Module

MixedLocalProjectorReduction.lean

Nyll.ClassFieldTheory.LocalClassFieldTheory.Brauer.MixedLocalProjectorReduction
12 declarations indexed from sourceView source ↗

Projected power classes of mixed-characteristic local units

Declarations

ClassFieldTheory.Brauer.normalBasisLatticeRep

The actual restricted Galois action on the chosen normal-basis lattice.

Source context 9 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
open CategoryTheory LocalFieldTheory LocalClassFieldTheory CyclicCohomology
open scoped IsMulCommutative MonoidAlgebra Ring ValuativeRel
noncomputable section
namespace ClassFieldTheory.Brauer
universe u v
variable (K L : Type u) [Field K] [Field L] [Algebra K L] [FiniteDimensional K L] [IsGalois K L]
    [ValuativeRel K] [TopologicalSpace K] [IsNonarchimedeanLocalField K] [CharZero K]
    [ValuativeRel L] [TopologicalSpace L] [IsNonarchimedeanLocalField L] [CharZero L]
    [Valuation.HasExtension (ValuativeRel.valuation K) (ValuativeRel.valuation L)]
    [IsIntegralClosure 𝒪[L] 𝒪[K] L] [Module.Finite 𝒪[K] 𝒪[L]]
local notation "G" => Gal(L/K)
local notation "M" => chosenNormalBasisIntegerLattice K L
def normalBasisLatticeRep : Rep.{u} ℤ G
ClassFieldTheory.Brauer.localGaloisGroupAlgebraFunctor

The group-algebra module functor on the original local Galois group.

Source context 9 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
open CategoryTheory LocalFieldTheory LocalClassFieldTheory CyclicCohomology
open scoped IsMulCommutative MonoidAlgebra Ring ValuativeRel
noncomputable section
namespace ClassFieldTheory.Brauer
universe u v
variable (K L : Type u) [Field K] [Field L] [Algebra K L] [FiniteDimensional K L] [IsGalois K L]
    [ValuativeRel K] [TopologicalSpace K] [IsNonarchimedeanLocalField K] [CharZero K]
    [ValuativeRel L] [TopologicalSpace L] [IsNonarchimedeanLocalField L] [CharZero L]
    [Valuation.HasExtension (ValuativeRel.valuation K) (ValuativeRel.valuation L)]
    [IsIntegralClosure 𝒪[L] 𝒪[K] L] [Module.Finite 𝒪[K] 𝒪[L]]
local notation "G" => Gal(L/K)
local notation "M" => chosenNormalBasisIntegerLattice K L
abbrev localGaloisGroupAlgebraFunctor : Rep.{u} ℤ G ⥤ ModuleCat.{u} ℤ[G]
ClassFieldTheory.Brauer.exists_normalBasisLatticeGroupAlgebraMap

The actual finite-index normal-basis inclusion is a map over the integral group algebra, with the original action on the integer units.

Source context 18 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
open CategoryTheory LocalFieldTheory LocalClassFieldTheory CyclicCohomology
open scoped IsMulCommutative MonoidAlgebra Ring ValuativeRel
noncomputable section
namespace ClassFieldTheory.Brauer
universe u v
variable (K L : Type u) [Field K] [Field L] [Algebra K L] [FiniteDimensional K L] [IsGalois K L]
    [ValuativeRel K] [TopologicalSpace K] [IsNonarchimedeanLocalField K] [CharZero K]
    [ValuativeRel L] [TopologicalSpace L] [IsNonarchimedeanLocalField L] [CharZero L]
    [Valuation.HasExtension (ValuativeRel.valuation K) (ValuativeRel.valuation L)]
    [IsIntegralClosure 𝒪[L] 𝒪[K] L] [Module.Finite 𝒪[K] 𝒪[L]]
