Fermat's Last Theorem in Lean 4

← all definition modules

Definitions/Def_Deformations_ProartinianCat.lean

The category of local pro-Artinian -algebras

Over a commutative ring \mathcal{O}, the class Deformation.IsLocalProartinianAlgebra π“ž R is imposed on a commutative ring R carrying a topology and an \mathcal{O}-algebra structure; it bundles: R is a topological ring and a local ring; IsProartinian R, i.e. the topology is linear (a basis of neighbourhoods of 0 by ideals), T_0, complete for the right uniformity, and R/I is Artinian for every open ideal I; the structure map \mathcal{O}\to R is a local homomorphism; and IsResidueAlgebra π“ž R, i.e. \mathcal{O}\to R/\mathfrak{m}_R is surjective. Two unnamed facts are recorded: such an R forces \mathcal{O} to be local, and if \mathcal{O} is local with the \mathfrak{m}_{\mathcal{O}}-adic topology then \mathcal{O}\to R is continuous.

Deformation.ProartinianCat π“ž is the structure bundling a carrier type in a fixed universe with these data. Morphisms Hom A B wrap the continuous \mathcal{O}-algebra homomorphisms A \to_A[\mathcal{O}] B, with identity and composition giving the category instance; every morphism is automatically local. The constructors of, ofHom and the lemmas coe_of, hom_id, hom_comp, hom_ext, ofHom_comp and companions relate bundled objects and morphisms to their underlying data; ofEquiv turns a continuous \mathcal{O}-algebra equivalence into a categorical isomorphism and CategoryTheory.Iso.toContinuousAlgEquiv goes back.

Two distinguished objects are constructed. When \mathcal{O} is local, Noetherian, \mathfrak{m}_{\mathcal{O}}-adically complete with finite residue field, self is \mathcal{O} with its adic topology; fromSelf is the structure map, the hom-set out of self is a singleton, and isInitialSelf exhibits it as initial. When \mathcal{O} is local, residueField is \mathcal{O}/\mathfrak{m}_{\mathcal{O}} with the discrete topology; toResidueField R is R \to R/\mathfrak{m}_R followed by the inverse of the induced isomorphism \mathcal{O}/\mathfrak{m}_{\mathcal{O}} \cong R/\mathfrak{m}_R. It is surjective with kernel \mathfrak{m}_R; to_residueField_apply shows any morphism to residueField sends r to the residue of a chosen a\in\mathcal{O} with r-a\in\mathfrak{m}_R, whence uniqueness and isTerminalResidueField.

Relation to Mathlib

Mathlib has no category of pro-Artinian local algebras; IsProartinian, IsResidueAlgebra and IsLocalRing.IsAdicTopology are the project's own predicates. The packaging (a carrier-plus-instances structure with of, ofHom, a wrapped Hom type and coercion lemmas) follows Mathlib's conventions for bundled concrete categories, and the morphisms are Mathlib's continuous algebra homomorphisms β†’A[π“ž].

Where it is used

This is the base category on which deformation and lifting functors of a residual representation \bar\rho \colon G \to \mathrm{GL}_n(k) are defined, so that representability statements for universal deformation rings can be formulated; the initial object \mathcal{O} and the terminal residue field provide the coefficient ring and the reduction used throughout the deformation-theoretic input to modularity lifting.

References

  1. B. Mazur, Deforming Galois representations, in: Galois Groups over \mathbb{Q}, MSRI Publications 16, Springer, 1989, 385–437
  2. M. Schlessinger, Functors of Artin rings, Transactions of the American Mathematical Society 130 (1968), 208–222
  3. B. de Smit and H. W. Lenstra, Jr., Explicit construction of universal deformation rings, in: Modular Forms and Fermat's Last Theorem, Springer, 1997, 313–326

References are suggested automatically and have not been individually verified.

English text generated automatically from the Lean source; the Lean statement is authoritative.

Source file: Definitions/Def_Deformations_ProartinianCat.lean

Imports

Imported by

Declarations

Source

