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

Kwas/Erdos1094Classify40.lean

46 lines3 declarationsno sorryimports Kwas.Erdos1094K31 Kwas.Erdos1094K32 Kwas.Erdos1094K33 Kwas.Erdos1094K34 Kwas.Erdos1094K35 Kwas.Erdos1094K36 +4

Lean 4 Web has Mathlib, so it can check files that import only Mathlib. This one also imports Kwas.Erdos1094K31, Kwas.Erdos1094K32, Kwas.Erdos1094K33, Kwas.Erdos1094K34 and more, 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.Erdos1094K31
  2. import Kwas.Erdos1094K32
  3. import Kwas.Erdos1094K33
  4. import Kwas.Erdos1094K34
  5. import Kwas.Erdos1094K35
  6. import Kwas.Erdos1094K36
  7. import Kwas.Erdos1094K37
  8. import Kwas.Erdos1094K38
  9. import Kwas.Erdos1094K39
  10. import Kwas.Erdos1094K40
  11. /-! Erdős Problem 1094: the classification of exceptions extended to `k ≤ 40` (continues namespace Erdos1093). -/
  12. namespace Erdos1093
  13. /-- **Classification for `k ≤ 40`.** Every exception `(n, k)` of Erdős problem 1094 with `k ≤ 40`
  14. (and any `n`) is one of the 14 known exceptions. -/
  15. theorem exc_classification_40 {n k : ℕ} (he : (n, k) ∈ Exc) (hk : k ≤ 40) : (n, k) ∈ known14 := by
  16. rcases Nat.lt_or_ge k 31 with h | h
  17. · exact exc_classification he (by omega)
  18. · interval_cases k
  19. · exact absurd (exc_k31 he) (by simp)
  20. · exact absurd (exc_k32 he) (by simp)
  21. · exact absurd (exc_k33 he) (by simp)
  22. · exact absurd (exc_k34 he) (by simp)
  23. · exact absurd (exc_k35 he) (by simp)
  24. · exact absurd (exc_k36 he) (by simp)
  25. · exact absurd (exc_k37 he) (by simp)
  26. · exact absurd (exc_k38 he) (by simp)
  27. · exact absurd (exc_k39 he) (by simp)
  28. · exact absurd (exc_k40 he) (by simp)
  29. /-- **Exact classification for `k ≤ 40`**: for every `n`, `(n, k)` is an exception iff it is one of the 14. -/
  30. theorem exc_iff_of_le_40 {n k : ℕ} (hk : k ≤ 40) : (n, k) ∈ Exc ↔ (n, k) ∈ known14 :=
  31. ⟨fun he => exc_classification_40 he hk, fun h => known14_subset h⟩
  32. /-- Any further exception has `k ≥ 41`. -/
  33. theorem new_exception_ge_41 {n k : ℕ} (he : (n, k) ∈ Exc) (hnew : (n, k) ∉ known14) : 41 ≤ k := by
  34. by_contra h
  35. exact hnew (exc_classification_40 he (by omega))
  36. end Erdos1093
  37. #print axioms Erdos1093.exc_iff_of_le_40
  38. #print axioms Erdos1093.new_exception_ge_41