diff --git a/OutcastsMathLab.lean b/OutcastsMathLab.lean index 9c586f9..368995f 100644 --- a/OutcastsMathLab.lean +++ b/OutcastsMathLab.lean @@ -1 +1,4 @@ import OutcastsMathLab.Problems.P000_VerifierSmoke.Proof +import OutcastsMathLab.Research.ESReduction +import OutcastsMathLab.Research.ESWitnessTarget +import OutcastsMathLab.Research.ESSmallShifts diff --git a/OutcastsMathLab/Research/ESReduction.lean b/OutcastsMathLab/Research/ESReduction.lean new file mode 100644 index 0000000..0488108 --- /dev/null +++ b/OutcastsMathLab/Research/ESReduction.lean @@ -0,0 +1,245 @@ +import Mathlib.Data.Nat.Prime.Basic +import Mathlib.Data.Rat.Defs +import Mathlib.Tactic.FieldSimp +import Mathlib.Tactic.LinearCombination +import Mathlib.Tactic.Ring +import Mathlib.Tactic.Positivity +import Mathlib.Tactic.NormNum + +/-! +# Reduction of the Erdős–Straus conjecture to six residue classes modulo 840 + +Known mathematics (Mordell; see also Elsholtz–Tao, arXiv:1107.1010, §1), formalized as the +skeleton into which an existence argument for the remaining primes would plug. This file does +**not** prove the conjecture and makes no claim of progress on it. + +* `ES n` : `4/n = 1/x + 1/y + 1/z` has a solution in positive integers (cleared denominators); + `es_iff_rat` checks this against the rational statement. +* `es_mul` : a solution for `n` gives one for every multiple of `n`. +* `es_of_witness` : Dahan's Type II criterion (arXiv:2608.24035, Theorem 3.9(ii)) in one + direction, with the explicit solution `x = u v t`, `y = a u v n`, `z = a v t n` + where `s * t = a * n + u` and `s + 1 = 4 * a * u * v`. +* `es_of_not_hard` : every prime outside the six classes `1, 121, 169, 289, 361, 529 (mod 840)` + has a solution (identities for `n ≡ 3 (mod 4)`, `n ≡ 5 (mod 8)`, and witnesses covering + `n ≡ 2 (mod 3)`, `n ≡ 7, 13 (mod 15)`, `n ≡ 3, 5, 6 (mod 7)`). +* `es_all_iff_hard_primes` : the conjecture for all `n ≥ 2` is equivalent to the conjecture for + primes in the six classes. +-/ + +namespace OutcastsMathLab.Research.ESReduction + +/-- `4/n = 1/x + 1/y + 1/z` with positive integers, denominators cleared. -/ +def ES (n : ℕ) : Prop := + ∃ x y z : ℕ, 0 < x ∧ 0 < y ∧ 0 < z ∧ 4 * x * y * z = n * (x * y + x * z + y * z) + +/-- The six residue classes modulo 840 left open by Mordell's identities. -/ +def hardResidues : Finset ℕ := {1, 121, 169, 289, 361, 529} + +/-- The cleared form agrees with the rational equation. -/ +theorem es_iff_rat {n : ℕ} (hn : 0 < n) : + ES n ↔ ∃ x y z : ℕ, 0 < x ∧ 0 < y ∧ 0 < z ∧ + (4 : ℚ) / n = 1 / x + 1 / y + 1 / z := by + constructor + · rintro ⟨x, y, z, hx, hy, hz, h⟩ + refine ⟨x, y, z, hx, hy, hz, ?_⟩ + have hq : (4 : ℚ) * x * y * z = n * (x * y + x * z + y * z) := by exact_mod_cast h + field_simp + linear_combination hq + · rintro ⟨x, y, z, hx, hy, hz, h⟩ + refine ⟨x, y, z, hx, hy, hz, ?_⟩ + have hn' : (n : ℚ) ≠ 0 := by positivity + have hx' : (x : ℚ) ≠ 0 := by positivity + have hy' : (y : ℚ) ≠ 0 := by positivity + have hz' : (z : ℚ) ≠ 0 := by positivity + field_simp at h + exact_mod_cast (by linear_combination h : (4 : ℚ) * x * y * z = n * (x * y + x * z + y * z)) + +/-- Scaling: a solution for `n` gives a solution for `n * m`. -/ +theorem es_mul {n : ℕ} (h : ES n) {m : ℕ} (hm : 0 < m) : ES (n * m) := by + obtain ⟨x, y, z, hx, hy, hz, he⟩ := h + refine ⟨x * m, y * m, z * m, by positivity, by positivity, by positivity, ?_⟩ + have : 4 * (x * m) * (y * m) * (z * m) = (4 * x * y * z) * m ^ 3 := by ring + rw [this, he] + ring + +theorem es_two : ES 2 := ⟨1, 2, 2, by norm_num, by norm_num, by norm_num, by norm_num⟩ + +/-- `n = 4k + 3`: `4/n = 1/(k+1) + 1/(2n(k+1)) + 1/(2n(k+1))`. -/ +theorem es_of_mod_four_eq_three {n : ℕ} (h : n % 4 = 3) : ES n := by + obtain ⟨k, rfl⟩ : ∃ k, n = 4 * k + 3 := ⟨n / 4, by omega⟩ + refine ⟨k + 1, 2 * (4 * k + 3) * (k + 1), 2 * (4 * k + 3) * (k + 1), + by positivity, by positivity, by positivity, ?_⟩ + ring + +/-- `n = 8k + 5`: `4/n = 1/(2k+2) + 1/(n(k+1)) + 1/(2n(k+1))`. -/ +theorem es_of_mod_eight_eq_five {n : ℕ} (h : n % 8 = 5) : ES n := by + obtain ⟨k, rfl⟩ : ∃ k, n = 8 * k + 5 := ⟨n / 8, by omega⟩ + refine ⟨2 * k + 2, (8 * k + 5) * (k + 1), 2 * (8 * k + 5) * (k + 1), + by positivity, by positivity, by positivity, ?_⟩ + ring + +/-- Dahan's Type II witness gives an explicit solution. -/ +theorem es_of_witness {n a u s : ℕ} (hn : 0 < n) (ha : 0 < a) (hu : 0 < u) + (hs : s ∣ a * n + u) (hm : 4 * a * u ∣ s + 1) : ES n := by + obtain ⟨t, ht⟩ := hs + obtain ⟨v, hv⟩ := hm + have htpos : 0 < t := by + rcases Nat.eq_zero_or_pos t with h0 | h0 + · rw [h0, mul_zero] at ht; omega + · exact h0 + have hvpos : 0 < v := by + rcases Nat.eq_zero_or_pos v with h0 | h0 + · rw [h0, mul_zero] at hv; omega + · exact h0 + refine ⟨u * v * t, a * u * v * n, a * v * t * n, + by positivity, by positivity, by positivity, ?_⟩ + have ht' : (a : ℤ) * n + u = s * t := by exact_mod_cast ht + have hv' : (s : ℤ) + 1 = 4 * a * u * v := by exact_mod_cast hv + have key : (4 : ℤ) * (u * v * t) * (a * u * v * n) * (a * v * t * n) = + n * ((u * v * t) * (a * u * v * n) + (u * v * t) * (a * v * t * n) + + (a * u * v * n) * (a * v * t * n)) := by + linear_combination (-(a : ℤ) * u * v ^ 2 * t * n ^ 2) * ht' + + (-(a : ℤ) * u * v ^ 2 * t ^ 2 * n ^ 2) * hv' + exact_mod_cast key + +/-- Residue bookkeeping: what survives the identities modulo 8, 3, 5, 7 is the six classes. -/ +theorem hard_of_residues (r : ℕ) (hr : r < 840) (h8 : r % 8 = 1) (h3 : r % 3 = 1) + (h5 : r % 5 = 1 ∨ r % 5 = 4) (h7 : r % 7 = 1 ∨ r % 7 = 2 ∨ r % 7 = 4) : + r ∈ hardResidues := by + simp only [hardResidues, Finset.mem_insert, Finset.mem_singleton] + omega + +/-! Small residue facts, each stated with only the hypotheses it needs (keeps `omega` fast). -/ + +theorem mod_ne_zero_of_prime {p q : ℕ} (hp : p.Prime) (hq : 1 < q) (hpq : p ≠ q) : + p % q ≠ 0 := by + intro h0 + rcases hp.eq_one_or_self_of_dvd q (Nat.dvd_of_mod_eq_zero h0) with h | h + · omega + · exact hpq h.symm + +theorem mod8_eq_one {p : ℕ} (hodd : p % 2 = 1) (h4 : p % 4 ≠ 3) (h85 : p % 8 ≠ 5) : + p % 8 = 1 := by omega + +theorem mod3_eq_one {p : ℕ} (h0 : p % 3 ≠ 0) (h2 : p % 3 ≠ 2) : p % 3 = 1 := by omega + +theorem mod5_cases {p : ℕ} (h0 : p % 5 ≠ 0) (h2 : p % 5 ≠ 2) (h3 : p % 5 ≠ 3) : + p % 5 = 1 ∨ p % 5 = 4 := by omega + +theorem mod7_cases {p : ℕ} (h0 : p % 7 ≠ 0) (h3 : p % 7 ≠ 3) (h5 : p % 7 ≠ 5) + (h6 : p % 7 ≠ 6) : p % 7 = 1 ∨ p % 7 = 2 ∨ p % 7 = 4 := by omega + +theorem dvd_mod3 {p : ℕ} (h : p % 3 = 2) : 3 ∣ 1 * p + 1 := by omega +theorem dvd_mod15_a {p : ℕ} (h3 : p % 3 = 1) (h5 : p % 5 = 2) : 15 ∣ 2 * p + 1 := by omega +theorem dvd_mod15_b {p : ℕ} (h3 : p % 3 = 1) (h5 : p % 5 = 3) : 15 ∣ 1 * p + 2 := by omega +theorem dvd_mod7_a {p : ℕ} (h : p % 7 = 3) : 7 ∣ 2 * p + 1 := by omega +theorem dvd_mod7_b {p : ℕ} (h : p % 7 = 5) : 7 ∣ 1 * p + 2 := by omega +theorem dvd_mod7_c {p : ℕ} (h : p % 7 = 6) : 7 ∣ 1 * p + 1 := by omega + +/-- Every prime outside the six classes modulo 840 has a solution. -/ +theorem es_of_not_hard {p : ℕ} (hp : p.Prime) (hh : p % 840 ∉ hardResidues) : ES p := by + have hp0 : 0 < p := hp.pos + by_contra hne + apply hh + -- each identity or witness that applies would give `ES p` + have h4 : p % 4 ≠ 3 := fun h => hne (es_of_mod_four_eq_three h) + have h85 : p % 8 ≠ 5 := fun h => hne (es_of_mod_eight_eq_five h) + have h2 : p ≠ 2 := fun h => hne (h ▸ es_two) + have h32 : p % 3 ≠ 2 := fun h => + hne (es_of_witness (a := 1) (u := 1) (s := 3) hp0 one_pos one_pos (dvd_mod3 h) (by norm_num)) + have hodd : p % 2 = 1 := hp.eq_two_or_odd.resolve_left h2 + have h8 : p % 8 = 1 := mod8_eq_one hodd h4 h85 + have h3 : p % 3 = 1 := + mod3_eq_one (mod_ne_zero_of_prime hp (by norm_num) (fun h => h4 (by rw [h]))) h32 + have h52 : p % 5 ≠ 2 := fun h => + hne (es_of_witness (a := 2) (u := 1) (s := 15) hp0 (by norm_num) one_pos + (dvd_mod15_a h3 h) (by norm_num)) + have h53 : p % 5 ≠ 3 := fun h => + hne (es_of_witness (a := 1) (u := 2) (s := 15) hp0 one_pos (by norm_num) + (dvd_mod15_b h3 h) (by norm_num)) + have h5 : p % 5 = 1 ∨ p % 5 = 4 := + mod5_cases (mod_ne_zero_of_prime hp (by norm_num) (fun h => h85 (by rw [h]))) h52 h53 + have h73 : p % 7 ≠ 3 := fun h => + hne (es_of_witness (a := 2) (u := 1) (s := 7) hp0 (by norm_num) one_pos + (dvd_mod7_a h) (by norm_num)) + have h75 : p % 7 ≠ 5 := fun h => + hne (es_of_witness (a := 1) (u := 2) (s := 7) hp0 one_pos (by norm_num) + (dvd_mod7_b h) (by norm_num)) + have h76 : p % 7 ≠ 6 := fun h => + hne (es_of_witness (a := 1) (u := 1) (s := 7) hp0 one_pos one_pos + (dvd_mod7_c h) (by norm_num)) + have h7 : p % 7 = 1 ∨ p % 7 = 2 ∨ p % 7 = 4 := + mod7_cases (mod_ne_zero_of_prime hp (by norm_num) (fun h => h4 (by rw [h]))) h73 h75 h76 + have e8 : p % 840 % 8 = p % 8 := Nat.mod_mod_of_dvd p (by norm_num) + have e3 : p % 840 % 3 = p % 3 := Nat.mod_mod_of_dvd p (by norm_num) + have e5 : p % 840 % 5 = p % 5 := Nat.mod_mod_of_dvd p (by norm_num) + have e7 : p % 840 % 7 = p % 7 := Nat.mod_mod_of_dvd p (by norm_num) + exact hard_of_residues (p % 840) (Nat.mod_lt _ (by norm_num)) (e8 ▸ h8) (e3 ▸ h3) + (e5 ▸ h5) (e7 ▸ h7) + +/-! Sanity checks on the definition: it is satisfiable, and not trivially true. -/ + +/-- The P001 example `4/1201 = 1/306 + 1/21618 + 1/61251`. -/ +theorem es_1201 : ES 1201 := + ⟨306, 21618, 61251, by norm_num, by norm_num, by norm_num, by norm_num⟩ + +/-- `4 = 1/x + 1/y + 1/z` has no solution, since the right side is at most 3. -/ +theorem not_es_one : ¬ ES 1 := by + rintro ⟨x, y, z, hx, hy, hz, h⟩ + have hxy : x * y ≤ x * y * z := Nat.le_mul_of_pos_right _ hz + have hxz : x * z ≤ x * y * z := by + calc x * z = x * z * 1 := by ring + _ ≤ x * z * y := Nat.mul_le_mul_left _ hy + _ = x * y * z := by ring + have hyz : y * z ≤ x * y * z := by + calc y * z = 1 * (y * z) := by ring + _ ≤ x * (y * z) := Nat.mul_le_mul_right _ hx + _ = x * y * z := by ring + have hpos : 0 < x * y * z := by positivity + have : 4 * x * y * z = 4 * (x * y * z) := by ring + omega + +/-- **Reduction.** The Erdős–Straus conjecture for every `n ≥ 2` is equivalent to the +conjecture for the primes in the six residue classes `1, 121, 169, 289, 361, 529 (mod 840)`. -/ +theorem es_all_iff_hard_primes : + (∀ n, 2 ≤ n → ES n) ↔ (∀ p, p.Prime → p % 840 ∈ hardResidues → ES p) := by + constructor + · intro h p hp _ + exact h p hp.two_le + · intro h n hn + obtain ⟨p, hp, hpn⟩ := Nat.exists_prime_and_dvd (show n ≠ 1 by omega) + obtain ⟨m, rfl⟩ := hpn + have hm : 0 < m := by + rcases Nat.eq_zero_or_pos m with h0 | h0 + · subst h0; omega + · exact h0 + have hesp : ES p := by + by_cases hh : p % 840 ∈ hardResidues + · exact h p hp hh + · exact es_of_not_hard hp hh + exact es_mul hesp hm + +#print axioms es_iff_rat +#print axioms es_mul +#print axioms es_two +#print axioms es_of_mod_four_eq_three +#print axioms es_of_mod_eight_eq_five +#print axioms es_of_witness +#print axioms hard_of_residues +#print axioms mod_ne_zero_of_prime +#print axioms mod8_eq_one +#print axioms mod3_eq_one +#print axioms mod5_cases +#print axioms mod7_cases +#print axioms dvd_mod3 +#print axioms dvd_mod15_a +#print axioms dvd_mod15_b +#print axioms dvd_mod7_a +#print axioms dvd_mod7_b +#print axioms dvd_mod7_c +#print axioms es_of_not_hard +#print axioms es_all_iff_hard_primes +#print axioms es_1201 +#print axioms not_es_one + +end OutcastsMathLab.Research.ESReduction diff --git a/OutcastsMathLab/Research/ESSmallShifts.lean b/OutcastsMathLab/Research/ESSmallShifts.lean new file mode 100644 index 0000000..9831551 --- /dev/null +++ b/OutcastsMathLab/Research/ESSmallShifts.lean @@ -0,0 +1,354 @@ +import OutcastsMathLab.Research.ESReduction +import Mathlib.Data.Nat.Factorization.Induction +import Mathlib.Data.Finset.Basic +import Mathlib.Tactic.NormNum.Prime + +/-! +# Small shifts on the hard primes: the Mordell obstruction left by `a u ≤ 3` + +Elementary facts behind `Research/SmallShifts20261008/` (finite data on the `luna/p001-failure-atlas` +fork branch). For the shifts `(a, u) = (1,1)`, `(1,2)`, `(2,1)` the Type II witness condition +`s ∣ a n + u, 4 a u ∣ s + 1` is characterised by the residues of the prime factors of `a n + u` +(likewise `(1,3)`, `(3,1)` for `n ≡ 1 (mod 24)`), +and for every `n ≡ 1 (mod 24)` (in particular every prime in the six hard classes mod 840) the +"global sign" is the one that does **not** guarantee a witness. Known mathematics; not progress +on the conjecture. + +* `mod_mem_of_prime_factors`: if every prime factor of `a ≠ 0` has residue in a multiplicatively + closed set `S ∋ 1`, then so does `a`. +* `witness_one_one_iff`: `(∃ s, s ∣ n + 1 ∧ 4 ∣ s + 1) ↔ ∃ prime q ∣ n + 1, q ≡ 3 (mod 4)`. +* `witness_mod_eight_iff`: for `N ≡ 3 (mod 8)`, + `(∃ s, s ∣ N ∧ 8 ∣ s + 1) ↔ ∃ prime q ∣ N, q ≡ 5 or 7 (mod 8)`; + applied to `N = n + 2` and `N = 2 n + 1` (shifts `(1,2)` and `(2,1)`). +* `witness_mod_twelve_iff`: for `3 ∤ N`, `(∃ s, s ∣ N ∧ 12 ∣ s + 1) ↔` + `N` has a prime factor `≡ 3 (mod 4)` and a prime factor `≡ 5 (mod 6)`; + applied to `N = n + 3` and `N = 3 n + 1` (shifts `(1,3)` and `(3,1)`), and, for `n ≡ 9 (mod 16)`, + reduced to the second condition alone (`witness_one_three_iff_of_mod16`, `witness_three_one_iff_of_mod16`). +* `global_signs_of_mod24`: for `n ≡ 1 (mod 24)`, `(n+1)/2 ≡ 1 (mod 4)`, `n + 2 ≡ 2 n + 1 ≡ 3 (mod 8)`, + and `n + 3`, `3 n + 1` are `4 k` with `k ≡ 1 (mod 3)`. +* `mod24_of_hard`: primes in the six classes satisfy `p ≡ 1 (mod 24)`. +* `es_of_divisor_three_mod_four`: a divisor `≡ 3 (mod 4)` of `p + 1` gives a solution (shift `(1,1)`). +-/ + +namespace OutcastsMathLab.Research.ESSmallShifts + +open OutcastsMathLab.Research.ESReduction + +/-- Residues of products stay in a multiplicatively closed set. -/ +theorem mod_mem_of_prime_factors (m : ℕ) (S : Finset ℕ) (h1 : 1 % m ∈ S) + (hS : ∀ x ∈ S, ∀ y ∈ S, (x * y) % m ∈ S) : + ∀ a : ℕ, a ≠ 0 → (∀ q, q.Prime → q ∣ a → q % m ∈ S) → a % m ∈ S := by + intro a + induction a using induction_on_primes with + | zero => intro h; exact absurd rfl h + | one => intro _ _; exact h1 + | prime_mul p a hp ih => + intro hpa hq + have ha : a ≠ 0 := by rintro rfl; simp at hpa + have hpS : p % m ∈ S := hq p hp (dvd_mul_right p a) + have haS : a % m ∈ S := ih ha fun q hq' hqa => hq q hq' (dvd_mul_of_dvd_right hqa p) + rw [Nat.mul_mod] + exact hS _ hpS _ haS + +/-- An odd number `≡ 3 (mod 4)` has a prime factor `≡ 3 (mod 4)`. -/ +theorem exists_prime_mod_four_three {s : ℕ} (hs : s % 4 = 3) : + ∃ q, q.Prime ∧ q ∣ s ∧ q % 4 = 3 := by + by_contra hne + push Not at hne + have hS := mod_mem_of_prime_factors 4 {1} (by decide) (by decide) s (by omega) (fun q hq hqs => by + have hodd : q % 2 = 1 := by + rcases hq.eq_two_or_odd with h | h + · subst h; omega + · exact h + have := hne q hq hqs + simp only [Finset.mem_singleton] + omega) + simp only [Finset.mem_singleton] at hS + omega + +/-- **Shift `(1,1)`.** A Type II witness for `(a,u) = (1,1)` exists iff `n + 1` has a prime +factor `≡ 3 (mod 4)`. -/ +theorem witness_one_one_iff (n : ℕ) : + (∃ s, s ∣ n + 1 ∧ 4 ∣ s + 1) ↔ ∃ q, q.Prime ∧ q ∣ n + 1 ∧ q % 4 = 3 := by + constructor + · rintro ⟨s, hs, h4⟩ + obtain ⟨q, hq, hqs, hq4⟩ := exists_prime_mod_four_three (s := s) (by omega) + exact ⟨q, hq, dvd_trans hqs hs, hq4⟩ + · rintro ⟨q, hq, hqn, hq4⟩ + exact ⟨q, hqn, by omega⟩ + +/-- A number `≡ 7 (mod 8)` has a prime factor `≡ 5` or `≡ 7 (mod 8)`. -/ +theorem exists_prime_mod_eight_five_or_seven {s : ℕ} (hs : s % 8 = 7) : + ∃ q, q.Prime ∧ q ∣ s ∧ (q % 8 = 5 ∨ q % 8 = 7) := by + by_contra hne + push Not at hne + have hS := mod_mem_of_prime_factors 8 {1, 3} (by decide) (by decide) s (by omega) (fun q hq hqs => by + have hodd : q % 2 = 1 := by + rcases hq.eq_two_or_odd with h | h + · subst h; omega + · exact h + have := hne q hq hqs + simp only [Finset.mem_insert, Finset.mem_singleton] + omega) + simp only [Finset.mem_insert, Finset.mem_singleton] at hS + omega + +/-- A number `≡ 3 (mod 8)` has a prime factor `≡ 3` or `≡ 7 (mod 8)`. -/ +theorem exists_prime_mod_eight_three_or_seven {N : ℕ} (hN : N % 8 = 3) : + ∃ q, q.Prime ∧ q ∣ N ∧ (q % 8 = 3 ∨ q % 8 = 7) := by + by_contra hne + push Not at hne + have hS := mod_mem_of_prime_factors 8 {1, 5} (by decide) (by decide) N (by omega) (fun q hq hqs => by + have hodd : q % 2 = 1 := by + rcases hq.eq_two_or_odd with h | h + · subst h; omega + · exact h + have := hne q hq hqs + simp only [Finset.mem_insert, Finset.mem_singleton] + omega) + simp only [Finset.mem_insert, Finset.mem_singleton] at hS + omega + +/-- **Shifts with `4 a u = 8`.** For `N ≡ 3 (mod 8)`, a divisor `s ≡ 7 (mod 8)` exists iff `N` +has a prime factor `≡ 5` or `≡ 7 (mod 8)`. -/ +theorem witness_mod_eight_iff {N : ℕ} (hN : N % 8 = 3) : + (∃ s, s ∣ N ∧ 8 ∣ s + 1) ↔ ∃ q, q.Prime ∧ q ∣ N ∧ (q % 8 = 5 ∨ q % 8 = 7) := by + constructor + · rintro ⟨s, hs, h8⟩ + obtain ⟨q, hq, hqs, hq8⟩ := exists_prime_mod_eight_five_or_seven (s := s) (by omega) + exact ⟨q, hq, dvd_trans hqs hs, hq8⟩ + · rintro ⟨q, hq, hqN, hq8 | hq8⟩ + · obtain ⟨r, hr, hrN, hr8 | hr8⟩ := exists_prime_mod_eight_three_or_seven hN + · have hne : q ≠ r := by intro h; subst h; omega + refine ⟨q * r, Nat.Prime.dvd_mul_of_dvd_ne hne hq hr hqN hrN, ?_⟩ + have : (q * r) % 8 = 7 := by rw [Nat.mul_mod, hq8, hr8] + omega + · exact ⟨r, hrN, by omega⟩ + · exact ⟨q, hqN, by omega⟩ + +/-- Shift `(1,2)`: `4 a u = 8`, `a n + u = n + 2`. -/ +theorem witness_one_two_iff {n : ℕ} (hn : n % 8 = 1) : + (∃ s, s ∣ 1 * n + 2 ∧ 4 * 1 * 2 ∣ s + 1) ↔ + ∃ q, q.Prime ∧ q ∣ n + 2 ∧ (q % 8 = 5 ∨ q % 8 = 7) := by + simp only [one_mul, show 4 * 1 * 2 = 8 by norm_num] + exact witness_mod_eight_iff (by omega) + +/-- Shift `(2,1)`: `4 a u = 8`, `a n + u = 2 n + 1`. -/ +theorem witness_two_one_iff {n : ℕ} (hn : n % 8 = 1) : + (∃ s, s ∣ 2 * n + 1 ∧ 4 * 2 * 1 ∣ s + 1) ↔ + ∃ q, q.Prime ∧ q ∣ 2 * n + 1 ∧ (q % 8 = 5 ∨ q % 8 = 7) := by + simp only [show 4 * 2 * 1 = 8 by norm_num] + exact witness_mod_eight_iff (by omega) + +/-- A number `≡ 2 (mod 3)` has a prime factor `≡ 2 (mod 3)`. -/ +theorem exists_prime_mod_three_two {s : ℕ} (hs : s % 3 = 2) : + ∃ q, q.Prime ∧ q ∣ s ∧ q % 3 = 2 := by + by_contra hne + push Not at hne + have hS := mod_mem_of_prime_factors 3 {1} (by decide) (by decide) s (by omega) (fun q hq hqs => by + have h3 : q % 3 ≠ 0 := by + intro h0 + have hq3 : q = 3 := by + rcases hq.eq_one_or_self_of_dvd 3 (Nat.dvd_of_mod_eq_zero h0) with h | h + · omega + · exact h.symm + subst hq3 + omega + have := hne q hq hqs + simp only [Finset.mem_singleton] + omega) + simp only [Finset.mem_singleton] at hS + omega + +/-- **Shifts with `4 a u = 12`.** If `3 ∤ N`, a divisor `s ≡ 11 (mod 12)` of `N` exists iff `N` has a +prime factor `≡ 3 (mod 4)` and an odd prime factor `≡ 2 (mod 3)` (i.e. `≡ 5 (mod 6)`). -/ +theorem witness_mod_twelve_iff {N : ℕ} (h3 : N % 3 ≠ 0) : + (∃ s, s ∣ N ∧ 12 ∣ s + 1) ↔ + (∃ q, q.Prime ∧ q ∣ N ∧ q % 4 = 3) ∧ (∃ q, q.Prime ∧ q ∣ N ∧ q % 6 = 5) := by + constructor + · rintro ⟨s, hs, h12⟩ + obtain ⟨q1, hq1, hq1s, hq14⟩ := exists_prime_mod_four_three (s := s) (by omega) + obtain ⟨q2, hq2, hq2s, hq23⟩ := exists_prime_mod_three_two (s := s) (by omega) + have hq2odd : q2 % 2 = 1 := by + rcases hq2.eq_two_or_odd with h | h + · subst h + have : 2 ∣ s := hq2s + omega + · exact h + exact ⟨⟨q1, hq1, dvd_trans hq1s hs, hq14⟩, ⟨q2, hq2, dvd_trans hq2s hs, by omega⟩⟩ + · rintro ⟨⟨q1, hq1, hq1N, hq14⟩, ⟨q2, hq2, hq2N, hq26⟩⟩ + have hq1ne3 : q1 % 3 ≠ 0 := by + intro h0 + have hq13 : q1 = 3 := by + rcases hq1.eq_one_or_self_of_dvd 3 (Nat.dvd_of_mod_eq_zero h0) with h | h + · omega + · exact h.symm + subst hq13 + exact h3 (Nat.mod_eq_zero_of_dvd hq1N) + by_cases h1 : q1 % 3 = 2 + · exact ⟨q1, hq1N, by omega⟩ + by_cases h2 : q2 % 4 = 3 + · exact ⟨q2, hq2N, by omega⟩ + have hne : q1 ≠ q2 := by intro h; subst h; omega + refine ⟨q1 * q2, Nat.Prime.dvd_mul_of_dvd_ne hne hq1 hq2 hq1N hq2N, ?_⟩ + have hm1 : q1 % 12 = 7 := by omega + have hm2 : q2 % 12 = 5 := by omega + have : (q1 * q2) % 12 = 11 := by rw [Nat.mul_mod, hm1, hm2] + omega + +/-- Shift `(1,3)`: `4 a u = 12`, `a n + u = n + 3`. -/ +theorem witness_one_three_iff {n : ℕ} (hn : n % 24 = 1) : + (∃ s, s ∣ 1 * n + 3 ∧ 4 * 1 * 3 ∣ s + 1) ↔ + (∃ q, q.Prime ∧ q ∣ n + 3 ∧ q % 4 = 3) ∧ (∃ q, q.Prime ∧ q ∣ n + 3 ∧ q % 6 = 5) := by + simp only [one_mul, show 4 * 1 * 3 = 12 by norm_num] + exact witness_mod_twelve_iff (by omega) + +/-- Shift `(3,1)`: `4 a u = 12`, `a n + u = 3 n + 1`. -/ +theorem witness_three_one_iff {n : ℕ} (hn : n % 24 = 1) : + (∃ s, s ∣ 3 * n + 1 ∧ 4 * 3 * 1 ∣ s + 1) ↔ + (∃ q, q.Prime ∧ q ∣ 3 * n + 1 ∧ q % 4 = 3) ∧ (∃ q, q.Prime ∧ q ∣ 3 * n + 1 ∧ q % 6 = 5) := by + simp only [show 4 * 3 * 1 = 12 by norm_num] + exact witness_mod_twelve_iff (by omega) + +/-- When `n ≡ 9 (mod 16)` the `χ₋₄` condition is automatic for `(1,3)`: `(n+3)/4 ≡ 3 (mod 4)`. -/ +theorem witness_one_three_iff_of_mod16 {n : ℕ} (hn : n % 24 = 1) (h16 : n % 16 = 9) : + (∃ s, s ∣ 1 * n + 3 ∧ 4 * 1 * 3 ∣ s + 1) ↔ ∃ q, q.Prime ∧ q ∣ n + 3 ∧ q % 6 = 5 := by + rw [witness_one_three_iff hn] + constructor + · exact fun h => h.2 + · intro h + refine ⟨?_, h⟩ + obtain ⟨q, hq, hqk, hq4⟩ := exists_prime_mod_four_three (s := (n + 3) / 4) (by omega) + exact ⟨q, hq, dvd_trans hqk ⟨4, by omega⟩, hq4⟩ + +/-- Same for `(3,1)`: `(3n+1)/4 ≡ 3 (mod 4)` when `n ≡ 9 (mod 16)`. -/ +theorem witness_three_one_iff_of_mod16 {n : ℕ} (hn : n % 24 = 1) (h16 : n % 16 = 9) : + (∃ s, s ∣ 3 * n + 1 ∧ 4 * 3 * 1 ∣ s + 1) ↔ ∃ q, q.Prime ∧ q ∣ 3 * n + 1 ∧ q % 6 = 5 := by + rw [witness_three_one_iff hn] + constructor + · exact fun h => h.2 + · intro h + refine ⟨?_, h⟩ + obtain ⟨q, hq, hqk, hq4⟩ := exists_prime_mod_four_three (s := (3 * n + 1) / 4) (by omega) + exact ⟨q, hq, dvd_trans hqk ⟨4, by omega⟩, hq4⟩ + +/-- The "global signs" for `n ≡ 1 (mod 24)`: none of them forces a witness for `a u ≤ 3`. +`(n+1)/2 ≡ 1 (mod 4)` (so `χ₋₄ = +1` on the odd part of `n + 1`); `n + 2` and `2 n + 1` are +`≡ 3 (mod 8)` (so `χ₋₈ = +1`); `n + 3` and `3 n + 1` are `4 k` with `k ≡ 1 (mod 3)` +(so `χ₋₃ = +1` on the part prime to 6). -/ +theorem global_signs_of_mod24 {n : ℕ} (hn : n % 24 = 1) : + (n + 1) = 2 * ((n + 1) / 2) ∧ ((n + 1) / 2) % 4 = 1 ∧ + (n + 2) % 8 = 3 ∧ (2 * n + 1) % 8 = 3 ∧ + (n + 3) = 4 * ((n + 3) / 4) ∧ ((n + 3) / 4) % 3 = 1 ∧ + (3 * n + 1) = 4 * ((3 * n + 1) / 4) ∧ ((3 * n + 1) / 4) % 3 = 1 := by + omega + +/-- Primes in the six hard classes satisfy `p ≡ 1 (mod 24)`. -/ +theorem mod24_of_hard {p : ℕ} (h : p % 840 ∈ hardResidues) : p % 24 = 1 := by + have e : p % 840 % 24 = p % 24 := Nat.mod_mod_of_dvd p (by norm_num) + simp only [hardResidues, Finset.mem_insert, Finset.mem_singleton] at h + omega + +/-- The shift `(1,1)` gives a solution as soon as `p + 1` has a divisor `≡ 3 (mod 4)`; for hard +primes, `global_signs_of_mod24` shows this is never forced by congruences alone. -/ +theorem es_of_divisor_three_mod_four {p q : ℕ} (hp : 0 < p) + (hqp : q ∣ p + 1) (hq4 : q % 4 = 3) : ES p := + es_of_witness (a := 1) (u := 1) (s := q) hp one_pos one_pos (by simpa using hqp) + (by norm_num; omega) + +/-- Sanity check: `p = 3678481` (hard class `121 mod 840`, the M-test prime whose `ω ≥ 4` shifts all +fail) is solved by the shift `(1,1)`, since `23 ∣ p + 1` and `23 ≡ 3 (mod 4)`. -/ +theorem es_3678481 : ES 3678481 := + es_of_divisor_three_mod_four (q := 23) (by norm_num) (by norm_num) (by norm_num) + +/-! ### The prime `11` (S test, fork `Research/Simultaneity20261010/`) + +In the six hard classes `p mod 3, 5, 7` are fixed, so `11` is the first prime that can decide the +small shifts. Since `11 ≡ 3 (mod 4)` and `11 ≡ -1 (mod 12)`, `s = 11` is a witness for `(1,1)`, +`(1,3)` and `(3,1)` whenever it divides the shifted number, i.e. for `n ≡ 10, 8, 7 (mod 11)`. It is +not a witness for `(1,2)`, `(2,1)` (`8 ∤ 12`). The S test observed no wipe-out of the five small +shifts in these classes (1,736 hard primes in `7·10⁶ < p < 10⁷`); this section is the elementary +reason. -/ + +theorem eleven_residues : 4 ∣ 11 + 1 ∧ 12 ∣ 11 + 1 ∧ ¬ 8 ∣ 11 + 1 := by decide + +/-- For `n ≡ 7, 8, 10 (mod 11)` one of the shifts `(3,1)`, `(1,3)`, `(1,1)` has the witness `s = 11`. -/ +theorem witness_of_mod_eleven {n : ℕ} (h : n % 11 = 7 ∨ n % 11 = 8 ∨ n % 11 = 10) : + ∃ a u s, 0 < a ∧ 0 < u ∧ a * u ≤ 3 ∧ s ∣ a * n + u ∧ 4 * a * u ∣ s + 1 := by + rcases h with h | h | h + · exact ⟨3, 1, 11, by norm_num, by norm_num, by norm_num, by omega, by norm_num⟩ + · exact ⟨1, 3, 11, by norm_num, by norm_num, by norm_num, by omega, by norm_num⟩ + · exact ⟨1, 1, 11, by norm_num, by norm_num, by norm_num, by omega, by norm_num⟩ + +theorem es_of_mod_eleven {n : ℕ} (hn : 0 < n) (h : n % 11 = 7 ∨ n % 11 = 8 ∨ n % 11 = 10) : + ES n := by + obtain ⟨a, u, s, ha, hu, -, hs, hm⟩ := witness_of_mod_eleven h + exact es_of_witness hn ha hu hs hm + +/-- The hypothesis is not empty inside the hard classes: the smallest hard primes with +`p ≡ 8, 7, 10 (mod 11)` are `1009`, `1129`, `4201`. -/ +theorem hard_examples_mod_eleven : + (Nat.Prime 1009 ∧ 1009 % 840 ∈ hardResidues ∧ 1009 % 11 = 8) ∧ + (Nat.Prime 1129 ∧ 1129 % 840 ∈ hardResidues ∧ 1129 % 11 = 7) ∧ + (Nat.Prime 4201 ∧ 4201 % 840 ∈ hardResidues ∧ 4201 % 11 = 10) := by + refine ⟨⟨by norm_num, by decide, by norm_num⟩, ⟨by norm_num, by decide, by norm_num⟩, + ⟨by norm_num, by decide, by norm_num⟩⟩ + +/-! ### The trivial witness `s = a n + u` (Q test, fork `Research/QR11Bit20261010/`) + +The Q test found that the shift `(1, 22)` almost never fails when `p ≡ 10 (mod 11)`: for hard primes +`p ≡ 1 (mod 8)`, so `p + 22 ≡ -1 (mod 88)` and the shifted number itself is a witness (`t = 1`). +This does not enlarge the covering (for `p ≡ 10 (mod 11)` the shift `(1, 1)` already has `s = 11`, +`witness_of_mod_eleven`); it gives a second, independent witness in the same class. -/ + +/-- If `4 a u ∣ a n + u + 1`, the shifted number `a n + u` itself is a witness. -/ +theorem trivial_witness {n a u : ℕ} (h : 4 * a * u ∣ a * n + u + 1) : + (a * n + u) ∣ a * n + u ∧ 4 * a * u ∣ (a * n + u) + 1 := + ⟨dvd_refl _, h⟩ + +/-- For `n ≡ 1 (mod 8)` and `n ≡ 10 (mod 11)`, the shift `(1, 22)` has the witness `s = n + 22`. -/ +theorem witness_one_twentytwo {n : ℕ} (h8 : n % 8 = 1) (h11 : n % 11 = 10) : + (n + 22) ∣ 1 * n + 22 ∧ 4 * 1 * 22 ∣ (n + 22) + 1 := by + refine ⟨by simp, ?_⟩ + omega + +/-- A hard prime with `p ≡ 10 (mod 11)` is solved by the shift `(1, 22)` with `s = p + 22`. -/ +theorem es_of_hard_mod_eleven_ten {p : ℕ} (hp : 0 < p) (hh : p % 840 ∈ hardResidues) + (h11 : p % 11 = 10) : ES p := by + have h24 := mod24_of_hard hh + obtain ⟨h1, h2⟩ := witness_one_twentytwo (n := p) (by omega) h11 + exact es_of_witness (a := 1) (u := 22) (s := p + 22) hp one_pos (by norm_num) h1 h2 + +/-- Non-vacuity: `4201` (hard class `1 mod 840`, `≡ 10 mod 11`) has `s = 4223` at `(1, 22)` +(`4224 = 88 · 48`). -/ +theorem witness_4201_one_twentytwo : 4223 ∣ 1 * 4201 + 22 ∧ 4 * 1 * 22 ∣ 4223 + 1 := by + norm_num + +#print axioms mod_mem_of_prime_factors +#print axioms exists_prime_mod_four_three +#print axioms witness_one_one_iff +#print axioms exists_prime_mod_eight_five_or_seven +#print axioms exists_prime_mod_eight_three_or_seven +#print axioms witness_mod_eight_iff +#print axioms witness_one_two_iff +#print axioms witness_two_one_iff +#print axioms exists_prime_mod_three_two +#print axioms witness_mod_twelve_iff +#print axioms witness_one_three_iff +#print axioms witness_three_one_iff +#print axioms witness_one_three_iff_of_mod16 +#print axioms witness_three_one_iff_of_mod16 +#print axioms global_signs_of_mod24 +#print axioms mod24_of_hard +#print axioms es_of_divisor_three_mod_four +#print axioms es_3678481 +#print axioms eleven_residues +#print axioms witness_of_mod_eleven +#print axioms es_of_mod_eleven +#print axioms hard_examples_mod_eleven +#print axioms trivial_witness +#print axioms witness_one_twentytwo +#print axioms es_of_hard_mod_eleven_ten +#print axioms witness_4201_one_twentytwo + +end OutcastsMathLab.Research.ESSmallShifts diff --git a/OutcastsMathLab/Research/ESWitnessTarget.lean b/OutcastsMathLab/Research/ESWitnessTarget.lean new file mode 100644 index 0000000..ab914f8 --- /dev/null +++ b/OutcastsMathLab/Research/ESWitnessTarget.lean @@ -0,0 +1,274 @@ +import OutcastsMathLab.Research.ESReduction +import Mathlib.NumberTheory.Divisors +import Mathlib.Algebra.Order.BigOperators.Group.Finset +import Mathlib.Data.Nat.Log + +/-! +# The Type II witness target, stated on top of the reduction + +Outcasts >>39 proposed the target: for each hard prime `p`, a candidate set of shifts `(a, u)` +contains at least one actual Type II witness, i.e. `∑_{(a,u) ∈ C_p} W(p; a, u) > 0` with +`W(p; a, u) = #{s ∣ a p + u : s ≡ -1 (mod 4 a u)}`. This file fixes that target as Lean +propositions and proves that it implies the Erdős–Straus conjecture through +`es_all_iff_hard_primes`. **It does not prove the target**; `Hlog` below is an open, stronger +candidate (it fixes the budget `a u ≤ ⌈log₂ p⌉`). + +The target is sufficient, not necessary: a prime could have only Type I solutions. +-/ + +namespace OutcastsMathLab.Research.ESWitnessTarget + +open OutcastsMathLab.Research.ESReduction + +/-- Number of actual Type II witnesses for the shift `(a, u)`: divisors `s` of `a p + u` +with `4 a u ∣ s + 1` (Dahan, Theorem 3.9(ii)). Every divisor is counted, with no order bound. -/ +def W (p a u : ℕ) : ℕ := ((a * p + u).divisors.filter (fun s => 4 * a * u ∣ s + 1)).card + +theorem W_pos_iff {p a u : ℕ} (hM : a * p + u ≠ 0) : + 0 < W p a u ↔ ∃ s, s ∣ a * p + u ∧ 4 * a * u ∣ s + 1 := by + unfold W + rw [Finset.card_pos] + constructor + · rintro ⟨s, hs⟩ + rw [Finset.mem_filter, Nat.mem_divisors] at hs + exact ⟨s, hs.1.1, hs.2⟩ + · rintro ⟨s, h1, h2⟩ + exact ⟨s, Finset.mem_filter.mpr ⟨Nat.mem_divisors.mpr ⟨h1, hM⟩, h2⟩⟩ + +/-- The product budget box `{(a, u) : 1 ≤ a, 1 ≤ u, a u ≤ B}`. -/ +def box (B : ℕ) : Finset (ℕ × ℕ) := + (Finset.Icc 1 B ×ˢ Finset.Icc 1 B).filter (fun au => au.1 * au.2 ≤ B) + +theorem mem_box {B a u : ℕ} : (a, u) ∈ box B ↔ 1 ≤ a ∧ 1 ≤ u ∧ a * u ≤ B := by + unfold box + simp only [Finset.mem_filter, Finset.mem_product, Finset.mem_Icc] + constructor + · rintro ⟨⟨⟨ha, -⟩, hu, -⟩, h⟩ + exact ⟨ha, hu, h⟩ + · rintro ⟨ha, hu, h⟩ + have hab : a ≤ a * u := Nat.le_mul_of_pos_right a hu + have hub : u ≤ a * u := Nat.le_mul_of_pos_left u ha + exact ⟨⟨⟨ha, by omega⟩, hu, by omega⟩, h⟩ + +/-- Total number of Type II witnesses over the budget box. -/ +def WSum (p B : ℕ) : ℕ := ∑ au ∈ box B, W p au.1 au.2 + +theorem WSum_pos_iff {p B : ℕ} : 0 < WSum p B ↔ ∃ au ∈ box B, 0 < W p au.1 au.2 := + Finset.sum_pos_iff + +theorem es_of_W_pos {p a u : ℕ} (hp : 0 < p) (ha : 0 < a) (hu : 0 < u) + (h : 0 < W p a u) : ES p := by + obtain ⟨s, h1, h2⟩ := (W_pos_iff (by positivity)).mp h + exact es_of_witness hp ha hu h1 h2 + +theorem es_of_WSum_pos {p B : ℕ} (hp : 0 < p) (h : 0 < WSum p B) : ES p := by + obtain ⟨⟨a, u⟩, hau, hw⟩ := WSum_pos_iff.mp h + obtain ⟨ha, hu, -⟩ := mem_box.mp hau + exact es_of_W_pos hp ha hu hw + +/-- A single witness inside the box makes the sum positive. -/ +theorem WSum_pos_of_witness {p B a u s : ℕ} (hau : (a, u) ∈ box B) + (hs : s ∣ a * p + u) (hm : 4 * a * u ∣ s + 1) : 0 < WSum p B := by + obtain ⟨-, hu, -⟩ := mem_box.mp hau + refine WSum_pos_iff.mpr ⟨(a, u), hau, (W_pos_iff (by omega)).mpr ⟨s, hs, hm⟩⟩ + +/-- **Any budget function works.** If every hard prime has a Type II witness in the box of +budget `B p`, the conjecture holds for every `n ≥ 2`. -/ +theorem es_all_of_budget (B : ℕ → ℕ) + (h : ∀ p, p.Prime → p % 840 ∈ hardResidues → 0 < WSum p (B p)) : + ∀ n, 2 ≤ n → ES n := + es_all_iff_hard_primes.mpr fun p hp hh => es_of_WSum_pos hp.pos (h p hp hh) + +/-- Unbudgeted form: a Type II witness for every hard prime suffices. -/ +theorem es_all_of_typeII + (h : ∀ p, p.Prime → p % 840 ∈ hardResidues → + ∃ a u s, 0 < a ∧ 0 < u ∧ s ∣ a * p + u ∧ 4 * a * u ∣ s + 1) : + ∀ n, 2 ≤ n → ES n := + es_all_iff_hard_primes.mpr fun p hp hh => by + obtain ⟨a, u, s, ha, hu, hs, hm⟩ := h p hp hh + exact es_of_witness hp.pos ha hu hs hm + +/-- `Hlog` (open, stronger than needed): every hard prime has a Type II witness with +`a u ≤ ⌈log₂ p⌉`. Stated, not proved. -/ +def Hlog : Prop := + ∀ p, p.Prime → p % 840 ∈ hardResidues → 0 < WSum p (Nat.clog 2 p) + +theorem es_all_of_Hlog (h : Hlog) : ∀ n, 2 ≤ n → ES n := + es_all_of_budget (fun p => Nat.clog 2 p) h + +/-- `2^k < p` gives `k + 1 ≤ ⌈log₂ p⌉`. -/ +theorem le_clog_two {p k : ℕ} (h : 2 ^ k < p) : k + 1 ≤ Nat.clog 2 p := by + by_contra hc + have hle : Nat.clog 2 p ≤ k := by omega + rw [Nat.clog_le_iff_le_pow (by norm_num)] at hle + omega + +/-! Sanity checks: the `Hlog` condition holds at P001's 1201 and at the primes discussed in the +thread (smallest product `a u` with a witness; witnesses computed in Python, checked here). -/ + +theorem hlog_at_1201 : 0 < WSum 1201 (Nat.clog 2 1201) := + WSum_pos_of_witness (a := 4) (u := 1) (s := 31) + (mem_box.mpr ⟨by norm_num, by norm_num, le_trans (by norm_num) (le_clog_two (k := 3) (by norm_num))⟩) + (by norm_num) (by norm_num) + +theorem hlog_at_2521 : 0 < WSum 2521 (Nat.clog 2 2521) := + WSum_pos_of_witness (a := 1) (u := 2) (s := 87) + (mem_box.mpr ⟨by norm_num, by norm_num, le_trans (by norm_num) (le_clog_two (k := 1) (by norm_num))⟩) + (by norm_num) (by norm_num) + +theorem hlog_at_66529 : 0 < WSum 66529 (Nat.clog 2 66529) := + WSum_pos_of_witness (a := 1) (u := 5) (s := 39) + (mem_box.mpr ⟨by norm_num, by norm_num, le_trans (by norm_num) (le_clog_two (k := 4) (by norm_num))⟩) + (by norm_num) (by norm_num) + +theorem hlog_at_345601 : 0 < WSum 345601 (Nat.clog 2 345601) := + WSum_pos_of_witness (a := 1) (u := 9) (s := 107) + (mem_box.mpr ⟨by norm_num, by norm_num, le_trans (by norm_num) (le_clog_two (k := 8) (by norm_num))⟩) + (by norm_num) (by norm_num) + +theorem hlog_at_670849 : 0 < WSum 670849 (Nat.clog 2 670849) := + WSum_pos_of_witness (a := 1) (u := 8) (s := 319) + (mem_box.mpr ⟨by norm_num, by norm_num, le_trans (by norm_num) (le_clog_two (k := 7) (by norm_num))⟩) + (by norm_num) (by norm_num) + +theorem hlog_at_1740481 : 0 < WSum 1740481 (Nat.clog 2 1740481) := + WSum_pos_of_witness (a := 3) (u := 4) (s := 3311) + (mem_box.mpr ⟨by norm_num, by norm_num, le_trans (by norm_num) (le_clog_two (k := 11) (by norm_num))⟩) + (by norm_num) (by norm_num) + +theorem hlog_at_5843041 : 0 < WSum 5843041 (Nat.clog 2 5843041) := + WSum_pos_of_witness (a := 1) (u := 5) (s := 7359) + (mem_box.mpr ⟨by norm_num, by norm_num, le_trans (by norm_num) (le_clog_two (k := 4) (by norm_num))⟩) + (by norm_num) (by norm_num) + +/-! ## Coprime normalisation of the box (Outcasts >>45) + +`box B` contains shifts with `gcd a u > 1`, while the earlier finite checks (PR #4, the failure +atlas) used coprime boxes. The witness *counts* of the two boxes can differ +(`WSumCop_lt_WSum_4201`), but their positivity is the same: a witness `s` for `(a, u)` is coprime +to `g = gcd a u` (because `g ∣ s + 1`), so the same `s` is a witness for `(a / g, u / g)`, whose +product is at most `a u`. The argument was given in Outcasts >>45; this section checks it in Lean. -/ + +/-- A Type II witness for `(a, u)` is also a witness for the coprime shift `(a / g, u / g)`, +`g = gcd a u`. -/ +theorem witness_div_gcd {p a u s : ℕ} (hs : s ∣ a * p + u) (hm : 4 * a * u ∣ s + 1) : + s ∣ a / Nat.gcd a u * p + u / Nat.gcd a u ∧ + 4 * (a / Nat.gcd a u) * (u / Nat.gcd a u) ∣ s + 1 := by + have hga : Nat.gcd a u ∣ a := Nat.gcd_dvd_left a u + have hgu : Nat.gcd a u ∣ u := Nat.gcd_dvd_right a u + have hg1 : Nat.gcd a u ∣ s + 1 := + hga.trans ((Dvd.intro_left 4 rfl).trans ((Dvd.intro u rfl).trans hm)) + have hcop : Nat.Coprime s (Nat.gcd a u) := + Nat.dvd_one.mp ((Nat.dvd_add_right (Nat.gcd_dvd_left _ _)).mp + ((Nat.gcd_dvd_right _ _).trans hg1)) + refine ⟨?_, ?_⟩ + · have heq : a * p + u = (a / Nat.gcd a u * p + u / Nat.gcd a u) * Nat.gcd a u := + calc a * p + u + = a / Nat.gcd a u * Nat.gcd a u * p + u / Nat.gcd a u * Nat.gcd a u := by + rw [Nat.div_mul_cancel hga, Nat.div_mul_cancel hgu] + _ = (a / Nat.gcd a u * p + u / Nat.gcd a u) * Nat.gcd a u := by ring + exact hcop.dvd_of_dvd_mul_right (heq ▸ hs) + · exact (Nat.mul_dvd_mul (Nat.mul_dvd_mul (dvd_refl 4) (Nat.div_dvd_of_dvd hga)) + (Nat.div_dvd_of_dvd hgu)).trans hm + +/-- The coprime part of the product budget box. -/ +def coprimeBox (B : ℕ) : Finset (ℕ × ℕ) := + (box B).filter (fun au => Nat.Coprime au.1 au.2) + +theorem mem_coprimeBox {B a u : ℕ} : + (a, u) ∈ coprimeBox B ↔ 1 ≤ a ∧ 1 ≤ u ∧ a * u ≤ B ∧ Nat.Coprime a u := by + unfold coprimeBox + rw [Finset.mem_filter, mem_box] + tauto + +/-- Total number of Type II witnesses over the coprime box. -/ +def WSumCop (p B : ℕ) : ℕ := ∑ au ∈ coprimeBox B, W p au.1 au.2 + +/-- The full box splits into its coprime and non-coprime parts. -/ +theorem WSum_eq_WSumCop_add (p B : ℕ) : + WSum p B = WSumCop p B + + ∑ au ∈ (box B).filter (fun au => ¬ Nat.Coprime au.1 au.2), W p au.1 au.2 := + (Finset.sum_filter_add_sum_filter_not (box B) _ _).symm + +theorem WSumCop_le_WSum (p B : ℕ) : WSumCop p B ≤ WSum p B := by + rw [WSum_eq_WSumCop_add p B] + exact Nat.le_add_right _ _ + +/-- **Positivity does not depend on the box convention.** -/ +theorem WSum_pos_iff_WSumCop_pos {p B : ℕ} : 0 < WSum p B ↔ 0 < WSumCop p B := by + constructor + · intro h + obtain ⟨⟨a, u⟩, hau, hw⟩ := WSum_pos_iff.mp h + obtain ⟨ha, hu, hB⟩ := mem_box.mp hau + obtain ⟨s, hs, hm⟩ := (W_pos_iff (by omega)).mp hw + obtain ⟨hs', hm'⟩ := witness_div_gcd hs hm + have hg : 0 < Nat.gcd a u := Nat.gcd_pos_of_pos_left u ha + have ha0 : 1 ≤ a / Nat.gcd a u := Nat.div_pos (Nat.gcd_le_left u ha) hg + have hu0 : 1 ≤ u / Nat.gcd a u := Nat.div_pos (Nat.gcd_le_right (m := a) hu) hg + have hle : a / Nat.gcd a u * (u / Nat.gcd a u) ≤ B := + le_trans (Nat.mul_le_mul (Nat.div_le_self a _) (Nat.div_le_self u _)) hB + exact Finset.sum_pos_iff.mpr ⟨(a / Nat.gcd a u, u / Nat.gcd a u), + mem_coprimeBox.mpr ⟨ha0, hu0, hle, Nat.coprime_div_gcd_div_gcd hg⟩, + (W_pos_iff (by omega)).mpr ⟨s, hs', hm'⟩⟩ + · intro h + exact lt_of_lt_of_le h (WSumCop_le_WSum p B) + +/-- The budget theorem with the coprime box (same strength as `es_all_of_budget`). -/ +theorem es_all_of_budget_coprime (B : ℕ → ℕ) + (h : ∀ p, p.Prime → p % 840 ∈ hardResidues → 0 < WSumCop p (B p)) : + ∀ n, 2 ≤ n → ES n := + es_all_of_budget B fun p hp hh => WSum_pos_iff_WSumCop_pos.mpr (h p hp hh) + +/-- The counts can differ: at `p = 4201` (`≡ 1 mod 840`, budget `⌈log₂ p⌉ = 13`) the +non-coprime shift `(2, 2)` has the witness `s = 191` (`8404 = 191 · 44`, `16 ∣ 192`), which the +coprime box does not count. Witness found in Python, checked here. -/ +theorem WSumCop_lt_WSum_4201 : WSumCop 4201 13 < WSum 4201 13 := by + rw [WSum_eq_WSumCop_add] + refine Nat.lt_add_of_pos_right (Finset.sum_pos_iff.mpr ⟨(2, 2), ?_, ?_⟩) + · exact Finset.mem_filter.mpr ⟨mem_box.mpr ⟨by norm_num, by norm_num, by norm_num⟩, by decide⟩ + · exact (W_pos_iff (by norm_num)).mpr ⟨191, by norm_num, by norm_num⟩ + +theorem clog_two_4201 : Nat.clog 2 4201 = 13 := by + refine le_antisymm ((Nat.clog_le_iff_le_pow (by norm_num)).mpr (by norm_num)) ?_ + exact le_clog_two (k := 12) (by norm_num) + +/-- For `p ≡ 7, 8, 10 (mod 11)` the box of budget `3` already has a witness (`s = 11` for +`(3,1)`, `(1,3)`, `(1,1)`; see `ESSmallShifts.witness_of_mod_eleven`). -/ +theorem WSum_pos_of_mod_eleven {p B : ℕ} (hB : 3 ≤ B) + (h : p % 11 = 7 ∨ p % 11 = 8 ∨ p % 11 = 10) : 0 < WSum p B := by + rcases h with h | h | h + · exact WSum_pos_of_witness (a := 3) (u := 1) (s := 11) + (mem_box.mpr ⟨by norm_num, by norm_num, by omega⟩) (by omega) (by norm_num) + · exact WSum_pos_of_witness (a := 1) (u := 3) (s := 11) + (mem_box.mpr ⟨by norm_num, by norm_num, by omega⟩) (by omega) (by norm_num) + · exact WSum_pos_of_witness (a := 1) (u := 1) (s := 11) + (mem_box.mpr ⟨by norm_num, by norm_num, by omega⟩) (by omega) (by norm_num) + +#print axioms W_pos_iff +#print axioms mem_box +#print axioms WSum_pos_iff +#print axioms es_of_W_pos +#print axioms es_of_WSum_pos +#print axioms WSum_pos_of_witness +#print axioms es_all_of_budget +#print axioms es_all_of_typeII +#print axioms es_all_of_Hlog +#print axioms le_clog_two +#print axioms hlog_at_1201 +#print axioms hlog_at_2521 +#print axioms hlog_at_66529 +#print axioms hlog_at_345601 +#print axioms hlog_at_670849 +#print axioms hlog_at_1740481 +#print axioms hlog_at_5843041 +#print axioms witness_div_gcd +#print axioms mem_coprimeBox +#print axioms WSum_eq_WSumCop_add +#print axioms WSumCop_le_WSum +#print axioms WSum_pos_iff_WSumCop_pos +#print axioms es_all_of_budget_coprime +#print axioms WSumCop_lt_WSum_4201 +#print axioms clog_two_4201 +#print axioms WSum_pos_of_mod_eleven + +end OutcastsMathLab.Research.ESWitnessTarget diff --git a/Research/ESReduction/README.md b/Research/ESReduction/README.md new file mode 100644 index 0000000..65d8e7b --- /dev/null +++ b/Research/ESReduction/README.md @@ -0,0 +1,173 @@ +# ESReduction — エルデシュ=シュトラウス予想を法 840 の 6 類の素数に帰着する + +`OutcastsMathLab/Research/ESReduction.lean`。**既知の結果の形式化**です(`docs/PROTOCOL.md` §1 の「既知結果を Lean へ写す」に当たり、 +未解決問題の進展ではありません)。予想そのものは証明していません。 + +## 何のためか + +これまでの P001 の Lean は、個別の素数(1201 など)か、固定した族についての定理でした。「どの素数で解の存在を示せば予想全体が閉じるか」は、 +Lean の上ではまだ決まっていませんでした。このファイルはその骨組みを 1 つの定理として固定します。 + +```lean +theorem es_all_iff_hard_primes : + (∀ n, 2 ≤ n → ES n) ↔ (∀ p, p.Prime → p % 840 ∈ hardResidues → ES p) +``` + +`hardResidues = {1, 121, 169, 289, 361, 529}`。右辺の存在を示す論法(たとえば Outcasts >>39 の「各 p で証人の数の合計が正」)ができれば、 +この定理を通して予想全体になります。 + +## 定義(仕様の照合用) + +- `ES n := ∃ x y z : ℕ, 0 < x ∧ 0 < y ∧ 0 < z ∧ 4 * x * y * z = n * (x * y + x * z + y * z)`。 + 分母を払った形です。`es_iff_rat` で、n > 0 のとき有理数の式 `(4:ℚ)/n = 1/x + 1/y + 1/z` と同値であることを示しています。 +- x, y, z の大小や、相異なることは要求していません(古典的な定式化と同じ)。 +- n ≥ 2 に限っています。n = 1 には解がありません(`not_es_one`)。定義が自明に真ではないことの確認でもあります。 +- `es_1201`: P001 の解 4/1201 = 1/306 + 1/21618 + 1/61251。 + +## 定理 + +| 定理 | 内容 | +|---|---| +| `es_iff_rat` | 分母を払った形と有理数の式の同値(n > 0) | +| `es_mul` | n の解から n·m の解(分母を m 倍) | +| `es_two` | 4/2 = 1/1 + 1/2 + 1/2 | +| `es_of_mod_four_eq_three` | n = 4k+3 のとき 4/n = 1/(k+1) + 1/(2n(k+1)) + 1/(2n(k+1)) | +| `es_of_mod_eight_eq_five` | n = 8k+5 のとき 4/n = 1/(2k+2) + 1/(n(k+1)) + 1/(2n(k+1)) | +| `es_of_witness` | Dahan Theorem 3.9(ii) の十分性: s ∣ an+u、4au ∣ s+1 なら解がある。s·t = an+u、s+1 = 4auv として x = uvt、y = auvn、z = avtn | +| `hard_of_residues` | r < 840 で r ≡ 1 (mod 8)、r ≡ 1 (mod 3)、r mod 5 ∈ {1,4}、r mod 7 ∈ {1,2,4} なら r は 6 類のどれか | +| 小補題(`mod8_eq_one` など 11 個) | 剰余の場合分けと、各証人の整除。`omega` を必要な仮定だけで呼ぶために分けています | +| `es_of_not_hard` | 6 類の外の素数には解がある | +| `es_all_iff_hard_primes` | 帰着(上) | +| `es_1201` / `not_es_one` | 定義の確認 | + +`es_of_not_hard` の場合分け: + +| 素数 p の類 | 使うもの | +|---|---| +| p = 2 | `es_two` | +| p ≡ 3 (mod 4)(3 と 7 を含む) | 恒等式 | +| p ≡ 5 (mod 8)(5 を含む) | 恒等式 | +| p ≡ 2 (mod 3) | 証人 (a,u,s) = (1,1,3) | +| p ≡ 1 (mod 3) かつ p ≡ 2 (mod 5)、つまり p ≡ 7 (mod 15) | 証人 (2,1,15) | +| p ≡ 1 (mod 3) かつ p ≡ 3 (mod 5)、つまり p ≡ 13 (mod 15) | 証人 (1,2,15) | +| p ≡ 3 / 5 / 6 (mod 7) | 証人 (2,1,7) / (1,2,7) / (1,1,7) | +| 残り | p ≡ 1 (mod 8)、≡ 1 (mod 3)、mod 5 ∈ {1,4}、mod 7 ∈ {1,2,4}。これが法 840 の 6 類 | + +覆う類は Mordell の古典的な整理と同じですが、法 3・5・7 の部分は Mordell の元の恒等式ではなく、Dahan の Type II 証人で書き直しています。 + +## 追加: Type II 証人の目標(`OutcastsMathLab/Research/ESWitnessTarget.lean`、26 定理) + +Outcasts >>39 で合意した証明対象「各 p で、候補 (a,u) 全体にわたる実際の証人の数の合計が正」を、上の帰着の上に Lean の命題として固定します。 +**目標そのものは証明していません。** + +| 定義・定理 | 内容 | +|---|---| +| `W p a u` | `a p + u` の約数 s で `4au ∣ s + 1` を満たすものの個数(実際の約数で数え、大小の条件なし)。`W_pos_iff` で「証人が存在する」と同値 | +| `box B` / `WSum p B` | 積の予算 `1 ≤ a, 1 ≤ u, a u ≤ B` の箱と、その上の W の合計。`mem_box`、`WSum_pos_iff` | +| `es_of_W_pos` / `es_of_WSum_pos` | W > 0、WSum > 0 なら ES p | +| `es_all_of_budget` | **どんな予算関数 B でも**、6 類の各素数で `WSum p (B p) > 0` なら、すべての n ≥ 2 で ES n | +| `es_all_of_typeII` | 予算なしの形: 6 類の各素数に Type II 証人があれば、すべての n ≥ 2 で ES n | +| `Hlog`(定義)/ `es_all_of_Hlog` | Hlog(予算 ⌈log₂ p⌉ = `Nat.clog 2 p`)を命題として固定し、Hlog ⇒ 予想を示す。**Hlog は未証明**で、必要以上に強い候補 | +| `hlog_at_1201` ほか 7 個 | 1201、2521、66529、345601、670849、1740481、5843041 で、Hlog の条件が成り立つ(au 最小の証人を Python で探し、Lean で整除と合同を確認) | + +注意: +- この目標は**十分条件で、必要条件ではありません**。Type I の解しか持たない素数があっても、予想は成り立ちえます。 +- 7 素数での成立は、Hlog の証拠ではなく、定義が意図どおりに働くことの確認です(HNR のように u を非剰余に絞ると、345601・670849 では予算内の証人がなくなります。Outcasts >>30)。 +- au 最小の証人: 1201 (4,1,31)、2521 (1,2,87)、66529 (1,5,39)、345601 (1,9,107)、670849 (1,8,319)、1740481 (3,4,3311)、5843041 (1,5,7359)。 + 5843041 の 7359 = 3·11·223 は素因数 3 個の積で、>>21 の反例(素因数 1〜2 個の積に限った予算)とは矛盾しません。 + +### 互いに素な箱への正規化(Outcasts >>45、8 定理) + +`box B` は gcd(a,u) > 1 の組も含みます。これまでの有限検査(PR #4、FailureAtlas)は互いに素な組だけの箱でした。 +>>45 の指摘どおり、2 つの規格で**証人の数そのもの**は一致しません。ただし**合計が正かどうか**は一致します。 +g = gcd(a,u) は 4au ∣ s+1 から s+1 を割るので、s と g は互いに素です。したがって同じ s が (a/g, u/g) の証人になり、 +(a/g)(u/g) ≤ au です。>>45 が初等的に示したこの論法を Lean で確認しました。 + +| 定義・定理 | 内容 | +|---|---| +| `witness_div_gcd` | s ∣ ap+u、4au ∣ s+1 なら、g = gcd(a,u) として s ∣ (a/g)p + u/g、4(a/g)(u/g) ∣ s+1 | +| `coprimeBox B` / `mem_coprimeBox` / `WSumCop p B` | 互いに素な組だけの箱と、その上の W の合計 | +| `WSum_eq_WSumCop_add` / `WSumCop_le_WSum` | 箱の合計 = 互いに素な部分 + 互いに素でない部分。よって WSumCop ≤ WSum | +| `WSum_pos_iff_WSumCop_pos` | **0 < WSum p B ⇔ 0 < WSumCop p B**(p と B は任意) | +| `es_all_of_budget_coprime` | `es_all_of_budget` の互いに素な箱の版(強さは同じ) | +| `WSumCop_lt_WSum_4201` / `clog_two_4201` | 数が一致しない例: p = 4201(≡ 1 mod 840、⌈log₂ p⌉ = 13)で、互いに素でない (2,2) に証人 s = 191(8404 = 191·44、16 ∣ 192)があり、WSumCop 4201 13 < WSum 4201 13。証人は Python で探しました(6 類の素数で、予算 ⌈log₂ p⌉ の箱の互いに素でない組に証人がある最小の例は p = 3529 の (4,2)、s = 543。4201 は (2,2) の最小例) | + +## 追加: 小さいシフトの成否条件(`OutcastsMathLab/Research/ESSmallShifts.lean`、26 定理) + +fork の有限記録 `Research/SmallShifts20261008/`(ブランチ `luna/p001-failure-atlas`)の初等的な部分を Lean にしたものです。 + +| 定理 | 内容 | +|---|---| +| `mod_mem_of_prime_factors` | a ≠ 0 のすべての素因数の法 m での剰余が、1 を含み掛け算で閉じた集合 S に入るなら、a の剰余も S に入る | +| `witness_one_one_iff` | シフト (1,1): `(∃ s, s ∣ n + 1 ∧ 4 ∣ s + 1) ↔ n + 1 が 3 (mod 4) の素因数を持つ`(n は任意) | +| `witness_mod_eight_iff` | N ≡ 3 (mod 8) のとき、`(∃ s, s ∣ N ∧ 8 ∣ s + 1) ↔ N が 5 か 7 (mod 8) の素因数を持つ` | +| `witness_one_two_iff` / `witness_two_one_iff` | n ≡ 1 (mod 8) のとき、シフト (1,2)・(2,1) について上を n + 2、2n + 1 に適用 | +| `witness_mod_twelve_iff` | 3 ∤ N のとき、`(∃ s, s ∣ N ∧ 12 ∣ s + 1) ↔ N が 3 (mod 4) の素因数と 5 (mod 6) の素因数を持つ` | +| `witness_one_three_iff` / `witness_three_one_iff` | n ≡ 1 (mod 24) のとき、シフト (1,3)・(3,1) について上を n + 3、3n + 1 に適用 | +| `witness_one_three_iff_of_mod16` / `witness_three_one_iff_of_mod16` | さらに n ≡ 9 (mod 16) なら、3 (mod 4) の条件は自動的に満たされ、5 (mod 6) の素因数の有無だけで決まる | +| `global_signs_of_mod24` | n ≡ 1 (mod 24) なら (n+1)/2 ≡ 1 (mod 4)、n + 2 ≡ 2n + 1 ≡ 3 (mod 8)、n + 3 = 4k・3n + 1 = 4k′ で k ≡ k′ ≡ 1 (mod 3)。つまり a·u ≤ 3 のどの組でも、合同だけでは証人は保証されない | +| `mod24_of_hard` | 6 類の素数は p ≡ 1 (mod 24) | +| `es_of_divisor_three_mod_four` | p + 1 が 3 (mod 4) の約数を持てば ES p(シフト (1,1)) | +| `es_3678481` | 確認: M 検査で ω ≥ 4 の組がすべて失敗した p = 3678481 も、23 ∣ p + 1 から解ける | +| 補助 5 定理 | 3 (mod 4)・7 (mod 8)・3 (mod 8)・2 (mod 3) の数が、それぞれ該当する剰余の素因数を持つこと | + +### 素数 11(S 検査、2026-10-10、4 + 1 定理) + +fork の S 検査(`Research/Simultaneity20261010/`)で、6 類の素数のうち p ≡ 7, 8, 10 (mod 11) のものでは小さい 5 組の全滅が 1 件もありませんでした(7·10⁶ < p < 10⁷ の 1,736 素数)。その初等的な理由です。 +6 類では p mod 3・5・7 が固定されるので、小さい組を決めうる最初の素数が 11 になります。 + +| 定理 | 内容 | +|---|---| +| `eleven_residues` | 4 ∣ 12、12 ∣ 12、8 ∤ 12。11 は (1,1)・(1,3)・(3,1) の証人になりうるが、(1,2)・(2,1) にはならない | +| `witness_of_mod_eleven` | n ≡ 7, 8, 10 (mod 11) なら (3,1)、(1,3)、(1,1) のどれかで s = 11 が証人(a·u ≤ 3、n は任意) | +| `es_of_mod_eleven` | そのとき ES n(n > 0) | +| `hard_examples_mod_eleven` | 前提が 6 類の中で空でないことの確認: 1009(≡ 8)、1129(≡ 7)、4201(≡ 10)は 6 類の素数 | +| `WSum_pos_of_mod_eleven`(`ESWitnessTarget`) | p ≡ 7, 8, 10 (mod 11) なら、予算 B ≥ 3 の箱で WSum p B > 0 | + +素数判定のため、`ESSmallShifts.lean` に `import Mathlib.Tactic.NormNum.Prime` を足しました。 + +### 自明な証人 s = an + u(Q 検査、2026-10-10、4 定理) + +fork の Q 検査(`Research/QR11Bit20261010/`)で、(1,22) は p ≡ 10 (mod 11) の素数ではほとんど失敗しませんでした(10⁷ < p < 1.3·10⁷ の 584 素数ですべて成功)。 +6 類の素数は p ≡ 1 (mod 8) なので p + 22 ≡ −1 (mod 88) となり、ずらした数そのものが証人になるためです(t = 1)。 +この類は S0 の (1,1)・s = 11 ですでに解けているので、**被覆は広がりません**。同じ類に 2 つ目の独立な証人があることを示すものです。 + +| 定理 | 内容 | +|---|---| +| `trivial_witness` | 4au ∣ an + u + 1 なら、an + u 自身が証人 | +| `witness_one_twentytwo` | n ≡ 1 (mod 8) かつ n ≡ 10 (mod 11) なら、(1,22) で s = n + 22 | +| `es_of_hard_mod_eleven_ten` | 6 類の素数で p ≡ 10 (mod 11) なら ES p((1,22)、s = p + 22) | +| `witness_4201_one_twentytwo` | 非空虚性: 4201(法 840 で 1、≡ 10 mod 11)で s = 4223(4224 = 88·48) | + +これで a·u ≤ 3 の 5 組すべての必要十分条件が揃いました。公開済みの E 検査の行(6·10⁶ < p < 7·10⁶ の 1,977 素数)で、5 組の条件と実際の成否は全件一致しました(p ≡ 9 mod 16 の簡略形も一致)。 + +## 出典 + +- Mordell の合同恒等式と法 840 の 6 類: L. J. Mordell, *Diophantine Equations* (1969)。整理は Elsholtz–Tao, arXiv:1107.1010, §1(査読済み: J. Aust. Math. Soc. 94 (2013) 50–105)。 +- Type II の判定条件: Dahan, arXiv:2608.24035, Theorem 3.9(ii)(PR #6 の `DivisorWitness` と同じ形)。Dahan v1(2026-08)は**査読前のプレプリント**です。 + ここで使うのは判定式の形と、その十分性(証人があれば解がある)だけで、十分性は `es_of_witness` として Lean で証明しています。 + 完全性(Type II の解があれば証人がある)には依存していません(2026-10-10 追記)。 +- 解の公式 x = uvt、y = auvn、z = avtn は、こちらで n < 400、a,u ≤ 4 の全 1,957 個の証人で数値的に確かめてから、代数的に証明しました + (4xyz − n(xy+xz+yz) = auv²tn²(4auvt − u − t − an) で、st = an+u、s+1 = 4auv から 0)。 + +## 既存の形式化の調査 + +- mathlib には該当する定理がありません。 +- erdosproblems.com のフォーラムで、Lean 4 プロジェクト `leochlon/erdstrau` が紹介されています(法 840 の一部の類、条件つきの証明書などを報告)。 + こちらではリポジトリの中身を確認していません。同じ帰着の定理があるかは未確認です。 +- google-deepmind/formal-conjectures に、この予想の項目があるかは確認できていません。 + +## 検証 + +| 項目 | 結果 | +|---|---| +| `lake build`(3 モジュールの生成物を消してから) | `ESReduction` Built(15s)、`ESWitnessTarget` Built(12s)、`ESSmallShifts` Built(12s)、1107 jobs、終了コード 0、警告なし。Lean 4.34.0 / mathlib v4.34.0 | +| `#print axioms`(22 + 26 + 26 = 74 定理) | すべて `propext` / `Classical.choice` / `Quot.sound` の部分集合 | +| `scripts/check_policy.py` | 5 files、禁止構文なし。`sorry` / `native_decide` / 新しい公理なし | + +head `4b5a002` の 57 定理は、境界測量士が Outcasts >>45 で命題文を照合し、Lean を再実行しました(PR #6 環境の依存を再利用。マージ・採択はしていません)。その後に足した正規化の 8 定理、素数 11 の 5 定理、自明な証人の 4 定理は作者(ルナ)しか確認していないので、独立した確認には数えません(`docs/PROTOCOL.md` §3)。 + +## 含まないこと + +6 類の素数での解の存在(予想の本体、未解決)。P001 の凍結問題文の変更。Mordell の元の恒等式そのものの形式化。 +「解が多い」「例外集合の密度」などの解析的な結果。