local notation "G" => Gal(L/K)
local notation "M" => chosenNormalBasisIntegerLattice K L
local notation "F" => localGaloisGroupAlgebraFunctor K L
local notation "ML" => ModuleCat.carrier (Functor.obj F (normalBasisLatticeRep K L))
local notation "UL" => ModuleCat.carrier (Functor.obj F (localIntegerUnitRep K L))
local notation "FL" => ModuleCat.carrier (Functor.obj F (Rep.ofAlgebraAutOnUnits K L))
local notation "VL" => ModuleCat.carrier (Functor.obj F (localValueRep K L))
local notation "N[" n "," X "]" => (n • (LinearMap.id : X →ₗ[ℤ[G]] X))
local notation "Q[" n "," X "]" => X ⧸ LinearMap.range (N[n,X])
local notation "T[" n "," X "]" => LinearMap.ker (N[n,X])
omit [CharZero K] in
theorem exists_normalBasisLatticeGroupAlgebraMap :
    ∃ f : ML →ₗ[ℤ[G]] UL, Function.Injective f ∧ Finite (UL ⧸ LinearMap.range f)
ClassFieldTheory.Brauer.finite_baseIntegerRingPowerQuotient
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
open CategoryTheory LocalFieldTheory LocalClassFieldTheory CyclicCohomology
open scoped IsMulCommutative MonoidAlgebra Ring ValuativeRel
noncomputable section
namespace ClassFieldTheory.Brauer
universe u v
variable (K L : Type u) [Field K] [Field L] [Algebra K L] [FiniteDimensional K L] [IsGalois K L]
    [ValuativeRel K] [TopologicalSpace K] [IsNonarchimedeanLocalField K] [CharZero K]
    [ValuativeRel L] [TopologicalSpace L] [IsNonarchimedeanLocalField L] [CharZero L]
    [Valuation.HasExtension (ValuativeRel.valuation K) (ValuativeRel.valuation L)]
    [IsIntegralClosure 𝒪[L] 𝒪[K] L] [Module.Finite 𝒪[K] 𝒪[L]]
local notation "G" => Gal(L/K)
local notation "M" => chosenNormalBasisIntegerLattice K L
local notation "F" => localGaloisGroupAlgebraFunctor K L
local notation "ML" => ModuleCat.carrier (Functor.obj F (normalBasisLatticeRep K L))
local notation "UL" => ModuleCat.carrier (Functor.obj F (localIntegerUnitRep K L))
local notation "FL" => ModuleCat.carrier (Functor.obj F (Rep.ofAlgebraAutOnUnits K L))
local notation "VL" => ModuleCat.carrier (Functor.obj F (localValueRep K L))
local notation "N[" n "," X "]" => (n • (LinearMap.id : X →ₗ[ℤ[G]] X))
local notation "Q[" n "," X "]" => X ⧸ LinearMap.range (N[n,X])
local notation "T[" n "," X "]" => LinearMap.ker (N[n,X])
theorem finite_baseIntegerRingPowerQuotient (n : ℕ) (hn : n ≠ 0) :
    Finite (𝒪[K] ⧸ LinearMap.range (LinearMap.nsmulLinear (R := ℤ) n 𝒪[K]))
ClassFieldTheory.Brauer.normalBasisLatticePowerQuotient_finite
Source context 18 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
open CategoryTheory LocalFieldTheory LocalClassFieldTheory CyclicCohomology
open scoped IsMulCommutative MonoidAlgebra Ring ValuativeRel
noncomputable section
namespace ClassFieldTheory.Brauer
universe u v
variable (K L : Type u) [Field K] [Field L] [Algebra K L] [FiniteDimensional K L] [IsGalois K L]
    [ValuativeRel K] [TopologicalSpace K] [IsNonarchimedeanLocalField K] [CharZero K]
    [ValuativeRel L] [TopologicalSpace L] [IsNonarchimedeanLocalField L] [CharZero L]
    [Valuation.HasExtension (ValuativeRel.valuation K) (ValuativeRel.valuation L)]
    [IsIntegralClosure 𝒪[L] 𝒪[K] L] [Module.Finite 𝒪[K] 𝒪[L]]