import Mathlib
import Definitions.Def_Deformations_IsProartinian
import Definitions.Def_Deformations_IsResidueAlgebra

set_option autoImplicit false

universe u

open CategoryTheory Function Limits IsLocalRing

namespace Deformation

variable (π“ž : Type u) [CommRing π“ž]

class IsLocalProartinianAlgebra
    (R : Type u) [CommRing R] [TopologicalSpace R] [Algebra π“ž R] : Prop extends
  IsTopologicalRing R, IsLocalRing R, IsProartinian R,
  IsLocalHom (algebraMap π“ž R), IsResidueAlgebra π“ž R

section π“ž_is_local

example (π“ž : Type u) [CommRing π“ž]
    (R : Type u) [CommRing R] [TopologicalSpace R]
    [Algebra π“ž R] [IsLocalProartinianAlgebra π“ž R] : IsLocalRing π“ž := by
  let Ο† : π“ž β†’+* R := algebraMap π“ž R
  have hφ : IsLocalHom φ := IsLocalProartinianAlgebra.toIsLocalHom
  have hR : Nontrivial R := IsLocalRing.toNontrivial
  haveI : Nontrivial π“ž := RingHom.domain_nontrivial Ο†
  apply of_nonunits_add
  intros a b ha hb
  rw [mem_nonunits_iff, ← isUnit_map_iff Ο†, ← mem_nonunits_iff] at ha hb ⊒
  rw [map_add]

  exact Ideal.add_mem (IsLocalRing.maximalIdeal R) ha hb

example (π“ž : Type u) [CommRing π“ž] [TopologicalSpace π“ž] [IsTopologicalRing π“ž]
    [IsLocalRing π“ž] [IsAdicTopology π“ž]
    (R : Type u) [CommRing R] [TopologicalSpace R]
    [Algebra π“ž R] [IsLocalProartinianAlgebra π“ž R] : Continuous (algebraMap π“ž R) :=
  isContinuous_of_isProartinian_of_isLocalHom _

end π“ž_is_local

structure ProartinianCat where

  carrier : Type u

  [commRing : CommRing carrier]

  [topologicalSpace : TopologicalSpace carrier]

  [algebra : Algebra π“ž carrier]
  [isLocalProartinianAlgebra : IsLocalProartinianAlgebra π“ž carrier]

local notation3:max "𝓒" π“ž => ProartinianCat π“ž

namespace ProartinianCat

attribute [instance] commRing algebra topologicalSpace isLocalProartinianAlgebra

initialize_simps_projections ProartinianCat (-commRing, -algebra, -topologicalSpace)

instance : CoeSort (ProartinianCat π“ž) (Type u) := ⟨carrier⟩

attribute [coe] ProartinianCat.carrier

abbrev of (X : Type u) [CommRing X] [Algebra π“ž X]
    [TopologicalSpace X] [IsLocalProartinianAlgebra π“ž X] :
    ProartinianCat π“ž :=
  ⟨X⟩

lemma coe_of (X : Type u) [CommRing X] [Algebra π“ž X] [TopologicalSpace X]
    [IsLocalProartinianAlgebra π“ž X] :
    of π“ž X = X := rfl

variable {π“ž} in

@[ext]
structure Hom (A B : ProartinianCat π“ž) where

  hom : A β†’A[π“ž] B

instance : Category (ProartinianCat π“ž) where
  Hom A B := Hom A B
  id A := ⟨ContinuousAlgHom.id π“ž A⟩
  comp f g := ⟨g.hom.comp f.hom⟩

instance (A B : ProartinianCat π“ž) (f : A ⟢ B) : IsLocalHom f.hom := by
  convert isLocalHom_of_isContinuous_of_isProartinian f.hom.toRingHom f.hom.cont
  exact ⟨fun ⟨H⟩ ↦ ⟨H⟩, fun ⟨H⟩ ↦ ⟨H⟩⟩

variable {π“ž} in

