The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V28. Algebraic geometry

Mathlib.AlgebraicGeometry.EllipticCurve.Affine.AddSubMap

21 declarations. Mathlib docs · Source

The addition-and-subtraction map on x-coordinates

We set up the endomorphism of ℙ² that on affine points with affine sum is equal to

(x(P) * x(Q) : x(P) + x(Q) : 1) ↦ (x(P+Q) * x(P-Q) : x(P+Q) + x(P-Q) : 1);

see WeierstrassCurve.addSubMap (this is on coordinate vectors).

TODO: Show that the map really does what it is claimed to do.

This will be used to eventually show the approximate parallelogram law for K-points on an elliptic curve E: ∃ C, ∀ P Q : E(K), |h(P+Q) + h(P-Q) - 2*h(P) - 2*h(Q)| ≤ C, where K is a field with a height and h denotes the (logarithmic) naïve height on E(K).

The addition-and-subtraction map on x-coordinates

The symmetric square of the x-coordinate map

We define Weierstrass.Affine.Point.sym2x, which sends a pair P, Q of nonsingular points in affine coordinates on a Weierstrass curve to a triple projectively equal to (x(P)*x(Q), x(P)+x(Q), 1), and provide some API.

theorem WeierstrassCurve.Affine.Point.some.hcongr_6 E1 #