local notation "G" => Gal(L/K)
local notation "M" => chosenNormalBasisIntegerLattice K L
local notation "F" => localGaloisGroupAlgebraFunctor K L
local notation "ML" => ModuleCat.carrier (Functor.obj F (normalBasisLatticeRep K L))
local notation "UL" => ModuleCat.carrier (Functor.obj F (localIntegerUnitRep K L))
local notation "FL" => ModuleCat.carrier (Functor.obj F (Rep.ofAlgebraAutOnUnits K L))
local notation "VL" => ModuleCat.carrier (Functor.obj F (localValueRep K L))
local notation "N[" n "," X "]" => (n • (LinearMap.id : X →ₗ[ℤ[G]] X))
local notation "Q[" n "," X "]" => X ⧸ LinearMap.range (N[n,X])
local notation "T[" n "," X "]" => LinearMap.ker (N[n,X])
omit [ValuativeRel L] [TopologicalSpace L] [IsNonarchimedeanLocalField L] [CharZero L]
  [Valuation.HasExtension (ValuativeRel.valuation K) (ValuativeRel.valuation L)]
  [IsIntegralClosure 𝒪[L] 𝒪[K] L] [Module.Finite 𝒪[K] 𝒪[L]] in
theorem normalBasisLatticePowerQuotient_finite (n : ℕ) (hn : n ≠ 0) : Finite (Q[n,ML])
ClassFieldTheory.Brauer.fieldUnitPowerQuotient_finite
Source context 18 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
open CategoryTheory LocalFieldTheory LocalClassFieldTheory CyclicCohomology
open scoped IsMulCommutative MonoidAlgebra Ring ValuativeRel
noncomputable section
namespace ClassFieldTheory.Brauer
universe u v
variable (K L : Type u) [Field K] [Field L] [Algebra K L] [FiniteDimensional K L] [IsGalois K L]
    [ValuativeRel K] [TopologicalSpace K] [IsNonarchimedeanLocalField K] [CharZero K]
    [ValuativeRel L] [TopologicalSpace L] [IsNonarchimedeanLocalField L] [CharZero L]
    [Valuation.HasExtension (ValuativeRel.valuation K) (ValuativeRel.valuation L)]
    [IsIntegralClosure 𝒪[L] 𝒪[K] L] [Module.Finite 𝒪[K] 𝒪[L]]
local notation "G" => Gal(L/K)
local notation "M" => chosenNormalBasisIntegerLattice K L
local notation "F" => localGaloisGroupAlgebraFunctor K L
local notation "ML" => ModuleCat.carrier (Functor.obj F (normalBasisLatticeRep K L))
local notation "UL" => ModuleCat.carrier (Functor.obj F (localIntegerUnitRep K L))
local notation "FL" => ModuleCat.carrier (Functor.obj F (Rep.ofAlgebraAutOnUnits K L))
local notation "VL" => ModuleCat.carrier (Functor.obj F (localValueRep K L))
local notation "N[" n "," X "]" => (n • (LinearMap.id : X →ₗ[ℤ[G]] X))
local notation "Q[" n "," X "]" => X ⧸ LinearMap.range (N[n,X])
local notation "T[" n "," X "]" => LinearMap.ker (N[n,X])
omit [FiniteDimensional K L] [IsGalois K L] [ValuativeRel K]
  [TopologicalSpace K] [IsNonarchimedeanLocalField K] [CharZero K]
  [Valuation.HasExtension (ValuativeRel.valuation K) (ValuativeRel.valuation L)]
  [IsIntegralClosure 𝒪[L] 𝒪[K] L] [Module.Finite 𝒪[K] 𝒪[L]] in
theorem fieldUnitPowerQuotient_finite (n : ℕ) (hn : 0 < n) : Finite (Q[n,FL])
ClassFieldTheory.Brauer.integerUnitPowerQuotient_finite
Source context 18 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
open CategoryTheory LocalFieldTheory LocalClassFieldTheory CyclicCohomology
open scoped IsMulCommutative MonoidAlgebra Ring ValuativeRel
noncomputable section
namespace ClassFieldTheory.Brauer
universe u v
variable (K L : Type u) [Field K] [Field L] [Algebra K L] [FiniteDimensional K L] [IsGalois K L]
    [ValuativeRel K] [TopologicalSpace K] [IsNonarchimedeanLocalField K] [CharZero K]
    [ValuativeRel L] [TopologicalSpace L] [IsNonarchimedeanLocalField L] [CharZero L]
    [Valuation.HasExtension (ValuativeRel.valuation K) (ValuativeRel.valuation L)]
    [IsIntegralClosure 𝒪[L] 𝒪[K] L] [Module.Finite 𝒪[K] 𝒪[L]]
