Download lean/OAI/LinearAlgebra/CirculantHadamard/BinaryLocalRing.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 4.55 kB
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/LinearAlgebra/CirculantHadamard/BinaryLocalRing.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/LinearAlgebra/CirculantHadamard/BinaryLocalRing.lean
-
curl -L -o BinaryLocalRing.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/LinearAlgebra/CirculantHadamard/BinaryLocalRing.lean
4.55 kB
Lean 4 · 23
declarations statementsfull
def twoIdeal (u : ℕ) : Ideal (B u) := body · 1 line
Classical.choose (BinaryLocalization.exists_maximal_two_mem (B u))instance twoIdeal_isMaximal (u : ℕ) : (twoIdeal u).IsMaximal := body · 1 line
(Classical.choose_spec (BinaryLocalization.exists_maximal_two_mem (B u))).1theorem two_mem (u : ℕ) : (2 : B u) ∈ twoIdeal u := proof · 1 line
(Classical.choose_spec (BinaryLocalization.exists_maximal_two_mem (B u))).2abbrev O (u : ℕ) := Localization.AtPrime (twoIdeal u) instance local_algebra (u : ℕ) : Algebra (B u) (O u) := body · 1 line
OreLocalization.instAlgebra (R := B u) (R₀ := B u) (S := (twoIdeal u).primeCompl)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))abbrev k (u : ℕ) := IsLocalRing.ResidueField (O u) def toLocal (u : ℕ) : B u →+* O u := algebraMap (B u) (O u) theorem toLocal_injective (u : ℕ) : Function.Injective (toLocal u) := proof · 1 line
IsLocalization.injective (O u) (twoIdeal u).primeCompl_le_nonZeroDivisors50The same localization embeds into the fraction field used for the alternating products.
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@[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
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)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 habinstance residue_charTwo (u : ℕ) : CharP (k u) 2 := body · 1 line
BinaryLocalization.residue_char_two (twoIdeal u) (two_mem u)def residue (u : ℕ) : O u →+* k u := IsLocalRing.residue (O u) def gaussianToLocal (u : ℕ) : GaussianRing →+* O u := body · 1 line
(toLocal u).comp (gaussianToB u).toRingHom
def imaginary (u : ℕ) : O u := gaussianToLocal u gaussianI theorem imaginary_sq (u : ℕ) : imaginary u ^ 2 = -1 := by proof · 2 lines
unfold imaginary
rw [← map_pow, gaussianI_sq, map_neg, map_one]theorem residue_imaginary (u : ℕ) : residue u (imaginary u) = 1 := proof · 1 line
BinaryLocalization.map_i_eq_one (residue u) (imaginary u) (imaginary_sq u)theorem two_ne_zero (u : ℕ) : (2 : O u) ≠ 0 := proof · 1 line
Nat.cast_ne_zero.mpr (by decide)98Every one of the actual character norms supplies its own local unit.
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 h106The unit value is the localized character value, not an unrelated witness.
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
@[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
Outline
- def
twoIdeal22 - instance
twoIdeal_isMaximal25 - theorem
two_mem28 - abbrev
O31 - instance
local_algebra35 - instance
fraction_algebra38 - abbrev
k41 - def
toLocal43 - theorem
toLocal_injective45 - def
toFraction50 - theorem
toFraction_toLocal54 - theorem
toFraction_injective58 - instance
local_charZero71 - instance
residue_charTwo77 - def
residue80 - def
gaussianToLocal82 - def
imaginary85 - theorem
imaginary_sq87 - theorem
residue_imaginary91 - theorem
two_ne_zero94 - theorem
norm_isUnit98 - def
normUnit106 - theorem
normUnit_val110