Riemann hypothesis: the Lean proof, cleaned up together
The 2026 Lean proof of the Riemann hypothesis and GRH, machine-checked by others, not refereed, no word from Clay; cleaned up together: more readable, faster to build, the theorems unchanged

| 1 | module |
| 2 | |
| 3 | import Mathlib.Analysis.Calculus.Deriv.Inverse |
| 4 | import Mathlib.RingTheory.Etale.Weakly |
| 5 | import Mathlib.RingTheory.Finiteness.ModuleFinitePresentation |
| 6 | import Mathlib.RingTheory.PiTensorProduct |
| 7 | import Mathlib.RingTheory.TotallySplit |
| 8 | import TauCeti.Analysis.Analytic.ExtractZeros |
| 9 | public import Lib.CM.Sigma.Basic |
| 10 | public import Lib.Shimura.ComplexTheta.DimensionFormula |
| 11 | import Lib.General.Groups.CongruenceSubgroups |
| 12 | import Lib.General.NumberTheory.SUnitsAndClassNumber |
| 13 | |
| 14 | /-! |
| 15 | # Theta functions of a CM elliptic curve: Weierstrass equation and spanning monomials |
| 16 | |
| 17 | Let `C : New.CMLattice d` be a CM datum with lattice Λ, point t of order two and constant a₁. Let |
| 18 | H(l, z) = π l̄ z / area(Λ), and let σ be the sigma function of Λ. Let θ be the twisted translate of |
| 19 | σ by t with θ(0) = 1 and multiplier χ = `New.CMLattice.multiplier`. Write x(z) = ℘(z + t) − ℘(t), |
| 20 | y(z) = ½(℘′(z + t) − a₁x(z)) and G = `New.CMLattice.translatedYThetaCube`; `New.CMLattice.sections` |
| 21 | m is the space of theta functions for Λ, the form mH and χ^m. The file proves an addition formula |
| 22 | for θ and the Weierstrass equation for x, y and for σ², θ, G, shows that the monomials θ^a σ^{2b} |
| 23 | G^c with c ≤ 1 span the sections of each degree, and transfers the identities to the Taylor series |
| 24 | of x and y at 0. |
| 25 | |
| 26 | ## Main definitions and results |
| 27 | |
| 28 | * `New.CMLattice.theta_add_mul_theta_sub`, `New.CMLattice.theta_sq`: the addition formula for |
| 29 | θ(z + w)θ(z − w) with z off t + Λ, and θ² = (℘ − ℘(t))σ² off Λ. |
| 30 | * `New.CMLattice.deriv_translatedX_sq`, `New.CMLattice.weierstrass_equation`, |
| 31 | `New.CMLattice.deriv_translatedY_eq`: off t + Λ, x′² = x(4x² + a₁²x + 4), y² + a₁xy = x³ + x and |
| 32 | y′ = 1 + 3x² − a₁y. |
| 33 | * `New.CMLattice.translatedYThetaCube_sq_add`: G² + a₁σ²θG = σ⁶ + σ²θ⁴ everywhere. |
| 34 | * `New.CMLattice.comp_mul_mem_sections`, `New.CMLattice.twistedTranslate_comp_mem`: for d a |
| 35 | prime ≡ 7 mod 8, sections pull back along isogenies z ↦ az, and z ↦ (T_uθ)(δ̄z) is a section of |
| 36 | degree N when z ↦ δ̄z is a degree-N isogeny of C to itself and δu lies in Λ. |
| 37 | * `New.CMLattice.exists_mul_eq_of_mem_sections`: division by a section z ↦ (T_uθ)(az) with a ≠ 0, |
| 38 | where T_u = `D.twistedTranslate 1 u` and θ belong to a CM datum D. The zeros of such a section are |
| 39 | simple (`New.CMLattice.deriv_twistedTranslate_theta_comp_mul_ne_zero`). |
| 40 | * `New.CMLattice.monomialDeg`, `New.CMLattice.monomialSection`: the degree a + 2b + 3c of a triple |
| 41 | (a, b, c) and the monomial θ^a σ^{2b} G^c. |
| 42 | * `New.CMLattice.sections_le_span_monomialSection`: the monomials with c ≤ 1, a + 2b + 3c = m (the |
| 43 | triples in `New.CMLattice.spanningExponents` m) span the sections of degree m. |
| 44 | |
| 45 | Notions from other files: |
| 46 | * `New.CMLattice`: A lattice `Λ` stable under the integers of `ℚ(√-d)`, with a point `t` of order |
| 47 | two modulo `Λ` such that `ω t`, `ω̄ t ∉ Λ` for `ω = (1 + √-d) / 2`, scaled so that `℘''(t) = 2`, |
| 48 | and a square root `a₁` of `12 ℘(t)`. The conditions on `ℚ(√-d)` and `ω` are void for `d = 0`. |
| 49 | * `PeriodPair.σ`: the sigma function of the lattice, a chosen odd theta function for the form H and |
| 50 | the multiplier `New.sigmaSign`, with derivative 1 at 0. |
| 51 | * `New.sigmaSign`: The multiplier of σ: 1 at w if w/2 lies in Λ, and −1 otherwise. |
| 52 | * `New.IsAppellHumbert` B χ, for a form B on a lattice L: Re B is symmetric, and on L one has |
| 53 | |χ| = 1 and χ(l + m) = χ(l)χ(m)·exp(πi E(m, l)), E the Riemann form of B. |
| 54 | * `New.CMLattice.translatedYThetaCube`: The entire function G = σ·(σ′θ − σ·(θ′ + ½a₁θ)), written as |
| 55 | a pointwise product of functions. |
| 56 | |
| 57 | ## Relation to the literature |
| 58 | |
| 59 | Known results: sigma and theta functions of a lattice, their addition formulas, the Weierstrass |
| 60 | equation and the elliptic functions with poles at one point are classical. See `Lib.CM.Sigma.Basic` |
| 61 | for the sigma function used here and for sources. |
| 62 | -/ |
| 63 | |
| 64 | @[expose] public section |
| 65 | |
| 66 | section CurveTheta |
| 67 | |
| 68 | open Complex PeriodPair ComplexConjugate Set |
| 69 | |
| 70 | namespace New.CMLattice |
| 71 | |
| 72 | variable {d : ℕ} (C : CMLattice d) {z : ℂ} |
| 73 | |
| 74 | /-! ### The function θ: multiplier, zeros, parity and square -/ |
| 75 | |
| 76 | /-- The multiplier χ of a CM lattice satisfies the Appell–Humbert condition for the hermitian form H |
| 77 | of Λ. -/ |
| 78 | instance isAppellHumbert_multiplier : IsAppellHumbert C.hermitianForm C.multiplier := |
| 79 | .mul_riemannPhase _ |
| 80 | |
| 81 | /-- The function `θ` of a CM lattice `C` is a section of degree one, meaning a theta function for |
| 82 | `Λ` with hermitian form H and multiplier χ. Here `θ` is related to the sigma function σ of `Λ` by |
| 83 | σ² = θ²·x off t + Λ, where x(z) = ℘(z + t) − ℘(t). -/ |
| 84 | lemma theta_mem : C.θ ∈ C.sections 1 := by |
| 85 | -- The translate of `σ` by `t` has the multiplier χ; `θ` is a constant multiple of it. |
| 86 | have h_shift : C.hermitianForm.thetaShift C.t C.σ ∈ C.hermitianForm.thetaSpace C.multiplier := |
| 87 | IsAppellHumbert.thetaShift_mem sigma_mem_thetaSpace _ |
| 88 | exact ⟨by fun_prop [θ], fun l hl z ↦ by simp [θ, twistedTranslate, h_shift.2 l hl, field]⟩ |
| 89 | |
| 90 | /-- `C.θ` is differentiable. -/ |
| 91 | @[fun_prop] |
| 92 | lemma differentiable_theta : Differentiable ℂ C.θ := C.theta_mem.1 |
| 93 | |
| 94 | /-- `C.θ 0 = 1`. -/ |
| 95 | @[simp] |
| 96 | lemma theta_zero : C.θ 0 = 1 := by simp [θ, thetaShift_apply, t_notMem] |
| 97 | |
| 98 | /-- For a CM lattice `C` (a lattice `Λ` with a point `t` of order two modulo `Λ`, scaled so that |
| 99 | `℘''(t) = 2`), the function `C.θ` vanishes at `z` exactly when `z + t ∈ Λ`. So its zero set is the |
| 100 | translate `−t + Λ`. -/ |
| 101 | @[simp] |
| 102 | lemma theta_eq_zero_iff : C.θ z = 0 ↔ z + C.t ∈ C.Λ := by simp [θ, thetaShift_apply, t_notMem] |
| 103 | |
| 104 | /-- The zeros of θ, the twisted translate of the sigma function by t normalised to θ(0) = 1, are |
| 105 | simple: where z + t lies in the lattice Λ, that is, where θ vanishes, the derivative of θ is not |
| 106 | zero. -/ |
| 107 | lemma deriv_θ_ne_zero (hz : z + C.t ∈ C.Λ) : deriv C.θ z ≠ 0 := by |
| 108 | -- θ is an exponential times w ↦ σ(w + t), divided by a constant, and σ has a simple zero at the |
| 109 | -- lattice point z + t. |
| 110 | let c : ℂ := C.twistedTranslate 1 C.t C.σ 0 |
| 111 | let e : ℂ → ℂ := fun w : ℂ ↦ cexp (-(C.hermitianForm C.t w + C.hermitianForm C.t C.t / 2)) |
| 112 | have h_θ : C.θ = fun w : ℂ ↦ e w * C.σ (w + C.t) / c := |
| 113 | funext fun w ↦ by simp [θ, c, e, thetaShift_apply] |
| 114 | have h_deriv : deriv C.θ z = e z * deriv C.σ (z + C.t) / c := by |
| 115 | rw [h_θ, deriv_div_const, deriv_fun_mul (by fun_prop) (by fun_prop), deriv_comp_add_const, |
| 116 | sigma_eq_zero_iff.mpr hz, mul_zero, zero_add] |
| 117 | have hc_ne : c ≠ 0 := by simp [c, thetaShift_apply, t_notMem] |
| 118 | rw [h_deriv] |
| 119 | exact div_ne_zero (mul_ne_zero (exp_ne_zero _) (deriv_sigma_ne_zero hz)) hc_ne |
| 120 | |
| 121 | /-- The twisted translation by a point l of the lattice Λ, θ ↦ (z ↦ exp(−H(l, z) − H(l, |
| 122 | l)/2)·θ(z + l)), multiplies θ by χ(l), the multiplier of θ at l. -/ |
| 123 | lemma twistedTranslate_theta_of_mem {l : ℂ} (hl : l ∈ C.Λ) : |
| 124 | C.twistedTranslate 1 l C.θ = C.multiplier l • C.θ := by |
| 125 | rw [twistedTranslate, thetaShift_of_mem C.theta_mem hl, pow_one] |
| 126 | |
| 127 | /-- A function F is a section of degree n exactly when it is entire and, for every l in the lattice |
| 128 | Λ, the twisted translation of degree n by l, F ↦ (z ↦ exp(−n(H(l, z) + H(l, l)/2))·F(z + l)), |
| 129 | multiplies F by χ(l)ⁿ, with χ the multiplier of θ. -/ |
| 130 | lemma mem_sections_iff_twistedTranslate {n : ℕ} {F : ℂ → ℂ} : |
| 131 | F ∈ C.sections n ↔ |
| 132 | Differentiable ℂ F ∧ |
| 133 | ∀ l ∈ C.Λ, C.twistedTranslate n l F = C.multiplier l ^ n • F := by |
| 134 | refine ⟨fun hF ↦ ⟨hF.1, fun l hl ↦ thetaShift_of_mem hF hl⟩, |
| 135 | fun ⟨hF_diff, hF_law⟩ ↦ ⟨hF_diff, fun l hl z ↦ ?_⟩⟩ |
| 136 | have h_value : cexp (-((n • C.hermitianForm) l z + (n • C.hermitianForm) l l / 2)) * F (z + l) = |
| 137 | C.multiplier l ^ n * F z := |
| 138 | congrFun (hF_law l hl) z |
| 139 | rw [exp_neg, inv_mul_eq_iff_eq_mul₀ (exp_ne_zero _)] at h_value |
| 140 | rw [h_value, Pi.pow_apply, mul_left_comm, mul_assoc] |
| 141 | |
| 142 | /-- For z in Λ, the multiplier χ(z) = ±exp(2πi E(z, t)) of θ (sign + exactly when z/2 ∈ Λ), with E |
| 143 | the Riemann form of H, E(u, v) = Im(ū v)/area(Λ), and t the point of order two, is minus the sigma |
| 144 | sign of 2t + z, that is −1 if t + z/2 lies in Λ and 1 otherwise. -/ |
| 145 | lemma multiplier_eq_neg_sigmaSign (hz : z ∈ C.Λ) : |
| 146 | C.multiplier z = -sigmaSign C.periodPair (C.t + C.t + z) := by |
| 147 | have h_add : sigmaSign C.periodPair (C.t + C.t + z) = |
| 148 | sigmaSign C.periodPair (C.t + C.t) * sigmaSign C.periodPair z * |
| 149 | cexp (Real.pi * I * C.hermitianForm.riemannForm z (C.t + C.t)) := |
| 150 | isAppellHumbert_hermitianForm.semicharacter _ C.two_t_mem _ hz |
| 151 | have h_sign : sigmaSign C.periodPair (C.t + C.t) = -1 := by simp [sigmaSign, t_notMem] |
| 152 | have h_phase : C.hermitianForm.riemannPhase z C.t = |
| 153 | cexp (Real.pi * I * C.hermitianForm.riemannForm z (C.t + C.t)) := by |
| 154 | simp [riemannForm_def] |
| 155 | ring_nf |
| 156 | rw [multiplier, h_add, h_sign, h_phase, neg_one_mul, neg_mul, neg_neg] |
| 157 | |
| 158 | /-- For a point `l` of the lattice `Λ` of `C`, the twisted translation of degree `1` by `l` is |
| 159 | `(T f)(z) = exp(−π(z l̄ + |l|²/2)/A)·f(z + l)`, with `A` the area of `Λ`. It takes `C.θ` to `−C.θ` |
| 160 | exactly when `l/2 ≡ t` modulo `Λ`, with `t` the point of order two of `C`. -/ |
| 161 | lemma twistedTranslate_theta_eq_neg_iff {l : ℂ} (hl : l ∈ C.Λ) : |
| 162 | C.twistedTranslate 1 l C.θ = -C.θ ↔ l / 2 - C.t ∈ C.Λ := by |
| 163 | have h_iff : l / 2 - C.t ∈ C.Λ ↔ (C.t + C.t + l) / 2 ∈ C.Λ := by |
| 164 | rw [show (C.t + C.t + l) / 2 = l / 2 - C.t + (C.t + C.t) by ring, |
| 165 | add_mem_cancel_right C.two_t_mem] |
| 166 | rw [C.twistedTranslate_theta_of_mem hl, C.multiplier_eq_neg_sigmaSign hl, sigmaSign, h_iff] |
| 167 | split_ifs with h_mem |
| 168 | · simp [h_mem] |
| 169 | · -- Here the multiplier is 1, and θ ≠ −θ because θ(0) = 1. |
| 170 | refine iff_of_false (fun h_eq ↦ ?_) h_mem |
| 171 | have h_zero : -(-1 : ℂ) * C.θ 0 = -C.θ 0 := congrFun h_eq 0 |
| 172 | norm_num at h_zero |
| 173 | |
| 174 | /-- The functional equation of the sigma function for the period 2t of Λ: |
| 175 | σ(z + 2t) = −exp(2H(t, z) + 2H(t, t))·σ(z). -/ |
| 176 | lemma sigma_add_two_t (z : ℂ) : |
| 177 | C.σ (z + (C.t + C.t)) = |
| 178 | -cexp (2 * C.hermitianForm C.t z + 2 * C.hermitianForm C.t C.t) * C.σ z := by |
| 179 | have h_sign : sigmaSign C.periodPair (C.t + C.t) = -1 := by simp [sigmaSign, t_notMem] |
| 180 | have h_exponent : C.hermitianForm (C.t + C.t) z + C.hermitianForm (C.t + C.t) (C.t + C.t) / 2 = |
| 181 | 2 * C.hermitianForm C.t z + 2 * C.hermitianForm C.t C.t := by |
| 182 | simp only [map_add, add_apply] |
| 183 | ring |
| 184 | rw [sigma_mem_thetaSpace.2 _ C.two_t_mem z, h_sign, h_exponent, neg_one_mul] |
| 185 | |
| 186 | /-- The function θ, the normalised translate of the sigma function of Λ by the point t of order two |
| 187 | of C, is even: θ(−z) = θ(z). -/ |
| 188 | @[simp] |
| 189 | lemma theta_neg (z : ℂ) : C.θ (-z) = C.θ z := by |
| 190 | -- `σ` is odd, and the functional equation for the period `2t` compares `z + t` with `z - t`. |
| 191 | have h_period : C.σ (z + C.t) = -cexp (2 * C.hermitianForm C.t z) * C.σ (z - C.t) := by |
| 192 | rw [← sub_add_add_cancel z C.t C.t, C.sigma_add_two_t, map_sub, mul_sub, sub_add_cancel] |
| 193 | suffices h : cexp (C.hermitianForm C.t z) * C.σ (-z + C.t) = |
| 194 | cexp (-C.hermitianForm C.t z) * C.σ (z + C.t) by |
| 195 | simpa [-hermitianForm_apply, θ, thetaShift_apply, exp_add, exp_neg, t_notMem, fieldEq] using h |
| 196 | rw [neg_add_eq_sub, ← neg_sub z, sigma_neg, h_period, two_mul, exp_add, exp_neg] |
| 197 | field |
| 198 | |
| 199 | /-- For z outside the lattice Λ, θ(z)² = (℘(z) − ℘(t))·σ(z)², with σ the sigma function of Λ, t the |
| 200 | point of order two of C and θ the twisted translate of σ by t with θ(0) = 1. -/ |
| 201 | lemma theta_sq (hz : z ∉ C.Λ) : C.θ z ^ 2 = (℘[C.periodPair] z - ℘[C.periodPair] C.t) * C.σ z ^ |
| 202 | 2 := by |
| 203 | -- `θ z ^ 2 = θ (-z) * θ z` is `σ (t - z) * σ (t + z) / σ t ^ 2`; use the addition formula. |
| 204 | rw [show C.θ z ^ 2 = C.θ (-z) * C.θ z by rw [theta_neg, sq]] |
| 205 | suffices h : C.σ (-z + C.t) * C.σ (z + C.t) = |
| 206 | C.σ C.t ^ 2 * (℘[C.periodPair] z - ℘[C.periodPair] C.t) * C.σ z ^ 2 by |
| 207 | simpa [θ, thetaShift_apply, exp_add, exp_neg, t_notMem, fieldEq] using h |
| 208 | rw [neg_add_eq_sub, add_comm z] |
| 209 | linear_combination sigma_add_mul_sigma_sub C.t_notMem hz |
| 210 | |
| 211 | /-! ### The curve in the coordinates x, y, and the addition formula for θ -/ |
| 212 | |
| 213 | /-- The invariant g₃ equals 4℘(t)³ − g₂℘(t): this is the equation ℘′² = 4℘³ − g₂℘ − g₃ at the |
| 214 | point t, where ℘′ vanishes. -/ |
| 215 | lemma g₃_eq : C.g₃ = 4 * ℘[C.periodPair] C.t ^ 3 - C.g₂ * ℘[C.periodPair] C.t := by |
| 216 | linear_combination C.derivWeierstrassP_sq C.t C.t_notMem - |
| 217 | ℘'[C.periodPair] C.t * C.derivWeierstrassP_t_eq_zero |
| 218 | |
| 219 | /-- Let `C` be a CM lattice: a lattice `Λ` with a point `t` of order two modulo `Λ`, scaled so that |
| 220 | `℘''(t) = 2`, together with a square root `a₁` of `12 ℘(t)`. Then the discriminant g₂³ − 27g₃² of |
| 221 | `Λ` equals a₁⁴ − 64. -/ |
| 222 | lemma disc_eq : C.g₂ ^ 3 - 27 * C.g₃ ^ 2 = C.a₁ ^ 4 - 64 := by grind [g₃_eq, a₁_sq, g₂_eq] |
| 223 | |
| 224 | lemma translatedX_add_of_mem (z : ℂ) {l : ℂ} (hl : l ∈ C.Λ) : |
| 225 | C.translatedX (z + l) = C.translatedX z := by |
| 226 | rw [translatedX, translatedX, add_right_comm, C.weierstrassP_add_coe (z + C.t) ⟨l, hl⟩] |
| 227 | |
| 228 | /-- The function `x(z) = ℘(z + t) - ℘(t)` is even, because `℘` is even and `2 t ∈ Λ`. -/ |
| 229 | lemma translatedX_neg (z : ℂ) : C.translatedX (-z) = C.translatedX z := by |
| 230 | rw [translatedX, translatedX, show -z + C.t = -(z + C.t) + (C.t + C.t) by ring, |
| 231 | C.weierstrassP_add_coe _ ⟨C.t + C.t, C.two_t_mem⟩, weierstrassP_neg] |
| 232 | |
| 233 | /-- The derivative of x is 2y + a₁x, with x(z) = ℘(z + t) − ℘(t) (`translatedX`) and |
| 234 | y(z) = ½(℘′(z + t) − a₁x(z)) (`translatedY`). -/ |
| 235 | @[simp] |
| 236 | lemma deriv_translatedX (z : ℂ) : |
| 237 | deriv C.translatedX z = 2 * C.translatedY z + C.a₁ * C.translatedX z := by |
| 238 | simp [translatedX.eq_unfold, translatedY, deriv_comp_add_const, fieldEq] |
| 239 | |
| 240 | /-- Let t be the point of order two of C and a₁ the chosen square root of 12℘(t). For z with z + t ∉ |
| 241 | Λ, the derivative of y at z is 1 + 3x(z)² − a₁y(z). Here x(z) = ℘(z + t) − ℘(t) is `translatedX` and |
| 242 | y(z) = ½(℘′(z + t) − a₁x(z)) is `translatedY`. -/ |
| 243 | lemma deriv_translatedY_eq (hz : z + C.t ∉ C.Λ) : |
| 244 | deriv C.translatedY z = 1 + 3 * C.translatedX z ^ 2 - C.a₁ * C.translatedY z := by |
| 245 | -- Differentiate y(z) = ½(℘′(z + t) − a₁x(z)) by ℘″ = 6℘² − g₂/2. |
| 246 | have h_deriv : deriv C.translatedY z = (6 * ℘[C.periodPair] (z + C.t) ^ 2 - C.g₂ / 2 - |
| 247 | C.a₁ * ℘'[C.periodPair] (z + C.t)) / 2 := by |
| 248 | simp (disch := fun_prop) [translatedY.eq_unfold, translatedX.eq_unfold, |
| 249 | deriv_derivWeierstrassP _ hz, deriv_comp_add_const] |
| 250 | -- The normalisations `g₂ = 12 ℘(t)² - 4` and `a₁² = 12 ℘(t)` identify the two sides. |
| 251 | grind [translatedY, translatedX.eq_1, a₁_sq, g₂_eq] |
| 252 | |
| 253 | /-- Let ℘ be the Weierstrass function of the lattice `Λ` of `C`, let `t` be its point of order two |
| 254 | (normalised so that ℘''(t) = 2), and let `a₁` be the chosen square root of 12℘(t). Then the function |
| 255 | `x(z) = ℘(z + t) - ℘(t)` satisfies the differential equation `x'² = x (4 x² + a₁² x + 4)` away from |
| 256 | its poles `t + Λ`. -/ |
| 257 | lemma deriv_translatedX_sq (hz : z + C.t ∉ C.Λ) : |
| 258 | deriv C.translatedX z ^ 2 = |
| 259 | C.translatedX z * (4 * C.translatedX z ^ 2 + C.a₁ ^ 2 * C.translatedX z + 4) := by |
| 260 | -- Expand ℘′² = 4℘³ − g₂℘ − g₃ at the root ℘(t), where 12℘(t) = a₁² and 12℘(t)² − g₂ = 4. |
| 261 | rw [show deriv C.translatedX z = ℘'[C.periodPair] (z + C.t) by simp [translatedY, fieldEq], |
| 262 | derivWeierstrassP_sq _ _ hz, g₃_eq, g₂_eq, a₁_sq, translatedX] |
| 263 | ring |
| 264 | |
| 265 | /-- For the lattice `Λ` of `C`, with Weierstrass function ℘ of `Λ`, let `t` be the point of order |
| 266 | two of `C` (normalised so that ℘''(t) = 2) and let `a₁` be the chosen square root of 12℘(t). If |
| 267 | z + t ∉ Λ, then x(z) = ℘(z + t) − ℘(t) (`translatedX`) and y(z) = ½(℘′(z + t) − a₁x(z)) |
| 268 | (`translatedY`) satisfy the Weierstrass equation y(z)² + a₁x(z)y(z) = x(z)³ + x(z). -/ |
| 269 | lemma weierstrass_equation (hz : z + C.t ∉ C.Λ) : |
| 270 | C.translatedY z ^ 2 + C.a₁ * C.translatedX z * C.translatedY z = |
| 271 | C.translatedX z ^ 3 + C.translatedX z := by |
| 272 | -- Substitute x′ = 2y + a₁x into the differential equation for x. |
| 273 | have h_sq : (2 * C.translatedY z + C.a₁ * C.translatedX z) ^ 2 = |
| 274 | C.translatedX z * (4 * C.translatedX z ^ 2 + C.a₁ ^ 2 * C.translatedX z + 4) := by |
| 275 | rw [← deriv_translatedX, C.deriv_translatedX_sq hz] |
| 276 | linear_combination h_sq / 4 |
| 277 | |
| 278 | /-- Addition formula: if z + t ∉ Λ, then θ(z + w)θ(z − w) = θ(z)²(θ(w)² − x(z)σ(w)²) for all complex |
| 279 | w, where x(z) = ℘(z + t) − ℘(t) is `translatedX` and σ is the sigma function of Λ. -/ |
| 280 | lemma theta_add_mul_theta_sub (hz : z + C.t ∉ C.Λ) (w : ℂ) : |
| 281 | C.θ (z + w) * C.θ (z - w) = C.θ z ^ 2 * (C.θ w ^ 2 - C.translatedX z * C.σ w ^ 2) := by |
| 282 | -- For `w ∉ Λ`, by `theta_sq`, this is the addition formula for `σ` at `z + t` and `w`. |
| 283 | revert w |
| 284 | refine C.eq_of_eq_off_lattice 0 (by fun_prop) (by fun_prop) fun w hw ↦ ?_ |
| 285 | rw [add_zero] at hw |
| 286 | suffices h : C.σ (z + w + C.t) * C.σ (z - w + C.t) = C.σ (z + C.t) ^ 2 * C.σ w ^ 2 * |
| 287 | (℘[C.periodPair] w - ℘[C.periodPair] C.t - C.translatedX z) by |
| 288 | simpa [↓theta_sq, -hermitianForm_apply, θ, thetaShift_apply, exp_add, exp_neg, exp_sub, |
| 289 | t_notMem, hw, fieldEq] using h |
| 290 | rw [add_right_comm z, sub_add_eq_add_sub, translatedX] |
| 291 | linear_combination sigma_add_mul_sigma_sub hz hw |
| 292 | |
| 293 | /-- `C.translatedX` is analytic at `0`. -/ |
| 294 | @[fun_prop] |
| 295 | lemma analyticAt_translatedX_zero : AnalyticAt ℂ C.translatedX 0 := by |
| 296 | fun_prop (disch := simp [t_notMem]) [translatedX] |
| 297 | |
| 298 | /-- `C.translatedY` is analytic at `0`. -/ |
| 299 | @[fun_prop] |
| 300 | lemma analyticAt_translatedY_zero : AnalyticAt ℂ C.translatedY 0 := by |
| 301 | fun_prop (disch := simp [t_notMem]) [translatedY] |
| 302 | |
| 303 | /-- The function `y = C.translatedY`, given by `y(z) = ½(℘′(z + t) − a₁(℘(z + t) − ℘(t)))` for the |
| 304 | point `t` of order two of the CM lattice `C`, has derivative `1` at `0`. -/ |
| 305 | @[simp] |
| 306 | lemma deriv_translatedY_zero : deriv C.translatedY 0 = 1 := by |
| 307 | simp [deriv_translatedY_eq, translatedX, t_notMem] |
| 308 | |
| 309 | /-- Let `C` be a lattice `Λ` with a point `t` of order two modulo `Λ` (with the normalisations of |
| 310 | `CMLattice d`). Let `σ` be the sigma function of `Λ`, and let `θ` (`C.θ`) be the translate of `σ` by |
| 311 | `t` multiplied by an exponential factor, normalised so that `θ(0) = 1`. Then there is a constant `K` |
| 312 | with `K σ(z)² = x(z) θ(z)²` for all `z ∉ Λ − t`, where `x(z) = ℘(z + t) − ℘(t)`. -/ |
| 313 | lemma exists_mul_sigma_sq_eq_translatedX_mul_theta_sq : |
| 314 | ∃ K : ℂ, ∀ z : ℂ, z + C.t ∉ C.Λ → K * C.σ z ^ 2 = C.translatedX z * C.θ z ^ 2 := by |
| 315 | -- Evenness of θ makes the left side of the addition formula symmetric in its two arguments. |
| 316 | -- Fix one argument at −t/2, where σ is nonzero and the formula is valid. |
| 317 | let u := -(C.t / 2) |
| 318 | have half_notMem : C.t / 2 ∉ C.Λ := fun h ↦ C.t_notMem (by simpa using add_mem h h) |
| 319 | have hu : u + C.t ∉ C.Λ := by rwa [show u + C.t = C.t / 2 by dsimp [u]; ring] |
| 320 | have hσ : C.σ u ≠ 0 := fun h ↦ half_notMem (by simpa [u] using (sigma_eq_zero_iff.mp h)) |
| 321 | refine ⟨C.translatedX u * C.θ u ^ 2 / C.σ u ^ 2, fun z hz ↦ ?_⟩ |
| 322 | have hzu := C.theta_add_mul_theta_sub hz u |
| 323 | have huz := C.theta_add_mul_theta_sub hu z |
| 324 | rw [add_comm u z, ← neg_sub z u, C.theta_neg] at huz |
| 325 | field_simp [hσ] |
| 326 | linear_combination huz - hzu |
| 327 | |
| 328 | /-- The complement of t + Λ, the set on which x and y are holomorphic, is open. -/ |
| 329 | lemma isOpen_setOf_add_t_notMem : IsOpen {w : ℂ | w + C.t ∉ C.Λ} := |
| 330 | C.isClosed_lattice.isOpen_compl.preimage_of_continuous |
| 331 | |
| 332 | /-- The derivative of an identity Kσ² = xθ² that holds off t + Λ, with K a constant: off t + Λ, |
| 333 | 2Kσσ′ = (2y + a₁x)θ² + 2xθθ′. -/ |
| 334 | lemma mul_sigma_mul_deriv_sigma_eq_of_mul_sigma_sq_eq {K : ℂ} |
| 335 | (hK : ∀ w : ℂ, w + C.t ∉ C.Λ → K * C.σ w ^ 2 = C.translatedX w * C.θ w ^ 2) |
| 336 | {z : ℂ} (hz : z + C.t ∉ C.Λ) : |
| 337 | K * (2 * C.σ z * deriv C.σ z) = |
| 338 | (2 * C.translatedY z + C.a₁ * C.translatedX z) * C.θ z ^ 2 + |
| 339 | C.translatedX z * (2 * C.θ z * deriv C.θ z) := by |
| 340 | have hx_diff : DifferentiableAt ℂ C.translatedX z := by fun_prop [translatedX] |
| 341 | have h_deriv : deriv (fun w ↦ K * C.σ w ^ 2) z = deriv (fun w ↦ C.translatedX w * C.θ w ^ 2) z := |
| 342 | EqOn.deriv (fun w ↦ hK w) C.isOpen_setOf_add_t_notMem hz |
| 343 | simpa (disch := fun_prop) using h_deriv |
| 344 | |
| 345 | /-- Let Λ be the lattice of `C` with 2-torsion point t, σ the sigma function of Λ, θ = `C.θ`, and |
| 346 | x(z) = ℘(z + t) − ℘(t) the function `translatedX`. For z with z + t ∉ Λ (so that x(z) is defined), |
| 347 | σ(z)² = x(z)·θ(z)². -/ |
| 348 | lemma sigma_sq_eq_translatedX_mul_theta_sq {z : ℂ} (hz : z + C.t ∉ C.Λ) : |
| 349 | C.σ z ^ 2 = C.translatedX z * C.θ z ^ 2 := by |
| 350 | -- Kσ² = xθ² for a constant K. The second derivatives at 0, where σ = x = y = 0 and |
| 351 | -- σ′ = θ = y′ = 1, are 2K and 2. |
| 352 | obtain ⟨K, hK⟩ := C.exists_mul_sigma_sq_eq_translatedX_mul_theta_sq |
| 353 | have h_second : deriv (fun w ↦ K * (2 * C.σ w * deriv C.σ w)) 0 = |
| 354 | deriv (fun w ↦ (2 * C.translatedY w + C.a₁ * C.translatedX w) * C.θ w ^ 2 + |
| 355 | C.translatedX w * (2 * C.θ w * deriv C.θ w)) 0 := |
| 356 | EqOn.deriv (fun w ↦ C.mul_sigma_mul_deriv_sigma_eq_of_mul_sigma_sq_eq hK) |
| 357 | C.isOpen_setOf_add_t_notMem (show (0 : ℂ) + C.t ∉ C.Λ by simpa using C.t_notMem) |
| 358 | have h_two : K * 2 = 2 := by |
| 359 | simpa (disch := fun_prop) [show C.translatedX 0 = 0 by simp [translatedX]] using h_second |
| 360 | linear_combination hK z hz - C.σ z ^ 2 / 2 * h_two |
| 361 | |
| 362 | /-- The square of θ in terms of the translate of the curve coordinate x by t. -/ |
| 363 | lemma theta_sq_eq_translatedX_add_t_mul_sigma_sq {z : ℂ} (hz : z ∉ C.Λ) : |
| 364 | C.θ z ^ 2 = C.translatedX (z + C.t) * C.σ z ^ 2 := by |
| 365 | rw [C.theta_sq hz, translatedX, add_assoc, C.weierstrassP_add_coe z ⟨C.t + C.t, C.two_t_mem⟩] |
| 366 | |
| 367 | /-- Let t be the point of order two of C, a₁ the chosen square root of 12℘(t), σ the sigma function |
| 368 | of Λ, and θ its normalised translate by t. For z with z + t ∉ Λ, the entire function |
| 369 | G = `translatedYThetaCube` = σ·(σ′θ − σ·(θ′ + ½a₁θ)) has the value y(z)θ(z)³. Here |
| 370 | y(z) = ½(℘′(z + t) − a₁(℘(z + t) − ℘(t))) is `translatedY`. -/ |
| 371 | lemma translatedYThetaCube_eq_translatedY_mul_theta_cube {z : ℂ} (hz : z + C.t ∉ C.Λ) : |
| 372 | C.translatedYThetaCube z = C.translatedY z * C.θ z ^ 3 := by |
| 373 | -- In G = σσ′θ − σ²(θ′ + ½a₁θ), replace σ² by xθ² and σσ′ by half the derivative of xθ². |
| 374 | have h_sq (w : ℂ) (hw : w + C.t ∉ C.Λ) : 1 * C.σ w ^ 2 = C.translatedX w * C.θ w ^ 2 := by |
| 375 | rw [one_mul, C.sigma_sq_eq_translatedX_mul_theta_sq hw] |
| 376 | have h_def : C.translatedYThetaCube z = |
| 377 | C.σ z * (deriv C.σ z * C.θ z - C.σ z * (deriv C.θ z + C.a₁ / 2 * C.θ z)) := rfl |
| 378 | linear_combination h_def - (deriv C.θ z + C.a₁ / 2 * C.θ z) * h_sq z hz + |
| 379 | C.θ z / 2 * C.mul_sigma_mul_deriv_sigma_eq_of_mul_sigma_sq_eq h_sq hz |
| 380 | |
| 381 | /-- For z with z + t ∉ Λ, both σ(z)² = x(z)θ(z)² and G(z) = y(z)θ(z)³, with x(z) = ℘(z + t) − ℘(t), |
| 382 | y(z) = ½(℘′(z + t) − a₁x(z)) and G = `translatedYThetaCube`: powers of θ clear the poles of x and |
| 383 | y. -/ |
| 384 | lemma sigma_sq_eq_and_translatedYThetaCube_eq (z : ℂ) (hz : z + C.t ∉ C.Λ) : |
| 385 | C.σ z ^ 2 = C.translatedX z * C.θ z ^ 2 ∧ |
| 386 | C.translatedYThetaCube z = C.translatedY z * C.θ z ^ 3 := |
| 387 | ⟨C.sigma_sq_eq_translatedX_mul_theta_sq hz, |
| 388 | C.translatedYThetaCube_eq_translatedY_mul_theta_cube hz⟩ |
| 389 | |
| 390 | /-- For all complex z, G² + a₁σ²θG = σ⁶ + σ²θ⁴, where G = `New.CMLattice.translatedYThetaCube`. This |
| 391 | is the curve equation y² + a₁xy = x³ + x multiplied by θ⁶, with G in the role of yθ³. -/ |
| 392 | lemma translatedYThetaCube_sq_add (z : ℂ) : |
| 393 | C.translatedYThetaCube z ^ 2 + C.a₁ * C.σ z ^ 2 * C.θ z * C.translatedYThetaCube z = |
| 394 | C.σ z ^ 6 + C.σ z ^ 2 * C.θ z ^ 4 := by |
| 395 | -- Both sides are entire. Off `t + Λ` this is `weierstrass_equation` times θ⁶, by σ² = xθ² and |
| 396 | -- G = yθ³. |
| 397 | revert z |
| 398 | refine C.eq_of_eq_off_lattice C.t (by fun_prop [translatedYThetaCube]) (by fun_prop) fun z hz ↦ ?_ |
| 399 | obtain ⟨hσ, hY⟩ := C.sigma_sq_eq_and_translatedYThetaCube_eq z hz |
| 400 | rw [show C.σ z ^ 6 = (C.σ z ^ 2) ^ 3 by ring, hσ, hY] |
| 401 | linear_combination C.θ z ^ 6 * C.weierstrass_equation hz |
| 402 | |
| 403 | /-! ### Isogenies and the multiplier of θ -/ |
| 404 | |
| 405 | /-- Let multiplication by a map the lattice Λ of C into the lattice Λ′ of C′ with degree N, that is, |
| 406 | a·ā·area(Λ) = N·area(Λ′). Then the hermitian forms H of Λ and H′ of Λ′ satisfy |
| 407 | H′(au, av) = N·H(u, v). -/ |
| 408 | lemma hermitianForm_mul_of_isIsogeny {C' : CMLattice d} {a : ℂ} {N : ℕ} |
| 409 | (h_isog : C.IsIsogeny C'.periodPair a N) (u v : ℂ) : |
| 410 | C'.hermitianForm (a * u) (a * v) = N * C.hermitianForm u v := by |
| 411 | -- As H(u, v) = π ū v / area, this is the degree condition a ā area(Λ) = N area(Λ′). |
| 412 | grind [hermitianForm_apply, IsIsogeny, ofReal_ne_zero, area_pos] |
| 413 | |
| 414 | /-- Twisted translation commutes with pull-back along an isogeny. Here the twisted translation of |
| 415 | degree m by y for a lattice of area A is (Tf)(z) = exp(−mπ(zȳ + |y|²/2)/A)·f(z + y). Let |
| 416 | multiplication by a map the lattice Λ of C into the lattice Λ′ of C′ with degree N, that is, |
| 417 | a·ā·area(Λ) = N·area(Λ′); then for every degree n, function G and complex number u, the twisted |
| 418 | translate by u, for Λ and degree nN, of z ↦ G(az) is z ↦ (T′G)(az), where T′ is the twisted |
| 419 | translation by au for Λ′ and degree n. -/ |
| 420 | lemma twistedTranslate_comp_isogeny {C' : CMLattice d} {a : ℂ} {N : ℕ} |
| 421 | (h_isog : C.IsIsogeny C'.periodPair a N) (n : ℕ) (G : ℂ → ℂ) (u : ℂ) : |
| 422 | C.twistedTranslate (n * N) u (fun z : ℂ ↦ G (a * z)) = |
| 423 | fun z : ℂ ↦ C'.twistedTranslate n (a * u) G (a * z) := by |
| 424 | -- The form nN·H of Λ is the pull-back along z ↦ az of the form n·H′ of Λ′. |
| 425 | have h_form (v w : ℂ) : |
| 426 | ((n * N) • C.hermitianForm) v w = (n • C'.hermitianForm) (a * v) (a * w) := by |
| 427 | simp [C.hermitianForm_mul_of_isIsogeny h_isog, mul_assoc] |
| 428 | funext z |
| 429 | rw [twistedTranslate, twistedTranslate, thetaShift_apply, thetaShift_apply, h_form, h_form, |
| 430 | mul_add] |
| 431 | |
| 432 | variable [PrimeSevenModEight d] |
| 433 | |
| 434 | /-- Let d be a prime ≡ 7 mod 8. For z in Λ and a equal to (1 + √−d)/2 or its conjugate, the |
| 435 | multiplier of θ at az is 1. -/ |
| 436 | lemma multiplier_quadGen_mul {a : ℂ} (ha : a = quadGen d ∨ a = conj (quadGen d)) (hz : z ∈ C.Λ) : |
| 437 | C.multiplier (a * z) = 1 := by |
| 438 | -- By `multiplier_eq_neg_sigmaSign` it suffices that `x = t + a z / 2` is not in `Λ`. |
| 439 | -- As `1 - a = ā`, we have `x - a x = ā t + (a ā / 2) z`, and `a ā` is even; so `x ∈ Λ` would put |
| 440 | -- `ā t` in `Λ`, against `quadGen_mul_t_notMem`. |
| 441 | have h_mul {x : ℂ} (hx : x ∈ C.Λ) : a * x ∈ C.Λ := |
| 442 | C.mul_mem_of_quadInt (a := a) (by grind [quadGen_mem_quadInt, conj_mem_quadInt]) hx |
| 443 | have h_norm : quadGen d * conj (quadGen d) = 2 * (d / 8).succ := by |
| 444 | have h_cast : (1 + d : ℝ) = 2 ^ 3 * ((d / 8 : ℕ) + 1) := by |
| 445 | exact_mod_cast (by grind [PrimeSevenModEight] : 1 + d = 8 * (d / 8).succ) |
| 446 | simpa [↓mul_conj, quadGen, normSq, fieldEq] using congrArg ((↑) : ℝ → ℂ) h_cast |
| 447 | have h_notMem : (C.t + C.t + a * z) / 2 ∉ C.lattice := fun hx ↦ by |
| 448 | have h_diff : (C.t + C.t + a * z) / 2 - a * ((C.t + C.t + a * z) / 2) - |
| 449 | (d / 8).succ • z = (1 - a) * C.t := by grind [conj_quadGen] |
| 450 | have h_conj : (1 - a) * C.t ∈ C.Λ := by |
| 451 | simpa only [← h_diff] using sub_mem (sub_mem hx (h_mul hx)) (nsmul_mem hz (d / 8).succ) |
| 452 | grind [conj_quadGen, quadGen_mul_t_notMem] |
| 453 | rw [multiplier_eq_neg_sigmaSign _ (h_mul hz), sigmaSign, ite_eq_right h_notMem, neg_neg] |
| 454 | |
| 455 | /-- Let d be a prime ≡ 7 mod 8, ω = (1 + √−d)/2 and t the point of order two of C. If `z` is `ω` or |
| 456 | `ω̄` and `2 x ∈ Λ`, then `z x` or `z (x - t)` lies in `Λ`. -/ |
| 457 | lemma mul_mem_or_mul_sub_t_mem (hz_quadGen : z = quadGen d ∨ z = conj (quadGen d)) (x : ℂ) |
| 458 | (hx : x + x ∈ C.Λ) : z * x ∈ C.Λ ∨ z * (x - C.t) ∈ C.Λ := by |
| 459 | -- If neither lay in `Λ`, put `e l = exp (2πi E(l, t))`. Each of `2zx`, `2zt`, `2z(x - t)` has its |
| 460 | -- half outside `Λ` and `multiplier = 1`, so `e = -1` on all three; but `e` is a character. |
| 461 | by_contra! ⟨hzx, hzxt⟩ |
| 462 | have hzt : z * C.t ∉ C.Λ := by grind [C.quadGen_mul_t_notMem] |
| 463 | let e (l : ℂ) : ℂ := C.hermitianForm.riemannPhase l C.t |
| 464 | have e_eq (y : ℂ) (hy : y + y ∈ C.Λ) (hzy : z * y ∉ C.Λ) : e (z * (y + y)) = -1 := by |
| 465 | have hχ : C.multiplier (z * (y + y)) = 1 := C.multiplier_quadGen_mul hz_quadGen hy |
| 466 | rw [multiplier, sigmaSign, ite_eq_right (by grind)] at hχ |
| 467 | linear_combination -hχ |
| 468 | have hxt : x - C.t + (x - C.t) ∈ C.Λ := by |
| 469 | simpa only [sub_add_sub_comm] using sub_mem hx C.two_t_mem |
| 470 | have h_split : e (z * (x + x)) = e (z * (x - C.t + (x - C.t))) * e (z * (C.t + C.t)) := by |
| 471 | rw [show z * (x + x) = z * (x - C.t + (x - C.t)) + z * (C.t + C.t) by ring] |
| 472 | simp [e, mul_add, exp_add] |
| 473 | rw [e_eq x hx hzx, e_eq _ hxt hzxt, e_eq _ C.two_t_mem hzt] at h_split |
| 474 | norm_num at h_split |
| 475 | |
| 476 | /-- Let d be a prime ≡ 7 mod 8. For z in Λ, the multiplier χ(z) is the canonical one |
| 477 | `New.ThetaTori.canonicalMultiplier` for multiplication by ω̄, that is χ(z) = exp(πi E(ω̄z, z)), with |
| 478 | ω = (1 + √−d)/2 and E the Riemann form of H. The linear map z ↦ ω̄z is written as ω̄ times the |
| 479 | identity map `1`. -/ |
| 480 | lemma multiplier_eq_canonicalMultiplier (hz : z ∈ C.Λ) : |
| 481 | C.multiplier z = ThetaTori.canonicalMultiplier C.hermitianForm (conj (quadGen d) • 1) z := by |
| 482 | -- Apply the cocycle rule to `z = ω z + ω̄ z`; `multiplier` is `1` on both summands by |
| 483 | -- `multiplier_quadGen_mul`. |
| 484 | have h_add : C.multiplier (quadGen d * z + conj (quadGen d) * z) = |
| 485 | C.multiplier (quadGen d * z) * C.multiplier (conj (quadGen d) * z) * |
| 486 | cexp (Real.pi * I * C.hermitianForm.riemannForm (conj (quadGen d) * z) (quadGen d * z)) := |
| 487 | C.isAppellHumbert_multiplier.semicharacter _ (C.mul_mem_of_quadInt quadGen_mem_quadInt hz) _ |
| 488 | (C.mul_mem_of_quadInt (conj_mem_quadInt quadGen_mem_quadInt) hz) |
| 489 | have h_sum : quadGen d * z + conj (quadGen d) * z = z := by simp [conj_quadGen, sub_mul] |
| 490 | -- The form `E` is alternating, so `E(ω̄ z, ω z) = E(ω̄ z, z - ω̄ z) = E(ω̄ z, z)`. |
| 491 | have h_alt : C.hermitianForm.riemannForm (conj (quadGen d) * z) (quadGen d * z) = |
| 492 | C.hermitianForm.riemannForm (conj (quadGen d) * z) z := by |
| 493 | rw [eq_sub_of_add_eq h_sum] |
| 494 | simp [↓riemannForm_def, -hermitianForm_apply] |
| 495 | rw [h_sum, h_alt, C.multiplier_quadGen_mul (.inl rfl) hz, C.multiplier_quadGen_mul (.inr rfl) hz, |
| 496 | one_mul, one_mul] at h_add |
| 497 | simpa [ThetaTori.canonicalMultiplier] using h_add |
| 498 | |
| 499 | /-- Let d be a prime ≡ 7 mod 8, let Λ be the lattice of `C` (stable under the ring of integers of |
| 500 | ℚ(√-d)) with area A, and let l ∈ Λ. Then |l|²√d/(2A) is an integer n. Moreover, the twisted |
| 501 | translate `C.twistedTranslate 1 l C.θ`, z ↦ exp(−π(z l̄ + |l|²/2)/A)·θ(z + l) with θ = `C.θ`, equals |
| 502 | (−1)ⁿθ. -/ |
| 503 | theorem exists_int_twistedTranslate_theta_eq_neg_one_zpow {l : ℂ} (hl : l ∈ C.Λ) : |
| 504 | ∃ n : ℤ, (n : ℝ) = ‖l‖ ^ 2 * √(d : ℝ) / (2 * C.area) ∧ |
| 505 | C.twistedTranslate 1 l C.θ = (-1 : ℂ) ^ n • C.θ := by |
| 506 | -- The multiplier at l is exp(πi E(ω̄l, l)), with ω = (1 + √−d)/2 and E the Riemann form; the |
| 507 | -- number E(ω̄l, l) = |l|²√d/(2A) is an integer because ω̄l lies in Λ. |
| 508 | obtain ⟨n, hn⟩ : ∃ n : ℤ, C.hermitianForm.riemannForm (conj (quadGen d) * l) l = n := |
| 509 | isAppellHumbert_hermitianForm.le_dualLattice |
| 510 | (C.mul_mem_of_quadInt (conj_mem_quadInt quadGen_mem_quadInt) hl) l hl |
| 511 | have h_value : (n : ℝ) = ‖l‖ ^ 2 * √(d : ℝ) / (2 * C.area) := by |
| 512 | rw [← hn, riemannForm_hermitianForm, map_mul, conj_conj, mul_assoc, conj_mul', ← ofReal_pow, |
| 513 | im_mul_ofReal] |
| 514 | simp [quadGen, field] |
| 515 | have h_mult : C.multiplier l = (-1 : ℂ) ^ n := |
| 516 | calc _ = cexp (Real.pi * I * C.hermitianForm.riemannForm (conj (quadGen d) * l) l) := by |
| 517 | simp [C.multiplier_eq_canonicalMultiplier hl, ThetaTori.canonicalMultiplier] |
| 518 | _ = (-1 : ℂ) ^ n := by rw [hn, ofReal_intCast, mul_comm, exp_intCast_mul, exp_pi_mul_I] |
| 519 | exact ⟨n, h_value, by rw [C.twistedTranslate_theta_of_mem hl, h_mult]⟩ |
| 520 | |
| 521 | /-- Let C, C′ be CM data for a prime d ≡ 7 mod 8, with aΛ ⊂ Λ′ and a·ā·area(Λ) = N·area(Λ′), N |
| 522 | natural. For l in Λ, the multipliers χ of C and χ′ of C′ satisfy χ′(al) = χ(l)^N. -/ |
| 523 | lemma multiplier_mul_of_isIsogeny {C' : CMLattice d} {a : ℂ} {N : ℕ} |
| 524 | (h_isog : C.IsIsogeny C'.periodPair a N) {l : ℂ} (hl : l ∈ C.Λ) : |
| 525 | C'.multiplier (a * l) = C.multiplier l ^ N := by |
| 526 | -- The multiplier at l is (−1)ⁿ with n = |l|²√d/(2 area(Λ)); at al the exponent is multiplied |
| 527 | -- by N. |
| 528 | have h_sign (D : CMLattice d) {w : ℂ} (hw : w ∈ D.Λ) : |
| 529 | ∃ n : ℤ, (n : ℝ) = ‖w‖ ^ 2 * √(d : ℝ) / (2 * D.area) ∧ D.multiplier w = (-1 : ℂ) ^ n := by |
| 530 | obtain ⟨n, hn, h_translate⟩ := D.exists_int_twistedTranslate_theta_eq_neg_one_zpow hw |
| 531 | exact ⟨n, hn, by simpa [D.twistedTranslate_theta_of_mem hw] using congrFun h_translate 0⟩ |
| 532 | obtain ⟨n, hn, hχ⟩ := h_sign C hl |
| 533 | obtain ⟨n', hn', hχ'⟩ := h_sign C' (h_isog.1 l hl) |
| 534 | have h_area : ‖a‖ ^ 2 * C.area = N * C'.area := |
| 535 | ofReal_injective (by simpa [mul_conj'] using h_isog.2) |
| 536 | have h_exponent : (n' : ℝ) = n * N := by |
| 537 | rw [hn, hn', norm_mul, div_mul_eq_mul_div, div_eq_div_iff |
| 538 | (mul_ne_zero two_ne_zero (area_pos _).ne') (mul_ne_zero two_ne_zero (area_pos _).ne')] |
| 539 | linear_combination 2 * ‖l‖ ^ 2 * √(d : ℝ) * h_area |
| 540 | rw [hχ, hχ', show n' = n * N by exact_mod_cast h_exponent, zpow_mul, zpow_natCast] |
| 541 | |
| 542 | /-- Let C, C′ be CM data for a prime d ≡ 7 mod 8, with aΛ ⊂ Λ′ and a·ā·area(Λ) = N·area(Λ′), N |
| 543 | natural. If g is a section of degree k for C′, that is a theta function for Λ′ with form kH′ and |
| 544 | multiplier χ′^k, then z ↦ g(az) is a section of degree kN for C. -/ |
| 545 | lemma comp_mul_mem_sections {C' : CMLattice d} {a : ℂ} {N : ℕ} |
| 546 | (h_isog : C.IsIsogeny C'.periodPair a N) {k : ℕ} {g : ℂ → ℂ} (hg : g ∈ C'.sections k) : |
| 547 | (fun z : ℂ ↦ g (a * z)) ∈ C.sections (k * N) := by |
| 548 | -- Translate by a point l of Λ: the translation passes through the pull-back and multiplies g by |
| 549 | -- χ′(al)^k = χ(l)^(kN). |
| 550 | obtain ⟨hg_diff, hg_law⟩ := C'.mem_sections_iff_twistedTranslate.1 hg |
| 551 | refine C.mem_sections_iff_twistedTranslate.2 ⟨by fun_prop, fun l hl ↦ ?_⟩ |
| 552 | calc _ = fun z : ℂ ↦ C'.twistedTranslate k (a * l) g (a * z) := |
| 553 | C.twistedTranslate_comp_isogeny h_isog k g l |
| 554 | _ = fun z : ℂ ↦ C'.multiplier (a * l) ^ k * g (a * z) := by |
| 555 | simp only [hg_law (a * l) (h_isog.1 l hl), Pi.smul_apply, smul_eq_mul] |
| 556 | _ = C.multiplier l ^ (k * N) • fun z : ℂ ↦ g (a * z) := by |
| 557 | simp [funext_iff, C.multiplier_mul_of_isIsogeny h_isog hl, pow_mul'] |
| 558 | |
| 559 | end New.CMLattice |
| 560 | |
| 561 | end CurveTheta |
| 562 | |
| 563 | /-! |
| 564 | ## Monomials spanning the sections of each degree; division of sections |
| 565 | |
| 566 | With θ of degree 1, σ² of degree 2 and G of degree 3 (G is the entire function equal to yθ³ off |
| 567 | t + Λ), the spanning result is proved by repeated division by θ. |
| 568 | |
| 569 | `New.CMLattice.twistedTranslate m u` is the translation by u twisted by |
| 570 | exp(−m(H(u, z) + H(u, u)/2)). θ is the section of degree 1 with θ(0) = 1; it vanishes exactly on |
| 571 | t + Λ. |
| 572 | -/ |
| 573 | |
| 574 | namespace New.CMLattice |
| 575 | |
| 576 | open Submodule Complex ComplexConjugate Function IsAppellHumbert |
| 577 | |
| 578 | variable {d : ℕ} (C : CMLattice d) |
| 579 | |
| 580 | /-- A function F is a section of degree n exactly when it is entire and, for every l in the lattice |
| 581 | Λ, F(z + l) = (χ(l)·exp(H(l, z) + H(l, l)/2))ⁿ·F(z), with χ the multiplier and H the hermitian form |
| 582 | of C. -/ |
| 583 | lemma mem_sections_iff {n : ℕ} {F : ℂ → ℂ} : |
| 584 | F ∈ C.sections n ↔ Differentiable ℂ F ∧ |
| 585 | ∀ l ∈ C.Λ, ∀ z : ℂ, F (z + l) = |
| 586 | (C.multiplier l * cexp (C.hermitianForm l z + C.hermitianForm l l / 2)) ^ n * F z := by |
| 587 | have h_factor (l z : ℂ) : |
| 588 | (C.multiplier ^ n) l * cexp ((n • C.hermitianForm) l z + (n • C.hermitianForm) l l / 2) = |
| 589 | (C.multiplier l * cexp (C.hermitianForm l z + C.hermitianForm l l / 2)) ^ n := by |
| 590 | simp [mul_pow, ← exp_nsmul, mul_div_assoc] |
| 591 | simp only [← h_factor] |
| 592 | -- The right side is now the definition of the space of theta functions for `(n H, χ ^ n)`. |
| 593 | exact Iff.rfl |
| 594 | |
| 595 | /-- At a zero z of a section F of degree n, the derivative obeys the same law as F: for l in the |
| 596 | lattice Λ, F′(z + l) = (χ(l)·exp(H(l, z) + H(l, l)/2))ⁿ·F′(z), with χ the multiplier and H the |
| 597 | hermitian form of C. -/ |
| 598 | lemma deriv_add_of_mem_sections {n : ℕ} {F : ℂ → ℂ} (hF : F ∈ C.sections n) {l z : ℂ} |
| 599 | (hl : l ∈ C.Λ) (hz : F z = 0) : |
| 600 | deriv F (z + l) = |
| 601 | (C.multiplier l * cexp (C.hermitianForm l z + C.hermitianForm l l / 2)) ^ n * deriv F z := by |
| 602 | obtain ⟨F_diff, F_add⟩ := C.mem_sections_iff.1 hF |
| 603 | let e : ℂ → ℂ := fun w : ℂ ↦ |
| 604 | (C.multiplier l * cexp (C.hermitianForm l w + C.hermitianForm l l / 2)) ^ n |
| 605 | have h_law : (fun w : ℂ ↦ F (w + l)) = fun w : ℂ ↦ e w * F w := funext (F_add l hl) |
| 606 | -- The product rule, in which the term with the derivative of the factor `e` vanishes with `F z`. |
| 607 | rw [← deriv_comp_add_const, h_law, deriv_fun_mul (by fun_prop) (F_diff z), hz, mul_zero, |
| 608 | zero_add] |
| 609 | |
| 610 | /-- The degree a + 2b + 3c of a triple of exponents (a, b, c): the degree of the monomial |
| 611 | `New.CMLattice.monomialSection` of the triple as a section. -/ |
| 612 | @[simp] |
| 613 | abbrev monomialDeg (x : ℕ × ℕ × ℕ) : ℕ := x.1 + x.2.1 * 2 + x.2.2 * 3 |
| 614 | |
| 615 | /-- The monomial θ^a·(σ²)^b·G^c of a triple of exponents (a, b, c). |
| 616 | Here σ is the sigma function of the lattice and G = `New.CMLattice.translatedYThetaCube` is the |
| 617 | entire function equal to yθ³ off t + Λ. The factors θ, σ², G are sections of degree 1, 2, 3. -/ |
| 618 | @[local simp] |
| 619 | noncomputable def monomialSection (x : ℕ × ℕ × ℕ) : ℂ → ℂ := |
| 620 | C.θ ^ x.1 * ((C.σ ^ 2) ^ x.2.1 * C.translatedYThetaCube ^ x.2.2) |
| 621 | |
| 622 | /-- `C.monomialSection e` is differentiable. -/ |
| 623 | @[fun_prop] |
| 624 | lemma differentiable_monomialSection (e : ℕ × ℕ × ℕ) : Differentiable ℂ (C.monomialSection e) := by |
| 625 | fun_prop [monomialSection, translatedYThetaCube] |
| 626 | |
| 627 | /-- For a CM lattice `C` with lattice `Λ`, Weierstrass function ℘, sigma function σ, point of order |
| 628 | two `t`, and constant `a₁`, let x(z) = ℘(z + t) − ℘(t) and y(z) = ½(℘′(z + t) − a₁x(z)). Let G be |
| 629 | the entire function equal to yθ³ off t + Λ, and let the monomial of e = (a, b, c) be θ^a·(σ²)^b·G^c, |
| 630 | a section of degree a + 2b + 3c. If z + t ∉ Λ, this monomial at z equals θ(z)^{a+2b+3c} x(z)^b |
| 631 | y(z)^c. -/ |
| 632 | lemma monomialSection_eq (e : ℕ × ℕ × ℕ) (z : ℂ) (hz : z + C.t ∉ C.Λ) : |
| 633 | C.monomialSection e z = |
| 634 | C.θ z ^ monomialDeg e * (C.translatedX z ^ e.2.1 * C.translatedY z ^ e.2.2) := by |
| 635 | simp only [monomialSection, Pi.mul_apply, Pi.pow_apply] |
| 636 | obtain ⟨hσ, hY⟩ := C.sigma_sq_eq_and_translatedYThetaCube_eq z hz |
| 637 | rw [hσ, hY] |
| 638 | ring |
| 639 | |
| 640 | /-- For a triple e = (a, b, c), the monomial `C.monomialSection e` = θ^a(σ²)^b G^c is a section of |
| 641 | degree `monomialDeg e` = a + 2b + 3c. That is, it is a theta function for the lattice Λ of `C` with |
| 642 | hermitian form (a + 2b + 3c)H and multiplier χ^(a+2b+3c). -/ |
| 643 | lemma monomialSection_mem (e : ℕ × ℕ × ℕ) : C.monomialSection e ∈ C.sections (monomialDeg e) := by |
| 644 | -- Both sides of the functional equation for `l` are entire, so it suffices to prove it off |
| 645 | -- `-t + Λ`. There `monomialSection_eq` writes the monomial as `θ ^ monomialDeg e` times a |
| 646 | -- periodic function. |
| 647 | refine C.mem_sections_iff.2 ⟨C.differentiable_monomialSection e, fun l hl ↦ ?_⟩ |
| 648 | refine C.eq_of_eq_off_lattice C.t (by fun_prop) (by fun_prop) fun z hz ↦ ?_ |
| 649 | have hzl : z + l + C.t ∉ C.Λ := by rwa [add_right_comm, add_mem_cancel_right hl] |
| 650 | have hx_periodic : C.translatedX (z + l) = C.translatedX z := C.translatedX_add_of_mem z hl |
| 651 | have hy_periodic : C.translatedY (z + l) = C.translatedY z := by |
| 652 | rw [translatedY, translatedY, hx_periodic, add_right_comm z l, |
| 653 | C.derivWeierstrassP_add_coe (z + C.t) ⟨l, hl⟩] |
| 654 | have hθ : C.θ (z + l) = |
| 655 | C.multiplier l * cexp (C.hermitianForm l z + C.hermitianForm l l / 2) * C.θ z := by |
| 656 | simpa using (C.mem_sections_iff.1 C.theta_mem).2 l hl z |
| 657 | rw [C.monomialSection_eq e _ hzl, C.monomialSection_eq e z hz, hx_periodic, hy_periodic, hθ, |
| 658 | mul_pow, mul_assoc] |
| 659 | |
| 660 | /-- Every section of degree 0, that is, every entire Λ-periodic function, is constant. The right |
| 661 | side 1 is the unit of the semiring of subspaces of the algebra ℂ → ℂ: the constant functions. -/ |
| 662 | lemma sections_zero_le_const : C.sections 0 ≤ 1 := by |
| 663 | -- `apply_smul_of_nonpos` gives `f (t • u) = exp (t² B u u / 2) * f 0`; take `B = 0` and `u = 1`. |
| 664 | intro f hf |
| 665 | exact ⟨f 0, funext fun t ↦ by simpa using (apply_smul_of_nonpos hf 1 (by simp) t).symm⟩ |
| 666 | |
| 667 | /-- For a ≠ 0, the zeros of z ↦ (T_uθ)(az) are simple, where T_u = `C.twistedTranslate 1 u` is the |
| 668 | twisted translation by u. -/ |
| 669 | lemma deriv_twistedTranslate_theta_comp_mul_ne_zero (u : ℂ) {a z : ℂ} (ha : a ≠ 0) |
| 670 | (hz : C.twistedTranslate 1 u C.θ (a * z) = 0) : |
| 671 | deriv (fun w : ℂ ↦ C.twistedTranslate 1 u C.θ (a * w)) z ≠ 0 := by |
| 672 | -- `T_u θ` is an exponential times `w ↦ θ (w + u)`, and the zeros of `θ` are simple. |
| 673 | let e : ℂ → ℂ := fun w : ℂ ↦ cexp (-(C.hermitianForm u w + C.hermitianForm u u / 2)) |
| 674 | have hT : C.twistedTranslate 1 u C.θ = fun w : ℂ ↦ e w * C.θ (w + u) := |
| 675 | funext fun w ↦ by simp [e, RealComplexForm.thetaShift_apply] |
| 676 | have hθ : C.θ (a * z + u) = 0 := by simpa [hT, e, -theta_eq_zero_iff] using hz |
| 677 | rw [deriv_comp_mul_left, hT, deriv_fun_mul (by fun_prop) (by fun_prop), hθ, mul_zero, zero_add, |
| 678 | deriv_comp_add_const] |
| 679 | exact smul_ne_zero ha (mul_ne_zero (exp_ne_zero _) (C.deriv_θ_ne_zero (C.theta_eq_zero_iff.1 hθ))) |
| 680 | |
| 681 | /-- Let f and g be entire functions such that the zeros of g are simple and f vanishes at each of |
| 682 | them. Then f/g, with the value f′(z)/g′(z) at a zero z of g, is entire. -/ |
| 683 | lemma differentiable_ite_deriv_div_deriv {f g : ℂ → ℂ} (hf : Differentiable ℂ f) |
| 684 | (hg : Differentiable ℂ g) (h_simple : ∀ z : ℂ, g z = 0 → deriv g z ≠ 0) |
| 685 | (h_zero : ∀ z : ℂ, g z = 0 → f z = 0) : |
| 686 | Differentiable ℂ fun z : ℂ ↦ if g z = 0 then deriv f z / deriv g z else f z / g z := by |
| 687 | intro z |
| 688 | by_cases hz : g z = 0 |
| 689 | · -- Remove the simple zero at `z` via `differentiableAt_of_eventuallyEq_div`. |
| 690 | refine TauCeti.differentiableAt_of_eventuallyEq_div (c := deriv f z / deriv g z) |
| 691 | (hf.analyticAt z) (hg.analyticAt z) (h_zero z hz) hz ?_ (hg z).hasDerivAt (h_simple z hz) |
| 692 | (ite_eq_left hz) |
| 693 | (((hg z).hasDerivAt.eventually_ne (h_simple z hz)).mono fun _ hw ↦ ite_eq_right hw) |
| 694 | simpa [div_mul_cancel₀ _ (h_simple z hz)] using (hf z).hasDerivAt |
| 695 | · refine ((hf z).div (hg z) hz).congr_of_eventuallyEq ?_ |
| 696 | filter_upwards [(hg z).continuousAt.eventually_ne hz] with w hw using ite_eq_right hw |
| 697 | |
| 698 | /-- Let g be a section of degree m of C of the form g(z) = (T_uθ)(az), where a ≠ 0, T_u = |
| 699 | `D.twistedTranslate 1 u`, and θ belongs to an arbitrary CM datum D, not necessarily C. A section f |
| 700 | of degree m + k that vanishes at every zero of g is c·g for a section c of degree k. This is stated |
| 701 | with c in any subspace S that contains the sections of degree k, so that a known bound on these |
| 702 | (`New.CMLattice.sections_zero_le_const`, or `New.CMLattice.sections_le_span_monomialSection` in its |
| 703 | induction) can be passed directly. -/ |
| 704 | lemma exists_mul_eq_of_mem_sections {e : ℕ} (D : CMLattice e) (u : ℂ) {m k : ℕ} |
| 705 | {S : Submodule ℂ (ℂ → ℂ)} {f g : ℂ → ℂ} {a : ℂ} (hS : C.sections k ≤ S) (hg : g ∈ C.sections m) |
| 706 | (hf : f ∈ C.sections (m + k)) (ha : a ≠ 0) |
| 707 | (hg_eq : g = fun z : ℂ ↦ D.twistedTranslate 1 u D.θ (a * z)) |
| 708 | (h_zero : ∀ z : ℂ, g z = 0 → f z = 0) : ∃ c ∈ S, c * g = f := by |
| 709 | have h_simple (z : ℂ) (hz : g z = 0) : deriv g z ≠ 0 := by |
| 710 | simpa only [hg_eq] using D.deriv_twistedTranslate_theta_comp_mul_ne_zero u ha |
| 711 | (by rwa [hg_eq] at hz) |
| 712 | obtain ⟨f_diff, f_add⟩ := C.mem_sections_iff.1 hf |
| 713 | obtain ⟨g_diff, g_add⟩ := C.mem_sections_iff.1 hg |
| 714 | let c : ℂ → ℂ := fun z : ℂ ↦ if g z = 0 then deriv f z / deriv g z else f z / g z |
| 715 | have hc : Differentiable ℂ c := differentiable_ite_deriv_div_deriv f_diff g_diff h_simple h_zero |
| 716 | refine ⟨c, hS (C.mem_sections_iff.2 ⟨hc, fun l hl z ↦ ?_⟩), funext fun z ↦ ?_⟩ |
| 717 | · -- The factors `j ^ (m + k)` and `j ^ m` divide, for the values and for the derivatives. |
| 718 | set j : ℂ := C.multiplier l * cexp (C.hermitianForm l z + C.hermitianForm l l / 2) with hj |
| 719 | have hj_ne : j ^ m ≠ 0 := |
| 720 | pow_ne_zero m (mul_ne_zero (C.isAppellHumbert_multiplier.ne_zero hl) (exp_ne_zero _)) |
| 721 | have h_div (u v : ℂ) : j ^ (m + k) * u / (j ^ m * v) = j ^ k * (u / v) := by |
| 722 | rw [pow_add, mul_assoc, mul_div_mul_left _ _ hj_ne, mul_div_assoc] |
| 723 | have h_iff : g (z + l) = 0 ↔ g z = 0 := by rw [g_add l hl, ← hj, mul_eq_zero_iff_left hj_ne] |
| 724 | by_cases hz : g z = 0 |
| 725 | · simp only [c, ite_eq_left hz, ite_eq_left (h_iff.2 hz), |
| 726 | C.deriv_add_of_mem_sections hf hl (h_zero z hz), C.deriv_add_of_mem_sections hg hl hz, |
| 727 | ← hj, h_div] |
| 728 | · simp only [c, ite_eq_right hz, ite_eq_right (mt h_iff.1 hz), f_add l hl, g_add l hl, |
| 729 | ← hj, h_div] |
| 730 | · -- At a zero of `g` both sides vanish by `h_zero`; elsewhere the quotient is `f z / g z`. |
| 731 | grind [Pi.mul_apply] |
| 732 | |
| 733 | /-- The monomial σ^{2b}·G^c, with G = `New.CMLattice.translatedYThetaCube`, has no factor θ and does |
| 734 | not vanish at the zero −t of θ. -/ |
| 735 | lemma monomialSection_neg_t_ne_zero (b c : ℕ) : C.monomialSection (0, b, c) (-C.t) ≠ 0 := by |
| 736 | -- At `-t`, where `θ` vanishes, the equation of the curve reads |
| 737 | -- `translatedYThetaCube ^ 2 = σ ^ 6`. |
| 738 | have G_sq : C.translatedYThetaCube (-C.t) ^ 2 = C.σ (-C.t) ^ 6 := by |
| 739 | simpa [C.theta_eq_zero_iff.2] using C.translatedYThetaCube_sq_add (-C.t) |
| 740 | have G_ne : C.translatedYThetaCube (-C.t) ≠ 0 := |
| 741 | (pow_ne_zero_iff two_ne_zero).1 (G_sq.trans_ne (by simp [t_notMem])) |
| 742 | simp [G_ne, t_notMem] |
| 743 | |
| 744 | /-- The triples (a, b, c) with c ≤ 1 and degree a + 2b + 3c = m. -/ |
| 745 | def spanningExponents (m : ℕ) : Set (ℕ × ℕ × ℕ) := {e : ℕ × ℕ × ℕ | e.2.2 ≤ 1 ∧ monomialDeg e = m} |
| 746 | |
| 747 | @[simp] |
| 748 | lemma mk_mem_spanningExponents {a b c m : ℕ} : |
| 749 | (a, b, c) ∈ spanningExponents m ↔ c ≤ 1 ∧ monomialDeg (a, b, c) = m := Iff.rfl |
| 750 | |
| 751 | /-- Multiplication by θ takes the span of the monomials θ^a σ^{2b} G^c with c ≤ 1 and |
| 752 | a + 2b + 3c = m into the span of those with c ≤ 1 and a + 2b + 3c = m + 1. -/ |
| 753 | lemma mul_theta_mem_span_monomialSection {m : ℕ} {q : ℂ → ℂ} |
| 754 | (hq : q ∈ span ℂ (C.monomialSection '' spanningExponents m)) : |
| 755 | q * C.θ ∈ span ℂ (C.monomialSection '' spanningExponents (m + 1)) := by |
| 756 | refine (map_span_le (LinearMap.mulRight ℂ C.θ) _ _).2 ?_ (mem_map_of_mem hq) |
| 757 | rintro _ ⟨⟨a, b, c⟩, h_mem, rfl⟩ |
| 758 | exact subset_span ⟨(a + 1, b, c), by grind [mk_mem_spanningExponents], |
| 759 | by simp [pow_succ, mul_right_comm]⟩ |
| 760 | |
| 761 | /-- Let Λ be the lattice of `C`, with 2-torsion point t, and put x(z) = ℘(z + t) − ℘(t). A section |
| 762 | of degree m is a theta function for Λ with hermitian form mH and multiplier χ^m. Every section of |
| 763 | degree m is a complex linear combination of the functions θ^a σ^{2b} G^c with c ≤ 1 and |
| 764 | a + 2b + 3c = m, which are the monomials `monomialSection` of the triples in `spanningExponents m`; |
| 765 | here θ = `C.θ`, σ is the sigma function of Λ, and G is the entire function equal to yθ³ off t + Λ. |
| 766 | Off t + Λ such a monomial equals θ^m x^b y^c. |
| 767 | |
| 768 | Part of Weierstrass's theorem on elliptic functions, stated for sections: a section of degree m |
| 769 | divided by θ^m is an elliptic function with poles of order at most m on t + Λ, hence a polynomial in |
| 770 | x and y. |
| 771 | |
| 772 | This gives the upper bound in Frobenius's dimension formula for theta functions, in one complex |
| 773 | variable and for the lattice of `C` only, as spanning by explicit monomials. -/ |
| 774 | lemma sections_le_span_monomialSection (m : ℕ) : |
| 775 | C.sections m ≤ span ℂ (C.monomialSection '' spanningExponents m) := by |
| 776 | induction m using Nat.twoStepInduction with |
| 777 | | zero => |
| 778 | exact C.sections_zero_le_const.trans (one_le.2 (subset_span ⟨(0, 0, 0), by simp, by simp⟩)) |
| 779 | | one => |
| 780 | rw [eq_span_singleton_of_mem_of_finrank_eq_one (S := C.sections 1) finrank_thetaSpace_nsmul |
| 781 | C.theta_mem (ne_iff.2 ⟨0, by simp⟩), span_singleton_le_iff_mem] |
| 782 | exact subset_span ⟨(1, 0, 0), by simp, by simp⟩ |
| 783 | | more m _ ih => |
| 784 | intro f hf |
| 785 | -- The monomial `e₀` of degree `m + 2` without a factor `θ` does not vanish at `-t`. |
| 786 | let e₀ : ℕ × ℕ × ℕ := (0, m / 2 + 1 - m % 2, m % 2) |
| 787 | have e₀_deg : monomialDeg e₀ = m + 2 := by grind |
| 788 | have e₀_ne : C.monomialSection e₀ (-C.t) ≠ 0 := C.monomialSection_neg_t_ne_zero _ _ |
| 789 | -- So `g = f - c • monomialSection e₀` vanishes on `-t + Λ`, the zeros of `θ`, and is `θ` times |
| 790 | -- a section. |
| 791 | let c : ℂ := f (-C.t) / C.monomialSection e₀ (-C.t) |
| 792 | let g : ℂ → ℂ := f - c • C.monomialSection e₀ |
| 793 | have hg : g ∈ C.sections (1 + (m + 1)) := by |
| 794 | rw [add_comm 1] |
| 795 | exact sub_mem hf (smul_mem _ c (by simpa only [e₀_deg] using C.monomialSection_mem e₀)) |
| 796 | have g_neg_t : g (-C.t) = 0 := by simp [g, c, e₀_ne, -monomialSection] |
| 797 | have g_zero (z : ℂ) (hz : C.θ z = 0) : g z = 0 := by |
| 798 | simpa [g_neg_t] using (C.mem_sections_iff.1 hg).2 (z + C.t) (C.theta_eq_zero_iff.1 hz) (-C.t) |
| 799 | obtain ⟨q, hq_span, hq⟩ : |
| 800 | ∃ q ∈ span ℂ (C.monomialSection '' spanningExponents (m + 1)), q * C.θ = g := |
| 801 | C.exists_mul_eq_of_mem_sections C 0 ih C.theta_mem hg one_ne_zero (by simp) g_zero |
| 802 | rw [show f = q * C.θ + c • C.monomialSection e₀ by rw [hq, sub_add_cancel]] |
| 803 | exact add_mem (C.mul_theta_mem_span_monomialSection hq_span) |
| 804 | (smul_mem _ c (subset_span ⟨e₀, ⟨by lia, e₀_deg⟩, rfl⟩)) |
| 805 | |
| 806 | /-- Let d be a prime ≡ 7 mod 8, and let Λ be the lattice of `C`, of area A. Let δ be a complex |
| 807 | number such that multiplication by δ̄ maps Λ into Λ with degree δδ̄ = N, and let u be a point with |
| 808 | δu ∈ Λ. Then z ↦ (T_uθ)(δ̄z) is a section of degree N, that is, a theta function for Λ with |
| 809 | hermitian form NH and multiplier χ^N; here θ = `C.θ` and T_u = `C.twistedTranslate 1 u` is (T_u |
| 810 | f)(z) = exp(−π(zū + |u|²/2)/A)·f(z + u). -/ |
| 811 | lemma twistedTranslate_comp_mem [PrimeSevenModEight d] {δ u : ℂ} {N : ℕ} |
| 812 | (h_isog : C.IsIsogeny C.periodPair (conj δ) N) (hu : δ * u ∈ C.Λ) : |
| 813 | (fun z : ℂ ↦ C.twistedTranslate 1 u C.θ (conj δ * z)) ∈ C.sections N := by |
| 814 | -- Translate by a point l of Λ. The translation passes through the pull-back, and T_{δ̄l} commutes |
| 815 | -- with T_u because E(δ̄l, u) = E(l, δu) is an integer, E the Riemann form. |
| 816 | refine C.mem_sections_iff_twistedTranslate.2 ⟨by fun_prop, fun l hl ↦ ?_⟩ |
| 817 | have hδl : conj δ * l ∈ C.Λ := h_isog.1 l hl |
| 818 | obtain ⟨k, hk⟩ : ∃ k : ℤ, C.hermitianForm.riemannForm l (δ * u) = k := |
| 819 | isAppellHumbert_hermitianForm.le_dualLattice hl (δ * u) hu |
| 820 | have h_int : (1 • C.hermitianForm).riemannForm (conj δ * l) u = k := by |
| 821 | simp [← hk, riemannForm_hermitianForm, mul_left_comm, mul_assoc, -hermitianForm_apply] |
| 822 | have h_comm : C.twistedTranslate 1 (conj δ * l) (C.twistedTranslate 1 u C.θ) = |
| 823 | C.twistedTranslate 1 u (C.twistedTranslate 1 (conj δ * l) C.θ) := by |
| 824 | have h_phase : (1 • C.hermitianForm).riemannPhase (conj δ * l) u = 1 := by |
| 825 | rw [RealComplexForm.riemannPhase, h_int, coe_fourierChar_eq_exp, ofReal_intCast, mul_comm, |
| 826 | exp_int_mul_two_pi_mul_I] |
| 827 | rw [twistedTranslate, twistedTranslate, (C.isAppellHumbert_multiplier.nsmul 1).thetaShift_comm, |
| 828 | h_phase, one_smul] |
| 829 | calc C.twistedTranslate N l (fun z : ℂ ↦ C.twistedTranslate 1 u C.θ (conj δ * z)) |
| 830 | = fun z : ℂ ↦ |
| 831 | C.twistedTranslate 1 (conj δ * l) (C.twistedTranslate 1 u C.θ) (conj δ * z) := by |
| 832 | rw [← C.twistedTranslate_comp_isogeny h_isog, one_mul] |
| 833 | _ = fun z : ℂ ↦ C.multiplier (conj δ * l) * C.twistedTranslate 1 u C.θ (conj δ * z) := by |
| 834 | simp only [h_comm, C.twistedTranslate_theta_of_mem hδl, map_smul, Pi.smul_apply, |
| 835 | smul_eq_mul] |
| 836 | _ = C.multiplier l ^ N • fun z : ℂ ↦ C.twistedTranslate 1 u C.θ (conj δ * z) := by |
| 837 | simp [funext_iff, C.multiplier_mul_of_isIsogeny h_isog hl] |
| 838 | |
| 839 | end New.CMLattice |
| 840 | |
| 841 | /-! |
| 842 | ## Taylor series of x and y: Weierstrass equation and derivatives |
| 843 | |
| 844 | The functions x (`New.CMLattice.translatedX`) and y (`New.CMLattice.translatedY`) are holomorphic |
| 845 | at `0`. Their Taylor series, moved to a field `K` along a ring homomorphism `ι : ℂ →+* K` |
| 846 | (`New.taylorVia`), satisfy the same identities as the functions. |
| 847 | |
| 848 | * `New.CMLattice.taylorVia_curve_eq`: the Weierstrass equation `y² + a₁ x y = x³ + x`. |
| 849 | * `New.CMLattice.derivative_taylorVia_translatedX`, |
| 850 | `New.CMLattice.derivative_taylorVia_translatedY`: `x' = 2 y + a₁ x` and |
| 851 | `y' = 1 + 3 x² - a₁ y`. |
| 852 | -/ |
| 853 | |
| 854 | section FormalCurve |
| 855 | |
| 856 | open PowerSeries |
| 857 | |
| 858 | namespace New.CMLattice |
| 859 | |
| 860 | variable {d : ℕ} (C : CMLattice d) {K : Type*} [Field K] (ι : ℂ →+* K) |
| 861 | |
| 862 | /-- `constantCoeff (taylorVia ι f) = ι (f 0)`. -/ |
| 863 | @[simp↓] |
| 864 | lemma constantCoeff_taylorVia (f : ℂ → ℂ) : constantCoeff (taylorVia ι f) = ι (f 0) := by |
| 865 | simp [taylorVia, ← coeff_zero_eq_constantCoeff_apply, taylorAtZero] |
| 866 | |
| 867 | /-- The formal derivative of the Taylor series of `f` at `0`, moved to `K` along `ι`, is the Taylor |
| 868 | series of the derivative of `f`. -/ |
| 869 | lemma derivative_taylorVia [CharZero K] |
| 870 | (f : ℂ → ℂ) : d⁄dX (taylorVia ι f) = taylorVia ι (deriv f) := |
| 871 | PowerSeries.ext fun n ↦ by simp [coeff_derivative, iteratedDeriv_succ', Nat.factorial, field] |
| 872 | |
| 873 | /-- Functions that agree off `t + Λ` agree near `0`, so they have the same Taylor series at `0`. -/ |
| 874 | lemma taylorAtZero_congr {f g : ℂ → ℂ} (hfg : ∀ z : ℂ, z + C.t ∉ C.Λ → f z = g z) : |
| 875 | taylorAtZero f = taylorAtZero g := by |
| 876 | -- The complement of `t + Λ` is open and contains 0, so the derivatives at 0 agree. |
| 877 | ext n |
| 878 | simp [taylorAtZero, Set.EqOn.iteratedDeriv_of_isOpen (s := {z : ℂ | z + C.t ∉ C.Λ}) hfg |
| 879 | C.isOpen_setOf_add_t_notMem n (show (0 : ℂ) + C.t ∉ C.Λ by simpa using C.t_notMem)] |
| 880 | |
| 881 | /-- The Taylor series at `0` of the monomial of `e = (a, b, c)` is |
| 882 | `θ ^ (a + 2 b + 3 c) x ^ b y ^ c`, formed with the Taylor series of `θ`, `x = C.translatedX` and |
| 883 | `y = C.translatedY`. -/ |
| 884 | lemma taylorAtZero_monomialSection_eq (e : ℕ × ℕ × ℕ) : |
| 885 | taylorAtZero (C.monomialSection e) = taylorAtZero C.θ ^ monomialDeg e * |
| 886 | (taylorAtZero C.translatedX ^ e.2.1 * taylorAtZero C.translatedY ^ e.2.2) := by |
| 887 | simp (disch := fun_prop) only [C.taylorAtZero_congr (C.monomialSection_eq e), taylorAtZero_mul, |
| 888 | taylorAtZero_pow] |
| 889 | |
| 890 | /-- The Taylor series at `0` of `x = C.translatedX` and `y = C.translatedY`, moved to `K` along |
| 891 | `ι`, satisfy the Weierstrass equation `y² + a₁ x y = x³ + x`. -/ |
| 892 | lemma taylorVia_curve_eq : |
| 893 | taylorVia ι C.translatedY ^ 2 + |
| 894 | PowerSeries.C (ι C.a₁) * taylorVia ι C.translatedX * taylorVia ι C.translatedY = |
| 895 | taylorVia ι C.translatedX ^ 3 + taylorVia ι C.translatedX := by |
| 896 | -- The curve equation holds off the poles, so it holds for the Taylor series. |
| 897 | simpa (disch := fun_prop) using |
| 898 | congrArg (map ι) (C.taylorAtZero_congr fun z hz ↦ C.weierstrass_equation hz) |
| 899 | |
| 900 | variable [CharZero K] |
| 901 | |
| 902 | /-- The Taylor series at `0` of `x = C.translatedX` and `y = C.translatedY`, moved to `K` along |
| 903 | `ι`, satisfy `x' = 2 y + a₁ x`. -/ |
| 904 | lemma derivative_taylorVia_translatedX : |
| 905 | d⁄dX (taylorVia ι C.translatedX) = |
| 906 | 2 * taylorVia ι C.translatedY + PowerSeries.C (ι C.a₁) * taylorVia ι C.translatedX := by |
| 907 | simp (disch := fun_prop) [funext C.deriv_translatedX, taylorVia, derivative_taylorVia, map_ofNat] |
| 908 | |
| 909 | /-- The Taylor series at `0` of `x = C.translatedX` and `y = C.translatedY`, moved to `K` along |
| 910 | `ι`, satisfy `y' = 1 + 3 x² - a₁ y`. -/ |
| 911 | lemma derivative_taylorVia_translatedY : |
| 912 | d⁄dX (taylorVia ι C.translatedY) = |
| 913 | 1 + 3 * taylorVia ι C.translatedX ^ 2 - |
| 914 | PowerSeries.C (ι C.a₁) * taylorVia ι C.translatedY := by |
| 915 | have h_taylor : taylorAtZero (deriv C.translatedY) = |
| 916 | taylorAtZero fun z : ℂ ↦ 1 + 3 * C.translatedX z ^ 2 - C.a₁ * C.translatedY z := |
| 917 | C.taylorAtZero_congr fun z hz ↦ C.deriv_translatedY_eq hz |
| 918 | rw [derivative_taylorVia] |
| 919 | simp (disch := fun_prop) [← neg_mul, h_taylor, taylorVia, sub_eq_add_neg, map_ofNat] |
| 920 | |
| 921 | end New.CMLattice |
| 922 | |
| 923 | end FormalCurve |