local notation "G" => Gal(L/K)
local notation "M" => chosenNormalBasisIntegerLattice K L
local notation "F" => localGaloisGroupAlgebraFunctor K L
local notation "ML" => ModuleCat.carrier (Functor.obj F (normalBasisLatticeRep K L))
local notation "UL" => ModuleCat.carrier (Functor.obj F (localIntegerUnitRep K L))
local notation "FL" => ModuleCat.carrier (Functor.obj F (Rep.ofAlgebraAutOnUnits K L))
local notation "VL" => ModuleCat.carrier (Functor.obj F (localValueRep K L))
local notation "N[" n "," X "]" => (n • (LinearMap.id : X →ₗ[ℤ[G]] X))
local notation "Q[" n "," X "]" => X ⧸ LinearMap.range (N[n,X])
local notation "T[" n "," X "]" => LinearMap.ker (N[n,X])
omit [FiniteDimensional K L] [IsGalois K L]
  [TopologicalSpace K] [IsNonarchimedeanLocalField K] [CharZero K]
  [Module.Finite 𝒪[K] 𝒪[L]] in
theorem integerUnitPowerQuotient_finite (n : ℕ) (hn : 0 < n) : Finite (Q[n,UL])
ClassFieldTheory.Brauer.valueGroupPowerQuotient_finite
Source context 18 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
open CategoryTheory LocalFieldTheory LocalClassFieldTheory CyclicCohomology
open scoped IsMulCommutative MonoidAlgebra Ring ValuativeRel
noncomputable section
namespace ClassFieldTheory.Brauer
universe u v
variable (K L : Type u) [Field K] [Field L] [Algebra K L] [FiniteDimensional K L] [IsGalois K L]
    [ValuativeRel K] [TopologicalSpace K] [IsNonarchimedeanLocalField K] [CharZero K]
    [ValuativeRel L] [TopologicalSpace L] [IsNonarchimedeanLocalField L] [CharZero L]
    [Valuation.HasExtension (ValuativeRel.valuation K) (ValuativeRel.valuation L)]
    [IsIntegralClosure 𝒪[L] 𝒪[K] L] [Module.Finite 𝒪[K] 𝒪[L]]
local notation "G" => Gal(L/K)
local notation "M" => chosenNormalBasisIntegerLattice K L
local notation "F" => localGaloisGroupAlgebraFunctor K L
local notation "ML" => ModuleCat.carrier (Functor.obj F (normalBasisLatticeRep K L))
local notation "UL" => ModuleCat.carrier (Functor.obj F (localIntegerUnitRep K L))
local notation "FL" => ModuleCat.carrier (Functor.obj F (Rep.ofAlgebraAutOnUnits K L))
local notation "VL" => ModuleCat.carrier (Functor.obj F (localValueRep K L))
local notation "N[" n "," X "]" => (n • (LinearMap.id : X →ₗ[ℤ[G]] X))
local notation "Q[" n "," X "]" => X ⧸ LinearMap.range (N[n,X])
local notation "T[" n "," X "]" => LinearMap.ker (N[n,X])
omit [FiniteDimensional K L] [IsGalois K L]
  [TopologicalSpace K] [IsNonarchimedeanLocalField K] [CharZero K]
  [Module.Finite 𝒪[K] 𝒪[L]] in
theorem valueGroupPowerQuotient_finite (n : ℕ) (hn : 0 < n) : Finite (Q[n,VL])
ClassFieldTheory.Brauer.integerUnitPowerTorsion_finite
Source context 18 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
open CategoryTheory LocalFieldTheory LocalClassFieldTheory CyclicCohomology
open scoped IsMulCommutative MonoidAlgebra Ring ValuativeRel
noncomputable section
namespace ClassFieldTheory.Brauer
universe u v
variable (K L : Type u) [Field K] [Field L] [Algebra K L] [FiniteDimensional K L] [IsGalois K L]
    [ValuativeRel K] [TopologicalSpace K] [IsNonarchimedeanLocalField K] [CharZero K]
    [ValuativeRel L] [TopologicalSpace L] [IsNonarchimedeanLocalField L] [CharZero L]
    [Valuation.HasExtension (ValuativeRel.valuation K) (ValuativeRel.valuation L)]
    [IsIntegralClosure 𝒪[L] 𝒪[K] L] [Module.Finite 𝒪[K] 𝒪[L]]
