roseking's picture
Add lean source and binary files (part 84)
cdec422 verified
Raw History Blame Contribute Delete
4.55 kB
22
def twoIdeal (u : ℕ) : Ideal (B u) :=
body · 1 line
  Classical.choose (BinaryLocalization.exists_maximal_two_mem (B u))
25
instance twoIdeal_isMaximal (u : ℕ) : (twoIdeal u).IsMaximal :=
body · 1 line
  (Classical.choose_spec (BinaryLocalization.exists_maximal_two_mem (B u))).1
28
theorem two_mem (u : ℕ) : (2 : B u) ∈ twoIdeal u :=
proof · 1 line
  (Classical.choose_spec (BinaryLocalization.exists_maximal_two_mem (B u))).2
31
abbrev O (u : ℕ) := Localization.AtPrime (twoIdeal u)
35
instance local_algebra (u : ℕ) : Algebra (B u) (O u) :=
body · 1 line
  OreLocalization.instAlgebra (R := B u) (R₀ := B u) (S := (twoIdeal u).primeCompl)
38
instance fraction_algebra (u : ℕ) : Algebra (B u) (FractionRing (B u)) :=
body · 1 line
  OreLocalization.instAlgebra (R := B u) (R₀ := B u) (S := nonZeroDivisors (B u))
41
abbrev k (u : ℕ) := IsLocalRing.ResidueField (O u)
43
def toLocal (u : ℕ) : B u →+* O u := algebraMap (B u) (O u)
45
theorem toLocal_injective (u : ℕ) : Function.Injective (toLocal u) :=
proof · 1 line
  IsLocalization.injective (O u) (twoIdeal u).primeCompl_le_nonZeroDivisors

The same localization embeds into the fraction field used for the alternating products.

50
def toFraction (u : ℕ) : O u →ₐ[B u] FractionRing (B u) :=
body · 2 lines
  Localization.mapToFractionRing (FractionRing (B u)) (twoIdeal u).primeCompl
    (O u) (twoIdeal u).primeCompl_le_nonZeroDivisors
54
@[simp] theorem toFraction_toLocal (u : ℕ) (x : B u) :
    toFraction u (toLocal u x) = algebraMap (B u) (FractionRing (B u)) x :=
proof · 1 line
  (toFraction u).commutes x
58
theorem toFraction_injective (u : ℕ) : Function.Injective (toFraction u) := by
proof · 11 lines
  apply (IsLocalization.injective_iff_map_algebraMap_eq
    (twoIdeal u).primeCompl (toFraction u).toRingHom).2
  intro a b
  change toLocal u a = toLocal u b ↔
    toFraction u (toLocal u a) = toFraction u (toLocal u b)
  rw [toFraction_toLocal, toFraction_toLocal]
  constructor
  · intro h
    exact congrArg (algebraMap (B u) (FractionRing (B u))) (toLocal_injective u h)
  · intro h
    exact congrArg (toLocal u) (IsFractionRing.injective (B u) (FractionRing (B u)) h)
71
instance local_charZero (u : ℕ) : CharZero (O u) where
body · 4 lines
  cast_injective a b hab := by
    apply (Nat.cast_injective (R := B u))
    apply toLocal_injective u
    simpa only [map_natCast] using hab
77
instance residue_charTwo (u : ℕ) : CharP (k u) 2 :=
body · 1 line
  BinaryLocalization.residue_char_two (twoIdeal u) (two_mem u)
80
def residue (u : ℕ) : O u →+* k u := IsLocalRing.residue (O u)
82
def gaussianToLocal (u : ℕ) : GaussianRing →+* O u :=
body · 1 line
  (toLocal u).comp (gaussianToB u).toRingHom
85
def imaginary (u : ℕ) : O u := gaussianToLocal u gaussianI
87
theorem imaginary_sq (u : ℕ) : imaginary u ^ 2 = -1 := by
proof · 2 lines
  unfold imaginary
  rw [← map_pow, gaussianI_sq, map_neg, map_one]
91
theorem residue_imaginary (u : ℕ) : residue u (imaginary u) = 1 :=
proof · 1 line
  BinaryLocalization.map_i_eq_one (residue u) (imaginary u) (imaginary_sq u)
94
theorem two_ne_zero (u : ℕ) : (2 : O u) ≠ 0 :=
proof · 1 line
  Nat.cast_ne_zero.mpr (by decide)

Every one of the actual character norms supplies its own local unit.

98
theorem norm_isUnit (u : ℕ) (hu : Odd u) (x y : B u)
    (hxy : x * y = (u : B u) ^ 2) : IsUnit (toLocal u x) := by
proof · 4 lines
  apply BinaryLocalization.isUnit_of_mul_eq_odd_square hu
    (y := toLocal u y)
  have h := congrArg (toLocal u) hxy
  simpa only [map_mul, map_pow, map_natCast] using h

The unit value is the localized character value, not an unrelated witness.

106
def normUnit (u : ℕ) (hu : Odd u) (x y : B u)
    (hxy : x * y = (u : B u) ^ 2) : (O u)ˣ :=
body · 1 line
  (norm_isUnit u hu x y hxy).unit
110
@[simp] theorem normUnit_val (u : ℕ) (hu : Odd u) (x y : B u)
    (hxy : x * y = (u : B u) ^ 2) :
    (normUnit u hu x y hxy : O u) = toLocal u x :=
proof · 1 line
  (norm_isUnit u hu x y hxy).unit_spec