abbrev ofHom {A B : Type u}
    [CommRing A] [Algebra π“ž A] [TopologicalSpace A] [IsLocalProartinianAlgebra π“ž A]
    [CommRing B] [Algebra π“ž B] [TopologicalSpace B] [IsLocalProartinianAlgebra π“ž B]
    (f : A β†’A[π“ž] B) :
    of π“ž A ⟢ of π“ž B := ⟨f⟩

variable {π“ž}

variable {X Y Z : Type u}
  [CommRing X] [Algebra π“ž X] [TopologicalSpace X] [IsLocalProartinianAlgebra π“ž X]
  [CommRing Y] [Algebra π“ž Y] [TopologicalSpace Y] [IsLocalProartinianAlgebra π“ž Y]
  [CommRing Z] [Algebra π“ž Z] [TopologicalSpace Z] [IsLocalProartinianAlgebra π“ž Z]

variable {A B C : ProartinianCat π“ž}

@[simp]
lemma hom_id : (πŸ™ A :).hom = ContinuousAlgHom.id π“ž A := rfl

lemma id_apply (x) : (πŸ™ A :).hom x = x := rfl

@[simp]
lemma hom_comp (f : A ⟢ B) (g : B ⟢ C) : (f ≫ g).hom = g.hom.comp f.hom := rfl

lemma comp_apply (f : A ⟢ B) (g : B ⟢ C) (x) : (f ≫ g).hom x = g.hom (f.hom x) := rfl

@[ext]
lemma hom_ext {f g : A ⟢ B} (hf : f.hom = g.hom) : f = g :=
  Hom.ext hf

lemma hom_ofHom (f : X β†’A[π“ž] Y) : (ofHom f).hom = f := rfl

@[simp]
lemma ofHom_hom (f : A ⟢ B) : ofHom (Hom.hom f) = f := rfl

@[simp]
lemma ofHom_id : ofHom (ContinuousAlgHom.id π“ž X) = πŸ™ (of π“ž X) := rfl

@[simp]
lemma ofHom_comp (f : X β†’A[π“ž] Y) (g : Y β†’A[π“ž] Z) :
    ofHom (g.comp f) = ofHom f ≫ ofHom g :=
  rfl

@[simps]
def ofEquiv (e : X ≃A[π“ž] Y) : of π“ž X β‰… of π“ž Y where
  hom := ofHom (e : X β†’A[π“ž] Y)
  inv := ofHom (e.symm : Y β†’A[π“ž] X)

def _root_.CategoryTheory.Iso.toContinuousAlgEquiv (i : A β‰… B) : A ≃A[π“ž] B where
  __ := i.hom.hom
  invFun := i.inv.hom
  left_inv _ := by simp [← comp_apply]
  right_inv _ := by simp [← comp_apply]
  continuous_toFun := i.hom.hom.cont
  continuous_invFun := i.inv.hom.2

section self

variable [IsLocalRing π“ž] [IsNoetherianRing π“ž]
  [Finite (ResidueField π“ž)] [IsAdicComplete (maximalIdeal π“ž) π“ž]

def self : 𝓒 π“ž where
  carrier := π“ž
  topologicalSpace := (maximalIdeal π“ž).adicTopology
  isLocalProartinianAlgebra :=
    letI := (maximalIdeal π“ž).adicTopology
    letI : IsTopologicalRing π“ž := (RingSubgroupsBasis.toRingFilterBasis _).isTopologicalRing
    letI : CompactSpace π“ž := compactSpace_of_finite_residueField
    ⟨⟩

instance : IsAdicTopology (self (π“ž := π“ž)) := ⟨rfl⟩

def fromSelf (R : ProartinianCat π“ž) : self ⟢ R where
  hom :=
    letI := (maximalIdeal π“ž).adicTopology
    letI : IsTopologicalRing π“ž := (RingSubgroupsBasis.toRingFilterBasis _).isTopologicalRing
    letI : IsAdicTopology π“ž := ⟨rfl⟩
    ⟨Algebra.ofId _ _, isContinuous_of_isProartinian_of_isLocalHom (algebraMap π“ž R)⟩