local notation "G" => Gal(L/K)
local notation "M" => chosenNormalBasisIntegerLattice K L
local notation "F" => localGaloisGroupAlgebraFunctor K L
local notation "ML" => ModuleCat.carrier (Functor.obj F (normalBasisLatticeRep K L))
local notation "UL" => ModuleCat.carrier (Functor.obj F (localIntegerUnitRep K L))
local notation "FL" => ModuleCat.carrier (Functor.obj F (Rep.ofAlgebraAutOnUnits K L))
local notation "VL" => ModuleCat.carrier (Functor.obj F (localValueRep K L))
local notation "N[" n "," X "]" => (n • (LinearMap.id : X →ₗ[ℤ[G]] X))
local notation "Q[" n "," X "]" => X ⧸ LinearMap.range (N[n,X])
local notation "T[" n "," X "]" => LinearMap.ker (N[n,X])
omit [FiniteDimensional K L] [IsGalois K L]
  [TopologicalSpace K] [IsNonarchimedeanLocalField K] [CharZero K]
  [TopologicalSpace L] [IsNonarchimedeanLocalField L] [CharZero L]
  [Module.Finite 𝒪[K] 𝒪[L]] in
theorem integerUnitPowerTorsion_finite (n : ℕ) (hn : n ≠ 0) : Finite (T[n,UL])
ClassFieldTheory.Brauer.normalBasisLattice_nsmul_injective
Source context 18 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
open CategoryTheory LocalFieldTheory LocalClassFieldTheory CyclicCohomology
open scoped IsMulCommutative MonoidAlgebra Ring ValuativeRel
noncomputable section
namespace ClassFieldTheory.Brauer
universe u v
variable (K L : Type u) [Field K] [Field L] [Algebra K L] [FiniteDimensional K L] [IsGalois K L]
    [ValuativeRel K] [TopologicalSpace K] [IsNonarchimedeanLocalField K] [CharZero K]
    [ValuativeRel L] [TopologicalSpace L] [IsNonarchimedeanLocalField L] [CharZero L]
    [Valuation.HasExtension (ValuativeRel.valuation K) (ValuativeRel.valuation L)]
    [IsIntegralClosure 𝒪[L] 𝒪[K] L] [Module.Finite 𝒪[K] 𝒪[L]]
local notation "G" => Gal(L/K)
local notation "M" => chosenNormalBasisIntegerLattice K L
local notation "F" => localGaloisGroupAlgebraFunctor K L
local notation "ML" => ModuleCat.carrier (Functor.obj F (normalBasisLatticeRep K L))
local notation "UL" => ModuleCat.carrier (Functor.obj F (localIntegerUnitRep K L))
local notation "FL" => ModuleCat.carrier (Functor.obj F (Rep.ofAlgebraAutOnUnits K L))
local notation "VL" => ModuleCat.carrier (Functor.obj F (localValueRep K L))
local notation "N[" n "," X "]" => (n • (LinearMap.id : X →ₗ[ℤ[G]] X))
local notation "Q[" n "," X "]" => X ⧸ LinearMap.range (N[n,X])
local notation "T[" n "," X "]" => LinearMap.ker (N[n,X])
omit [TopologicalSpace K] [IsNonarchimedeanLocalField K] [CharZero K]
  [ValuativeRel L] [TopologicalSpace L] [IsNonarchimedeanLocalField L]
  [Valuation.HasExtension (ValuativeRel.valuation K) (ValuativeRel.valuation L)]
  [IsIntegralClosure 𝒪[L] 𝒪[K] L] [Module.Finite 𝒪[K] 𝒪[L]] in
theorem normalBasisLattice_nsmul_injective (n : ℕ) (hn : n ≠ 0) :
    Function.Injective (N[n,ML])
ClassFieldTheory.Brauer.localIntegerUnits_primeProjectorLength

