Lean / janjarosz05/0kwas / Erdos1094K31.lean
Lean reader

Kwas/Erdos1094K31.lean

38 lines6 declarationsno sorryimports Kwas.Erdos1094Split

Lean 4 Web has Mathlib, so it can check files that import only Mathlib. This one also imports Kwas.Erdos1094Split, which it does not have: you can read it there, but it will not check. Build the project itself to check it.

  1. import Kwas.Erdos1094Split
  2. /-! Erdős Problem 1094: no exception with `k = 31` (kernel check in 4 parts). -/
  3. namespace Erdos1093
  4. theorem part31_0_0 : chkM ps 1 [(2, 4), (3, 3), (5, 2), (7, 1), (11, 1), (13, 1), (17, 1), (19, 1), (23, 1)] 31 [] = true := by decide +kernel
  5. theorem part31_0_1 : chkM ps 29 [(2, 4), (3, 3), (5, 2), (7, 1), (11, 1), (13, 1), (17, 1), (19, 1), (23, 1)] 31 [] = true := by decide +kernel
  6. theorem part31_1_0 : chkM ps 31 [(2, 4), (3, 3), (5, 2), (7, 1), (11, 1), (13, 1), (17, 1), (19, 1), (23, 1)] 31 [] = true := by decide +kernel
  7. theorem part31_1_1 : chkM ps 899 [(2, 4), (3, 3), (5, 2), (7, 1), (11, 1), (13, 1), (17, 1), (19, 1), (23, 1)] 31 [] = true := by decide +kernel
  8. theorem chk31 : chk ps [(31, 1), (29, 1), (2, 4), (3, 3), (5, 2), (7, 1), (11, 1), (13, 1), (17, 1), (19, 1), (23, 1)] 31 [] = true := by
  9. rw [← chkM_one]
  10. rw [chkM_cons, List.all_eq_true]
  11. intro j0 hj0
  12. rw [List.mem_range] at hj0
  13. interval_cases j0
  14. · rw [chkM_cons, List.all_eq_true]
  15. intro j1 hj1
  16. rw [List.mem_range] at hj1
  17. interval_cases j1
  18. · exact part31_0_0
  19. · exact part31_0_1
  20. · rw [chkM_cons, List.all_eq_true]
  21. intro j1 hj1
  22. rw [List.mem_range] at hj1
  23. interval_cases j1
  24. · exact part31_1_0
  25. · exact part31_1_1
  26. theorem exc_k31 {n : ℕ} (he : (n, 31) ∈ Exc) : n ∈ ([] : List ℕ) :=
  27. mem_known_of_chk (ps := ps) (l := [(31, 1), (29, 1), (2, 4), (3, 3), (5, 2), (7, 1), (11, 1), (13, 1), (17, 1), (19, 1), (23, 1)]) ps_prime (by decide +kernel) (by decide +kernel) chk31 he
  28. end Erdos1093