∀ (R R' : Type r),
  R = R' →
    ∀ (inst : CommRing R) (inst' : CommRing R'),
      inst ≍ inst' →
        ∀ (W' : WeierstrassCurve.Affine R) (W'' : WeierstrassCurve.Affine R'),
          W' ≍ W'' →
            ∀ (x : R) (x' : R'),
              x ≍ x' →
                ∀ (y : R) (y' : R'),
                  y ≍ y' →
                    ∀ (h : W'.Nonsingular x y) (h' : W''.Nonsingular x' y'),
                      h ≍ h' → WeierstrassCurve.Affine.Point.some x y h ≍ WeierstrassCurve.Affine.Point.some x' y' h'

def WeierstrassCurve.addSubMap E1 #

{R : Type u_1} → [inst : CommRing R] → WeierstrassCurve R → Fin 3 → MvPolynomial (Fin 3) R

The polynomial map on coordinate vectors giving (x(P) * x(Q) : x(P) + x(Q) : 1) ↦ (x(P+Q) * x(P-Q) : x(P+Q) + x(P-Q) : 1) for points P, Q on the Weierstrass curve W.

def WeierstrassCurve.addSubMapCoeff E1 #

{R : Type u_1} → [inst : CommRing R] → WeierstrassCurve R → Fin 3 × Fin 3 → MvPolynomial (Fin 3) R

The coefficient polynomials in linear combinations of the polynomials in addSubMap that result in the fourth powers of the variables, multiplied by W.Δ.

theorem WeierstrassCurve.isHomogeneous_addSubMap E1 #

∀ {R : Type u_1} [inst : CommRing R] (W : WeierstrassCurve R) (i : Fin 3), (W.addSubMap i).IsHomogeneous 2

theorem WeierstrassCurve.isHomogeneous_addSubMapCoeff E1 #

∀ {R : Type u_1} [inst : CommRing R] (W : WeierstrassCurve R) (ij : Fin 3 × Fin 3),
  (W.addSubMapCoeff ij).IsHomogeneous 2

theorem WeierstrassCurve.addSubMapCoeff_condition E1 #

∀ {R : Type u_1} [inst : CommRing R] (W : WeierstrassCurve R) [inst_1 : W.IsElliptic] (x : Fin 3 → R) (i : Fin 3),
  ∑ j,
      (MvPolynomial.eval x) (MvPolynomial.C ↑W.Δ'⁻¹ * W.addSubMapCoeff (i, j)) * (MvPolynomial.eval x) (W.addSubMap j) =
    x i ^ 4

theorem WeierstrassCurve.addSubMap_ne_zero E1 #

∀ {R : Type u_1} [inst : CommRing R] (W : WeierstrassCurve R) [W.IsElliptic] [IsReduced R] {x : Fin 3 → R},
  x ≠ 0 → (fun x_1 ↦ (MvPolynomial.eval x) (W.addSubMap x_1)) ≠ 0

def WeierstrassCurve.Affine.Point.sym2x E1 #

{R : Type u_1} → [inst : CommRing R] → {W' : WeierstrassCurve.Affine R} → W'.Point → W'.Point → Fin 3 → R

This map sends a pair P, Q of nonsingular points in affine coordinates on W to a triple projectively equivalent to ![x(P) * x(Q), x(P) + x(Q), 1].

In more geometric terms, this is the map Sym² W → Sym² ℙ¹ ≃ ℙ² induced by x : W → ℙ¹.

theorem WeierstrassCurve.Affine.Point.sym2x_eq E0 #

∀ {R : Type u_1} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} {P Q : W'.Point},
  P.sym2x Q = ![P.xRep 0 * Q.xRep 0, P.xRep 0 * Q.xRep 1 + P.xRep 1 * Q.xRep 0, P.xRep 1 * Q.xRep 1]

theorem WeierstrassCurve.Affine.Point.sym2x_zero_zero E0 #

∀ {R : Type u_1} [inst : CommRing R] {W' : WeierstrassCurve.Affine R},
  WeierstrassCurve.Affine.Point.sym2x 0 0 = ![1, 0, 0]

theorem WeierstrassCurve.Affine.Point.sym2x_zero_some E0 #

∀ {R : Type u_1} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} {x y : R} (h : W'.Nonsingular x y),
  WeierstrassCurve.Affine.Point.sym2x 0 (WeierstrassCurve.Affine.Point.some x y h) = ![x, 1, 0]

theorem WeierstrassCurve.Affine.Point.sym2x_some_zero E0 #

∀ {R : Type u_1} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} {x y : R} (h : W'.Nonsingular x y),
  (WeierstrassCurve.Affine.Point.some x y h).sym2x 0 = ![x, 1, 0]

theorem WeierstrassCurve.Affine.Point.sym2x_some_some E0 #

∀ {R : Type u_1} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} {x y x' y' : R} (h : W'.Nonsingular x y)
  (h' : W'.Nonsingular x' y'),
  (WeierstrassCurve.Affine.Point.some x y h).sym2x (WeierstrassCurve.Affine.Point.some x' y' h') = ![x * x', x + x', 1]

theorem WeierstrassCurve.Affine.Point.sym2x_ne_zero E1 #

∀ {R : Type u_1} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} [Nontrivial R] (P Q : W'.Point), P.sym2x Q ≠ 0

theorem WeierstrassCurve.Affine.Point.sym2x_comm E1 #

∀ {R : Type u_1} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} (P Q : W'.Point), P.sym2x Q = Q.sym2x P

theorem WeierstrassCurve.Affine.Point.sym2x_neg_left E0 #

∀ {R : Type u_1} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} (P Q : W'.Point), (-P).sym2x Q = P.sym2x Q

theorem WeierstrassCurve.Affine.Point.sym2x_neg_right E0 #

∀ {R : Type u_1} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} (P Q : W'.Point), P.sym2x (-Q) = P.sym2x Q

theorem WeierstrassCurve.Affine.Point.sym2x_self_eq_addSubMap E1 #

∀ {R : Type u_1} [inst : CommRing R] {W' : WeierstrassCurve.Affine R} (P : W'.Point),
  P.sym2x P = fun x ↦ (MvPolynomial.eval (P.sym2x 0)) (WeierstrassCurve.addSubMap W' x)

theorem WeierstrassCurve.Affine.Point.addSubMap_sym2x_some_some E1 #

∀ {F : Type u_2} [inst : Field F] {W : WeierstrassCurve.Affine F} {xP yP xQ yQ : F} (hP : W.Nonsingular xP yP)
  (hQ : W.Nonsingular xQ yQ),
  (fun x ↦
      (MvPolynomial.eval
          ((WeierstrassCurve.Affine.Point.some xP yP hP).sym2x (WeierstrassCurve.Affine.Point.some xQ yQ hQ)))
        (WeierstrassCurve.addSubMap W x)) =
    ![(xP * xQ) ^ 2 - WeierstrassCurve.b₄ W * (xP * xQ) - WeierstrassCurve.b₆ W * (xP + xQ) - WeierstrassCurve.b₈ W,
      2 * (xP + xQ) * (xP * xQ) + WeierstrassCurve.b₂ W * (xP * xQ) + WeierstrassCurve.b₄ W * (xP + xQ) +
        WeierstrassCurve.b₆ W,
      (xP - xQ) ^ 2]

theorem WeierstrassCurve.Affine.Point.addSubMap_sym2x_some_self E1 #

∀ {F : Type u_2} [inst : Field F] {W : WeierstrassCurve.Affine F} {x y : F} (h : W.Nonsingular x y),
  (fun x_1 ↦
      (MvPolynomial.eval ((WeierstrassCurve.Affine.Point.some x y h).sym2x (WeierstrassCurve.Affine.Point.some x y h)))
        (WeierstrassCurve.addSubMap W x_1)) =
    ![x ^ 4 - WeierstrassCurve.b₄ W * x ^ 2 - 2 * WeierstrassCurve.b₆ W * x - WeierstrassCurve.b₈ W,
      4 * x ^ 3 + WeierstrassCurve.b₂ W * x ^ 2 + 2 * WeierstrassCurve.b₄ W * x + WeierstrassCurve.b₆ W, 0]

theorem WeierstrassCurve.Affine.Point.sym2x_add_sub_eq_addSubMap_sym2x E1 #

∀ {F : Type u_2} [inst : Field F] {W : WeierstrassCurve.Affine F} [inst_1 : DecidableEq F] (P Q : W.Point),
  ∃ t, t ≠ 0 ∧ t • (P + Q).sym2x (P - Q) = fun x ↦ (MvPolynomial.eval (P.sym2x Q)) (WeierstrassCurve.addSubMap W x)

sym2x (P + Q) (P - Q) is equal, up to scaling by a nonzero constant, to addSubMap W applied to sym2x P Q.