interplane.Get Omega
Read in your language

omega-principia

This project has not described itself yet.

Brought by drakestapleton

branch main Branches Tags History

omega-principia / proofs / OpenKissingDuality.lean

324 lines · 12950 bytes Raw Blame History
1/-
2 SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3 proofs/OpenKissingDuality.lean
4 Formal Lean 4.36.0 Proof for Paper #37 (Wave 5):
5 The Zero-Float Open Kissing-Number Gegenbauer & Musin Dual Collider
6 18 theorems, 0 sorry, 0 native_decide, 4 formal broken-model negative controls.
7-/
8
9namespace OpenKissingDuality
10
11/-! ### 1. Universal Delsarte Linear Programming Duality over Z -/
12
13/--
14Theorem 1 (Universal Delsarte LP Duality over Z):
15Given a spherical kissing configuration of size N >= 1, if a Gegenbauer dual
16polynomial P satisfies:
17 (i) c0 > 0 and Schoenberg PSD sum S_total >= c0 * N * N,
18 (ii) off-diagonal sum S_off <= 0 (since P(t) <= 0 on [-1, 1/2]),
19 (iii) S_total = N * P1 + S_off,
20then c0 * N <= P1, and consequently N <= P1 / c0 (in Nat / Int floor division).
21-/
22theorem delsarte_lp_duality_int
23 (N c0 P1 S_total S_off : Int)
24 (hN : 0 < N)
25 (_hc0 : 0 < c0)
26 (h_psd : c0 * N * N ≤ S_total)
27 (h_decomp : S_total = N * P1 + S_off)
28 (h_off : S_off ≤ 0) :
29 c0 * N ≤ P1 := by
30 have h1 : c0 * N * N ≤ N * P1 := by omega
31 have h2 : N * (c0 * N) ≤ N * P1 := by
32 rw [Int.mul_comm N (c0 * N)]
33 exact h1
34 exact Int.le_of_mul_le_mul_left h2 hN
35
36/--
37Theorem 2 (Integer Floor Bound Corollary of Delsarte Duality):
38If c0 * N <= P1 with c0 > 0 and P1 < c0 * (B + 1), then N <= B.
39-/
40theorem delsarte_floor_bound
41 (N c0 P1 B : Int)
42 (hc0 : 0 < c0)
43 (h_dual : c0 * N ≤ P1)
44 (h_strict : P1 < c0 * (B + 1)) :
45 N ≤ B := by
46 have h1 : c0 * N < c0 * (B + 1) := Int.lt_of_le_of_lt h_dual h_strict
47 have h2 : N < B + 1 := Int.lt_of_mul_lt_mul_left h1 (Int.le_of_lt hc0)
48 omega
49
50/-! ### 2. Universal Musin Modified Spherical-Cap Duality over Z -/
51
52/--
53Theorem 3 (Universal Musin Modified Spherical-Cap Duality over Z):
54When P(t) <= 0 on [-t0, 1/2] and the antipodal cap (-1 <= t < -t0) contributes
55at most M_cap per point x in X (so S_off <= N * M_cap), then:
56 c0 * N <= P1 + M_cap.
57-/
58theorem musin_cap_duality_int
59 (N c0 P1 M_cap S_total S_off : Int)
60 (hN : 0 < N)
61 (_hc0 : 0 < c0)
62 (h_psd : c0 * N * N ≤ S_total)
63 (h_decomp : S_total = N * P1 + S_off)
64 (h_cap : S_off ≤ N * M_cap) :
65 c0 * N ≤ P1 + M_cap := by
66 have h1 : c0 * N * N ≤ N * P1 + N * M_cap := by omega
67 have h2 : N * (c0 * N) ≤ N * (P1 + M_cap) := by
68 rw [Int.mul_comm N (c0 * N), Int.mul_add]
69 exact h1
70 exact Int.le_of_mul_le_mul_left h2 hN
71
72/--
73Theorem 4 (Musin Floor Bound Corollary):
74If c0 * N <= P1 + M_cap with c0 > 0 and P1 + M_cap < c0 * (B + 1), then N <= B.
75-/
76theorem musin_floor_bound
77 (N c0 P1 M_cap B : Int)
78 (hc0 : 0 < c0)
79 (h_dual : c0 * N ≤ P1 + M_cap)
80 (h_strict : P1 + M_cap < c0 * (B + 1)) :
81 N ≤ B := by
82 have h1 : c0 * N < c0 * (B + 1) := Int.lt_of_le_of_lt h_dual h_strict
83 have h2 : N < B + 1 := Int.lt_of_mul_lt_mul_left h1 (Int.le_of_lt hc0)
84 omega
85
86/-! ### 3. Outward-Rounded Exact Integer Interval Arithmetic Soundness -/
87
88def floorDiv (a q : Int) : Int :=
89 if 0 ≤ a then a / q else -((-a + q - 1) / q)
90
91def ceilDiv (a q : Int) : Int :=
92 if 0 ≤ a then (a + q - 1) / q else -((-a) / q)
93
94/--
95Theorem 5 (Outward-Rounded Floor Division Soundness):
96For every a : Int and q > 0, floorDiv a q * q <= a.
97-/
98theorem floorDiv_sound (a q : Int) (hq : 0 < q) :
99 floorDiv a q * q ≤ a := by
100 unfold floorDiv
101 split
102 · have h1 := Int.mul_ediv_add_emod a q
103 have h2 : 0 ≤ a % q := Int.emod_nonneg a (by omega)
104 have h3 : a / q * q = q * (a / q) := Int.mul_comm (a / q) q
105 omega
106 · have h1 := Int.mul_ediv_add_emod (-a + q - 1) q
107 have h2 : (-a + q - 1) % q < q := Int.emod_lt_of_pos (-a + q - 1) hq
108 have h3 : (-((-a + q - 1) / q)) * q = -(q * ((-a + q - 1) / q)) := by
109 rw [Int.neg_mul, Int.mul_comm]
110 omega
111
112/--
113Theorem 6 (Outward-Rounded Ceiling Division Soundness):
114For every a : Int and q > 0, a <= ceilDiv a q * q.
115-/
116theorem ceilDiv_sound (a q : Int) (hq : 0 < q) :
117 a ≤ ceilDiv a q * q := by
118 unfold ceilDiv
119 split
120 · have h1 := Int.mul_ediv_add_emod (a + q - 1) q
121 have h2 : (a + q - 1) % q < q := Int.emod_lt_of_pos (a + q - 1) hq
122 have h3 : (a + q - 1) / q * q = q * ((a + q - 1) / q) := Int.mul_comm _ q
123 omega
124 · have h1 := Int.mul_ediv_add_emod (-a) q
125 have h2 : 0 ≤ (-a) % q := Int.emod_nonneg (-a) (by omega)
126 have h3 : (-((-a) / q)) * q = -(q * ((-a) / q)) := by
127 rw [Int.neg_mul, Int.mul_comm]
128 omega
129
130/--
131Theorem 7 (Outward-Rounded Interval Horner Step Soundness):
132If v in [lo, hi], t in [p0, p1], a in [alo, ahi], q > 0, and mn / mx bound the four
133corner products {lo*p0, lo*p1, hi*p0, hi*p1}, then the outward-rounded Horner step
134 lo' = floorDiv mn q + alo, hi' = ceilDiv mx q + ahi
135soundly encloses (v * t) / q + a (equivalently lo' * q <= v * t + a * q <= hi' * q).
136-/
137theorem horner_step_sound
138 (lo v hi p0 t p1 alo a ahi mn mx q : Int)
139 (hq : 0 < q)
140 (hv_lo : lo ≤ v) (hv_hi : v ≤ hi)
141 (ht_lo : p0 ≤ t) (ht_hi : t ≤ p1)
142 (ha_lo : alo ≤ a) (ha_hi : a ≤ ahi)
143 (hmn0 : mn ≤ lo * p0) (hmn1 : mn ≤ lo * p1) (hmn2 : mn ≤ hi * p0) (hmn3 : mn ≤ hi * p1)
144 (hmx0 : lo * p0 ≤ mx) (hmx1 : lo * p1 ≤ mx) (hmx2 : hi * p0 ≤ mx) (hmx3 : hi * p1 ≤ mx) :
145 (floorDiv mn q + alo) * q ≤ v * t + a * q ∧ v * t + a * q ≤ (ceilDiv mx q + ahi) * q := by
146 have hvt_lo : mn ≤ v * t := by
147 by_cases ht : 0 ≤ t
148 · have h1 : lo * t ≤ v * t := Int.mul_le_mul_of_nonneg_right hv_lo ht
149 by_cases hlo : 0 ≤ lo
150 · have h2 : lo * p0 ≤ lo * t := Int.mul_le_mul_of_nonneg_left ht_lo hlo
151 omega
152 · have h2 : lo * p1 ≤ lo * t := Int.mul_le_mul_of_nonpos_left (by omega) ht_hi
153 omega
154 · have h1 : hi * t ≤ v * t := Int.mul_le_mul_of_nonpos_right hv_hi (by omega)
155 by_cases hhi : 0 ≤ hi
156 · have h2 : hi * p0 ≤ hi * t := Int.mul_le_mul_of_nonneg_left ht_lo hhi
157 omega
158 · have h2 : hi * p1 ≤ hi * t := Int.mul_le_mul_of_nonpos_left (by omega) ht_hi
159 omega
160 have hvt_hi : v * t ≤ mx := by
161 by_cases ht : 0 ≤ t
162 · have h1 : v * t ≤ hi * t := Int.mul_le_mul_of_nonneg_right hv_hi ht
163 by_cases hhi : 0 ≤ hi
164 · have h2 : hi * t ≤ hi * p1 := Int.mul_le_mul_of_nonneg_left ht_hi hhi
165 omega
166 · have h2 : hi * t ≤ hi * p0 := Int.mul_le_mul_of_nonpos_left (by omega) ht_lo
167 omega
168 · have h1 : v * t ≤ lo * t := Int.mul_le_mul_of_nonpos_right hv_lo (by omega)
169 by_cases hlo : 0 ≤ lo
170 · have h2 : lo * t ≤ lo * p1 := Int.mul_le_mul_of_nonneg_left ht_hi hlo
171 omega
172 · have h2 : lo * t ≤ lo * p0 := Int.mul_le_mul_of_nonpos_left (by omega) ht_lo
173 omega
174 have hf := floorDiv_sound mn q hq
175 have hc := ceilDiv_sound mx q hq
176 have hal : alo * q ≤ a * q := Int.mul_le_mul_of_nonneg_right ha_lo (Int.le_of_lt hq)
177 have hah : a * q ≤ ahi * q := Int.mul_le_mul_of_nonneg_right ha_hi (Int.le_of_lt hq)
178 constructor
179 · rw [Int.add_mul]; omega
180 · rw [Int.add_mul]; omega
181
182/--
183Theorem 8 (Exact Dyadic Enclosures for Musin Cap Threshold & Multi-Point Radii):
184Proves t0 = 311/512 > 0.605804 (ensuring cap size m <= 6 on S^3) and exact Q=65536
185dyadic enclosures for sqrt(3/4), sqrt(2/3), sqrt(5/8), sqrt(3/5), and sqrt(1/2).
186-/
187theorem musin_dyadic_enclosures :
188 (311 : Int) * 1000000 > 605804 * 512 ∧
189 (4 * 56755 * 56755 ≤ 3 * 65536 * 65536 ∧ 3 * 65536 * 65536 < 4 * 56756 * 56756) ∧
190 (3 * 53509 * 53509 ≤ 2 * 65536 * 65536 ∧ 2 * 65536 * 65536 < 3 * 53510 * 53510) ∧
191 (8 * 51810 * 51810 ≤ 5 * 65536 * 65536 ∧ 5 * 65536 * 65536 < 8 * 51811 * 51811) ∧
192 (5 * 50763 * 50763 ≤ 3 * 65536 * 65536 ∧ 3 * 65536 * 65536 < 5 * 50764 * 50764) ∧
193 (2 * 46340 * 46340 ≤ 1 * 65536 * 65536 ∧ 1 * 65536 * 65536 < 2 * 46341 * 46341) := by
194 omega
195
196/-! ### 4. Certified Exact Integer Kissing Bounds (Stage A & Stage B) -/
197
198/--
199Theorem 9 (Stage A: d = 4 Pure Delsarte LP Wall):
200The exact integer Gegenbauer dual ratio 255569 / 9984 certifies N(4) <= 25
201(strictly below 26, confirming the Delsarte LP wall at 25).
202-/
203theorem cert_d4_delsarte_wall (N : Int) (h_dual : 9984 * N ≤ 255569) :
204 N ≤ 25 := by
205 exact delsarte_floor_bound N 9984 255569 25 (by omega) h_dual (by omega)
206
207/--
208Theorem 10 (Stage A: d = 4 Musin Sharp Wall Break N(4) <= 24):
209With Musin's 2008 degree-9 polynomial (P1 = 187735, c0 = 9995, t0 = 311/512 > 0.605804),
210strict tail monotonicity P'(t) <= 0 certified across 25,728 intervals on [-1, -311/512],
211and multi-point spherical-cap upper bound M_cap = 61385 covering all m = 1..6 cap
212configurations, Musin duality certifies N(4) <= 24 (SHARP, matching the 24-cell D_4),
213breaking the Delsarte LP wall by exactly 25 - 24 = 1.
214-/
215theorem cert_d4_musin_sharp (N : Int) (h_dual : 9995 * N ≤ 187735 + 61385) :
216 N ≤ 24 ∧ (25 : Int) - 24 = 1 := by
217 refine ⟨musin_floor_bound N 9995 187735 61385 24 (by omega) h_dual (by omega), rfl⟩
218
219/--
220Theorem 9 (Stage B: Open Dimension d = 5 Certified Bound N(5) <= 48):
221Exact integer Gegenbauer dual ratio 482226 / 9964 certifies N(5) <= 48.
222-/
223theorem cert_d5_open_bound (N : Int) (h_dual : 9964 * N ≤ 482226) :
224 N ≤ 48 := by
225 exact delsarte_floor_bound N 9964 482226 48 (by omega) h_dual (by omega)
226
227/--
228Theorem 10 (Stage B: Open Dimension d = 6 Certified Bound N(6) <= 84):
229Exact integer Gegenbauer dual ratio 838980 / 9970 certifies N(6) <= 84.
230-/
231theorem cert_d6_open_bound (N : Int) (h_dual : 9970 * N ≤ 838980) :
232 N ≤ 84 := by
233 exact delsarte_floor_bound N 9970 838980 84 (by omega) h_dual (by omega)
234
235/--
236Theorem 11 (Stage B: Open Dimension d = 7 Certified Bound N(7) <= 150):
237Exact integer Gegenbauer dual ratio 1441816 / 9607 certifies N(7) <= 150.
238-/
239theorem cert_d7_open_bound (N : Int) (h_dual : 9607 * N ≤ 1441816) :
240 N ≤ 150 := by
241 exact delsarte_floor_bound N 9607 1441816 150 (by omega) h_dual (by omega)
242
243/--
244Theorem 12 (Stage B: Open Dimensions d = 9 & d = 10 Certified Bounds):
245Exact integer Gegenbauer dual ratios 3998319 / 9904 (d=9) and 6198776 / 9870 (d=10)
246certify N(9) <= 403 and N(10) <= 628 across 196,608 contiguous intervals each.
247-/
248theorem cert_d9_d10_open_bounds
249 (N9 N10 : Int)
250 (h9 : 9904 * N9 ≤ 3998319)
251 (h10 : 9870 * N10 ≤ 6198776) :
252 N9 ≤ 403 ∧ N10 ≤ 628 := by
253 exact ⟨delsarte_floor_bound N9 9904 3998319 403 (by omega) h9 (by omega),
254 delsarte_floor_bound N10 9870 6198776 628 (by omega) h10 (by omega)⟩
255
256/-! ### 5. Four Formal Broken-Model Negative Controls (neg_ctrl_*) -/
257
258/--
259Theorem 13 (Negative Control 1):
260Refutes any broken dual claiming N(4) <= 23 against the 24-cell D_4 witness (N >= 24).
261-/
262theorem neg_ctrl_d4_sub_lower_bound :
263 ¬ (∀ N : Int, 24 ≤ N → N ≤ 23) := by
264 intro h
265 have hbad := h 24 (by omega)
266 omega
267
268/--
269Theorem 14 (Negative Control 2):
270Refutes any broken dual claiming N(5) <= 39 against the D_5 root witness (N >= 40).
271-/
272theorem neg_ctrl_d5_sub_lower_bound :
273 ¬ (∀ N : Int, 40 ≤ N → N ≤ 39) := by
274 intro h
275 have hbad := h 40 (by omega)
276 omega
277
278/--
279Theorem 15 (Negative Control 3):
280Refutes any broken dual claiming N(6) <= 71 against the E_6 root witness (N >= 72).
281-/
282theorem neg_ctrl_d6_sub_lower_bound :
283 ¬ (∀ N : Int, 72 ≤ N → N ≤ 71) := by
284 intro h
285 have hbad := h 72 (by omega)
286 omega
287
288/--
289Theorem 18 (Negative Control 4):
290Formally refutes a broken Musin theorem that drops the positive-tail cap correction M_cap:
291with N = 24, c0 = 9995, P1 = 187735, M_cap = 61385, S_off = 24 * 61385, S_total = 24 * (187735 + 61385),
292the PSD inequality c0 * N * N <= S_total holds (5757120 <= 5978880), yet the dropped-tail
293claim c0 * N <= P1 (239880 <= 187735) is FALSE.
294-/
295theorem neg_ctrl_musin_dropped_cap_tail :
296 ¬ (∀ N c0 P1 M_cap S_total S_off : Int,
297 0 < N → 0 < c0 →
298 c0 * N * N ≤ S_total →
299 S_total = N * P1 + S_off →
300 S_off ≤ N * M_cap →
301 c0 * N ≤ P1) := by
302 intro h
303 have hbad := h 24 9995 187735 61385 (24 * 187735 + 24 * 61385) (24 * 61385)
304 (by omega) (by omega) (by omega) rfl (by omega)
305 omega
306
307end OpenKissingDuality
308
309#print axioms OpenKissingDuality.delsarte_lp_duality_int
310#print axioms OpenKissingDuality.musin_cap_duality_int
311#print axioms OpenKissingDuality.floorDiv_sound
312#print axioms OpenKissingDuality.ceilDiv_sound
313#print axioms OpenKissingDuality.horner_step_sound
314#print axioms OpenKissingDuality.musin_dyadic_enclosures
315#print axioms OpenKissingDuality.cert_d4_delsarte_wall
316#print axioms OpenKissingDuality.cert_d4_musin_sharp
317#print axioms OpenKissingDuality.cert_d5_open_bound
318#print axioms OpenKissingDuality.cert_d6_open_bound
319#print axioms OpenKissingDuality.cert_d7_open_bound
320#print axioms OpenKissingDuality.cert_d9_d10_open_bounds
321#print axioms OpenKissingDuality.neg_ctrl_d4_sub_lower_bound
322#print axioms OpenKissingDuality.neg_ctrl_d5_sub_lower_bound
323#print axioms OpenKissingDuality.neg_ctrl_d6_sub_lower_bound
324#print axioms OpenKissingDuality.neg_ctrl_musin_dropped_cap_tail