Skip to content

Commit f633a40

Browse files
your-name123claude
andcommitted
r133 (B4): the quartic duplication height inequality for 37a1, kappa = 171
- exists_common_factor + naiveHeight_div_int: exact equality naiveHeight(p/Q) = max(|p/d|,|Q/d|), d = gcd - no divInt internals - height_bound_of_coprime: joins r131's reduced_height_bound' - duplication_height_bound (capstone): naiveHeight(x)^4 <= 171 * naiveHeight(f x/g x), unconditional on Q (g never vanishes) - dbl_height: driver-ready form through r132's dbl_x - exactly the quartic step r130's infinite_of_duplication_step consumes kappa = 171 (the 37 cancels; plan's 6327 was conservative). Independently rebuilt; all capstones [propext, Classical.choice, Quot.sound]. lake build PF: 4,631 jobs clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 90ac013 commit f633a40

2 files changed

Lines changed: 252 additions & 0 deletions

File tree

PF_Lean4_Code/PF.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,7 @@ import PF.MordellWeilRankLowerBound_r129 -- r129: non-torsion point => Module.r
934934
import PF.NaiveHeightQ_r130 -- r130 (B1): naive height on Q + the quartic-growth driver for the non-torsion arc
935935
import PF.DuplicationBezout37a1_r131 -- r131 (B3): Bezout identities, gcd-divides-37, quartic size bound (kappa=171*37)
936936
import PF.DuplicationFormula37a1_r132 -- r132 (B2): x(2P) = f(x)/g(x) on 37a1; no rational 2-torsion
937+
import PF.DuplicationHeightBound37a1_r133 -- r133 (B4): naiveHeight(x)^4 <= 171*naiveHeight(x(2P)) - the quartic step
937938

938939
/-!
939940
## Principia Fractalis Formal Verification
Lines changed: 251 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
/-
2+
# PF.DuplicationHeightBound37a1_r133
3+
4+
★★★ 2026-07-27 — B4 OF THE NON-TORSION ARC ★★★
5+
6+
The duplication height inequality for the curve 37a1 (`y² + y = x³ − x`):
7+
stone B4 of the arc mapped in `codex/BSD_NONTORSION_ARC_PLAN_2026-07-27.md`,
8+
joining B2 (`DuplicationFormula37a1_r132`: `x(2P) = f(x)/g(x)`) and B3
9+
(`DuplicationBezout37a1_r131`: gcd/size bounds for the homogenized pair
10+
`F, D`) into the exact quartic step that B1's driver
11+
(`NaiveHeightQ_r130.infinite_of_duplication_step`, with `κ = 171`) consumes.
12+
13+
The capstone:
14+
15+
`duplication_height_bound : naiveHeight x ^ 4 ≤ 171 * naiveHeight (f x / g x)`
16+
17+
for EVERY rational `x` — no on-curve hypothesis is needed, because `g` has no
18+
rational roots (r132) so the fraction `f x / g x` is always defined and the
19+
homogenized denominator `D` never vanishes.
20+
21+
The bookkeeping heart is `naiveHeight_div_int`: for `Q ≠ 0` the reduced
22+
fraction of `p/Q` has numerator and denominator EXACTLY `p/gcd` and `Q/gcd`
23+
(up to sign) — proved elementarily from `Rat.num_div_den` cross-multiplication
24+
plus coprimality of the reduced pair, avoiding any `Rat.divInt` internals.
25+
26+
Also exported: `dbl_height`, the driver-ready corollary through r132's
27+
`dbl_x` — for a rational affine point `P` of 37a1, `P + P = some h'` with
28+
`naiveHeight (x P) ^ 4 ≤ 171 * naiveHeight (x (2P))`.
29+
30+
HONEST SCOPE. This file proves the height inequality for the duplication
31+
RATIONAL MAP of the one curve 37a1 and its transport along r132's group-law
32+
formula. It does not compute any concrete point (B5), does not certify any
33+
point as non-torsion, and does not touch `Module.rank` (r129).
34+
35+
Kernel axioms `[propext, Classical.choice, Quot.sound]`; no `sorry`,
36+
no project axioms, no `native_decide`.
37+
38+
Author: Pablo Cohen + Claude. 2026-07-27.
39+
-/
40+
import PF.NaiveHeightQ_r130
41+
import PF.DuplicationBezout37a1_r131
42+
import PF.DuplicationFormula37a1_r132
43+
import Mathlib.Tactic.FieldSimp
44+
import Mathlib.Tactic.LinearCombination
45+
46+
namespace PrincipiaTractalis.DuplicationHeightBound37a1
47+
48+
open PrincipiaTractalis.NaiveHeightQ
49+
open PrincipiaTractalis.DuplicationBezout37a1
50+
open PrincipiaTractalis.DuplicationFormula37a1
51+
52+
/-! ## §1 — the reduction bookkeeping: `naiveHeight (p/Q)` exactly
53+
54+
For integers `p, Q` with `Q ≠ 0`, the rational `p/Q` in lowest terms has
55+
`|num| = |p|/d` and `den = |Q|/d` for `d = gcd(p, Q)` — an exact equality,
56+
proved without touching `Rat.divInt` internals: cross-multiplying
57+
`p/Q = num/den` gives `p·den = num·Q`; coprimality of `(num, den)` forces
58+
`den ∣ Q`, and the quotient `k = Q/den` satisfies `p = num·k`, `Q = den·k`,
59+
`gcd(p, Q) = |k|`. -/
60+
61+
section Reduction
62+
63+
/-- **Structure of the unreduced fraction.** For `Q ≠ 0` and
64+
`r = (p : ℚ)/(Q : ℚ)`, there is a common factor `k ≠ 0` with
65+
`p = num(r)·k` and `Q = den(r)·k`. -/
66+
theorem exists_common_factor (p Q : ℤ) (hQ : Q ≠ 0) :
67+
∃ k : ℤ, k ≠ 0 ∧ p = ((p : ℚ) / (Q : ℚ)).num * k
68+
∧ Q = (((p : ℚ) / (Q : ℚ)).den : ℤ) * k := by
69+
set r : ℚ := (p : ℚ) / (Q : ℚ) with hr
70+
have hQQ : (Q : ℚ) ≠ 0 := Int.cast_ne_zero.mpr hQ
71+
have hdenQ : ((r.den : ℚ)) ≠ 0 := by exact_mod_cast r.den_ne_zero
72+
have hden0 : ((r.den : ℤ)) ≠ 0 := by exact_mod_cast r.den_ne_zero
73+
-- cross-multiplication: p · den(r) = num(r) · Q
74+
have h1 : (p : ℚ) / (Q : ℚ) = (r.num : ℚ) / (r.den : ℚ) := by
75+
rw [← hr]; exact (Rat.num_div_den r).symm
76+
have hcross : p * (r.den : ℤ) = r.num * Q := by
77+
exact_mod_cast (div_eq_div_iff hQQ hdenQ).mp h1
78+
-- coprimality of the reduced pair
79+
have hcop : IsCoprime r.num (r.den : ℤ) := by
80+
rw [Int.isCoprime_iff_gcd_eq_one]
81+
simpa [Int.gcd, Int.natAbs_natCast] using r.reduced
82+
-- den(r) ∣ Q, and the quotient is the common factor
83+
have hnum_mul : (r.den : ℤ) ∣ r.num * Q := ⟨p, by linear_combination -hcross⟩
84+
have hdvd : (r.den : ℤ) ∣ Q := hcop.symm.dvd_of_dvd_mul_left hnum_mul
85+
refine ⟨Q / (r.den : ℤ), ?_, ?_, (Int.mul_ediv_cancel' hdvd).symm⟩
86+
· intro h0
87+
exact hQ (by rw [← Int.mul_ediv_cancel' hdvd, h0, mul_zero])
88+
· refine mul_right_cancel₀ hden0 ?_
89+
have hQk : Q = (r.den : ℤ) * (Q / (r.den : ℤ)) :=
90+
(Int.mul_ediv_cancel' hdvd).symm
91+
linear_combination hcross + r.num * hQk
92+
93+
/-- **The exact height of an unreduced fraction.** For `Q ≠ 0` and
94+
`d = gcd(p, Q)`: `naiveHeight (p/Q) = max |p/d| |Q/d|`. This is the bridge
95+
between r131's reduced max (stated on `F/gcd`, `D/gcd`) and r130's
96+
`naiveHeight` (stated on `num`, `den`). -/
97+
theorem naiveHeight_div_int (p Q : ℤ) (hQ : Q ≠ 0) :
98+
naiveHeight ((p : ℚ) / (Q : ℚ))
99+
= max ((p / (Int.gcd p Q : ℤ)).natAbs) ((Q / (Int.gcd p Q : ℤ)).natAbs) := by
100+
obtain ⟨k, hk0, hpk, hQk⟩ := exists_common_factor p Q hQ
101+
set r : ℚ := (p : ℚ) / (Q : ℚ) with hr
102+
-- gcd(p, Q) = |k|
103+
have hd : Int.gcd p Q = k.natAbs := by
104+
rw [hpk, hQk]
105+
unfold Int.gcd
106+
rw [Int.natAbs_mul, Int.natAbs_mul, Nat.gcd_mul_right, Int.natAbs_natCast,
107+
r.reduced.gcd_eq_one, one_mul]
108+
have hdpos : 0 < Int.gcd p Q := by
109+
rw [hd]; exact Int.natAbs_pos.mpr hk0
110+
-- |p/d|·d = |p| and |Q/d|·d = |Q| (exact division by the gcd)
111+
have ep : (p / (Int.gcd p Q : ℤ)).natAbs * Int.gcd p Q = p.natAbs := by
112+
calc (p / (Int.gcd p Q : ℤ)).natAbs * Int.gcd p Q
113+
= (p / (Int.gcd p Q : ℤ)).natAbs * ((Int.gcd p Q : ℤ)).natAbs := by
114+
rw [Int.natAbs_natCast]
115+
_ = ((p / (Int.gcd p Q : ℤ)) * (Int.gcd p Q : ℤ)).natAbs :=
116+
(Int.natAbs_mul _ _).symm
117+
_ = p.natAbs := by rw [Int.ediv_mul_cancel (Int.gcd_dvd_left _ _)]
118+
have eQ : (Q / (Int.gcd p Q : ℤ)).natAbs * Int.gcd p Q = Q.natAbs := by
119+
calc (Q / (Int.gcd p Q : ℤ)).natAbs * Int.gcd p Q
120+
= (Q / (Int.gcd p Q : ℤ)).natAbs * ((Int.gcd p Q : ℤ)).natAbs := by
121+
rw [Int.natAbs_natCast]
122+
_ = ((Q / (Int.gcd p Q : ℤ)) * (Int.gcd p Q : ℤ)).natAbs :=
123+
(Int.natAbs_mul _ _).symm
124+
_ = Q.natAbs := by rw [Int.ediv_mul_cancel (Int.gcd_dvd_right _ _)]
125+
-- |p| = |num(r)|·d and |Q| = den(r)·d
126+
have hpabs : p.natAbs = r.num.natAbs * Int.gcd p Q := by
127+
rw [hd, hpk, Int.natAbs_mul]
128+
have hQabs : Q.natAbs = r.den * Int.gcd p Q := by
129+
rw [hd, hQk, Int.natAbs_mul, Int.natAbs_natCast]
130+
-- cancel d
131+
have hnum_eq : (p / (Int.gcd p Q : ℤ)).natAbs = r.num.natAbs :=
132+
Nat.eq_of_mul_eq_mul_right hdpos (by rw [ep, hpabs])
133+
have hden_eq : (Q / (Int.gcd p Q : ℤ)).natAbs = r.den :=
134+
Nat.eq_of_mul_eq_mul_right hdpos (by rw [eQ, hQabs])
135+
simp only [naiveHeight]
136+
rw [hnum_eq, hden_eq]
137+
138+
end Reduction
139+
140+
/-! ## §2 — the height bound in homogenized coordinates
141+
142+
Composing §1 with r131's `reduced_height_bound'`: for coprime `(a, b)` with
143+
`b ≠ 0` and `D a b ≠ 0`, the height of `F/D : ℚ` dominates `H⁴/171`. -/
144+
145+
/-- The B3 bound transported to `naiveHeight`:
146+
`H⁴ ≤ 171 · naiveHeight (F/D)` for `H = max |a| |b|`. -/
147+
theorem height_bound_of_coprime {a b : ℤ} (hcop : IsCoprime a b) (hb : b ≠ 0)
148+
(hD : D a b ≠ 0) :
149+
(max a.natAbs b.natAbs) ^ 4
150+
171 * naiveHeight ((F a b : ℚ) / (D a b : ℚ)) := by
151+
rw [naiveHeight_div_int (F a b) (D a b) hD]
152+
exact reduced_height_bound' hcop hb hD
153+
154+
/-! ## §3 — dehomogenization: `f x / g x = F/D` for `x = num/den` -/
155+
156+
section Cast
157+
158+
private theorem F_cast (a b : ℤ) (hb : (b : ℚ) ≠ 0) :
159+
((F a b : ℤ) : ℚ) = (b : ℚ) ^ 4 * f ((a : ℚ) / (b : ℚ)) := by
160+
simp only [F, f]
161+
push_cast
162+
field_simp
163+
164+
private theorem D_cast (a b : ℤ) (hb : (b : ℚ) ≠ 0) :
165+
((D a b : ℤ) : ℚ) = (b : ℚ) ^ 4 * g ((a : ℚ) / (b : ℚ)) := by
166+
simp only [D, G3, g]
167+
push_cast
168+
field_simp
169+
170+
end Cast
171+
172+
/-! ## §4 — THE CAPSTONE: the duplication height inequality on 37a1
173+
174+
For every rational `x` (no on-curve hypothesis: `g` never vanishes on ℚ
175+
by r132's `g_ne_zero`, so the fraction and the homogeneous denominator are
176+
always honest):
177+
178+
`naiveHeight x ^ 4 ≤ 171 * naiveHeight (f x / g x)`.
179+
180+
This is exactly the quartic step `h(P)⁴ ≤ κ · h(2P)` with `κ = 171` that
181+
r130's `infinite_of_duplication_step` consumes. -/
182+
183+
/-- **The duplication height inequality for 37a1.** -/
184+
theorem duplication_height_bound (x : ℚ) :
185+
naiveHeight x ^ 4171 * naiveHeight (f x / g x) := by
186+
-- the reduced coordinates of x
187+
have hb : ((x.den : ℤ)) ≠ 0 := by exact_mod_cast x.den_ne_zero
188+
have hbQ : (((x.den : ℤ)) : ℚ) ≠ 0 := by exact_mod_cast x.den_ne_zero
189+
have hcop : IsCoprime x.num ((x.den : ℤ)) := by
190+
rw [Int.isCoprime_iff_gcd_eq_one]
191+
simpa [Int.gcd, Int.natAbs_natCast] using x.reduced
192+
have hx : x = (x.num : ℚ) / (((x.den : ℤ)) : ℚ) := by
193+
rw [Int.cast_natCast]
194+
exact (Rat.num_div_den x).symm
195+
-- dehomogenize F and D against f and g
196+
have hfval : ((F x.num (x.den : ℤ) : ℤ) : ℚ)
197+
= (((x.den : ℤ)) : ℚ) ^ 4 * f x := by
198+
have h := F_cast x.num (x.den : ℤ) hbQ
199+
rw [← hx] at h
200+
exact h
201+
have hDval : ((D x.num (x.den : ℤ) : ℤ) : ℚ)
202+
= (((x.den : ℤ)) : ℚ) ^ 4 * g x := by
203+
have h := D_cast x.num (x.den : ℤ) hbQ
204+
rw [← hx] at h
205+
exact h
206+
-- the homogeneous denominator never vanishes (g has no rational roots)
207+
have hgx : g x ≠ 0 := g_ne_zero x
208+
have hD : D x.num (x.den : ℤ) ≠ 0 := by
209+
intro h0
210+
apply mul_ne_zero (pow_ne_zero 4 hbQ) hgx
211+
rw [← hDval, h0, Int.cast_zero]
212+
-- the fraction identity
213+
have hfg : f x / g x
214+
= ((F x.num (x.den : ℤ) : ℤ) : ℚ) / ((D x.num (x.den : ℤ) : ℤ) : ℚ) := by
215+
rw [hfval, hDval, mul_div_mul_left _ _ (pow_ne_zero 4 hbQ)]
216+
-- naiveHeight x in homogenized form
217+
have hHx : max x.num.natAbs ((x.den : ℤ)).natAbs = naiveHeight x := by
218+
simp only [naiveHeight, Int.natAbs_natCast]
219+
calc naiveHeight x ^ 4
220+
= (max x.num.natAbs ((x.den : ℤ)).natAbs) ^ 4 := by rw [hHx]
221+
_ ≤ 171 * naiveHeight
222+
((F x.num (x.den : ℤ) : ℚ) / (D x.num (x.den : ℤ) : ℚ)) :=
223+
height_bound_of_coprime hcop hb hD
224+
_ = 171 * naiveHeight (f x / g x) := by rw [← hfg]
225+
226+
/-! ## §5 — the driver-ready corollary through the group law (B2 + B4)
227+
228+
For a rational affine point `P` of 37a1, doubling stays affine (r132) and the
229+
new x-coordinate's height satisfies the quartic step. -/
230+
231+
open WeierstrassCurve WeierstrassCurve.Affine in
232+
/-- **Duplication height step on the curve.** For any rational affine point
233+
`P = some h` of 37a1 at `(x, y)`: `P + P` is an affine point `some h'` at
234+
some `(x', y')` with `naiveHeight x ^ 4 ≤ 171 * naiveHeight x'`. This is the
235+
exact shape B5 feeds into r130's `infinite_of_duplication_step` (κ = 171). -/
236+
theorem dbl_height {x y : ℚ} (h : E37a1.toAffine.Nonsingular x y) :
237+
∃ (x' y' : ℚ) (h' : E37a1.toAffine.Nonsingular x' y'),
238+
Point.some h + Point.some h = Point.some h' ∧
239+
naiveHeight x ^ 4171 * naiveHeight x' := by
240+
obtain ⟨x', y', h', hadd, hx'⟩ := dbl_x h
241+
refine ⟨x', y', h', hadd, ?_⟩
242+
rw [hx']
243+
exact duplication_height_bound x
244+
245+
end PrincipiaTractalis.DuplicationHeightBound37a1
246+
247+
#print axioms PrincipiaTractalis.DuplicationHeightBound37a1.exists_common_factor
248+
#print axioms PrincipiaTractalis.DuplicationHeightBound37a1.naiveHeight_div_int
249+
#print axioms PrincipiaTractalis.DuplicationHeightBound37a1.height_bound_of_coprime
250+
#print axioms PrincipiaTractalis.DuplicationHeightBound37a1.duplication_height_bound
251+
#print axioms PrincipiaTractalis.DuplicationHeightBound37a1.dbl_height

0 commit comments

Comments
 (0)