Skip to content

Commit fe0e672

Browse files
committed
feat(AlgebraicGeometry/EllipticCurve/*): some missing lemmas (#22601)
Add the simple lemmas `polynomial_relation` and `Equation.baseChange` that are present in some coordinate files but missing in others, and fix some `evalEval` names based on standard naming conventions.
1 parent 3800f46 commit fe0e672

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,12 @@ lemma negY_negY (x y : R) : W'.negY x (W'.negY x y) = y := by
335335
simp only [negY]
336336
ring1
337337

338-
lemma eval_negPolynomial (x y : R) : W'.negPolynomial.evalEval x y = W'.negY x y := by
338+
lemma evalEval_negPolynomial (x y : R) : W'.negPolynomial.evalEval x y = W'.negY x y := by
339339
rw [negY, sub_sub, negPolynomial]
340340
eval_simp
341341

342+
@[deprecated (since := "2025-03-05")] alias eval_negPolynomial := evalEval_negPolynomial
343+
342344
/-- The line polynomial `ℓ(X - x) + y` associated to the line `Y = ℓ(X - x) + y` that passes through
343345
a nonsingular affine point `(x, y)` on a Weierstrass curve `W` with a slope of `ℓ`.
344346
@@ -473,13 +475,15 @@ lemma slope_of_X_ne {x₁ x₂ y₁ y₂ : F} (hx : x₁ ≠ x₂) :
473475
W.slope x₁ x₂ y₁ y₂ = (y₁ - y₂) / (x₁ - x₂) := by
474476
rw [slope, if_neg hx]
475477

476-
lemma slope_of_Y_ne_eq_eval {x₁ x₂ y₁ y₂ : F} (hx : x₁ = x₂) (hy : y₁ ≠ W.negY x₂ y₂) :
478+
lemma slope_of_Y_ne_eq_evalEval {x₁ x₂ y₁ y₂ : F} (hx : x₁ = x₂) (hy : y₁ ≠ W.negY x₂ y₂) :
477479
W.slope x₁ x₂ y₁ y₂ = -W.polynomialX.evalEval x₁ y₁ / W.polynomialY.evalEval x₁ y₁ := by
478480
rw [slope_of_Y_ne hx hy, evalEval_polynomialX, neg_sub]
479481
congr 1
480482
rw [negY, evalEval_polynomialY]
481483
ring1
482484

485+
@[deprecated (since := "2025-03-05")] alias slope_of_Y_ne_eq_eval := slope_of_Y_ne_eq_evalEval
486+
483487
lemma Y_eq_of_X_eq {x₁ x₂ y₁ y₂ : F} (h₁ : W.Equation x₁ y₁) (h₂ : W.Equation x₂ y₂)
484488
(hx : x₁ = x₂) : y₁ = y₂ ∨ y₁ = W.negY x₂ y₂ := by
485489
rw [equation_iff] at h₁ h₂
@@ -739,10 +743,13 @@ lemma map_polynomial : (W'.map f).toAffine.polynomial = W'.polynomial.map (mapRi
739743
simp only [polynomial]
740744
map_simp
741745

742-
lemma evalEval_baseChange_polynomial_X_Y :
746+
lemma evalEval_baseChange_polynomial :
743747
(W'.baseChange R[X][Y]).toAffine.polynomial.evalEval (C X) Y = W'.polynomial := by
744748
rw [map_polynomial, evalEval, eval_map, eval_C_X_eval₂_map_C_X]
745749

750+
@[deprecated (since := "2025-03-05")] alias evalEval_baseChange_polynomial_X_Y :=
751+
evalEval_baseChange_polynomial
752+
746753
variable {x y} in
747754
lemma Equation.map {x y : R} (h : W'.Equation x y) : (W'.map f).toAffine.Equation (f x) (f y) := by
748755
rw [Equation, map_polynomial, map_mapRingHom_evalEval, h, map_zero]

Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian/Basic.lean

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ group operations in `Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian/Formula.le
3232
* `WeierstrassCurve.Jacobian.Nonsingular`: the nonsingular condition on a point representative.
3333
* `WeierstrassCurve.Jacobian.NonsingularLift`: the nonsingular condition on a point class.
3434
35+
## Main statements
36+
37+
* `WeierstrassCurve.Jacobian.polynomial_relation`: Euler's homogeneous function theorem.
38+
3539
## Implementation notes
3640
3741
All definitions and lemmas for Weierstrass curves in Jacobian coordinates live in the namespace
@@ -351,6 +355,13 @@ lemma eval_polynomialZ (P : Fin 3 → R) : eval P W'.polynomialZ =
351355
rw [polynomialZ_eq]
352356
eval_simp
353357

358+
/-- Euler's homogeneous function theorem in Jacobian coordinates. -/
359+
theorem polynomial_relation (P : Fin 3 → R) : 6 * eval P W'.polynomial =
360+
2 * P x * eval P W'.polynomialX + 3 * P y * eval P W'.polynomialY +
361+
P z * eval P W'.polynomialZ := by
362+
rw [eval_polynomial, eval_polynomialX, eval_polynomialY, eval_polynomialZ]
363+
ring1
364+
354365
variable (W') in
355366
/-- The proposition that a Jacobian point representative `(x, y, z)` on a Weierstrass curve `W` is
356367
nonsingular.
@@ -532,6 +543,12 @@ lemma baseChange_polynomial : (W'.baseChange B).toJacobian.polynomial =
532543
MvPolynomial.map f (W'.baseChange A).toJacobian.polynomial := by
533544
rw [← map_polynomial, map_baseChange]
534545

546+
variable {P} in
547+
lemma Equation.baseChange (h : (W'.baseChange A).toJacobian.Equation P) :
548+
(W'.baseChange B).toJacobian.Equation (f ∘ P) := by
549+
convert Equation.map f.toRingHom h using 1
550+
rw [AlgHom.toRingHom_eq_coe, map_baseChange]
551+
535552
variable {f} in
536553
lemma baseChange_equation (hf : Function.Injective f) :
537554
(W'.baseChange B).toJacobian.Equation (f ∘ P) ↔ (W'.baseChange A).toJacobian.Equation P := by

Mathlib/AlgebraicGeometry/EllipticCurve/Projective/Basic.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,12 @@ lemma baseChange_polynomial : (W'.baseChange B).toProjective.polynomial =
517517
MvPolynomial.map f (W'.baseChange A).toProjective.polynomial := by
518518
rw [← map_polynomial, map_baseChange]
519519

520+
variable {P} in
521+
lemma Equation.baseChange (h : (W'.baseChange A).toProjective.Equation P) :
522+
(W'.baseChange B).toProjective.Equation (f ∘ P) := by
523+
convert Equation.map f.toRingHom h using 1
524+
rw [AlgHom.toRingHom_eq_coe, map_baseChange]
525+
520526
variable {f} in
521527
lemma baseChange_equation (hf : Function.Injective f) :
522528
(W'.baseChange B).toProjective.Equation (f ∘ P) ↔

0 commit comments

Comments
 (0)