@@ -3,7 +3,7 @@ Copyright (c) 2024 Junyan Xu. All rights reserved.
33Released under Apache 2.0 license as described in the file LICENSE.
44Authors: Junyan Xu
55-/
6- import Mathlib.AlgebraicGeometry.EllipticCurve.Group
6+ import Mathlib.AlgebraicGeometry.EllipticCurve.Jacobian.Point
77
88/-!
99# The universal elliptic curve
@@ -27,7 +27,7 @@ order on the universal pointed elliptic curve.
2727
2828noncomputable section
2929
30- open scoped PolynomialPolynomial
30+ open scoped Polynomial.Bivariate
3131
3232namespace WeierstrassCurve
3333
@@ -37,7 +37,7 @@ inductive Coeff : Type | A₁ : Coeff | A₂ : Coeff | A₃ : Coeff | A₄ : Coe
3737
3838namespace Universal
3939
40- open scoped Polynomial PolynomialPolynomial
40+ open scoped Polynomial Polynomial.Bivariate
4141open Coeff
4242
4343open MvPolynomial (X) in
@@ -86,26 +86,33 @@ lemma algebraMap_ring_eq_comp :
8686lemma algebraMap_field_injective :
8787 Function.Injective (algebraMap (MvPolynomial Coeff ℤ) Universal.Field) :=
8888 (IsFractionRing.injective Universal.Ring Universal.Field).comp
89- (Affine.CoordinateRing.algebraMap_injective' _ )
89+ (Affine.CoordinateRing.algebraMap_injective' (W' := curve) )
9090
9191/-- The universal pointed Weierstrass curve is an elliptic curve
92- when base-changed to the the universal field. -/
93- def pointedCurve : EllipticCurve Universal.Field where
94- __ := baseChange curve Universal.Field
95- Δ' := .mk0 (baseChange curve Universal.Field).Δ <| by
96- simpa only [map_Δ, map_ne_zero_iff _ algebraMap_field_injective] using Δ_curve_ne_zero
97- coe_Δ' := rfl
92+ when base-changed to the universal field. -/
93+ abbrev pointedCurve : WeierstrassCurve Universal.Field := baseChange curve Universal.Field
94+
95+ instance : pointedCurve.IsElliptic where
96+ isUnit := by
97+ rw [show pointedCurve.Δ = _ from map_Δ curve (algebraMap _ Universal.Field)]
98+ exact ((map_ne_zero_iff _ algebraMap_field_injective).mpr Δ_curve_ne_zero).isUnit
9899
99100open Polynomial in
100101lemma equation_point : pointedCurve.toAffine.Equation (polyToField (C X)) (polyToField Y) := by
101- simp_rw [Affine.Equation, pointedCurve, baseChange, EllipticCurve.toAffine,
102- algebraMap_field_eq_comp, ← map_map, Affine.map_polynomial_evalEval, Affine.map_polynomial,
103- evalEval, eval_map, eval_C_X_eval₂_map_C_X, polyToField_polynomial]
102+ show evalEval (polyToField (C X)) (polyToField Y)
103+ ((curve.map (algebraMap _ Universal.Field)).toAffine.polynomial) = 0
104+ have h : (evalEvalRingHom (polyToField (C X)) (polyToField Y)).comp
105+ (mapRingHom <| mapRingHom (algebraMap _ Universal.Field)) = polyToField := by
106+ ext <;> simp [polyToField, algebraMap_field_eq_comp]
107+ have : ∀ p, evalEval (polyToField (C X)) (polyToField Y)
108+ (p.map (mapRingHom (algebraMap _ Universal.Field))) = polyToField p :=
109+ fun p ↦ congr($h p)
110+ rw [Affine.map_polynomial, this, polyToField_polynomial]
104111
105112open Polynomial Affine in
106113/-- The distinguished point on the universal pointed Weierstrass curve. -/
107114def Affine.point : curve⟮Universal.Field⟯ :=
108- .some (EllipticCurve.Affine.nonsingular pointedCurve equation_point)
115+ .some (equation_iff_nonsingular.mp equation_point)
109116
110117/-- The distinguished point on the universal curve in Jacobian coordinates. -/
111118def Jacobian.point : Jacobian.Point (curve.baseChange Universal.Field) :=
@@ -128,7 +135,7 @@ abbrev curveRing : WeierstrassCurve Universal.Ring := curve.baseChange Universal
128135(the universal field), where `P` is the Weierstrass polynomial. -/
129136abbrev curveField : WeierstrassCurve Universal.Field := curve.baseChange Universal.Field
130137
131- lemma curveField_eq : curveField = pointedCurve.toWeierstrassCurve := rfl
138+ lemma curveField_eq : curveField = pointedCurve := rfl
132139
133140end Universal
134141
@@ -190,8 +197,9 @@ protected lemma Field.two_ne_zero : (2 : Universal.Field) ≠ 0 := by
190197 intro h; replace h := congr(ringEval cusp_equation_one_one $h)
191198 rw [map_ofNat, map_zero] at h; cases h
192199
193- lemma curveRing_map_ringEval : curveRing.map (ringEval eqn) = W := by
194- rw [curveRing, baseChange, map_map, ringEval_comp_eq_specialize, map_specialize]
200+ lemma curveRing_map_ringEval : curveRing.map (ringEval eqn) = W :=
201+ (map_map curve (algebraMap _ _) (ringEval eqn)).symm ▸
202+ (ringEval_comp_eq_specialize eqn) ▸ map_specialize W
195203
196204end Universal
197205
0 commit comments