For mixed-characteristic integer units, the actual projected prime power classes equal the normal-basis reduction plus the roots-of-unity kernel.

Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
open CategoryTheory LocalFieldTheory LocalClassFieldTheory CyclicCohomology
open scoped IsMulCommutative MonoidAlgebra Ring ValuativeRel
noncomputable section
namespace ClassFieldTheory.Brauer
universe u v
variable (K L : Type u) [Field K] [Field L] [Algebra K L] [FiniteDimensional K L] [IsGalois K L]
    [ValuativeRel K] [TopologicalSpace K] [IsNonarchimedeanLocalField K] [CharZero K]
    [ValuativeRel L] [TopologicalSpace L] [IsNonarchimedeanLocalField L] [CharZero L]
    [Valuation.HasExtension (ValuativeRel.valuation K) (ValuativeRel.valuation L)]
    [IsIntegralClosure 𝒪[L] 𝒪[K] L] [Module.Finite 𝒪[K] 𝒪[L]]
local notation "G" => Gal(L/K)
local notation "M" => chosenNormalBasisIntegerLattice K L
local notation "F" => localGaloisGroupAlgebraFunctor K L
local notation "ML" => ModuleCat.carrier (Functor.obj F (normalBasisLatticeRep K L))
local notation "UL" => ModuleCat.carrier (Functor.obj F (localIntegerUnitRep K L))
local notation "FL" => ModuleCat.carrier (Functor.obj F (Rep.ofAlgebraAutOnUnits K L))
local notation "VL" => ModuleCat.carrier (Functor.obj F (localValueRep K L))
local notation "N[" n "," X "]" => (n • (LinearMap.id : X →ₗ[ℤ[G]] X))
local notation "Q[" n "," X "]" => X ⧸ LinearMap.range (N[n,X])
local notation "T[" n "," X "]" => LinearMap.ker (N[n,X])
theorem localIntegerUnits_primeProjectorLength (p : ℕ) (hp : p.Prime) [IsMulCommutative G]
    {J : Type v} [Fintype J] [DecidableEq J]
    (e : Matrix J J ((ZMod p)[G])) (he : IsIdempotentElem e) :
    letI : Finite (T[p,UL]) := integerUnitPowerTorsion_finite K L p hp.ne_zero
    letI : Finite (Q[p,UL]) := integerUnitPowerQuotient_finite K L p hp.pos
    letI : Finite (Q[p,ML]) := normalBasisLatticePowerQuotient_finite K L p hp.ne_zero
    MonoidAlgebra.primeProjectorLength G e he hp (ModuleCat.of ℤ[G] (Q[p,UL])) =
      MonoidAlgebra.primeProjectorLength G e he hp (ModuleCat.of ℤ[G] (Q[p,ML])) +
        MonoidAlgebra.primeProjectorLength G e he hp (ModuleCat.of ℤ[G] (T[p,UL])) := by
  let : Finite (T[p,UL]) := integerUnitPowerTorsion_finite K L p hp.ne_zero
  let : Finite (Q[p,UL]) := integerUnitPowerQuotient_finite K L p hp.pos
  let : Finite (Q[p,ML]) := normalBasisLatticePowerQuotient_finite K L p hp.ne_zero
  obtain ⟨f, hf, hF⟩ := exists_normalBasisLatticeGroupAlgebraMap K L
  let D := LinearMap.range f
  let : Finite (UL ⧸ D) := hF
  exact MonoidAlgebra.primeProjectorLength_powerReduction_of_finite_quotient G e he hp
    f D.mkQ hf D.mkQ_surjective (LinearMap.exact_map_mkQ_range f)
    (normalBasisLattice_nsmul_injective K L p hp.ne_zero)
ClassFieldTheory.Brauer.localFieldUnits_primeProjectorLength

