Documentation

Atlas.EllipticCurves.code.ModularPolynomial

The upper half-plane as a subset of : complex numbers with strictly positive imaginary part.

Instances For
    noncomputable def ModularFunction.qMapN (N : ) (τ : UpperHalfPlane) :

    The local uniformizer q_N(τ) = exp(2πiτ/N) at the cusp i∞ for level N.

    Instances For

      f : ℍ → ℂ is meromorphic at the cusp i∞ if, after the substitution q = q_N(τ), it agrees near 0 with a meromorphic function in q.

      Instances For

        f : ℍ → ℂ is meromorphic at every cusp (= every SL₂(ℤ)-translate of i∞).

        Instances For

          f : ℍ → ℂ is meromorphic on the upper half-plane if it extends to a meromorphic function on the open set {Im z > 0} ⊆ ℂ.

          Instances For

            f is invariant under the subgroup Γ ≤ SL₂(ℤ), i.e. f(γ τ) = f(τ) for all γ ∈ Γ and τ ∈ ℍ.

            Instances For

              f : ℍ → ℂ is holomorphic on the upper half-plane if it extends to an analytic function on the open set {Im z > 0} ⊆ ℂ.

              Instances For

                The modular j-function j : ℍ → ℂ.

                Instances For

                  The j-function is surjective from to .

                  The j-function is meromorphic on the upper half-plane (in fact holomorphic).

                  The j-function is invariant under the full modular group SL₂(ℤ).

                  The j-function is meromorphic at every cusp.

                  Scaling of the upper half-plane by a positive integer N: sends τ ∈ ℍ to N τ ∈ ℍ.

                  Instances For
                    noncomputable def ModularFunction.jModularN (N : ) (hN : 0 < N) (τ : UpperHalfPlane) :

                    The level-N j-function j_N(τ) := j(N τ) (cf. Theorem 19.13).

                    Instances For

                      A modular function for the congruence subgroup Γ (Definition 19.2): a function f : ℍ → ℂ that is meromorphic on , Γ-invariant, and meromorphic at the cusps.

                      Instances For

                        Auxiliary version of Theorem 19.8: every modular function for Γ(1) = SL₂(ℤ) is a rational function of j(τ), witnessed by a pair (P, Q) of polynomials.

                        Theorem 19.8: every modular function for Γ(1) is a rational function of j(τ); equivalently ℂ(Γ(1)) = ℂ(j).

                        If f = P(j)/Q(j) is holomorphic on , then Q(j(τ)) is never zero on .

                        The level-N j-function j_N is meromorphic on : it is the composition of j with the (holomorphic) scaling τ ↦ N τ.

                        The level-N j-function j_N(τ) = j(N τ) is invariant under Γ₀(N) (Theorem 19.13).

                        The level-N j-function is meromorphic at every cusp.

                        Theorem 19.13: j_N(τ) := j(Nτ) is a modular function for Γ₀(N).

                        noncomputable def ModularPolynomial.Phi (N : ) :

                        The (classical) modular polynomial Φ_N(X, Y) ∈ ℤ[X, Y] as a MvPolynomial indexed by Fin 2, characterized in Definition 19.15 as the minimal polynomial of j_N over ℂ(j).

                        Instances For

                          The modular polynomial Φ_N, repackaged for positive N : ℕ+.

                          Instances For
                            @[simp]

                            modularPolynomial N = Phi N (definitional unfolding for simp).

                            noncomputable def ModularPolynomial.eval {R : Type u_1} [CommRing R] (N : ) (j₁ j₂ : R) :
                            R

                            Evaluate Φ_N(j₁, j₂) in an arbitrary commutative ring R via the integer casts.

                            Instances For
                              def ModularPolynomial.HasCyclicNIsogeny (F : Type u_1) [Field F] (N : ) (j₁ j₂ : F) :

                              Two j-invariants j₁, j₂ ∈ F admit a cyclic N-isogeny over F: there are elliptic curves E₁, E₂ with those j-invariants and a surjective group homomorphism E₁ → E₂ whose kernel is cyclic of order N.

                              Instances For
                                theorem ModularPolynomial.phi_symmetric (N : ) (hN : 1 < N) :

                                Theorem 20.7: the modular polynomial is symmetric, Φ_N(X, Y) = Φ_N(Y, X).

                                theorem ModularPolynomial.eval_swap {R : Type u_1} [CommRing R] (N : ) (hN : 1 < N) (j₁ j₂ : R) :
                                eval N j₁ j₂ = eval N j₂ j₁

                                Symmetry of the evaluation Φ_N(j₁, j₂) = Φ_N(j₂, j₁), derived from phi_symmetric.

                                Dedekind's ψ function ψ(N) = N ∏_{p | N}(1 + 1/p), equal to the index [Γ(1) : Γ₀(N)] and the degree of Φ_N in each variable.

                                Instances For

                                  Theorem 19.14: the degree of Φ_N in the variable Y equals [Γ(1) : Γ₀(N)] = ψ(N).

                                  The two variable-degrees of Φ_N agree, by the symmetry Φ_N(X, Y) = Φ_N(Y, X).

                                  Consequently, the degree of Φ_N in the variable X also equals ψ(N).

                                  theorem ModularPolynomial.eval_eq_zero_iff {F : Type u_1} [Field F] (N : ) (hN : 1 < N) (hchar : ¬ringChar F N) (j₁ j₂ : F) :
                                  eval N j₁ j₂ = 0 HasCyclicNIsogeny F N j₁ j₂

                                  Theorem 20.4: over any field of characteristic not dividing N, Φ_N(j₁, j₂) = 0 iff j₁, j₂ are the j-invariants of elliptic curves related by a cyclic isogeny of degree N.

                                  theorem ModularPolynomial.eval_eq_zero_iff_of_charZero {F : Type u_1} [Field F] [CharZero F] (N : ) (hN : 1 < N) (j₁ j₂ : F) :
                                  eval N j₁ j₂ = 0 HasCyclicNIsogeny F N j₁ j₂

                                  Specialization of Theorem 20.4 to fields of characteristic 0 (where the character/divisibility hypothesis is automatic).

                                  noncomputable def ModularPolynomial.diagPhi (N : ) :

                                  The diagonal modular polynomial Φ_N(X, X) ∈ ℤ[X], obtained by specializing both variables of Φ_N to the same indeterminate.

                                  Instances For

                                    For prime N, Φ_N(X, X) = -X^{2N} + r(X) with deg r < 2N; in particular the leading term is -X^{2N} (a strengthening of Lemma 20.7's tail).

                                    For prime N, the leading coefficient of Φ_N(X, X) is -1.

                                    Corollary 19.10: every modular function for Γ(1) that is holomorphic on is a polynomial in j(τ). The witness P is constructed from a rational-function representation by checking that the denominator polynomial has degree 0.

                                    def sl2zEntry (γ : Matrix.SpecialLinearGroup (Fin 2) ) (i j : Fin 2) :

                                    The (i, j)-entry of an SL₂(ℤ)-matrix, coerced to .

                                    Instances For
                                      theorem sl2zEntry_det (γ : Matrix.SpecialLinearGroup (Fin 2) ) :
                                      sl2zEntry γ 0 0 * sl2zEntry γ 1 1 - sl2zEntry γ 0 1 * sl2zEntry γ 1 0 = 1

                                      The determinant identity ad - bc = 1 rewritten in terms of sl2zEntry.

                                      theorem sl2zEntry_mul (g₁ g₂ : Matrix.SpecialLinearGroup (Fin 2) ) (i j : Fin 2) :
                                      sl2zEntry (g₁ * g₂) i j = sl2zEntry g₁ i 0 * sl2zEntry g₂ 0 j + sl2zEntry g₁ i 1 * sl2zEntry g₂ 1 j

                                      The matrix-product entry formula (g₁ g₂)_{ij} = g₁_{i0} g₂_{0j} + g₁_{i1} g₂_{1j} for SL₂(ℤ)-matrices, expressed via sl2zEntry.

                                      The extended upper half-plane ℍ* = ℍ ⊔ ℚ ∪ {∞}, obtained by adjoining the rational cusps and the cusp at infinity to .

                                      Instances For

                                        Inclusion ℍ ↪ ℍ*.

                                        Instances For

                                          Inclusion of a rational cusp r ∈ ℚ ↪ ℍ*.

                                          Instances For

                                            The cusp at infinity in ℍ*.

                                            Instances For

                                              The action of SL₂(ℤ) on the cusps ℚ ∪ {∞}, given by the linear-fractional formula γ · r = (ar + b)/(cr + d) and γ · ∞ = a/c (with c = 0 mapping to ).

                                              Instances For

                                                The identity matrix acts trivially on the cusps.

                                                theorem ExtendedUpperHalfPlane.cuspAction_factor_denom_zero (g₁ g₂ : Matrix.SpecialLinearGroup (Fin 2) ) (r : ) (hd₂ : sl2zEntry g₂ 1 0 * r + sl2zEntry g₂ 1 1 = 0) :
                                                sl2zEntry (g₁ * g₂) 1 0 * r + sl2zEntry (g₁ * g₂) 1 1 = sl2zEntry g₁ 1 0 * (sl2zEntry g₂ 0 0 * r + sl2zEntry g₂ 0 1)

                                                Auxiliary algebraic identity used in proving the multiplicative law for cuspAction: handles the case where the denominator vanishes for g₂.

                                                theorem ExtendedUpperHalfPlane.cuspAction_factor_numer_zero (g₁ g₂ : Matrix.SpecialLinearGroup (Fin 2) ) (r : ) (hd₂ : sl2zEntry g₂ 1 0 * r + sl2zEntry g₂ 1 1 = 0) :
                                                sl2zEntry (g₁ * g₂) 0 0 * r + sl2zEntry (g₁ * g₂) 0 1 = sl2zEntry g₁ 0 0 * (sl2zEntry g₂ 0 0 * r + sl2zEntry g₂ 0 1)

                                                Companion identity to cuspAction_factor_denom_zero for the numerator.

                                                theorem ExtendedUpperHalfPlane.cuspAction_numer_ne_zero_of_denom_zero (g₂ : Matrix.SpecialLinearGroup (Fin 2) ) (r : ) (hd₂ : sl2zEntry g₂ 1 0 * r + sl2zEntry g₂ 1 1 = 0) :
                                                sl2zEntry g₂ 0 0 * r + sl2zEntry g₂ 0 1 0

                                                If the denominator of the linear-fractional action of g₂ on r vanishes, then the numerator cannot also vanish (consequence of det g₂ = 1).

                                                The cusp action at is compatible with multiplication in SL₂(ℤ): (g₁ g₂) · ∞ = g₁ · (g₂ · ∞).

                                                theorem ExtendedUpperHalfPlane.cuspAction_mul_coe (g₁ g₂ : Matrix.SpecialLinearGroup (Fin 2) ) (r : ) :
                                                cuspAction (g₁ * g₂) r = cuspAction g₁ (cuspAction g₂ r)

                                                The cusp action at a rational cusp r is compatible with multiplication in SL₂(ℤ): (g₁ g₂) · r = g₁ · (g₂ · r).

                                                Multiplicativity of the cusp action on all of WithTop, combining the cases for the cusp at infinity and the finite rational cusps.

                                                The SL₂(ℤ)-action on ℍ*, defined cases-wise: the Möbius action on the upper half-plane component, and cuspAction on the cusp component.

                                                Instances For
                                                  @[implicit_reducible]

                                                  Register smulExt as the scalar multiplication of SL₂(ℤ) on ℍ*.

                                                  @[implicit_reducible]

                                                  The SL₂(ℤ)-action on ℍ* is a MulAction, with 1 · x = x and (g₁ g₂) · x = g₁ · (g₂ · x).

                                                  @[implicit_reducible]

                                                  Restriction of the SL₂(ℤ)-action on ℍ* to the congruence subgroup Γ₀(N).

                                                  The modular curve X₀(N) = Γ₀(N) \ ℍ* as the orbit space of Γ₀(N) acting on the extended upper half-plane.

                                                  Instances For

                                                    Canonical projection ℍ* → X₀(N), sending a point to its Γ₀(N)-orbit.

                                                    Instances For

                                                      The modular j-function ℍ → ℂ, accessed inside the ModularFunctionField namespace.

                                                      Instances For

                                                        f : ℍ → ℂ is a rational function of j(τ) if there exist polynomials p, q with q ≠ 0 such that q(j(τ)) · f(τ) = p(j(τ)) for all τ ∈ ℍ.

                                                        Instances For

                                                          The q-expansion of a polynomial in j, viewed as a Laurent series in q.

                                                          Instances For

                                                            The leading-order coefficient of the q-expansion of P(j) at order -deg P is the leading coefficient of P (since j = 1/q + O(1)).

                                                            The map qExpJ is additive: qExpJ (P - Q) = qExpJ P - qExpJ Q.

                                                            theorem ModularFunctionField.qExpJ_monomial_coeffs (a : ) (d : ) (n : ) :
                                                            ∃ (k : ), (qExpJ (Polynomial.C a * Polynomial.X ^ d)).coeff n = k * a

                                                            Each coefficient of the q-expansion of a monomial a · X^d in j is an integer multiple of a.

                                                            The q-expansion of an arbitrary function f : ℍ → ℂ as a Laurent series.

                                                            Instances For

                                                              For a polynomial P, the q-expansion of τ ↦ P(j(τ)) equals qExpJ P.

                                                              Corollary 19.10 in this namespace: every holomorphic modular function for Γ(1) is a polynomial in j(τ).

                                                              @[deprecated ModularFunctionField.holomorphic_modular_is_polynomial_in_j (since := "2025-04-30")]

                                                              Deprecated name for holomorphic_modular_is_polynomial_in_j (Corollary 19.10).

                                                              A Laurent series f has coefficients in an additive subgroup A ⊆ ℂ if every coefficient f.coeff n belongs to A.

                                                              Instances For

                                                                A function f : ℍ → ℂ has q-expansion coefficients in the additive subgroup A ⊆ ℂ.

                                                                Instances For

                                                                  A polynomial P : ℂ[X] has all its coefficients in the additive subgroup A ⊆ ℂ.

                                                                  Instances For

                                                                    If the q-expansion of P(j) has all coefficients in A, then so does P itself. Proved by induction on the degree, peeling off leading terms.

                                                                    Lemma 19.18 (Hasse q-expansion principle): if a holomorphic modular function f for Γ(1) has q-expansion coefficients in an additive subgroup A ⊆ ℂ, then f(τ) = P(j(τ)) for some polynomial P ∈ A[X].

                                                                    Scaling of the upper half-plane τ ↦ N τ (the level-N version inside the ModularPolynomial namespace).

                                                                    Instances For
                                                                      noncomputable def ModularPolynomial.translateScaleUHP (N : ) (hN : 0 < N) (k : ) (τ : UpperHalfPlane) :

                                                                      The translate-and-scale map τ ↦ (τ + k)/N, used to describe the Γ₀(N)-orbit representatives appearing in Lemma 19.16 and the conjugates of j_N.

                                                                      Instances For
                                                                        noncomputable def ModularPolynomial.jFunc_N (N : ) (hN : 0 < N) (τ : UpperHalfPlane) :

                                                                        j_N(τ) := j(N τ), the level-N j-function, here defined inside the ModularPolynomial namespace.

                                                                        Instances For
                                                                          noncomputable def ModularPolynomial.jFunc_N_conjugate (N : ) (hN : 0 < N) (k : ) (τ : UpperHalfPlane) :

                                                                          The conjugate j_N-value j((τ + k)/N); these conjugates are the roots of Φ_N(j(τ), Y) for N prime.

                                                                          Instances For
                                                                            noncomputable def ModularPolynomial.PhiComplex (N : ) :

                                                                            The modular polynomial Φ_N viewed with complex coefficients, before checking integrality (used to bootstrap Theorem 19.17).

                                                                            Instances For

                                                                              The polynomial Φ_N^ℂ(j(τ), j_N(τ)) vanishes identically on : this is the defining property of Φ_N as a minimal polynomial of j_N over ℂ(j).

                                                                              For prime N, each conjugate j_N-value also satisfies Φ_N^ℂ(j(τ), ·) = 0, exhibiting the N + 1 roots of the modular polynomial.

                                                                              The integer modular polynomial Phi N, mapped to , recovers the complex modular polynomial PhiComplex N.

                                                                              Theorem 19.17: Φ_N has integer coefficients, i.e. Φ_N ∈ ℤ[X, Y]. The witness is Phi N, which maps via integers to PhiComplex N.

                                                                              theorem coe_S_mul_T_zpow (k : ) :
                                                                              ↑(ModularGroup.S * ModularGroup.T ^ k) = !![0, -1; 1, k]

                                                                              Matrix-entry computation: S · T^k = !![0, -1; 1, k] in SL₂(ℤ).

                                                                              Matrix-entry computation: S · T^m · S⁻¹ = !![1, 0; -m, 1] in SL₂(ℤ).

                                                                              theorem product_matrix_eq (a b c d k : ) :
                                                                              !![k * a - b, a; k * c - d, c] * !![0, -1; 1, k] = !![a, b; c, d]

                                                                              Auxiliary algebraic identity used to factor a general matrix !![a, b; c, d] as a product of a Γ₀(N)-matrix with S · T^k.

                                                                              theorem gamma0_right_coset_cover (N : ) (hN : Nat.Prime N) (γ : Matrix.SpecialLinearGroup (Fin 2) ) :
                                                                              γ CongruenceSubgroup.Gamma0 N ∃ (k : ) (_ : k < N), γ₀CongruenceSubgroup.Gamma0 N, γ = γ₀ * (ModularGroup.S * ModularGroup.T ^ k)

                                                                              For prime N, every γ ∈ SL₂(ℤ) lies in Γ₀(N) or in one of the N right cosets Γ₀(N) · S · T^k for 0 ≤ k < N (the "cover" half of Lemma 19.16).

                                                                              Part of Lemma 19.16: the coset representative S · T^k itself never lies in Γ₀(N) for prime N.

                                                                              theorem gamma0_coset_distinct_neq (N : ) (hN : Nat.Prime N) (j k : ) (hj : j < N) (hk : k < N) (hjk : j k) :

                                                                              The remaining part of Lemma 19.16: distinct coset representatives S · T^k, S · T^j (with j, k < N and j ≠ k) give genuinely distinct cosets.

                                                                              theorem lemma_19_16 (N : ) (hN : Nat.Prime N) :

                                                                              Lemma 19.16: for prime N, the right cosets of Γ₀(N) in Γ(1) are exactly {Γ₀(N)} ∪ {Γ₀(N) · S · T^k : 0 ≤ k < N}. This is packaged as three conjuncts: covering, non-membership of representatives, and pairwise distinctness.

                                                                              Theorem 19.14 (restated): the degree of Φ_N in Y equals the Dedekind ψ function, which is the index [Γ(1) : Γ₀(N)].

                                                                              def ModularPolynomial.HasCyclicEndomorphism (F : Type u_1) [Field F] (N : ) (j₀ : F) :

                                                                              E has a cyclic endomorphism of degree N (Definition 19.15 / Section 20.1): a cyclic N-isogeny from E to itself.

                                                                              Instances For
                                                                                theorem ModularPolynomial.eval_diag_eq_zero_iff {F : Type u_1} [Field F] (N : ) (hN : 1 < N) (hchar : ¬ringChar F N) (j₀ : F) :
                                                                                eval N j₀ j₀ = 0 HasCyclicEndomorphism F N j₀

                                                                                The diagonal of Theorem 20.4: Φ_N(j₀, j₀) = 0 iff the elliptic curve with j-invariant j₀ admits a cyclic endomorphism of degree N.

                                                                                theorem ModularPolynomial.eval_diag_eq_diagPhi_eval {R : Type u_1} [CommRing R] (N : ) (j₀ : R) :

                                                                                The diagonal evaluation Φ_N(j₀, j₀) agrees with evaluating the univariate diagonal polynomial diagPhi N at j₀.

                                                                                A Laurent series f : LaurentSeries has integer coefficients: every f.coeff n is in the image of ℤ → ℂ.

                                                                                Instances For

                                                                                  Corollary 19.6 (integrality part): the q-expansion of j(τ) has all integer coefficients.

                                                                                  Corollary 19.6 (leading-term): the q⁻¹-coefficient of j(τ) is 1.

                                                                                  Corollary 19.6 (constant term): the q⁰-coefficient of j(τ) is 744.

                                                                                  Corollary 19.6 (order at the cusp): all coefficients of j(τ) below q⁻¹ vanish, i.e. j has a simple pole of residue 1 at i∞.

                                                                                  theorem corollary_19_6 :
                                                                                  have f := ModularFunctionField.qExpansion ModularFunctionField.jFunction; f.coeff (-1) = 1 f.coeff 0 = 744 (∀ (n : ), ∃ (m : ), f.coeff n = m) n < -1, f.coeff n = 0

                                                                                  Corollary 19.6: with q = e^{2πiτ} we have j(τ) = 1/q + 744 + ∑_{n ≥ 1} aₙ qⁿ with aₙ ∈ ℤ.