Lean / janjarosz05/0kwas / Erdos1094Split.lean
Lean readerKwas/Erdos1094Split.lean
Lean 4 Web has Mathlib, so it can check files that import only Mathlib. This one also imports Kwas.Erdos1094Classify, which it does not have: you can read it there, but it will not check. Build the project itself to check it.
import Kwas.Erdos1094Classify/-! Erdős Problem 1094: the finite check of `Erdos1094Classify` split into parts with a fixed cofactor, so thatthe kernel evaluates each part separately (continues namespace Erdos1093). -/namespace Erdos1093/-- the check of `chk` restricted to the divisors `c * d`, `d ∈ divs l` -/def chkM (ps : List ℕ) (c : ℕ) (l : List (ℕ × ℕ)) (k : ℕ) (known : List ℕ) : Bool :=(divs l).all fun d => (List.range k).all fun i =>((c * d) % k != 0) || decide (c * d + i < 2 * k) || known.contains (c * d + i) || killB ps (c * d + i) ktheorem chkM_one (ps : List ℕ) (l : List (ℕ × ℕ)) (k : ℕ) (known : List ℕ) :chkM ps 1 l k known = chk ps l k known := bysimp [chkM, chk]theorem chkM_cons (ps : List ℕ) (c p e : ℕ) (t : List (ℕ × ℕ)) (k : ℕ) (known : List ℕ) :chkM ps c ((p, e) :: t) k known = (List.range (e + 1)).all fun j => chkM ps (c * p ^ j) t k known := bysimp only [chkM, divs, List.all_flatMap, List.all_map, Function.comp_def, mul_assoc]end Erdos1093