The field power classes have the projected weight of the normal-basis reduction, the original torsion units, and the trivial valuation reduction.

Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
open CategoryTheory LocalFieldTheory LocalClassFieldTheory CyclicCohomology
open scoped IsMulCommutative MonoidAlgebra Ring ValuativeRel
noncomputable section
namespace ClassFieldTheory.Brauer
universe u v
variable (K L : Type u) [Field K] [Field L] [Algebra K L] [FiniteDimensional K L] [IsGalois K L]
    [ValuativeRel K] [TopologicalSpace K] [IsNonarchimedeanLocalField K] [CharZero K]
    [ValuativeRel L] [TopologicalSpace L] [IsNonarchimedeanLocalField L] [CharZero L]
    [Valuation.HasExtension (ValuativeRel.valuation K) (ValuativeRel.valuation L)]
    [IsIntegralClosure 𝒪[L] 𝒪[K] L] [Module.Finite 𝒪[K] 𝒪[L]]
local notation "G" => Gal(L/K)
local notation "M" => chosenNormalBasisIntegerLattice K L
local notation "F" => localGaloisGroupAlgebraFunctor K L
local notation "ML" => ModuleCat.carrier (Functor.obj F (normalBasisLatticeRep K L))
local notation "UL" => ModuleCat.carrier (Functor.obj F (localIntegerUnitRep K L))
local notation "FL" => ModuleCat.carrier (Functor.obj F (Rep.ofAlgebraAutOnUnits K L))
local notation "VL" => ModuleCat.carrier (Functor.obj F (localValueRep K L))
local notation "N[" n "," X "]" => (n • (LinearMap.id : X →ₗ[ℤ[G]] X))
local notation "Q[" n "," X "]" => X ⧸ LinearMap.range (N[n,X])
local notation "T[" n "," X "]" => LinearMap.ker (N[n,X])
theorem localFieldUnits_primeProjectorLength (p : ℕ) (hp : p.Prime) [IsMulCommutative G]
    {J : Type v} [Fintype J] [DecidableEq J]
    (e : Matrix J J ((ZMod p)[G])) (he : IsIdempotentElem e) :
    letI : Finite (T[p,UL]) := integerUnitPowerTorsion_finite K L p hp.ne_zero
    letI : Finite (Q[p,FL]) := fieldUnitPowerQuotient_finite K L p hp.pos
    letI : Finite (Q[p,ML]) := normalBasisLatticePowerQuotient_finite K L p hp.ne_zero
    letI : Finite (Q[p,VL]) := valueGroupPowerQuotient_finite K L p hp.pos
    MonoidAlgebra.primeProjectorLength G e he hp (ModuleCat.of ℤ[G] (Q[p,FL])) =
      MonoidAlgebra.primeProjectorLength G e he hp (ModuleCat.of ℤ[G] (Q[p,ML])) +
        MonoidAlgebra.primeProjectorLength G e he hp (ModuleCat.of ℤ[G] (T[p,UL])) +
          MonoidAlgebra.primeProjectorLength G e he hp (ModuleCat.of ℤ[G] (Q[p,VL])) := by
  let : Finite (T[p,UL]) := integerUnitPowerTorsion_finite K L p hp.ne_zero
  let : Finite (Q[p,FL]) := fieldUnitPowerQuotient_finite K L p hp.pos
  let : Finite (Q[p,ML]) := normalBasisLatticePowerQuotient_finite K L p hp.ne_zero
  let : Finite (Q[p,VL]) := valueGroupPowerQuotient_finite K L p hp.pos
  let : Finite (Q[p,UL]) := integerUnitPowerQuotient_finite K L p hp.pos
  let f := ((F).map (localIntegerUnitInclusion K L)).hom
  let g := ((F).map (localUnitValuation K L)).hom
  obtain ⟨hf, hex, hg⟩ := localUnitValuation_exact K L
  have hZ : Function.Injective (N[p,VL]) := localValue_nsmul_injective K L p hp.pos
  have hPower := MonoidAlgebra.primeProjectorLength_add_of_exact G e he hp
    (ModuleCat.of ℤ[G] (Q[p,UL])) (ModuleCat.of ℤ[G] (Q[p,FL])) (ModuleCat.of ℤ[G] (Q[p,VL]))
    (LinearMap.powerReductionMap p f) (LinearMap.powerReductionMap p g)
    (LinearMap.powerReductionMap_injective_of_quotient p f g hf hg hex hZ)
    (LinearMap.powerReductionMap_surjective p g hg)
    (LinearMap.powerReduction_exact p f g hg hex)
  rw [hPower, localIntegerUnits_primeProjectorLength K L p hp e he]