APNOutputs/ErdosProblems/erdos_12.parts.i.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: Google DeepMind published the AlphaProof Nexus proof artifacts. The pinned repository identifies the mathematical sources and collaborators, including OEIS, Erdős Problems, Gergely Bérczi, and Mario Krenn; those source records remain the authority for individual credit.
Project sources: Pinned AlphaProof Nexus results documentation, AlphaProof Nexus paper, Pinned human-written natural-language proof companions
80 declarations, 0 contain sorry, 0 declared as axioms
Imports (1)
FormalConjectures.Util.ProblemImports
- abbrev
Erdos12.IsGoodProperty P: no member divides the sum of two larger distinct members line 48 sourceSource documentation
A set
Ais "good" if it is infinite and there are no distincta,b,cinAsuch thata ∣ (b+c)andb > a,c > a.L4DEL explanation
divides the sum of two larger terms
IsGood Ameans thatAis infinite and whenevera,b,c ∈ A,a ∣ b+c,a<b, anda<c, the two larger terms must coincide. Equivalently, no three distinct members realize the forbidden divisibility pattern.- The conclusion
b = cis how the Lean predicate permits repeated use of one larger element while excluding a triple of distinct elements. - This is the formal version of the property introduced by Paul Erdős and András Sárközy; their ordered-sequence wording and the set-based Lean wording express the same restriction.
Sources and attribution: Pinned Lean source (0647711a7118), Paul Erdős and András Sárközy (1970), p. 97
no axioms what this means
Statement uses:
Set,NatProof uses:
And,Set.Infinite,Membership.mem,Dvd.dvd,HAdd.hAdd,LT.lt,Eq5 instances, coercions and auxiliary constants left out.
Also declared: APNOutputs/ErdosProblems/erdos_12.parts.ii.lean:48 (same declaration text).
abbrev IsGood (A : Set ℕ) : Prop := A.Infinite ∧ …
- The conclusion
- lemma
Erdos12.exists_prime_boundedFind a controlled next prime line 89 sourceL4DEL explanation
For every natural number
n, there is a primepwithn < p ≤ 2*n+2.- The case
n=0uses the prime2; otherwise Mathlib's Bertrand bound supplies a prime at most2*n. - This is the existence result used to define the prime sequence
q.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Exists,And,LT.lt,LE.le,HAdd.hAdd,HMul.hMul,OfNat.ofNat,Nat.PrimeProof uses:
Eq,Ne,Or,eq_or_ne,Exists.intro,And.intro,of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl,Nat.prime_two,Eq.symm,Nat.exists_prime_lt_and_le_two_mul,Decidable.byContradiction,Not21 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
lemma exists_prime_bounded (n : ℕ) : ∃ p, n < p ∧ p ≤ 2 * n + 2 ∧ p.Prime := by …
- The case
- def
Erdos12.qA recursively chosen increasing sequence of primes line 95 sourceL4DEL explanation
q 0 = 5; eachq (m+1)is a prime chosen strictly aboveq mbut no larger than2*q m+2.exists_prime_boundedsupplies the next prime using the Bertrand-type prime bound already available in Mathlib.- The lower bound gives new moduli for separating blocks, while the upper bound later controls their quantitative growth.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Erdos12.q.match_1,Unit,OfNat.ofNat,Nat.succ,Classical.choose,And,LT.lt,LE.le,HAdd.hAdd,HMul.hMul,Nat.Prime10 instances, coercions and auxiliary constants left out.
noncomputable def q : ℕ → ℕ | 0 => 5 | m + 1 => Classical.choose (exists_prime_bounded (q m))
Mentions: Erdos12.exists_prime_bounded
- lemma
Erdos12.q_primeEvery chosen modulus is prime line 99 sourceL4DEL explanation
Each value
q mis prime.- The base value is
5, and every successor is the witness selected byexists_prime_bounded.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Nat.Prime, Erdos12.qProof uses:
Nat.casesAuxOn,Eq,OfNat.ofNat,of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl,Eq.symm,HAdd.hAdd,And,LT.lt,Classical.choose,LE.le,HMul.hMul, Erdos12.exists_prime_bounded,Classical.choose_spec,And.right9 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
lemma q_prime (m : ℕ) : (q m).Prime := by …
Mentions: Erdos12.q
- The base value is
- lemma
Erdos12.q_gtSuccessive chosen primes strictly increase line 106 sourceL4DEL explanation
q m < q (m+1)for every block indexm.- This is the strict lower inequality carried by the witness selected in the recursive definition of
q.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt, Erdos12.q,HAdd.hAdd,OfNat.ofNatProof uses:
And,Classical.choose,LE.le,HMul.hMul,Nat.Prime, Erdos12.exists_prime_bounded,Classical.choose_spec,And.left11 instances, coercions and auxiliary constants left out.
Tactic trace: 2 steps
Open to load the checked before-and-after goal states.
lemma q_gt (m : ℕ) : q m < q (m + 1) := by …
Mentions: Erdos12.q
- This is the strict lower inequality carried by the witness selected in the recursive definition of
- lemma
Erdos12.q_ge_5Every chosen prime is at least five line 110 sourceL4DEL explanation
The increasing sequence
qnever falls below its initial value5.- Induction combines
q 0 = 5with the strict growth lemmaq_gt.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat, Erdos12.qProof uses:
Nat.recAux,of_decide_eq_true,id,Eq,Bool,Decidable.decide,Bool.true,Eq.refl,LT.lt,HAdd.hAdd, Erdos12.q_gt,Decidable.byContradiction,Not9 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
lemma q_ge_5 (m : ℕ) : 5 ≤ q m := by …
Mentions: Erdos12.q
- Induction combines
- def
Erdos12.KThe accumulated modulus from all earlier primes line 117 sourceL4DEL explanation
K 0 = 729 = 3^6, andK (m+1) = K m * q m.- Thus
K mis divisible by every earlierq jwithj<m, as well as by3. - Members of block
mwill be congruent to1moduloK m, which makes them congruent to1modulo each earlier prime.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
Erdos12.q.match_1,Unit,OfNat.ofNat,Nat.succ,HMul.hMul, Erdos12.q5 instances, coercions and auxiliary constants left out.
noncomputable def K : ℕ → ℕ | 0 => 729 | m + 1 => K m * q m
Mentions: Erdos12.q
- Thus
- def
Erdos12.PThe full period for block $m$ line 121 sourceL4DEL explanation
P m = K m * q m, combining the accumulated earlier-prime modulus with the block's new prime.- Because
K mandq mare coprime, the Chinese remainder theorem selects a residue modulo this product satisfying both block congruences. - The arithmetic progression enumerating block elements advances by
P m, so both congruences remain unchanged.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
HMul.hMul, Erdos12.K, Erdos12.q2 instances, coercions and auxiliary constants left out.
noncomputable def P (m : ℕ) : ℕ := K m * q m
- Because
- def
Erdos12.MThe rapidly growing scale separating the blocks line 123 sourceL4DEL explanation
M mis the eighth power ofP m.- The eighth power makes room for roughly fourth-power-many progression points while keeping each block inside
[M m, 2*M m]. - Since successive primes are at least five, the scales grow fast enough that one block ends before the next begins.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
HPow.hPow, Erdos12.P,OfNat.ofNat4 instances, coercions and auxiliary constants left out.
noncomputable def M (m : ℕ) : ℕ := (P m)^8
Mentions: Erdos12.P
- The eighth power makes room for roughly fourth-power-many progression points while keeping each block inside
- def
Erdos12.MyGoodSetThe Lean proof's congruence-block witness line 125 sourceL4DEL explanation
We will construct a sequence of “blocks” that individually cannot contain such a, b, c
MyGoodSetcontains a natural numbernwhen some block indexmplaces it nearM m, below a controlled progression cutoff, withn ≡ 1 (mod K m)andn ≡ 0 (mod q m).- The interval conditions are
M m ≤ n ≤ 2*M mand a sharper upper bound determined byP (m+1)^4/2progression steps of sizeP m. - This is the witness actually formalized in Lean. The linked human-written companion proves the same final theorem with a different base-2-to-base-3 block construction.
Sources and attribution: Pinned Lean source (0647711a7118), Human-written proof companion for Erdős 12(i)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Set,NatProof uses:
setOf,Exists,And,LE.le, Erdos12.M,HMul.hMul,OfNat.ofNat,LT.lt,HAdd.hAdd,HDiv.hDiv,HPow.hPow, Erdos12.P,Eq,HMod.hMod, Erdos12.K, Erdos12.q14 instances, coercions and auxiliary constants left out.
def MyGoodSet : Set ℕ := …
- The interval conditions are
- lemma
Erdos12.K_posThe accumulated modulus is positive line 129 sourceL4DEL explanation
K mis positive for every block index.K 0=729, and each successor multiplies a positive earlier value by the positive primeq m.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat, Erdos12.KProof uses:
Nat.recAux,of_decide_eq_true,id,Eq,Bool,Decidable.decide,Bool.true,Eq.refl, Erdos12.q,lt_of_not_ge,LE.le,Mathlib.Tactic.Linarith.lt_irrefl,Int,Eq.mp,HAdd.hAdd,HMul.hMul,Neg.neg,HSub.hSub,congrArg,Mathlib.Tactic.Ring.of_eqand 46 more82 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
lemma K_pos (m : ℕ) : 0 < K m := by …
Mentions: Erdos12.K
- lemma
Erdos12.P_posThe joint period is positive line 136 sourceL4DEL explanation
P m = K m*q mis always positive.- Positivity follows from
K_posand the lower boundq m≥5.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat, Erdos12.PProof uses:
Nat.mul_pos, Erdos12.K, Erdos12.q, Erdos12.K_pos,lt_of_not_ge,LE.le,Mathlib.Tactic.Linarith.lt_irrefl,Int,Eq.mp,HAdd.hAdd,HMul.hMul,Neg.neg,HSub.hSub,congrArg,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.add_congr,Int.rawCast,Int.negOfNat,HPow.hPow,Nat.rawCastand 43 more80 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma P_pos (m : ℕ) : 0 < P m := Nat.mul_pos (K_pos m) (by linarith [q_ge_5 m])
Mentions: Erdos12.P, Erdos12.K_pos, Erdos12.q_ge_5
- Positivity follows from
- lemma
Erdos12.M_succSuccessive block scales differ by an eighth power line 138 sourceL4DEL explanation
M (m+1) = M m * q (m+1)^8.- Since
P (m+1)=P m*q (m+1)andM=P^8, the identity follows by distributing the eighth power over multiplication.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq, Erdos12.M,HAdd.hAdd,OfNat.ofNat,HMul.hMul,HPow.hPow, Erdos12.qProof uses:
Trans.trans, Erdos12.P,rfl,Nat.mul_pow19 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma M_succ (m : ℕ) : M (m + 1) = M m * (q (m + 1))^8 := by …
- Since
- lemma
Erdos12.pow_eight_leEighth powers preserve order on naturals line 144 sourceL4DEL explanation
If
a≤b, thena^8≤b^8.- This elementary monotonicity lemma is used in the block-growth estimates.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,HPow.hPow,OfNat.ofNatProof uses:
pow_le_pow_left₀,zero_le22 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma pow_eight_le {a b : ℕ} (h : a ≤ b) : a^8 ≤ b^8 := by … - lemma
Erdos12.M_increasingConsecutive block scales are more than a factor of two apart line 147 sourceL4DEL explanation
M_increasing mproves2*M m < M (m+1).- The identity
M (m+1) = M m * q (m+1)^8reduces the claim to the fact that the next prime is at least five. - This strict separation prevents the intervals
[M m,2*M m]for different block indices from overlapping.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,HMul.hMul,OfNat.ofNat, Erdos12.M,HAdd.hAddProof uses:
Eq,HPow.hPow, Erdos12.q, Erdos12.M_succ,LE.le, Erdos12.q_ge_5,of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl, Erdos12.pow_eight_le,lt_of_not_ge,Mathlib.Tactic.Linarith.lt_irrefl,Int,Eq.mp,Neg.neg,HSub.hSub,congrArgand 74 more107 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.
lemma M_increasing (m : ℕ) : 2 * M m < M (m + 1) := by …
Mentions: Erdos12.M
- The identity
- lemma
Erdos12.M_monotoneBlock scales are monotone line 159 sourceL4DEL explanation
If
m1≤m2, thenM m1≤M m2.- Induction advances through
M_increasing, whose stronger conclusion says each next scale exceeds twice the previous one.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le, Erdos12.MProof uses:
Nat.recAux,OfNat.ofNat,Eq,Decidable.byContradiction,Not,Eq.mpr,id,congrArg,le_refl,HAdd.hAdd,Or,LT.lt,HMul.hMul, Erdos12.M_increasing,Eq.symm17 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.
lemma M_monotone {m1 m2 : ℕ} (h : m1 ≤ m2) : M m1 ≤ M m2 := by …Mentions: Erdos12.M
- Induction advances through
- lemma
Erdos12.m_le_of_ltNumerical order respects block order line 172 sourceL4DEL explanation
If
alies in blockma,blies in blockmb, anda<b, thenma≤mb.- If
mb<ma, then the factor-of-two separation puts the start of blockmaabove the end of blockmb, contradictinga<b. - The good-set proof uses this lemma to reduce all possible triples to later-block and same-block cases.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le, Erdos12.M,HMul.hMul,OfNat.ofNat,LT.ltProof uses:
Decidable.byContradiction,Not,HAdd.hAdd,Eq.mp, Erdos12.M_increasing, Erdos12.M_monotone19 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
lemma m_le_of_lt {a b ma mb : ℕ} (ha : M ma ≤ a) (_ : a ≤ 2 * M ma) (_ : M mb ≤ b) (hb2 : b ≤ 2 * M mb) (hab : a < b) : ma ≤ mb := by …Mentions: Erdos12.M
- If
- lemma
Erdos12.q_dvd_KEvery earlier prime is absorbed into later accumulated moduli line 181 sourceL4DEL explanation
When
ma<mb, the primeq madividesK mb.- The recursion
K (m+1)=K m*q minserts each chosen prime and preserves all earlier prime factors.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,Dvd.dvd, Erdos12.q, Erdos12.KProof uses:
Nat.recAux,OfNat.ofNat,Decidable.byContradiction,Not,HAdd.hAdd,Or,Eq,dvd_mul_of_dvd_left,Exists.intro,HMul.hMul,mul_comm22 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.
lemma q_dvd_K {ma mb : ℕ} (hma : ma < mb) : q ma ∣ K mb := by … - The recursion
- lemma
Erdos12.mod_q_of_ltA later block is $1$ modulo every earlier block prime line 192 sourceL4DEL explanation
If
b ≡ 1 (mod K mb)andma<mb, thenb ≡ 1 (mod q ma).q_dvd_Kproves that the earlier primeq madivides the later accumulated modulusK mb.- Reducing the block congruence through that divisibility transfers the residue
1to the earlier prime.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,HMod.hMod, Erdos12.K,OfNat.ofNat,LT.lt, Erdos12.qProof uses:
Dvd.dvd, Erdos12.q_dvd_K,HMul.hMul,HAdd.hAdd,HDiv.hDiv,Nat.div_add_mod,Trans.trans,Eq.symm,Eq.mp,congrArg,Eq.mpr,id,Eq.refl,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,HPow.hPow,Mathlib.Tactic.Ring.instCommSemiringNat,Mathlib.Tactic.Ring.add_congr,Mathlib.Tactic.Ring.mul_congr,Mathlib.Tactic.Ring.atom_pfand 21 more37 instances, coercions and auxiliary constants left out.
Tactic trace: 20 steps
Open to load the checked before-and-after goal states.
lemma mod_q_of_lt {b mb ma : ℕ} (hb : b % K mb = 1) (hma : ma < mb) : b % q ma = 1 := by … - lemma
Erdos12.q_div_aZero remainder gives divisibility by the block prime line 214 sourceL4DEL explanation
If
a mod q ma = 0, thenq madividesa.- This is the standard remainder characterization of divisibility.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,HMod.hMod, Erdos12.q,OfNat.ofNat,Dvd.dvdProof uses:
Nat.dvd_of_mod_eq_zero7 instances, coercions and auxiliary constants left out.
lemma q_div_a {a ma : ℕ} (ha : a % q ma = 0) : q ma ∣ a := Nat.dvd_of_mod_eq_zero haMentions: Erdos12.q
- lemma
Erdos12.K_mod_3Every accumulated modulus is divisible by three line 216 sourceL4DEL explanation
K m mod 3 = 0for everym.- The base
K 0=729=3^6is divisible by three, and multiplication by later primes preserves that factor.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,HMod.hMod, Erdos12.K,OfNat.ofNatProof uses:
Nat.recAux,of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl,HMul.hMul, Erdos12.q,Nat.mul_mod,Nat.zero_mul,Eq.mp,congrArg9 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
lemma K_mod_3 (m : ℕ) : K m % 3 = 0 := by …
Mentions: Erdos12.K
- The base
- lemma
Erdos12.mod_3_eq_1The block residue forces residue one modulo three line 226 sourceL4DEL explanation
If
n mod K m = 1, thenn mod 3 = 1.- Because
3dividesK m, writingnas a multiple ofK mplus one gives the claimed residue.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,HMod.hMod, Erdos12.K,OfNat.ofNatProof uses:
Dvd.dvd,Nat.dvd_of_mod_eq_zero, Erdos12.K_mod_3,HMul.hMul,HAdd.hAdd,HDiv.hDiv,Nat.div_add_mod,Trans.trans,Eq.symm,Eq.mp,congrArg,Eq.mpr,id,Eq.refl,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,HPow.hPow,Mathlib.Tactic.Ring.instCommSemiringNat,Mathlib.Tactic.Ring.add_congr,Mathlib.Tactic.Ring.mul_congrand 15 more34 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
lemma mod_3_eq_1 {n m : ℕ} (hn : n % K m = 1) : n % 3 = 1 := by …Mentions: Erdos12.K
- Because
- lemma
Erdos12.prime_dvd_KPrime factors of an accumulated modulus precede the current prime line 237 sourceL4DEL explanation
If a prime
pdividesK m, thenp<q m.- At
m=0, every prime factor of3^6is at most3<5; the successor step splits a prime divisor ofK m*q mbetween the two factors. - Strict growth of
qthen places either possible factor belowq (m+1).
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Nat.Prime,Dvd.dvd, Erdos12.K,LT.lt, Erdos12.qProof uses:
Nat.recAux,OfNat.ofNat,Eq,rfl,LE.le,HPow.hPow,Eq.mp,congrArg,Nat.Prime.dvd_of_dvd_pow,Nat.le_of_dvd,of_decide_eq_true,id,Bool,Decidable.decide,Bool.true,Eq.refl,lt_of_not_ge,Mathlib.Tactic.Linarith.lt_irrefl,Int,HAdd.hAddand 61 more92 instances, coercions and auxiliary constants left out.
Tactic trace: 25 steps
Open to load the checked before-and-after goal states.
lemma prime_dvd_K {p m : ℕ} (hp : p.Prime) (h : p ∣ K m) : p < q m := by … - At
- lemma
Erdos12.K_q_coprimeThe accumulated modulus and the new prime are coprime line 261 sourceL4DEL explanation
K_q_coprime mprovesNat.Coprime (K m) (q m).- Every prime divisor of
K mis smaller thanq m, whereasq mitself is prime. - This coprimality is the exact hypothesis needed to combine residues
1 mod K mand0 mod q mby the Chinese remainder theorem.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Nat.Coprime, Erdos12.K, Erdos12.qProof uses:
Dvd.dvd,Nat.gcd,Nat.gcd_dvd_right,Nat.Prime, Erdos12.q_prime,Or,Eq,OfNat.ofNat,Iff.mp,Nat.dvd_prime,Nat.gcd_dvd_left,LT.lt, Erdos12.prime_dvd_K,Eq.mp,congrArg,Decidable.byContradiction,Not6 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
lemma K_q_coprime (m : ℕ) : Nat.Coprime (K m) (q m) := by …
- Every prime divisor of
- lemma
Erdos12.K_ge_3The accumulated modulus is never smaller than three line 272 sourceL4DEL explanation
3≤K mfor every block index.- The base is
729, and the recursion only multiplies by primes at least five.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat, Erdos12.KProof uses:
Nat.recAux,of_decide_eq_true,id,Eq,Bool,Decidable.decide,Bool.true,Eq.refl,HAdd.hAdd,HMul.hMul, Erdos12.q,rfl,le_of_not_gt,LT.lt,Mathlib.Tactic.Linarith.lt_irrefl,Int,Eq.mp,Neg.neg,HSub.hSub,congrArgand 57 more81 instances, coercions and auxiliary constants left out.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
lemma K_ge_3 (m : ℕ) : 3 ≤ K m := by …
Mentions: Erdos12.K
- The base is
- lemma
Erdos12.P_dvd_MThe joint period divides the block scale line 282 sourceL4DEL explanation
P mdividesM m=P m^8.- Factor the eighth power as
P m^7 * P m.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Dvd.dvd, Erdos12.P, Erdos12.MProof uses:
Eq,HPow.hPow,OfNat.ofNat,rfl,HMul.hMul,Eq.mpr,id,congrArg,dvd_mul_left9 instances, coercions and auxiliary constants left out.
Tactic trace: 4 steps
Open to load the checked before-and-after goal states.
lemma P_dvd_M (m : ℕ) : P m ∣ M m := by …
- Factor the eighth power as
- lemma
Erdos12.K_dvd_PThe accumulated modulus divides the joint period line 288 sourceL4DEL explanation
K mdividesP mbecauseP m=K m*q m.Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Dvd.dvd, Erdos12.K, Erdos12.PProof uses:
Exists.intro,Eq,HMul.hMul, Erdos12.q,rfl3 instances, coercions and auxiliary constants left out.
lemma K_dvd_P (m : ℕ) : K m ∣ P m := ⟨q m, rfl⟩
- lemma
Erdos12.q_dvd_PThe current prime divides the joint period line 290 sourceL4DEL explanation
q mdividesP mbecauseP m=K m*q m.Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Dvd.dvd, Erdos12.q, Erdos12.PProof uses:
Exists.intro,Eq,HMul.hMul, Erdos12.K,mul_comm7 instances, coercions and auxiliary constants left out.
lemma q_dvd_P (m : ℕ) : q m ∣ P m := ⟨K m, mul_comm (K m) (q m)⟩
- lemma
Erdos12.K_dvd_MThe accumulated modulus divides the block scale line 292 sourceL4DEL explanation
K mdividesM m.- Divisibility passes through
K m ∣ P mandP m ∣ M m.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Dvd.dvd, Erdos12.K, Erdos12.MProof uses:
dvd_trans, Erdos12.P, Erdos12.K_dvd_P, Erdos12.P_dvd_M2 instances, coercions and auxiliary constants left out.
lemma K_dvd_M (m : ℕ) : K m ∣ M m := dvd_trans (K_dvd_P m) (P_dvd_M m)
Mentions: Erdos12.K, Erdos12.M, Erdos12.K_dvd_P, Erdos12.P_dvd_M
- Divisibility passes through
- lemma
Erdos12.q_dvd_MThe current prime divides the block scale line 294 sourceL4DEL explanation
q mdividesM m.- Divisibility passes through
q m ∣ P mandP m ∣ M m.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Dvd.dvd, Erdos12.q, Erdos12.MProof uses:
dvd_trans, Erdos12.P, Erdos12.q_dvd_P, Erdos12.P_dvd_M2 instances, coercions and auxiliary constants left out.
lemma q_dvd_M (m : ℕ) : q m ∣ M m := dvd_trans (q_dvd_P m) (P_dvd_M m)
Mentions: Erdos12.q, Erdos12.M, Erdos12.q_dvd_P, Erdos12.P_dvd_M
- Divisibility passes through
- lemma
Erdos12.pow_four_leFourth powers preserve order on naturals line 296 sourceL4DEL explanation
If
a≤b, thena^4≤b^4.- This elementary monotonicity lemma supports the quantitative block estimates.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,HPow.hPow,OfNat.ofNatProof uses:
pow_le_pow_left₀,zero_le22 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma pow_four_le {a b : ℕ} (h : a ≤ b) : a^4 ≤ b^4 := by gcongr - def
Erdos12.r_valA Chinese-remainder solution for the two block residues line 298 sourceL4DEL explanation
r_val mselects the natural-number representative produced by the Chinese remainder theorem for residue1moduloK mand residue0moduloq m.- Existence depends on
K_q_coprime m. - The definition is noncomputable because it chooses a representative from an existence theorem; the surrounding proof needs its specification, not an extraction algorithm.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
And,Nat.ModEq, Erdos12.K,OfNat.ofNat, Erdos12.q,Nat.chineseRemainder, Erdos12.K_q_coprime2 instances, coercions and auxiliary constants left out.
noncomputable def r_val (m : ℕ) : ℕ := (Nat.chineseRemainder (K_q_coprime m) 1 0).val
Mentions: Erdos12.K_q_coprime
- Existence depends on
- def
Erdos12.x_valThe canonical block offset modulo the full period line 300 sourceL4DEL explanation
x_val mreducesr_val mmoduloP m = K m*q m.- Consequently
x_val m < P m, which keeps the first progression point close to the block's base scale. - Because both
K mandq mdivideP m, reduction moduloP mpreserves the two Chinese-remainder congruences.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
HMod.hMod, Erdos12.r_val, Erdos12.P2 instances, coercions and auxiliary constants left out.
noncomputable def x_val (m : ℕ) : ℕ := (r_val m) % P m
Mentions: Erdos12.r_val, Erdos12.P
- Consequently
- lemma
Erdos12.x_val_lt_PChoose the canonical residue below one period line 302 sourceL4DEL explanation
x_val mis strictly smaller thanP m.- By definition it is the remainder of
r_val mmodulo the positive numberP m.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt, Erdos12.x_val, Erdos12.PProof uses:
Nat.mod_lt, Erdos12.r_val, Erdos12.P_pos1 instances, coercions and auxiliary constants left out.
lemma x_val_lt_P (m : ℕ) : x_val m < P m := Nat.mod_lt _ (P_pos m)
Mentions: Erdos12.x_val, Erdos12.P, Erdos12.P_pos
- By definition it is the remainder of
- lemma
Erdos12.x_val_mod_KThe canonical offset is $1$ modulo the accumulated modulus line 304 sourceL4DEL explanation
x_val_mod_K mestablishesx_val m % K m = 1.- It combines the Chinese-remainder specification of
r_valwith the fact thatK m ∣ P m. - Adding multiples of
P mtherefore keeps every enumerated block element at residue one moduloK m.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,HMod.hMod, Erdos12.x_val, Erdos12.K,OfNat.ofNatProof uses:
Nat.ModEq, Erdos12.r_val,And.left,And, Erdos12.q,Nat.chineseRemainder, Erdos12.K_q_coprime,Subtype.property,LE.le, Erdos12.K_ge_3,Nat.mod_eq_of_lt,lt_of_not_ge,Mathlib.Tactic.Linarith.lt_irrefl,Int,Eq.mp,LT.lt,HAdd.hAdd,HMul.hMul,Neg.neg,HSub.hSuband 56 more80 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
lemma x_val_mod_K (m : ℕ) : (x_val m) % K m = 1 := by …
Mentions: Erdos12.x_val, Erdos12.K
- It combines the Chinese-remainder specification of
- lemma
Erdos12.x_val_mod_qThe canonical offset is $0$ modulo the block's new prime line 314 sourceL4DEL explanation
x_val_mod_q mestablishesx_val m % q m = 0.- It transfers the second Chinese-remainder congruence through reduction modulo
P m, usingq m ∣ P m. - Every point in block
mwill consequently be divisible byq m.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Eq,HMod.hMod, Erdos12.x_val, Erdos12.q,OfNat.ofNatProof uses:
Nat.ModEq, Erdos12.r_val,And.right, Erdos12.K,And,Nat.chineseRemainder, Erdos12.K_q_coprime,Subtype.property,Nat.zero_mod, Erdos12.P,Nat.mod_mod_of_dvd, Erdos12.q_dvd_P,Eq.mp,congrArg7 instances, coercions and auxiliary constants left out.
Tactic trace: 7 steps
Open to load the checked before-and-after goal states.
lemma x_val_mod_q (m : ℕ) : (x_val m) % q m = 0 := by …
Mentions: Erdos12.x_val, Erdos12.q
- It transfers the second Chinese-remainder congruence through reduction modulo
- lemma
Erdos12.exists_good_in_blockEvery block contains at least one admissible residue line 323 sourceL4DEL explanation
For each
m, somenlies in themth block and satisfiesn ≡ 1 (mod K m)andn ≡ 0 (mod q m).- The Chinese remainder theorem supplies a residue
x<P msatisfying both congruences becauseK mandq mare coprime. - Taking
n=M m+xpreserves those residues because both moduli divideM m; the size estimates placenwithin the required block cutoff.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Exists,And,LE.le, Erdos12.M,HMul.hMul,OfNat.ofNat,LT.lt,HAdd.hAdd,HDiv.hDiv,HPow.hPow, Erdos12.P,Eq,HMod.hMod, Erdos12.K, Erdos12.qProof uses:
Nat.Coprime, Erdos12.K_q_coprime,Subtype,Nat.ModEq,Nat.chineseRemainder,And.left,Subtype.property,And.right, Erdos12.K_ge_3,Nat.mod_eq_of_lt,lt_of_not_ge,Mathlib.Tactic.Linarith.lt_irrefl,Int,Eq.mp,Neg.neg,HSub.hSub,congrArg,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.add_congr,Nat.rawCastand 99 more120 instances, coercions and auxiliary constants left out.
Tactic trace: 62 steps
Open to load the checked before-and-after goal states.
lemma exists_good_in_block (m : ℕ) : ∃ n, M m ≤ n ∧ n ≤ 2 * M m ∧ n < M m + (P (m + 1)^4 / 2) * P m ∧ n % K m = 1 ∧ n % q m = 0 := by …
- The Chinese remainder theorem supplies a residue
- lemma
Erdos12.M_gt_mBlock scales eventually dominate their indices immediately line 383 sourceL4DEL explanation
Every index satisfies
m<M m.- The base scale is positive, and
M_increasingmore than doubles the scale at each successor.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt, Erdos12.MProof uses:
Nat.recAux,Eq,OfNat.ofNat,HPow.hPow, Erdos12.P,rfl,LE.le, Erdos12.P_pos, Erdos12.pow_eight_le,Trans.trans,Eq.symm,lt_of_not_ge,Mathlib.Tactic.Linarith.lt_irrefl,Int,Eq.mp,HAdd.hAdd,Neg.neg,HSub.hSub,congrArg,Mathlib.Tactic.Ring.of_eqand 75 more91 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
lemma M_gt_m (m : ℕ) : m < M m := by …
Mentions: Erdos12.M
- The base scale is positive, and
- lemma
Erdos12.my_good_set_infiniteThe congruence-block witness is infinite line 398 sourceL4DEL explanation
Beyond every natural bound
N, the proof constructs a member ofMyGoodSetin blockN+1.exists_good_in_blocksupplies a number with the block inequalities and both required residues.M_gt_mplaces that number aboveN, yielding the standard unboundedness characterization of an infinite set of naturals.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Set.Infinite,Nat, Erdos12.MyGoodSetProof uses:
Eq.mpr,Exists,And,Membership.mem,Set,LT.lt,id,Eq,congrArg,propext,Set.infinite_iff_exists_gt,LE.le, Erdos12.M,HAdd.hAdd,OfNat.ofNat,HMul.hMul,HDiv.hDiv,HPow.hPow, Erdos12.P,HMod.hModand 65 more95 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.
lemma my_good_set_infinite : MyGoodSet.Infinite := by …
- lemma
Erdos12.my_good_set_is_goodThe congruences exclude every forbidden divisibility triple line 409 sourceL4DEL explanation
my_good_set_is_goodproves thatMyGoodSetis infinite and satisfies property P.- If one larger term lies in a later block, it is
1 mod q ma; the other larger term is0or1 mod q ma, so their sum cannot be divisible byq ma, whileais divisible by that prime. - If all three terms lie in the same block, interval bounds force
(b+c)/ato be3or4. Every block member is1 mod 3, but neither multiplier gives the required residue2 mod 3forb+c. - This is a complete congruence proof internal to the Lean file; it does not invoke the companion PDF's base-3 progression-free map.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses: Erdos12.IsGood, Erdos12.MyGoodSet
Proof uses:
And.intro,Set.Infinite,Nat,Membership.mem,Set,Dvd.dvd,HAdd.hAdd,LT.lt,Eq, Erdos12.my_good_set_infinite,And,LE.le, Erdos12.M,HMul.hMul,OfNat.ofNat,HDiv.hDiv,HPow.hPow, Erdos12.P,HMod.hMod, Erdos12.K and 99 more117 instances, coercions and auxiliary constants left out.
Tactic trace: 138 steps
Open to load the checked before-and-after goal states.
lemma my_good_set_is_good : IsGood MyGoodSet := by …
Mentions: Erdos12.IsGood, Erdos12.MyGoodSet
- If one larger term lies in a later block, it is
- def
Erdos12.f_valEnumerate the arithmetic progression inside one block line 519 sourceL4DEL explanation
f_val m i = M m + x_val m + i*P mis theith candidate in blockm.M mandP mare divisible by bothK mandq m, whilex_val mhas residues one and zero respectively.- Varying
itherefore produces distinct candidates with exactly the congruences required byMyGoodSet.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
HAdd.hAdd, Erdos12.M, Erdos12.x_val,HMul.hMul, Erdos12.P4 instances, coercions and auxiliary constants left out.
noncomputable def f_val (m i : ℕ) : ℕ := M m + x_val m + i * P m
Mentions: Erdos12.M, Erdos12.x_val, Erdos12.P
- lemma
Erdos12.P_le_MOne period fits inside its block scale line 521 sourceL4DEL explanation
P m≤M m=P m^8.- Positivity of
P mmakes the seventh-power multiplier at least one.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le, Erdos12.P, Erdos12.MProof uses:
Eq,HMul.hMul,HPow.hPow,OfNat.ofNat,rfl, Erdos12.P_pos,pow_le_pow_left₀,le_of_lt,Mathlib.Meta.Positivity.pos_of_isNat,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Bool,Nat.ble,Nat.mul_le_mul_right,le_of_not_gt,LT.lt,Mathlib.Tactic.Linarith.lt_irrefl,Int,Eq.mp,HAdd.hAddand 66 more89 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
lemma P_le_M (m : ℕ) : P m ≤ M m := by …
- Positivity of
- lemma
Erdos12.q_bound_leAn exponential upper bound for the chosen primes line 530 sourceL4DEL explanation
q m+2 ≤ 7*2^m.- Each selected prime is at most
2*q m+2, so the shifted quantityq m+2at most doubles at every step.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,HAdd.hAdd, Erdos12.q,OfNat.ofNat,HMul.hMul,HPow.hPowProof uses:
Nat.recAux,of_decide_eq_true,id,Eq,Bool,Decidable.decide,Bool.true,Eq.refl,And.left,Classical.choose,And,LT.lt,Nat.Prime, Erdos12.exists_prime_bounded,And.right,Classical.choose_spec,Decidable.byContradiction,Not,Nat.mul_le_mul_left,Mathlib.Tactic.Ring.of_eqand 26 more37 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
lemma q_bound_le (m : ℕ) : q m + 2 ≤ 7 * 2^m := by …
Mentions: Erdos12.q
- Each selected prime is at most
- lemma
Erdos12.P_lower_boundAn exponential lower bound for the joint periods line 540 sourceL4DEL explanation
3645*5^m ≤ P m.- The base value is exactly
3645, and every successor multiplies by a prime at least five.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,HMul.hMul,OfNat.ofNat,HPow.hPow, Erdos12.PProof uses:
Nat.recAux,Eq,rfl,Decidable.byContradiction,Not,HAdd.hAdd, Erdos12.q, Erdos12.q_ge_5,Nat.mul_le_mul,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Mathlib.Tactic.Ring.instCommSemiringNat,Mathlib.Tactic.Ring.mul_congr,Mathlib.Tactic.Ring.cast_pos,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Mathlib.Tactic.Ring.pow_congr,Mathlib.Tactic.Ring.atom_pf,Mathlib.Tactic.Ring.pow_add,Mathlib.Tactic.Ring.single_powand 17 more34 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
lemma P_lower_bound (m : ℕ) : 3645 * 5^m ≤ P m := by …
Mentions: Erdos12.P
- The base value is exactly
- lemma
Erdos12.q_pow_four_bound_helperCompare the explicit exponential envelopes line 552 sourceL4DEL explanation
38416*16^m ≤ 48427561125*125^m.- The base case is numerical; induction preserves the inequality because the left side grows by
16while the right side grows by125.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,HMul.hMul,OfNat.ofNat,HPow.hPowProof uses:
Nat.recAux,of_decide_eq_true,id,Eq,Bool,Decidable.decide,Bool.true,Eq.refl,HAdd.hAdd,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Mathlib.Tactic.Ring.instCommSemiringNat,Mathlib.Tactic.Ring.mul_congr,Mathlib.Tactic.Ring.cast_pos,Mathlib.Meta.NormNum.isNat_ofNat,Mathlib.Tactic.Ring.pow_congr,Mathlib.Tactic.Ring.add_congr,Mathlib.Tactic.Ring.atom_pf,Mathlib.Tactic.Ring.add_pf_add_gt,Mathlib.Tactic.Ring.add_pf_add_zeroand 21 more33 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
lemma q_pow_four_bound_helper (m : ℕ) : 38416 * 16^m ≤ 48427561125 * 125^m := by …
- The base case is numerical; induction preserves the inequality because the left side grows by
- lemma
Erdos12.q_pow_four_boundThe next prime grows slowly relative to the current period line 563 sourceL4DEL explanation
The inequality
q (m+1)^4 ≤ P m^3supplies the quantitative room needed to fit many progression points into blockm.- The proof combines the recursive upper bound
q m + 2 ≤ 7*2^mwith the lower bound3645*5^m ≤ P m. - Raising those estimates to the relevant powers reduces the comparison to an explicit exponential inequality.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,HPow.hPow, Erdos12.q,HAdd.hAdd,OfNat.ofNat, Erdos12.PProof uses:
HMul.hMul, Erdos12.q_bound_le,Decidable.byContradiction,Not, Erdos12.P_lower_bound,pow_le_pow_left₀,zero_le,le_of_lt,mul_pos,Mathlib.Meta.Positivity.pos_of_isNat,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Bool,Nat.ble,pow_pos,Eq,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Mathlib.Tactic.Ring.instCommSemiringNat,Mathlib.Tactic.Ring.pow_congrand 42 more59 instances, coercions and auxiliary constants left out.
Tactic trace: 33 steps
Open to load the checked before-and-after goal states.
lemma q_pow_four_bound (m : ℕ) : q (m + 1) ^ 4 ≤ P m ^ 3 := by …
- The proof combines the recursive upper bound
- lemma
Erdos12.f_val_boundProgression offsets occupy at most half a block line 596 sourceL4DEL explanation
If
i≤P (m+1)^4/2, theni*P m≤M m/2.- Expand
P (m+1)^4asP m^4*q (m+1)^4and useq (m+1)^4≤P m^3. - The resulting seventh power, after multiplying by
P m, is exactlyM m=P m^8.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,HDiv.hDiv,HPow.hPow, Erdos12.P,HAdd.hAdd,OfNat.ofNat,HMul.hMul, Erdos12.MProof uses:
Decidable.byContradiction,Not,Eq, Erdos12.q,rfl,Eq.mpr,id,congrArg,Nat.mul_pow,Eq.refl, Erdos12.q_pow_four_bound,Trans.trans,Nat.mul_le_mul_left,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Mathlib.Tactic.Ring.instCommSemiringNat,Mathlib.Tactic.Ring.mul_congr,Mathlib.Tactic.Ring.pow_congr,Mathlib.Tactic.Ring.atom_pf,Mathlib.Tactic.Ring.cast_posand 60 more99 instances, coercions and auxiliary constants left out.
Tactic trace: 17 steps
Open to load the checked before-and-after goal states.
lemma f_val_bound (m i : ℕ) (hi : i ≤ (P (m + 1))^4 / 2) : i * P m ≤ M m / 2 := by …
- Expand
- lemma
Erdos12.P_le_M_halfEven one full period fits inside half a block line 613 sourceL4DEL explanation
P m≤M m/2.- Since
P m≥15, its seventh power is at least two, so2*P m≤P m^8=M m.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le, Erdos12.P,HDiv.hDiv, Erdos12.M,OfNat.ofNatProof uses:
Eq,HMul.hMul,HPow.hPow,rfl,LT.lt, Erdos12.P_pos, Erdos12.K, Erdos12.K_ge_3, Erdos12.q, Erdos12.q_ge_5,Nat.mul_le_mul,Decidable.byContradiction,Not,Trans.trans,Nat.le_mul_of_pos_right,pow_pos,Mathlib.Tactic.Ring.of_eq,HAdd.hAdd,Nat.rawCast,Mathlib.Tactic.Ring.instCommSemiringNatand 26 more41 instances, coercions and auxiliary constants left out.
Tactic trace: 17 steps
Open to load the checked before-and-after goal states.
lemma P_le_M_half (m : ℕ) : P m ≤ M m / 2 := by …
- Since
- lemma
Erdos12.f_val_in_good_setEvery bounded progression index produces a valid block member line 631 sourceL4DEL explanation
For
i < P (m+1)^4/2, the pointf_val m ibelongs toMyGoodSet ∩ [M m,2*M m].- Growth estimates bound
i*P mbyM m/2, whilex_val m<P m≤M m/2, placing the point inside the block interval and below the sharper cutoff. - Divisibility of
M mandP mpreservesx_val's residues, proving the membership congruences.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,HDiv.hDiv,HPow.hPow, Erdos12.P,HAdd.hAdd,OfNat.ofNat,Membership.mem,Set,Inter.inter, Erdos12.MyGoodSet,Set.Icc, Erdos12.M,HMul.hMul, Erdos12.f_valProof uses:
And.intro,Exists.intro,And,LE.le,Eq,HMod.hMod, Erdos12.K, Erdos12.q,id,Decidable.byContradiction, Erdos12.x_val,Not, Erdos12.P_le_M_half, Erdos12.f_val_bound, Erdos12.x_val_lt_P,Nat.mul_le_mul_right,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Mathlib.Tactic.Ring.instCommSemiringNat,Mathlib.Tactic.Ring.add_congrand 35 more59 instances, coercions and auxiliary constants left out.
Tactic trace: 85 steps
Open to load the checked before-and-after goal states.
lemma f_val_in_good_set (m i : ℕ) (hi : i < (P (m + 1))^4 / 2) : f_val m i ∈ MyGoodSet ∩ Set.Icc (M m) (2 * M m) := by …
Mentions: Erdos12.P, Erdos12.f_val, Erdos12.MyGoodSet, Erdos12.M
- Growth estimates bound
- lemma
Erdos12.f_val_injDistinct progression indices give distinct block members line 708 sourceL4DEL explanation
The map
i ↦ f_val m iis injective on the permitted index interval.- Equality cancels the common block offset and leaves
i*P m=j*P m; positivity ofP mpermits cancellation.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Set.InjOn, Erdos12.f_val,Set.Ico,OfNat.ofNat,HDiv.hDiv,HPow.hPow, Erdos12.P,HAdd.hAddProof uses:
Membership.mem,Set,Eq,HMul.hMul,Decidable.byContradiction,Not,LT.lt, Erdos12.P_pos,Nat.eq_of_mul_eq_mul_right24 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
lemma f_val_inj (m : ℕ) : Set.InjOn (f_val m) (Set.Ico 0 ((P (m + 1))^4 / 2)) := by …
Mentions: Erdos12.f_val, Erdos12.P
- Equality cancels the common block offset and leaves
- lemma
Erdos12.finset_coe_ncardSet cardinality agrees with finite-set cardinality line 715 sourceL4DEL explanation
Viewing a finite set
sas aSetdoes not change its number of elements.- This bridge lets the counting proof move between
Finset.cardandSet.ncard.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Finset,Eq,Nat,Set.ncard,Finset.cardProof uses:
of_eq_true,Eq.trans,True,congrArg,Set.ncard_coe_finset,eq_self4 instances, coercions and auxiliary constants left out.
Tactic trace: 1 steps
Open to load the checked before-and-after goal states.
lemma finset_coe_ncard {α : Type*} (s : Finset α) : (s : Set α).ncard = s.card := by … - This bridge lets the counting proof move between
- lemma
Erdos12.good_set_inter_finiteA bounded slice of the witness set is finite line 718 sourceL4DEL explanation
MyGoodSet ∩ [M m,2*M m]is finite.- It is a subset of the finite natural-number interval
[M m,2*M m].
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Set.Finite,Inter.inter,Set, Erdos12.MyGoodSet,Set.Icc, Erdos12.M,HMul.hMul,OfNat.ofNatProof uses:
HasSubset.Subset,Membership.mem,And.right,Set.finite_Icc,Set.Finite.subset13 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
lemma good_set_inter_finite (m : ℕ) : (MyGoodSet ∩ Set.Icc (M m) (2 * M m)).Finite := by …
Mentions: Erdos12.MyGoodSet, Erdos12.M
- It is a subset of the finite natural-number interval
- lemma
Erdos12.count_intervalEach block contains at least half a fourth power of points line 723 sourceL4DEL explanation
Block
mcontains at leastP (m+1)^4/2members ofMyGoodSetbetweenM mand2*M m.- The indices
0 ≤ i < P (m+1)^4/2map into the block byf_val_in_good_set. f_val_injshows that different indices give different natural numbers, so the image cardinality supplies the lower bound.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,HDiv.hDiv,HPow.hPow, Erdos12.P,HAdd.hAdd,OfNat.ofNat,Set.ncard,Inter.inter,Set, Erdos12.MyGoodSet,Set.Icc, Erdos12.M,HMul.hMulProof uses:
Eq,Finset.card,Finset.Ico,Nat.card_Ico,Membership.mem,Finset, Erdos12.f_val,Set.Ico,LT.lt,And.right,Iff.mp,And,Finset.mem_Ico,And.intro,Decidable.byContradiction,Not, Erdos12.f_val_inj, Erdos12.f_val_in_good_set,Finset.image,Eq.mprand 11 more42 instances, coercions and auxiliary constants left out.
Tactic trace: 35 steps
Open to load the checked before-and-after goal states.
lemma count_interval (m : ℕ) : P (m + 1) ^ 4 / 2 ≤ (MyGoodSet ∩ Set.Icc (M m) (2 * M m)).ncard := by …
Mentions: Erdos12.P, Erdos12.MyGoodSet, Erdos12.M
- The indices
- lemma
Erdos12.density_ineq_xA floor-division estimate beyond ten line 764 sourceL4DEL explanation
For
x≥10, the inequality8*x≤9*(x/2)^2holds in natural arithmetic.- The proof controls the remainder modulo two and reduces the claim to a quadratic inequality in
x/2.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,HMul.hMul,HPow.hPow,HDiv.hDivProof uses:
Eq,HAdd.hAdd,HMod.hMod,Nat.div_add_mod,Decidable.byContradiction,Not,GE.ge,le_of_not_gt,LT.lt,Mathlib.Tactic.Linarith.lt_irrefl,Int,Eq.mp,Neg.neg,HSub.hSub,congrArg,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.add_congr,Nat.rawCast,Mathlib.Meta.NormNum.instAddMonoidWithOne,Mathlib.Tactic.Ring.instCommSemiringNatand 75 more120 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
lemma density_ineq_x {x : ℕ} (hx : 10 ≤ x) : 8 * x ≤ 9 * (x / 2)^2 := by … - The proof controls the remainder modulo two and reduces the claim to a quadratic inequality in
- lemma
Erdos12.density_ineq_x_sqA squared floor-division estimate beyond twenty line 770 sourceL4DEL explanation
For
x≥20, the inequality2*x^2≤9*(x/2)^2holds.- As in
density_ineq_x, the proof accounts explicitly for the possible remainder when dividing by two.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,HMul.hMul,HPow.hPow,HDiv.hDivProof uses:
Eq,HAdd.hAdd,HMod.hMod,Nat.div_add_mod,Decidable.byContradiction,Not,GE.ge,le_of_not_gt,LT.lt,Mathlib.Tactic.Linarith.lt_irrefl,Int,Eq.mp,Neg.neg,HSub.hSub,congrArg,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.add_congr,Nat.rawCast,Mathlib.Meta.NormNum.instAddMonoidWithOne,Mathlib.Tactic.Ring.instCommSemiringNatand 75 more120 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
lemma density_ineq_x_sq {x : ℕ} (hx : 20 ≤ x) : 2 * x^2 ≤ 9 * (x / 2)^2 := by … - As in
- lemma
Erdos12.density_helper_powThe density envelopes separate exponentially line 776 sourceL4DEL explanation
2151296*32^(m+6) ≤ 3375*125^(m+6).- The base inequality is checked directly, then induction uses the growth-rate comparison
32≤125.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,HMul.hMul,OfNat.ofNat,HPow.hPow,HAdd.hAddProof uses:
Nat.recAux,of_decide_eq_true,id,Eq,Bool,Decidable.decide,Bool.true,Eq.refl,Decidable.byContradiction,Not,Eq.mpr,congrArg,pow_add,pow_one,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Mathlib.Tactic.Ring.instCommSemiringNat,Mathlib.Tactic.Ring.mul_congr,Mathlib.Tactic.Ring.cast_pos,Mathlib.Meta.NormNum.isNat_ofNatand 29 more40 instances, coercions and auxiliary constants left out.
Tactic trace: 17 steps
Open to load the checked before-and-after goal states.
lemma density_helper_pow (m : ℕ) : 2151296 * 32^(m + 6) ≤ 3375 * 125^(m + 6) := by …
- The base inequality is checked directly, then induction uses the growth-rate comparison
- lemma
Erdos12.density_ineq_q_helperCompare prime-growth and period-growth envelopes line 793 sourceL4DEL explanation
For
m≥6,4*(7*2^(m+1))^5 ≤ (15*5^m)^3.- Writing
m=k+6converts both sides to the exponential forms compared bydensity_helper_pow.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,HMul.hMul,HPow.hPow,HAdd.hAddProof uses:
Exists,Eq,Exists.intro,HSub.hSub,Decidable.byContradiction,Not,Eq.mpr,id,congrArg,pow_add,pow_one,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Mathlib.Tactic.Ring.instCommSemiringNat,Mathlib.Tactic.Ring.pow_congr,Mathlib.Tactic.Ring.mul_congr,Mathlib.Tactic.Ring.cast_pos,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Mathlib.Tactic.Ring.add_congrand 31 more46 instances, coercions and auxiliary constants left out.
Tactic trace: 26 steps
Open to load the checked before-and-after goal states.
lemma density_ineq_q_helper (m : ℕ) (hm : 6 ≤ m) : 4 * (7 * 2^(m + 1))^5 ≤ (15 * 5^m)^3 := by …
- Writing
- lemma
Erdos12.density_ineq_qBound the fifth power of the next prime line 821 sourceL4DEL explanation
For
m≥6,4*q (m+1)^5≤P m^3.- The upper envelope for
qand lower envelope forPreduce the claim todensity_ineq_q_helper.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,OfNat.ofNat,HMul.hMul,HPow.hPow, Erdos12.q,HAdd.hAdd, Erdos12.PProof uses: Erdos12.q_bound_le,
Decidable.byContradiction,Not,pow_le_pow_left₀,zero_le, Erdos12.P_lower_bound,le_of_not_gt,LT.lt,Mathlib.Tactic.Linarith.lt_irrefl,Int,Eq.mp,Neg.neg,HSub.hSub,congrArg,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.add_congr,Int.rawCast,Int.negOfNat,Nat.rawCast,Mathlib.Tactic.Ring.instCommSemiringNatand 64 more112 instances, coercions and auxiliary constants left out.
Tactic trace: 12 steps
Open to load the checked before-and-after goal states.
lemma density_ineq_q (m : ℕ) (hm : 6 ≤ m) : 4 * (q (m + 1))^5 ≤ P m ^ 3 := by …
- The upper envelope for
- lemma
Erdos12.density_ineqThe next scale is controlled by the square of the block count line 831 sourceL4DEL explanation
density_ineq mproves2*M (m+1) ≤ 9*(P (m+1)^4/2)^2.- Since
M (m+1)=P (m+1)^8, the right-hand side is a constant multiple of the same eighth power after accounting for integer division by two. - This inequality converts the block cardinality lower bound into a uniform lower bound after division by
√N.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,HMul.hMul,OfNat.ofNat, Erdos12.M,HAdd.hAdd,HPow.hPow,HDiv.hDiv, Erdos12.PProof uses:
Eq,rfl,Eq.mpr,id,congrArg, Erdos12.K, Erdos12.K_ge_3, Erdos12.q, Erdos12.q_ge_5,le_of_not_gt,LT.lt,Mathlib.Tactic.Linarith.lt_irrefl,Int,Eq.mp,Neg.neg,HSub.hSub,Mathlib.Tactic.Ring.of_eq,Mathlib.Tactic.Ring.add_congr,Nat.rawCast,Mathlib.Tactic.Ring.instCommSemiringNatand 77 more125 instances, coercions and auxiliary constants left out.
Tactic trace: 16 steps
Open to load the checked before-and-after goal states.
lemma density_ineq (m : ℕ) : 2 * M (m + 1) ≤ 9 * (P (m + 1) ^ 4 / 2) ^ 2 := by …
- Since
- lemma
Erdos12.exists_M_intervalLocate every sufficiently large $N$ between consecutive block scales line 847 sourceL4DEL explanation
For
N≥M 7, there is anm≥7withM m≤N<M (m+1).- The proof chooses the least index whose scale exceeds
Nand subtracts one. - Monotonicity and the initial lower bound ensure the preceding index exists and is at least seven.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le, Erdos12.M,OfNat.ofNat,Exists,And,GE.ge,LT.lt,HAdd.hAddProof uses:
Exists.intro, Erdos12.M_gt_m,id,Decidable.byContradiction,Not,Nat.find,Nat.find_spec,Eq, Erdos12.M_monotone,of_decide_eq_true,Bool,Decidable.decide,Bool.true,Eq.refl,Eq.mp,congrArg,HSub.hSub,Nat.find_min,Eq.mpr,And.intro28 instances, coercions and auxiliary constants left out.
Tactic trace: 39 steps
Open to load the checked before-and-after goal states.
lemma exists_M_interval (N : ℕ) (hN : M 7 ≤ N) : ∃ m ≥ 7, M m ≤ N ∧ N < M (m + 1) := by …
Mentions: Erdos12.M
- The proof chooses the least index whose scale exceeds
- lemma
Erdos12.density_ratio_boundConvert a square count bound into a normalized density bound line 884 sourceL4DEL explanation
If
C≤countandN≤9*C^2withN>0, then1/3≤count/√N.- Taking square roots gives
√N≤3*C; division by the positive√Nyields the ratio bound.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LT.lt,OfNat.ofNat,LE.le,HMul.hMul,HPow.hPow,Real,HDiv.hDiv,Real.sqrtProof uses:
Iff.mpr,Nat.cast_le,Eq,Eq.mpr,id,congrArg,Eq.trans,Nat.cast_mul,Nat.cast_pow,Mathlib.Tactic.Ring.of_eq,HAdd.hAdd,Nat.rawCast,Mathlib.Tactic.Ring.instCommSemiringNat,Mathlib.Tactic.Ring.mul_congr,Mathlib.Tactic.Ring.cast_pos,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Mathlib.Meta.NormNum.instAtLeastTwo,Mathlib.Tactic.Ring.pow_congr,Mathlib.Tactic.Ring.atom_pfand 56 more110 instances, coercions and auxiliary constants left out.
Tactic trace: 18 steps
Open to load the checked before-and-after goal states.
lemma density_ratio_bound (N C count : ℕ) (h_N_pos : 0 < N) (h_count : C ≤ count) (h_N_bound : N ≤ 9 * C^2) : (1 / 3 : ℝ) ≤ (count : ℝ) / (N : ℝ).sqrt := by …
- Taking square roots gives
- lemma
Erdos12.density_bound_NA uniform lower bound for every sufficiently large cutoff line 901 sourceL4DEL explanation
For every
N≥M 7, the normalized count|MyGoodSet∩[1,N]|/√Nis at least1/3.- Locate
NbetweenM mandM (m+1). IfN<2*M m, use the completed previous block; otherwise use the completed current block. count_intervalsupplies the count in either case, anddensity_ineqboundsNby nine times the square of that count.density_ratio_boundtakes square roots and divides by the positive√Nto obtain the constant1/3.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le, Erdos12.M,OfNat.ofNat,Real,HDiv.hDiv,Set.ncard,Inter.inter,Set, Erdos12.MyGoodSet,Set.Icc,Real.sqrtProof uses:
Exists,And,GE.ge,LT.lt,HAdd.hAdd, Erdos12.exists_M_interval,Set.Finite,HasSubset.Subset,Membership.mem,And.right,Set.Finite.subset,Set.finite_Icc, Erdos12.M_gt_m,Decidable.byContradiction,Not,dite,HMul.hMul,HSub.hSub,Eq, Erdos12.M_increasing and 14 more66 instances, coercions and auxiliary constants left out.
Tactic trace: 76 steps
Open to load the checked before-and-after goal states.
lemma density_bound_N (N : ℕ) (hN : M 7 ≤ N) : (1 / 3 : ℝ) ≤ (MyGoodSet ∩ Set.Icc 1 N).ncard / (N : ℝ).sqrt := by …
Mentions: Erdos12.M, Erdos12.MyGoodSet
- Locate
- lemma
Erdos12.sum_P_pow_fourEarlier fourth-power periods are dominated by the latest one line 972 sourceL4DEL explanation
∑ k<m, P (k+1)^4 ≤ 2*P m^4.- Each successor period is at least five times the preceding period, so its fourth power more than absorbs twice the preceding accumulated bound.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,Finset.sum,Finset.range,HPow.hPow, Erdos12.P,HAdd.hAdd,OfNat.ofNat,HMul.hMulProof uses:
Nat.recAux,of_eq_true,Eq.mpr,id,Eq,congrArg,Finset.sum_range_succ, Erdos12.q,rfl, Erdos12.q_ge_5,Nat.mul_le_mul_left,pow_le_pow_left₀,mul_nonneg,zero_le,le_of_lt,Mathlib.Meta.Positivity.pos_of_isNat,Mathlib.Meta.NormNum.isNat_ofNat,Eq.refl,Bool,Nat.bleand 79 more117 instances, coercions and auxiliary constants left out.
Tactic trace: 15 steps
Open to load the checked before-and-after goal states.
lemma sum_P_pow_four (m : ℕ) : ∑ k ∈ Finset.range m, P (k + 1)^4 ≤ 2 * P m^4 := by …
Mentions: Erdos12.P
- lemma
Erdos12.dvd_sub_of_mod_eqEqual residues make the difference divisible by the modulus line 989 sourceL4DEL explanation
If
aandbhave the same remainder modulocandb≤a, thencdividesa-b.- Expanding both numbers by quotient and remainder cancels the common remainder and factors out
c.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Quot.sound, propext what this means
Statement uses:
Nat,Eq,HMod.hMod,LE.le,Dvd.dvd,HSub.hSubProof uses:
HMul.hMul,HDiv.hDiv,HAdd.hAdd,Trans.trans,Eq.symm,Nat.div_add_mod,Eq.mpr,id,congrArg,Eq.refl,Decidable.byContradiction,Not,Nat.mul_sub_left_distrib,dvd_mul_right22 instances, coercions and auxiliary constants left out.
Tactic trace: 11 steps
Open to load the checked before-and-after goal states.
lemma dvd_sub_of_mod_eq {a b c x : ℕ} (ha : a % c = x) (hb : b % c = x) (hle : b ≤ a) : c ∣ a - b := by … - Expanding both numbers by quotient and remainder cancels the common remainder and factors out
- lemma
Erdos12.div_eq_implies_sub_ltEqual quotient cells are narrower than one period line 1002 sourceL4DEL explanation
If
a/P=b/P,b≤a, andP>0, thena-b<P.- Both numbers share the same quotient, so their difference is controlled by remainders that are each smaller than
P.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Quot.sound, propext what this means
Statement uses:
Nat,Eq,HDiv.hDiv,LE.le,LT.lt,OfNat.ofNat,HSub.hSubProof uses:
HAdd.hAdd,HMul.hMul,HMod.hMod,Nat.div_add_mod,Nat.mod_lt,Eq.mpr,id,congrArg,Eq.symm,Decidable.byContradiction,Not22 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
lemma div_eq_implies_sub_lt {a b P : ℕ} (h_div : a / P = b / P) (_hle : b ≤ a) (hP : 0 < P) : a - b < P := by …Mentions: Erdos12.P
- Both numbers share the same quotient, so their difference is controlled by remainders that are each smaller than
- lemma
Erdos12.good_set_injA block and quotient cell contain at most one admissible number line 1010 sourceL4DEL explanation
Two numbers with the block's required residues and the same quotient
(n-M m)/P mmust be equal.- Their difference is divisible by both coprime factors
K mandq m, hence byP m. - The shared quotient cell makes that same difference smaller than
P m; the only such multiple is zero.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le, Erdos12.M,Eq,HMod.hMod, Erdos12.K,OfNat.ofNat, Erdos12.q,HDiv.hDiv,HSub.hSub, Erdos12.PProof uses:
Nat.Coprime, Erdos12.K_q_coprime,HMul.hMul,rfl,LT.lt, Erdos12.P_pos,Or,le_total,Dvd.dvd, Erdos12.dvd_sub_of_mod_eq,Eq.mpr,id,congrArg,Nat.Coprime.mul_dvd_of_dvd_of_dvd,Nat.sub_le_sub_right,Eq.symm, Erdos12.div_eq_implies_sub_lt,Decidable.byContradiction,Not,Nat.eq_zero_of_dvd_of_lt31 instances, coercions and auxiliary constants left out.
Tactic trace: 29 steps
Open to load the checked before-and-after goal states.
lemma good_set_inj {n1 n2 m : ℕ} (hn1_ge : M m ≤ n1) (hn1_modK : n1 % K m = 1) (hn1_modq : n1 % q m = 0) (hn2_ge : M m ≤ n2) (hn2_modK : n2 % K m = 1) (hn2_modq : n2 % q m = 0) (h_div : (n1 - M m) / P m = (n2 - M m) / P m) : n1 = n2 := by … - Their difference is divisible by both coprime factors
- lemma
Erdos12.block_uniqueA number has only one compatible block index line 1040 sourceL4DEL explanation
If
n∈[M m,2*M m]and alsoM k≤n<M (k+1), thenm=k.- The separation
2*M j<M (j+1)and monotonicity ofMrule out either index being smaller than the other.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le, Erdos12.M,HMul.hMul,OfNat.ofNat,LT.lt,HAdd.hAdd,EqProof uses:
Or,lt_trichotomy, Erdos12.M_monotone, Erdos12.M_increasing,Decidable.byContradiction,Not,Eq.refl23 instances, coercions and auxiliary constants left out.
Tactic trace: 10 steps
Open to load the checked before-and-after goal states.
lemma block_unique {n m k : ℕ} (h1 : M m ≤ n) (h2 : n ≤ 2 * M m) (h3 : M k ≤ n) (h4 : n < M (k + 1)) : m = k := by …Mentions: Erdos12.M
- The separation
- def
Erdos12.g_blockSelect the scale interval containing a number line 1049 sourceL4DEL explanation
g_block nis the leastkwithM k≤n<M (k+1), when such a block exists; otherwise it is zero.- The definition uses
Nat.find, so it is noncomputable but has a precise least-witness specification.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NatProof uses:
dite,Exists,And,LE.le, Erdos12.M,LT.lt,HAdd.hAdd,OfNat.ofNat,Nat.find,Not9 instances, coercions and auxiliary constants left out.
noncomputable def g_block (n : ℕ) : ℕ := …
- The definition uses
- lemma
Erdos12.g_block_specThe selected block really contains the number line 1052 sourceL4DEL explanation
Whenever some scale interval contains
n, the selected index satisfiesM (g_block n)≤n<M (g_block n+1).- Unfolding
g_blockreduces the statement to the witness specification ofNat.find.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Exists,And,LE.le, Erdos12.M,LT.lt,HAdd.hAdd,OfNat.ofNat, Erdos12.g_blockProof uses:
id,Eq.mpr,dite,Nat.find,Not,Eq,congrArg,dif_pos,Nat.find_spec14 instances, coercions and auxiliary constants left out.
Tactic trace: 3 steps
Open to load the checked before-and-after goal states.
lemma g_block_spec {n : ℕ} (h : ∃ k, M k ≤ n ∧ n < M (k + 1)) : M (g_block n) ≤ n ∧ n < M (g_block n + 1) := by …Mentions: Erdos12.M, Erdos12.g_block
- Unfolding
- lemma
Erdos12.my_good_set_has_blockEvery witness-set member lies between consecutive scales line 1058 sourceL4DEL explanation
If
n∈MyGoodSet, then someksatisfiesM k≤n<M (k+1).- Membership already gives
n≤2*M k, and block separation strengthens this ton<M (k+1).
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Membership.mem,Set, Erdos12.MyGoodSet,Exists,And,LE.le, Erdos12.M,LT.lt,HAdd.hAdd,OfNat.ofNatProof uses:
HMul.hMul,HDiv.hDiv,HPow.hPow, Erdos12.P,Eq,HMod.hMod, Erdos12.K, Erdos12.q,Exists.intro,And.intro, Erdos12.M_increasing,Decidable.byContradiction,Not25 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
lemma my_good_set_has_block {n : ℕ} (hn : n ∈ MyGoodSet) : ∃ k, M k ≤ n ∧ n < M (k + 1) := by …Mentions: Erdos12.MyGoodSet, Erdos12.M
- Membership already gives
- def
Erdos12.g_valEncode a good-set member by its block and progression cell line 1065 sourceL4DEL explanation
g_val npairs the block index containingnwith the quotient(n-M k)/P kinside that block.g_blockchooses the scale intervalM k≤n<M (k+1).- This coordinate map supports the separate upper bound needed to show the liminf is a finite real rather than positive infinity.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,ProdProof uses:
Prod.mk, Erdos12.g_block,HDiv.hDiv,HSub.hSub, Erdos12.M, Erdos12.P4 instances, coercions and auxiliary constants left out.
noncomputable def g_val (n : ℕ) : ℕ × ℕ := …
- lemma
Erdos12.g_val_injThe block-and-cell coordinate is injective on the witness set line 1068 sourceL4DEL explanation
Two members of
MyGoodSetwith the sameg_valmust be the same natural number.- Equality of the first coordinate gives a common block; equality of the second gives a common quotient interval of width
P m. - Matching residues modulo coprime
K mandq mmake their difference divisible byP m; being smaller thanP mforces that difference to vanish.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Set.InjOn,Nat,Prod, Erdos12.g_val, Erdos12.MyGoodSetProof uses:
Membership.mem,Set,Eq, Erdos12.g_block,Prod.fst,Prod.mk,HDiv.hDiv,HSub.hSub, Erdos12.M, Erdos12.P,Eq.mpr,id,congrArg,Eq.refl,Prod.snd,And,LE.le,LT.lt,HAdd.hAdd,OfNat.ofNatand 13 more19 instances, coercions and auxiliary constants left out.
Tactic trace: 22 steps
Open to load the checked before-and-after goal states.
lemma g_val_inj : Set.InjOn g_val MyGoodSet := by …
Mentions: Erdos12.g_val, Erdos12.MyGoodSet
- Equality of the first coordinate gives a common block; equality of the second gives a common quotient interval of width
- def
Erdos12.target_setA finite coordinate box for all earlier blocks line 1090 sourceL4DEL explanation
target_set mcontains pairs(k,i)withk<mand0≤i≤P (k+1)^4/2.- Every good-set member up to
M mmaps into this finite union of block-and-cell coordinates. - Its deliberately slightly generous inclusive cell range makes the containment proof simple while retaining the required fourth-power bound.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Finset,ProdProof uses:
Finset.biUnion,Finset.range,Finset.image,Prod.mk,Finset.Icc,OfNat.ofNat,HDiv.hDiv,HPow.hPow, Erdos12.P,HAdd.hAdd12 instances, coercions and auxiliary constants left out.
noncomputable def target_set (m : ℕ) : Finset (ℕ × ℕ) := …
- Every good-set member up to
- lemma
Erdos12.target_set_cardBound the finite code space for all earlier blocks line 1093 sourceL4DEL explanation
The encoding set
target_set mhas at most2*P m^4pairs.- Bound the union by the sum of its per-block index ranges, absorb the endpoint term into each fourth power, and apply
sum_P_pow_four.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,Finset.card,Prod, Erdos12.target_set,HMul.hMul,OfNat.ofNat,HPow.hPow, Erdos12.PProof uses:
Finset.sum,Finset.range,Finset.image,Prod.mk,Finset.Icc,HDiv.hDiv,HAdd.hAdd,Finset.card_biUnion_le,Eq,Finset.sum_congr,rfl,Finset,Membership.mem,Set.InjOn,Set,congr_arg,Prod.snd,Eq.mpr,id,congrArgand 86 more134 instances, coercions and auxiliary constants left out.
Tactic trace: 24 steps
Open to load the checked before-and-after goal states.
lemma target_set_card (m : ℕ) : (target_set m).card ≤ 2 * P m^4 := by …
Mentions: Erdos12.target_set, Erdos12.P
- Bound the union by the sum of its per-block index ranges, absorb the endpoint term into each fourth power, and apply
- lemma
Erdos12.g_val_maps_toEvery early witness-set member has a bounded block code line 1118 sourceL4DEL explanation
If
n∈MyGoodSet∩[1,M m], theng_val n∈target_set m.- The containing block must have index
k<m; equality atk=mcontradicts the required residue, and a later block starts aboveM m. - The block cutoff bounds the quotient coordinate by
P (k+1)^4/2, placing the pair in the corresponding finite range.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Membership.mem,Set,Inter.inter, Erdos12.MyGoodSet,Set.Icc,OfNat.ofNat, Erdos12.M,Prod,Finset, Erdos12.target_set, Erdos12.g_valProof uses:
LE.le,And.right, Erdos12.g_block,And,LT.lt,HAdd.hAdd, Erdos12.g_block_spec, Erdos12.my_good_set_has_block,Or,Eq,lt_trichotomy,Eq.mpr,id,congrArg,Eq.symm,And.left,Decidable.byContradiction,Not,Erdos12.g_val_maps_to.match_1,HMul.hMuland 38 more44 instances, coercions and auxiliary constants left out.
Tactic trace: 49 steps
Open to load the checked before-and-after goal states.
lemma g_val_maps_to (m : ℕ) {n : ℕ} (hn : n ∈ MyGoodSet ∩ Set.Icc 1 (M m)) : g_val n ∈ target_set m := by …Mentions: Erdos12.MyGoodSet, Erdos12.M, Erdos12.g_val, Erdos12.target_set
- The containing block must have index
- lemma
Erdos12.count_upper_boundThe witness count at a block scale is at most twice a fourth power line 1161 sourceL4DEL explanation
Up to
M m,MyGoodSethas at most2*P m^4members.- The injective map
g_valsends those members intotarget_set m. target_set_cardbounds the finite coordinate set by summing the earlier fourth powers and comparing that sum with2*P m^4.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,LE.le,Set.ncard,Inter.inter,Set, Erdos12.MyGoodSet,Set.Icc,OfNat.ofNat, Erdos12.M,HMul.hMul,HPow.hPow, Erdos12.PProof uses:
HasSubset.Subset,Prod,Set.image, Erdos12.g_val,Finset, Erdos12.target_set,Membership.mem,And,Eq, Erdos12.g_val_maps_to,Set.Finite,Set.Finite.subset,Set.finite_Icc,And.right,Set.ncard_le_ncard,Finset.finite_toSet,Set.InjOn,Set.InjOn.mono,And.left, Erdos12.g_val_inj and 8 more28 instances, coercions and auxiliary constants left out.
Tactic trace: 15 steps
Open to load the checked before-and-after goal states.
lemma count_upper_bound (m : ℕ) : (MyGoodSet ∩ Set.Icc 1 (M m)).ncard ≤ 2 * P m^4 := by …
Mentions: Erdos12.MyGoodSet, Erdos12.M, Erdos12.P
- The injective map
- lemma
Erdos12.exists_f_le_twoThe normalized count is at most two infinitely often line 1179 sourceL4DEL explanation
Along the unbounded subsequence
N=M m, the ratio|MyGoodSet∩[1,N]|/√Nis at most2.count_upper_boundgives the numerator bound2*P m^4.- Since
M m=P m^8, its real square root is exactlyP m^4, giving the ratio bound after cancellation.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Filter.Frequently,Nat,LE.le,Real,HDiv.hDiv,Set.ncard,Inter.inter,Set, Erdos12.MyGoodSet,Set.Icc,OfNat.ofNat,Real.sqrt,Filter.atTopProof uses:
Iff.mpr,Exists,And,GE.ge,Filter.frequently_atTop,Exists.intro, Erdos12.M,And.intro,LT.lt.le, Erdos12.M_gt_m,HMul.hMul,HPow.hPow, Erdos12.P, Erdos12.count_upper_bound,Eq,rfl,Eq.mpr,id,congrArg,Mathlib.Tactic.Ring.of_eqand 43 more114 instances, coercions and auxiliary constants left out.
Tactic trace: 31 steps
Open to load the checked before-and-after goal states.
lemma exists_f_le_two : ∃ᶠ N in Filter.atTop, (MyGoodSet ∩ Set.Icc 1 N).ncard / (N : ℝ).sqrt ≤ 2 := by …
Mentions: Erdos12.MyGoodSet
- lemma
Erdos12.bdd_above_of_frequently_leA frequent upper bound caps every eventual lower bound line 1206 sourceL4DEL explanation
If
f N≤cfrequently, then the set of real numbers that are eventually belowf Nis bounded above byc.- A frequent occurrence of
f N≤cintersects any eventual assertiona≤f N, producing one index witha≤c.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Nat,Real,Filter.Frequently,LE.le,Filter.atTop,BddAbove,setOf,Filter.EventuallyProof uses:
Exists.intro,Membership.mem,Set,upperBounds,And,Filter.Frequently.and_eventually,Exists,Filter.Frequently.exists,le_trans8 instances, coercions and auxiliary constants left out.
Tactic trace: 5 steps
Open to load the checked before-and-after goal states.
lemma bdd_above_of_frequently_le {f : ℕ → ℝ} {c : ℝ} (h : ∃ᶠ N in Filter.atTop, f N ≤ c) : BddAbove {a | ∀ᶠ N in Filter.atTop, a ≤ f N} := by … - A frequent occurrence of
- lemma
Erdos12.my_good_set_densityThe normalized counting function has positive lower limit line 1214 sourceL4DEL explanation
The liminf of
|MyGoodSet∩[1,N]|/√Nis at least1/3, hence strictly positive.density_bound_Nsupplies the eventual lower bound1/3.exists_f_le_twosupplies a frequently occurring upper bound, which proves the set of eventual lower bounds is bounded above and lets the proof use the real-valuedliminfcharacterization safely.- The proof then applies
le_csSupto obtain1/3≤liminfand concludes positivity.
Sources and attribution: Pinned Lean source (0647711a7118)
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
LT.lt,Real,OfNat.ofNat,Filter.liminf,Nat,HDiv.hDiv,Set.ncard,Inter.inter,Set, Erdos12.MyGoodSet,Set.Icc,Real.sqrt,Filter.atTopProof uses:
Filter.Eventually,LE.le,Eq.mpr,Exists,GE.ge,id,Eq,congrArg,propext,Filter.eventually_atTop,Exists.intro, Erdos12.M, Erdos12.density_bound_N,BddAbove,setOf, Erdos12.bdd_above_of_frequently_le, Erdos12.exists_f_le_two,le_csSup,Filter.map,lt_of_not_geand 78 more119 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
lemma my_good_set_density : (0 : ℝ) < Filter.atTop.liminf (fun N => (MyGoodSet ∩ Set.Icc 1 N).ncard / (N : ℝ).sqrt) := by …
Mentions: Erdos12.MyGoodSet
- theorem
Erdos12.target_theorem_0Erdős problem 12(i): a dense infinite set avoiding the divisibility pattern line 1228 sourceL4DEL explanation
We will construct a sequence of “blocks” that individually cannot contain such a, b, c
divides the sum of two larger terms
There exists an infinite set
Aof natural numbers with no distincta,b,cinAsatisfyinga < b,a < c, anda ∣ b+c, while|A ∩ [1,N]|/√Nhas positive lower limit.- The Lean proof witnesses the existential with
MyGoodSet, whose prime and Chinese-remainder congruences establishIsGoodand whose arithmetic-progression blocks establish an eventual normalized count of at least1/3. - The reverse implication is logically trivial because the left side is
answer(True); the mathematical content is the forward construction of the set. - Provenance boundary: the human-written companion proves the same theorem by a different construction using a base-2-to-base-3 map and progression-free blocks. Those proof details are not attributed to the Lean declarations above.
- Erdős and Sárközy introduced property P and exhibited a weaker square-root-over-logarithm example in 1970; this theorem supplies the positive square-root-scale liminf asked for in problem 12(i).
Sources and attribution: Pinned Lean source (0647711a7118), Human-written proof companion for Erdős 12(i), Erdős Problems 12 source record, Paul Erdős and András Sárközy (1970), p. 97
standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Iff,True,Exists,Set,Nat,And, Erdos12.IsGood,LT.lt,Real,OfNat.ofNat,Filter.liminf,HDiv.hDiv,Set.ncard,Inter.inter,Set.Icc,Real.sqrt,Filter.atTopProof uses:
Iff.intro,Exists.intro, Erdos12.MyGoodSet,And.intro, Erdos12.my_good_set_is_good, Erdos12.my_good_set_density,True.intro26 instances, coercions and auxiliary constants left out.
Distinct definitions of this name: APNOutputs/ErdosProblems/erdos_12.parts.ii.lean:762 (different declaration text). Qualify references as Erdos12.target_theorem_0@path.
Tactic trace: 8 steps
Open to load the checked before-and-after goal states.
theorem target_theorem_0 : answer(True) ↔ ∃ (A : Set ℕ), IsGood A ∧ (0 : ℝ) < Filter.atTop.liminf (fun N => (A ∩ Icc 1 N).ncard / (N : ℝ).sqrt) := by …
Mentions: Erdos12.IsGood
- The Lean proof witnesses the existential with