Lean / janjarosz05/0kwas / Erdos1094Classify40.lean
Lean readerKwas/Erdos1094Classify40.lean
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.
import Kwas.Erdos1094K31import Kwas.Erdos1094K32import Kwas.Erdos1094K33import Kwas.Erdos1094K34import Kwas.Erdos1094K35import Kwas.Erdos1094K36import Kwas.Erdos1094K37import Kwas.Erdos1094K38import Kwas.Erdos1094K39import Kwas.Erdos1094K40/-! Erdős Problem 1094: the classification of exceptions extended to `k ≤ 40` (continues namespace Erdos1093). -/namespace Erdos1093/-- **Classification for `k ≤ 40`.** Every exception `(n, k)` of Erdős problem 1094 with `k ≤ 40`(and any `n`) is one of the 14 known exceptions. -/theorem exc_classification_40 {n k : ℕ} (he : (n, k) ∈ Exc) (hk : k ≤ 40) : (n, k) ∈ known14 := byrcases Nat.lt_or_ge k 31 with h | h· exact exc_classification he (by omega)· interval_cases k· exact absurd (exc_k31 he) (by simp)· exact absurd (exc_k32 he) (by simp)· exact absurd (exc_k33 he) (by simp)· exact absurd (exc_k34 he) (by simp)· exact absurd (exc_k35 he) (by simp)· exact absurd (exc_k36 he) (by simp)· exact absurd (exc_k37 he) (by simp)· exact absurd (exc_k38 he) (by simp)· exact absurd (exc_k39 he) (by simp)· exact absurd (exc_k40 he) (by simp)/-- **Exact classification for `k ≤ 40`**: for every `n`, `(n, k)` is an exception iff it is one of the 14. -/theorem exc_iff_of_le_40 {n k : ℕ} (hk : k ≤ 40) : (n, k) ∈ Exc ↔ (n, k) ∈ known14 :=⟨fun he => exc_classification_40 he hk, fun h => known14_subset h⟩/-- Any further exception has `k ≥ 41`. -/theorem new_exception_ge_41 {n k : ℕ} (he : (n, k) ∈ Exc) (hnew : (n, k) ∉ known14) : 41 ≤ k := byby_contra hexact hnew (exc_classification_40 he (by omega))end Erdos1093#print axioms Erdos1093.exc_iff_of_le_40#print axioms Erdos1093.new_exception_ge_41