instance (R : ProartinianCat π“ž) : Unique (self ⟢ R) := by
  refine ⟨⟨fromSelf R⟩, fun f ↦ ?_⟩
  ext : 1
  apply ContinuousAlgHom.coe_inj.mp
  ext

def isInitialSelf : IsInitial (self (π“ž := π“ž)) := .ofUnique _

end self

section residueField

variable [IsLocalRing π“ž]

set_option backward.isDefEq.respectTransparency false in

def residueField : 𝓒 π“ž where
  carrier := ResidueField π“ž
  topologicalSpace := βŠ₯
  isLocalProartinianAlgebra :=
    letI : TopologicalSpace (ResidueField π“ž) := βŠ₯
    letI : DiscreteTopology (ResidueField π“ž) := ⟨rfl⟩
    letI : IsResidueAlgebra π“ž (ResidueField π“ž) := by delta ResidueField; infer_instance
    ⟨⟩

instance : DiscreteTopology (residueField (π“ž := π“ž)) := ⟨rfl⟩

noncomputable
instance : Field (residueField (π“ž := π“ž)) := inferInstanceAs (Field (ResidueField π“ž))

set_option backward.isDefEq.respectTransparency false in

noncomputable
def toResidueField (R : ProartinianCat π“ž) : R ⟢ residueField where
  hom := ⟨(IsResidueAlgebra.algEquiv π“ž R).symm.toAlgHom.comp (IsScalarTower.toAlgHom π“ž R _), by
    refine (RingHom.continuous_iff_isOpen_ker (Ξ² := residueField) (f := AlgHom.toRingHom _)).mpr ?_
    dsimp [residueField]
    rw [AlgHom.comp_toRingHom, RingHom.ker_comp_of_injective]
    Β· simp only [IsScalarTower.coe_toAlgHom, ResidueField.algebraMap_eq, residue]
      rw [Ideal.mk_ker]
      exact isOpen_maximalIdeal_of_isProartinian
    Β· exact (IsResidueAlgebra.algEquiv π“ž R).symm.injective⟩

lemma toResidueField_surjective (R : ProartinianCat π“ž) :
    Function.Surjective (toResidueField R).hom :=
  (IsResidueAlgebra.algEquiv π“ž R).symm.surjective.comp Ideal.Quotient.mk_surjective

lemma ker_toResidueField (R : ProartinianCat π“ž) :
    RingHom.ker (toResidueField R).hom = maximalIdeal R :=
  (RingHom.ker_comp_of_injective _ (f := (IsResidueAlgebra.algEquiv π“ž R).symm.toRingHom)
    (IsResidueAlgebra.algEquiv π“ž R).symm.injective).trans Ideal.mk_ker

lemma to_residueField_apply {R : 𝓒 π“ž} (f : R ⟢ residueField) (r : R.carrier) :
    f.hom r = residue _ (IsResidueAlgebra.preimage π“ž r)  := by
  trans f.hom (algebraMap _ _ (IsResidueAlgebra.preimage π“ž r))
  Β· rw [← sub_eq_zero, ← map_sub, ← not_ne_iff,
      ← @isUnit_iff_ne_zero _ _ (f.hom (r - (algebraMap π“ž ↑R) (IsResidueAlgebra.preimage π“ž r)))]
    change Β¬IsUnit (f.hom.toRingHom _)
    rw [isUnit_map_iff f.hom.toRingHom, ← mem_nonunits_iff, ← mem_maximalIdeal]
    exact IsResidueAlgebra.preimage_spec _ _
  Β· erw [AlgHom.commutes]; rfl

noncomputable
instance (R : ProartinianCat π“ž) : Unique (R ⟢ residueField) := by
  refine ⟨⟨toResidueField R⟩, fun f ↦ ?_⟩
  ext
  simp [to_residueField_apply]

noncomputable
def isTerminalResidueField : IsTerminal (residueField (π“ž := π“ž)) := .ofUnique _

end residueField

end ProartinianCat

end Deformation

Statements phrased using this module (6)