ClassFieldTheory (Lean 4.35.0)

Lean License

Developed as part of NYLL, this Lean library treats class field theory for nonarchimedean local fields, number fields and function fields over finite fields. The mathematical guide presents reciprocity, existence and the other selected results with their mathematical hypotheses and links to the formal proofs.

Main results

Local class field theory

Let K be a nonarchimedean local field.

ResultMathematical content
Finite abelian reciprocityFor each finite abelian extension L/K, a continuous surjective Artin map Kˣ → Gal(L/K) has kernel N(Lˣ).
Existence and classificationFinite abelian extensions in a fixed separable closure correspond, with reversed inclusion, to open finite-index subgroups of Kˣ via norms.

Global class field theory: number fields

Let K be a number field.

ResultMathematical content
Finite abelian reciprocityEach finite abelian extension L/K admits a modulus and a surjective ray-class Artin map to Gal(L/K), sending prime classes away from the modulus to arithmetic Frobenius.
Class-field existenceEvery subgroup of a ray class group is the kernel of the Frobenius-normalized Artin map of a finite abelian extension.

Global class field theory: function fields

Let K be a function field in one variable over a finite field k.

ResultMathematical content
Finite abelian reciprocityFor each finite abelian extension L/K, the Artin map identifies C_K / N(C_L) with Gal(L/K), where C denotes the idèle class group.
Class-field existence and uniquenessEvery open finite-index subgroup of C_K in its usual topology is the norm subgroup of a unique finite abelian extension in a fixed separable closure.

Choose an entry point

You do not need to import the entire library for every project. Start with the smallest entry point that matches the mathematics you are using.

TopicEntry point
Local class field theory (full local development)Nyll.ClassFieldTheory.LocalClassFieldTheory.All
Number-field global class field theory (reciprocity and maximal abelian statements)Nyll.ClassFieldTheory.Theorems.GlobalClassFieldTheory.All
Number-field conductors and ray class fieldsNyll.ClassFieldTheory.Theorems.ConductorsAndRayClassFields.All
Function-field class field theory (public theorem collection)Nyll.ClassFieldTheory.Theorems.FunctionField.All
Entire CFT libraryNyll.ClassFieldTheory.All

For example, a project focused on function fields can start with:

import Nyll.ClassFieldTheory.Theorems.FunctionField.All

The theorem collections are broader than individual leaf modules. If build time or import closure matters, import the specific theorem module you need instead. For instance:

import Nyll.ClassFieldTheory.Theorems.LocalClassFieldTheory.FiniteAbelianLocalReciprocity

The paths above are existing modules; short aliases such as Nyll.ClassFieldTheory.Local, NumberField, and FunctionField are possible future conveniences, not modules provided by this revision.

Package boundaries

The public standalone distribution currently uses the Lake package name Nyll. Do not add multiple standalone NYLL-derived distributions as separate dependencies and assume they can coexist: they share that package name and may overlap in module ownership. For a project using several NYLL libraries, use the main NYLL repository and its dependency configuration.

Version pinning

For reproducible downstream builds, prefer a reviewed Git tag or commit over tracking main, and commit the resulting lake-manifest.json. A tag should only be advertised as a supported release after the matching source revision has passed the repository's verification workflow. Check the repository's Releases page for published versions; this README does not imply that a release tag already exists.

Public API

Use leanprover/lean4:v4.35.0 and the Mathlib revision pinned in lake-manifest.json. Add this dependency to your project’s lakefile.toml:

[[require]]
name = "Nyll"
git = "https://github.com/n-yamaguchi-0729/ClassFieldTheory.git"
rev = "main"

Run lake update Nyll, then commit your generated lake-manifest.json to retain the resolved revisions. Import the library in a Lean file:

import Nyll.ClassFieldTheory.All

The standalone distributions share the package name Nyll. Choose one distribution; for several libraries together, use NYLL.

To build a checkout of this repository, run from its root:

lake exe cache get
lake --wfail build

Verification

CI checks the import closure, builds with warnings as errors, audits declarations, and verifies proofs with NanoDa and the Lean kernel. The public API contract checks the named declarations and their source modules.

Authorship

All original code in this library is written by OpenAI Codex.

Naganori Yamaguchi sets the mathematical goals and scope, directs development, and maintains the library.

License

Apache License 2.0. See LICENSE.

Included adaptations from pi1 and Anthropic’s Fermat’s Last Theorem project retain their source-specific copyrights and authors. The included-file inventories and preserved upstream notices are in NOTICE.