The FLT adelic genus equals the Riemann–Roch genus of a function field
ProvedWeilConjectures.Bridge.genusFF_eq_genusLet be a field and let be an algebraic function field in one variable, presented through a separating variable: is a finite separable extension of the rational function field , the structure maps being compatible. Assume that is the full constant field of : every element of that is algebraic over already lies in . Assume moreover that is a perfect field.
The genus of the Riemann–Roch library is the largest value of over all divisors of , where places are valuation rings with infinite cyclic value group, , and . The FLT genus is defined adelically: let be the ring of répartitions of in the FLT sense, the -subalgebra of (product over the FLT places ) generated by the families with for all but finitely many ; let , and embed diagonally. The FLT genus is
Here the FLT places are the valuation rings that are discrete valuation rings (these are exactly the valuation rings of the places above). Then
This identifies the genus used by the FLT algebraic-curve API (for instance in the existence of the -polynomial and in the Riemann hypothesis for curves over finite fields) with the genus computed by the Riemann–Roch library.
Formalization Note The tower is given by the instances Algebra k[X] K, Algebra k⟮X⟯ K, Algebra k K, IsScalarTower k k[X] K and IsScalarTower k[X] k⟮X⟯ K, together with FunctionField k K ( is finite-dimensional over ) and Algebra.IsSeparable k⟮X⟯ K. The full constant field hypothesis is FunctionField.IsFullConstantField k K, and [PerfectField k] is an explicit hypothesis of the theorem (a standing assumption of the FLT genus API). The FLT genus is AlgebraicCurve.genusFF k K = Module.finrank k (H1 0), with H1 0 the quotient of repartitions k K by repartitionsOf 0 ⊔ principalRepartitions k K; the library genus FunctionField.genus k K is the natural-number truncation of the supremum of the defects.
import Mathlib import Definitions.Def_WeilConjectures_RiemannRochFLT set_option maxHeartbeats 4000000 set_option synthInstance.maxHeartbeats 400000 open scoped WithZero open MonoidWithZeroHom open WeilConjectures.Bridge open scoped Polynomial RatFunc variable (k K : Type*) [Field k] [Field K] [Algebra k K] [Algebra k[X] K] [Algebra k⟮X⟯ K] [IsScalarTower k k[X] K] [IsScalarTower k[X] k⟮X⟯ K] [FunctionField k K] [Algebra.IsSeparable k⟮X⟯ K] [FunctionField.IsFullConstantField k K]
theorem WeilConjectures.Bridge.genusFF_eq_genus [PerfectField k] :
AlgebraicCurve.genusFF k K = FunctionField.genus k K := by sorry