fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
mem_smul_pointwise_iff_exists (g : G) (x : K) (S : ValuationSubring K) : x ∈ g • S ↔ ∃ s : K, s ∈ S ∧ g • s = x := (Set.mem_smul_set : x ∈ g • (S : Set K) ↔ _)
theorem
RingTheory
[ "Mathlib.RingTheory.Valuation.ValuationRing", "Mathlib.RingTheory.Localization.AsSubring", "Mathlib.Algebra.Algebra.Subalgebra.Tower", "Mathlib.Algebra.Ring.Subring.Pointwise", "Mathlib.Algebra.Ring.Action.Field", "Mathlib.RingTheory.LocalRing.ResidueField.Basic" ]
Mathlib/RingTheory/Valuation/ValuationSubring.lean
mem_smul_pointwise_iff_exists
null
pointwise_central_scalar [MulSemiringAction Gᵐᵒᵖ K] [IsCentralScalar G K] : IsCentralScalar G (ValuationSubring K) := ⟨fun g S => toSubring_injective <| op_smul_eq_smul g S.toSubring⟩ @[simp]
instance
RingTheory
[ "Mathlib.RingTheory.Valuation.ValuationRing", "Mathlib.RingTheory.Localization.AsSubring", "Mathlib.Algebra.Algebra.Subalgebra.Tower", "Mathlib.Algebra.Ring.Subring.Pointwise", "Mathlib.Algebra.Ring.Action.Field", "Mathlib.RingTheory.LocalRing.ResidueField.Basic" ]
Mathlib/RingTheory/Valuation/ValuationSubring.lean
pointwise_central_scalar
null
smul_mem_pointwise_smul_iff {g : G} {S : ValuationSubring K} {x : K} : g • x ∈ g • S ↔ x ∈ S := Set.smul_mem_smul_set_iff
theorem
RingTheory
[ "Mathlib.RingTheory.Valuation.ValuationRing", "Mathlib.RingTheory.Localization.AsSubring", "Mathlib.Algebra.Algebra.Subalgebra.Tower", "Mathlib.Algebra.Ring.Subring.Pointwise", "Mathlib.Algebra.Ring.Action.Field", "Mathlib.RingTheory.LocalRing.ResidueField.Basic" ]
Mathlib/RingTheory/Valuation/ValuationSubring.lean
smul_mem_pointwise_smul_iff
null
mem_pointwise_smul_iff_inv_smul_mem {g : G} {S : ValuationSubring K} {x : K} : x ∈ g • S ↔ g⁻¹ • x ∈ S := Set.mem_smul_set_iff_inv_smul_mem
theorem
RingTheory
[ "Mathlib.RingTheory.Valuation.ValuationRing", "Mathlib.RingTheory.Localization.AsSubring", "Mathlib.Algebra.Algebra.Subalgebra.Tower", "Mathlib.Algebra.Ring.Subring.Pointwise", "Mathlib.Algebra.Ring.Action.Field", "Mathlib.RingTheory.LocalRing.ResidueField.Basic" ]
Mathlib/RingTheory/Valuation/ValuationSubring.lean
mem_pointwise_smul_iff_inv_smul_mem
null
mem_inv_pointwise_smul_iff {g : G} {S : ValuationSubring K} {x : K} : x ∈ g⁻¹ • S ↔ g • x ∈ S := Set.mem_inv_smul_set_iff @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.Valuation.ValuationRing", "Mathlib.RingTheory.Localization.AsSubring", "Mathlib.Algebra.Algebra.Subalgebra.Tower", "Mathlib.Algebra.Ring.Subring.Pointwise", "Mathlib.Algebra.Ring.Action.Field", "Mathlib.RingTheory.LocalRing.ResidueField.Basic" ]
Mathlib/RingTheory/Valuation/ValuationSubring.lean
mem_inv_pointwise_smul_iff
null
pointwise_smul_le_pointwise_smul_iff {g : G} {S T : ValuationSubring K} : g • S ≤ g • T ↔ S ≤ T := Set.smul_set_subset_smul_set_iff
theorem
RingTheory
[ "Mathlib.RingTheory.Valuation.ValuationRing", "Mathlib.RingTheory.Localization.AsSubring", "Mathlib.Algebra.Algebra.Subalgebra.Tower", "Mathlib.Algebra.Ring.Subring.Pointwise", "Mathlib.Algebra.Ring.Action.Field", "Mathlib.RingTheory.LocalRing.ResidueField.Basic" ]
Mathlib/RingTheory/Valuation/ValuationSubring.lean
pointwise_smul_le_pointwise_smul_iff
null
pointwise_smul_subset_iff {g : G} {S T : ValuationSubring K} : g • S ≤ T ↔ S ≤ g⁻¹ • T := Set.smul_set_subset_iff_subset_inv_smul_set
theorem
RingTheory
[ "Mathlib.RingTheory.Valuation.ValuationRing", "Mathlib.RingTheory.Localization.AsSubring", "Mathlib.Algebra.Algebra.Subalgebra.Tower", "Mathlib.Algebra.Ring.Subring.Pointwise", "Mathlib.Algebra.Ring.Action.Field", "Mathlib.RingTheory.LocalRing.ResidueField.Basic" ]
Mathlib/RingTheory/Valuation/ValuationSubring.lean
pointwise_smul_subset_iff
null
subset_pointwise_smul_iff {g : G} {S T : ValuationSubring K} : S ≤ g • T ↔ g⁻¹ • S ≤ T := Set.subset_smul_set_iff
theorem
RingTheory
[ "Mathlib.RingTheory.Valuation.ValuationRing", "Mathlib.RingTheory.Localization.AsSubring", "Mathlib.Algebra.Algebra.Subalgebra.Tower", "Mathlib.Algebra.Ring.Subring.Pointwise", "Mathlib.Algebra.Ring.Action.Field", "Mathlib.RingTheory.LocalRing.ResidueField.Basic" ]
Mathlib/RingTheory/Valuation/ValuationSubring.lean
subset_pointwise_smul_iff
null
comap (A : ValuationSubring L) (f : K →+* L) : ValuationSubring K := { A.toSubring.comap f with mem_or_inv_mem' := fun k => by simp [ValuationSubring.mem_or_inv_mem] } @[simp]
def
RingTheory
[ "Mathlib.RingTheory.Valuation.ValuationRing", "Mathlib.RingTheory.Localization.AsSubring", "Mathlib.Algebra.Algebra.Subalgebra.Tower", "Mathlib.Algebra.Ring.Subring.Pointwise", "Mathlib.Algebra.Ring.Action.Field", "Mathlib.RingTheory.LocalRing.ResidueField.Basic" ]
Mathlib/RingTheory/Valuation/ValuationSubring.lean
comap
The pullback of a valuation subring `A` along a ring homomorphism `K →+* L`.
coe_comap (A : ValuationSubring L) (f : K →+* L) : (A.comap f : Set K) = f ⁻¹' A := rfl @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.Valuation.ValuationRing", "Mathlib.RingTheory.Localization.AsSubring", "Mathlib.Algebra.Algebra.Subalgebra.Tower", "Mathlib.Algebra.Ring.Subring.Pointwise", "Mathlib.Algebra.Ring.Action.Field", "Mathlib.RingTheory.LocalRing.ResidueField.Basic" ]
Mathlib/RingTheory/Valuation/ValuationSubring.lean
coe_comap
null
mem_comap {A : ValuationSubring L} {f : K →+* L} {x : K} : x ∈ A.comap f ↔ f x ∈ A := Iff.rfl
theorem
RingTheory
[ "Mathlib.RingTheory.Valuation.ValuationRing", "Mathlib.RingTheory.Localization.AsSubring", "Mathlib.Algebra.Algebra.Subalgebra.Tower", "Mathlib.Algebra.Ring.Subring.Pointwise", "Mathlib.Algebra.Ring.Action.Field", "Mathlib.RingTheory.LocalRing.ResidueField.Basic" ]
Mathlib/RingTheory/Valuation/ValuationSubring.lean
mem_comap
null
comap_comap (A : ValuationSubring J) (g : L →+* J) (f : K →+* L) : (A.comap g).comap f = A.comap (g.comp f) := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.Valuation.ValuationRing", "Mathlib.RingTheory.Localization.AsSubring", "Mathlib.Algebra.Algebra.Subalgebra.Tower", "Mathlib.Algebra.Ring.Subring.Pointwise", "Mathlib.Algebra.Ring.Action.Field", "Mathlib.RingTheory.LocalRing.ResidueField.Basic" ]
Mathlib/RingTheory/Valuation/ValuationSubring.lean
comap_comap
null
mem_unitGroup_iff : x ∈ v.valuationSubring.unitGroup ↔ v x = 1 := IsEquiv.eq_one_iff_eq_one (Valuation.isEquiv_valuation_valuationSubring _).symm
theorem
RingTheory
[ "Mathlib.RingTheory.Valuation.ValuationRing", "Mathlib.RingTheory.Localization.AsSubring", "Mathlib.Algebra.Algebra.Subalgebra.Tower", "Mathlib.Algebra.Ring.Subring.Pointwise", "Mathlib.Algebra.Ring.Action.Field", "Mathlib.RingTheory.LocalRing.ResidueField.Basic" ]
Mathlib/RingTheory/Valuation/ValuationSubring.lean
mem_unitGroup_iff
null
mem_maximalIdeal_iff {a : v.valuationSubring} : a ∈ IsLocalRing.maximalIdeal (v.valuationSubring) ↔ v a < 1 := Integer.not_isUnit_iff_valuation_lt_one
theorem
RingTheory
[ "Mathlib.RingTheory.Valuation.ValuationRing", "Mathlib.RingTheory.Localization.AsSubring", "Mathlib.Algebra.Algebra.Subalgebra.Tower", "Mathlib.Algebra.Ring.Subring.Pointwise", "Mathlib.Algebra.Ring.Action.Field", "Mathlib.RingTheory.LocalRing.ResidueField.Basic" ]
Mathlib/RingTheory/Valuation/ValuationSubring.lean
mem_maximalIdeal_iff
null
mapFun (f : α → β) : 𝕎 α → 𝕎 β := fun x => mk _ (f ∘ x.coeff)
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
mapFun
`f : α → β` induces a map from `𝕎 α` to `𝕎 β` by applying `f` componentwise. If `f` is a ring homomorphism, then so is `f`, see `WittVector.map f`.
injective (f : α → β) (hf : Injective f) : Injective (mapFun f : 𝕎 α → 𝕎 β) := fun _ _ h => ext fun n => hf (congr_arg (fun x => coeff x n) h :)
theorem
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
injective
null
surjective (f : α → β) (hf : Surjective f) : Surjective (mapFun f : 𝕎 α → 𝕎 β) := fun x => ⟨mk _ fun n => Classical.choose <| hf <| x.coeff n, by ext n; simp only [mapFun, coeff_mk, comp_apply, Classical.choose_spec (hf (x.coeff n))]⟩
theorem
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
surjective
null
private ghostFun : 𝕎 R → ℕ → R := fun x n => aeval x.coeff (W_ ℤ n)
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
ghostFun
Auxiliary tactic for showing that `mapFun` respects the ring operations. -/ macro "map_fun_tac" : tactic => `(tactic| ( -- TODO: the Lean 3 version of this tactic was more functional ext n simp only [mapFun, mk, comp_apply, zero_coeff, map_zero, -- the lemmas on the next line do not have the `simp` tag in mathlib4 add_coeff, sub_coeff, mul_coeff, neg_coeff, nsmul_coeff, zsmul_coeff, pow_coeff, peval, map_aeval, algebraMap_int_eq, coe_eval₂Hom] <;> try { cases n <;> simp <;> done } <;> -- this line solves `one` apply eval₂Hom_congr (RingHom.ext_int _ _) _ rfl <;> ext ⟨i, k⟩ <;> fin_cases i <;> rfl)) variable [Fact p.Prime] -- Porting note: using `(x y : 𝕎 R)` instead of `(x y : WittVector p R)` produced sorries. variable (f : R →+* S) (x y : WittVector p R) -- and until `pow`. -- We do not tag these lemmas as `@[simp]` because they will be bundled in `map` later on. theorem zero : mapFun f (0 : 𝕎 R) = 0 := by map_fun_tac theorem one : mapFun f (1 : 𝕎 R) = 1 := by map_fun_tac theorem add : mapFun f (x + y) = mapFun f x + mapFun f y := by map_fun_tac theorem sub : mapFun f (x - y) = mapFun f x - mapFun f y := by map_fun_tac theorem mul : mapFun f (x * y) = mapFun f x * mapFun f y := by map_fun_tac theorem neg : mapFun f (-x) = -mapFun f x := by map_fun_tac theorem nsmul (n : ℕ) (x : WittVector p R) : mapFun f (n • x) = n • mapFun f x := by map_fun_tac theorem zsmul (z : ℤ) (x : WittVector p R) : mapFun f (z • x) = z • mapFun f x := by map_fun_tac theorem pow (n : ℕ) : mapFun f (x ^ n) = mapFun f x ^ n := by map_fun_tac theorem natCast (n : ℕ) : mapFun f (n : 𝕎 R) = n := show mapFun f n.unaryCast = (n : WittVector p S) by induction n <;> simp [*, Nat.unaryCast, add, one, zero] <;> rfl theorem intCast (n : ℤ) : mapFun f (n : 𝕎 R) = n := show mapFun f n.castDef = (n : WittVector p S) by cases n <;> simp [*, Int.castDef, neg, natCast] <;> rfl end mapFun end WittVector namespace WittVector /-- Evaluates the `n`th Witt polynomial on the first `n` coefficients of `x`, producing a value in `R`. This function will be bundled as the ring homomorphism `WittVector.ghostMap` once the ring structure is available, but we rely on it to set up the ring structure in the first place.
private ghostEquiv' [Invertible (p : R)] : 𝕎 R ≃ (ℕ → R) where toFun := ghostFun invFun x := mk p fun n => aeval x (xInTermsOfW p R n) left_inv := by intro x ext n have := bind₁_wittPolynomial_xInTermsOfW p R n apply_fun aeval x.coeff at this simpa +unfoldPartialApp only [aeval_bind₁, aeval_X, ghostFun, aeval_wittPolynomial] right_inv := by intro x ext n have := bind₁_xInTermsOfW_wittPolynomial p R n apply_fun aeval x at this simpa only [aeval_bind₁, aeval_X, ghostFun, aeval_wittPolynomial] variable [Fact p.Prime] @[local instance]
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
ghostEquiv'
An auxiliary tactic for proving that `ghostFun` respects the ring operations. -/ elab "ghost_fun_tac " φ:term ", " fn:term : tactic => do evalTactic (← `(tactic| ( ext n have := congr_fun (congr_arg (@peval R _ _) (wittStructureInt_prop p $φ n)) $fn simp only [wittZero, OfNat.ofNat, Zero.zero, wittOne, One.one, HAdd.hAdd, Add.add, HSub.hSub, Sub.sub, Neg.neg, HMul.hMul, Mul.mul, HPow.hPow, Pow.pow, wittNSMul, wittZSMul, HSMul.hSMul, SMul.smul] simpa +unfoldPartialApp [WittVector.ghostFun, aeval_rename, aeval_bind₁, comp, uncurry, peval, eval] using this ))) end Tactic section GhostFun -- The following lemmas are not `@[simp]` because they will be bundled in `ghostMap` later on. @[local simp] theorem matrix_vecEmpty_coeff {R} (i j) : @coeff p R (Matrix.vecEmpty i) j = (Matrix.vecEmpty i : ℕ → R) j := by rcases i with ⟨_ | _ | _ | _ | i_val, ⟨⟩⟩ variable [Fact p.Prime] variable (x y : WittVector p R) private theorem ghostFun_zero : ghostFun (0 : 𝕎 R) = 0 := by ghost_fun_tac 0, ![] private theorem ghostFun_one : ghostFun (1 : 𝕎 R) = 1 := by ghost_fun_tac 1, ![] private theorem ghostFun_add : ghostFun (x + y) = ghostFun x + ghostFun y := by ghost_fun_tac X 0 + X 1, ![x.coeff, y.coeff] private theorem ghostFun_natCast (i : ℕ) : ghostFun (i : 𝕎 R) = i := show ghostFun i.unaryCast = _ by induction i <;> simp [*, Nat.unaryCast, ghostFun_zero, ghostFun_one, ghostFun_add] private theorem ghostFun_sub : ghostFun (x - y) = ghostFun x - ghostFun y := by ghost_fun_tac X 0 - X 1, ![x.coeff, y.coeff] private theorem ghostFun_mul : ghostFun (x * y) = ghostFun x * ghostFun y := by ghost_fun_tac X 0 * X 1, ![x.coeff, y.coeff] private theorem ghostFun_neg : ghostFun (-x) = -ghostFun x := by ghost_fun_tac -X 0, ![x.coeff] private theorem ghostFun_intCast (i : ℤ) : ghostFun (i : 𝕎 R) = i := show ghostFun i.castDef = _ by cases i <;> simp [*, Int.castDef, ghostFun_natCast, ghostFun_neg] private lemma ghostFun_nsmul (m : ℕ) (x : WittVector p R) : ghostFun (m • x) = m • ghostFun x := by ghost_fun_tac m • (X 0), ![x.coeff] private lemma ghostFun_zsmul (m : ℤ) (x : WittVector p R) : ghostFun (m • x) = m • ghostFun x := by ghost_fun_tac m • (X 0), ![x.coeff] private theorem ghostFun_pow (m : ℕ) : ghostFun (x ^ m) = ghostFun x ^ m := by ghost_fun_tac X 0 ^ m, ![x.coeff] end GhostFun variable (p) (R) /-- The bijection between `𝕎 R` and `ℕ → R`, under the assumption that `p` is invertible in `R`. In `WittVector.ghostEquiv` we upgrade this to an isomorphism of rings.
private comm_ring_aux₁ : CommRing (𝕎 (MvPolynomial R ℚ)) := (ghostEquiv' p (MvPolynomial R ℚ)).injective.commRing ghostFun ghostFun_zero ghostFun_one ghostFun_add ghostFun_mul ghostFun_neg ghostFun_sub ghostFun_nsmul ghostFun_zsmul ghostFun_pow ghostFun_natCast ghostFun_intCast @[local instance]
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
comm_ring_aux₁
null
private comm_ring_aux₂ : CommRing (𝕎 (MvPolynomial R ℤ)) := (mapFun.injective _ <| map_injective (Int.castRingHom ℚ) Int.cast_injective).commRing _ (mapFun.zero _) (mapFun.one _) (mapFun.add _) (mapFun.mul _) (mapFun.neg _) (mapFun.sub _) (mapFun.nsmul _) (mapFun.zsmul _) (mapFun.pow _) (mapFun.natCast _) (mapFun.intCast _)
abbrev
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
comm_ring_aux₂
null
noncomputable map (f : R →+* S) : 𝕎 R →+* 𝕎 S where toFun := mapFun f map_zero' := mapFun.zero f map_one' := mapFun.one f map_add' := mapFun.add f map_mul' := mapFun.mul f
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
map
The commutative ring structure on `𝕎 R`. -/ instance : CommRing (𝕎 R) := (mapFun.surjective _ <| counit_surjective _).commRing (mapFun <| MvPolynomial.counit _) (mapFun.zero _) (mapFun.one _) (mapFun.add _) (mapFun.mul _) (mapFun.neg _) (mapFun.sub _) (mapFun.nsmul _) (mapFun.zsmul _) (mapFun.pow _) (mapFun.natCast _) (mapFun.intCast _) variable {p R} /-- `WittVector.map f` is the ring homomorphism `𝕎 R →+* 𝕎 S` naturally induced by a ring homomorphism `f : R →+* S`. It acts coefficientwise.
map_injective (f : R →+* S) (hf : Injective f) : Injective (map f : 𝕎 R → 𝕎 S) := mapFun.injective f hf
theorem
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
map_injective
null
map_surjective (f : R →+* S) (hf : Surjective f) : Surjective (map f : 𝕎 R → 𝕎 S) := mapFun.surjective f hf @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
map_surjective
null
map_coeff (f : R →+* S) (x : 𝕎 R) (n : ℕ) : (map f x).coeff n = f (x.coeff n) := rfl
theorem
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
map_coeff
null
ghostMap : 𝕎 R →+* ℕ → R where toFun := ghostFun map_zero' := ghostFun_zero map_one' := ghostFun_one map_add' := ghostFun_add map_mul' := ghostFun_mul
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
ghostMap
`WittVector.ghostMap` is a ring homomorphism that maps each Witt vector to the sequence of its ghost components.
ghostComponent (n : ℕ) : 𝕎 R →+* R := (Pi.evalRingHom _ n).comp ghostMap
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
ghostComponent
Evaluates the `n`th Witt polynomial on the first `n` coefficients of `x`, producing a value in `R`.
ghostComponent_apply (n : ℕ) (x : 𝕎 R) : ghostComponent n x = aeval x.coeff (W_ ℤ n) := rfl @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
ghostComponent_apply
null
ghostMap_apply (x : 𝕎 R) (n : ℕ) : ghostMap x n = ghostComponent n x := rfl
theorem
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
ghostMap_apply
null
ghostEquiv : 𝕎 R ≃+* (ℕ → R) := { (ghostMap : 𝕎 R →+* ℕ → R), ghostEquiv' p R with } @[simp]
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
ghostEquiv
`WittVector.ghostMap` is a ring isomorphism when `p` is invertible in `R`.
ghostEquiv_coe : (ghostEquiv p R : 𝕎 R →+* ℕ → R) = ghostMap := rfl
theorem
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
ghostEquiv_coe
null
ghostMap.bijective_of_invertible : Function.Bijective (ghostMap : 𝕎 R → ℕ → R) := (ghostEquiv p R).bijective
theorem
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
ghostMap.bijective_of_invertible
null
@[simps] noncomputable constantCoeff : 𝕎 R →+* R where toFun x := x.coeff 0 map_zero' := by simp map_one' := by simp map_add' := add_coeff_zero map_mul' := mul_coeff_zero
def
RingTheory
[ "Mathlib.Algebra.MvPolynomial.Counit", "Mathlib.Algebra.MvPolynomial.Invertible", "Mathlib.RingTheory.WittVector.Defs" ]
Mathlib/RingTheory/WittVector/Basic.lean
constantCoeff
`WittVector.coeff x 0` as a `RingHom`
eq_of_le_of_cast_pow_eq_zero [CharP R p] (i : ℕ) (hin : i ≤ n) (hpi : (p : TruncatedWittVector p n R) ^ i = 0) : i = n := by contrapose! hpi replace hin := lt_of_le_of_ne hin hpi; clear hpi have : (p : TruncatedWittVector p n R) ^ i = WittVector.truncate n ((p : 𝕎 R) ^ i) := by rw [RingHom.map_pow, map_natCast] rw [this, ne_eq, TruncatedWittVector.ext_iff, not_forall]; clear this use ⟨i, hin⟩ rw [WittVector.coeff_truncate, coeff_zero, Fin.val_mk, WittVector.coeff_p_pow] haveI : Nontrivial R := CharP.nontrivial_of_char_ne_one hp.1.ne_one exact one_ne_zero
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
eq_of_le_of_cast_pow_eq_zero
null
card_zmod : Fintype.card (TruncatedWittVector p n (ZMod p)) = p ^ n := by rw [card, ZMod.card]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
card_zmod
null
charP_zmod : CharP (TruncatedWittVector p n (ZMod p)) (p ^ n) := charP_of_prime_pow_injective _ _ _ (card_zmod _ _) (eq_of_le_of_cast_pow_eq_zero p n (ZMod p)) attribute [local instance] charP_zmod
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
charP_zmod
null
zmodEquivTrunc : ZMod (p ^ n) ≃+* TruncatedWittVector p n (ZMod p) := ZMod.ringEquiv (TruncatedWittVector p n (ZMod p)) (card_zmod _ _)
def
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
zmodEquivTrunc
The unique isomorphism between `ZMod p^n` and `TruncatedWittVector p n (ZMod p)`. This isomorphism exists, because `TruncatedWittVector p n (ZMod p)` is a finite ring with characteristic and cardinality `p^n`.
zmodEquivTrunc_apply {x : ZMod (p ^ n)} : zmodEquivTrunc p n x = ZMod.castHom (m := p ^ n) (by rfl) (TruncatedWittVector p n (ZMod p)) x := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
zmodEquivTrunc_apply
null
commutes {m : ℕ} (hm : n ≤ m) : (truncate hm).comp (zmodEquivTrunc p m).toRingHom = (zmodEquivTrunc p n).toRingHom.comp (ZMod.castHom (pow_dvd_pow p hm) _) := RingHom.ext_zmod _ _
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
commutes
The following diagram commutes: ```text ZMod (p^n) ----------------------------> ZMod (p^m) | | | | v v TruncatedWittVector p n (ZMod p) ----> TruncatedWittVector p m (ZMod p) ``` Here the vertical arrows are `TruncatedWittVector.zmodEquivTrunc`, the horizontal arrow at the top is `ZMod.castHom`, and the horizontal arrow at the bottom is `TruncatedWittVector.truncate`.
commutes' {m : ℕ} (hm : n ≤ m) (x : ZMod (p ^ m)) : truncate hm (zmodEquivTrunc p m x) = zmodEquivTrunc p n (ZMod.castHom (pow_dvd_pow p hm) _ x) := show (truncate hm).comp (zmodEquivTrunc p m).toRingHom x = _ by rw [commutes _ _ hm]; rfl
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
commutes'
null
commutes_symm' {m : ℕ} (hm : n ≤ m) (x : TruncatedWittVector p m (ZMod p)) : (zmodEquivTrunc p n).symm (truncate hm x) = ZMod.castHom (pow_dvd_pow p hm) _ ((zmodEquivTrunc p m).symm x) := by apply (zmodEquivTrunc p n).injective rw [← commutes' _ _ hm] simp
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
commutes_symm'
null
commutes_symm {m : ℕ} (hm : n ≤ m) : (zmodEquivTrunc p n).symm.toRingHom.comp (truncate hm) = (ZMod.castHom (pow_dvd_pow p hm) _).comp (zmodEquivTrunc p m).symm.toRingHom := by ext; apply commutes_symm'
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
commutes_symm
The following diagram commutes: ```text TruncatedWittVector p n (ZMod p) ----> TruncatedWittVector p m (ZMod p) | | | | v v ZMod (p^n) ----------------------------> ZMod (p^m) ``` Here the vertical arrows are `(TruncatedWittVector.zmodEquivTrunc p _).symm`, the horizontal arrow at the top is `ZMod.castHom`, and the horizontal arrow at the bottom is `TruncatedWittVector.truncate`.
toZModPow (k : ℕ) : 𝕎 (ZMod p) →+* ZMod (p ^ k) := (zmodEquivTrunc p k).symm.toRingHom.comp (truncate k)
def
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
toZModPow
`toZModPow` is a family of compatible ring homs. We get this family by composing `TruncatedWittVector.zmodEquivTrunc` (in right-to-left direction) with `WittVector.truncate`.
toZModPow_compat (m n : ℕ) (h : m ≤ n) : (ZMod.castHom (pow_dvd_pow p h) (ZMod (p ^ m))).comp (toZModPow p n) = toZModPow p m := calc (ZMod.castHom _ (ZMod (p ^ m))).comp ((zmodEquivTrunc p n).symm.toRingHom.comp (truncate n)) _ = ((zmodEquivTrunc p m).symm.toRingHom.comp (TruncatedWittVector.truncate h)).comp (truncate n) := by rw [commutes_symm, RingHom.comp_assoc] _ = (zmodEquivTrunc p m).symm.toRingHom.comp (truncate m) := by rw [RingHom.comp_assoc, truncate_comp_wittVector_truncate]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
toZModPow_compat
null
toPadicInt : 𝕎 (ZMod p) →+* ℤ_[p] := PadicInt.lift <| toZModPow_compat p
def
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
toPadicInt
`toPadicInt` lifts `toZModPow : 𝕎 (ZMod p) →+* ZMod (p ^ k)` to a ring hom to `ℤ_[p]` using `PadicInt.lift`, the universal property of `ℤ_[p]`.
zmodEquivTrunc_compat (k₁ k₂ : ℕ) (hk : k₁ ≤ k₂) : (TruncatedWittVector.truncate hk).comp ((zmodEquivTrunc p k₂).toRingHom.comp (PadicInt.toZModPow k₂)) = (zmodEquivTrunc p k₁).toRingHom.comp (PadicInt.toZModPow k₁) := by rw [← RingHom.comp_assoc, commutes, RingHom.comp_assoc, PadicInt.zmod_cast_comp_toZModPow _ _ hk]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
zmodEquivTrunc_compat
null
fromPadicInt : ℤ_[p] →+* 𝕎 (ZMod p) := (WittVector.lift fun k => (zmodEquivTrunc p k).toRingHom.comp (PadicInt.toZModPow k)) <| zmodEquivTrunc_compat _
def
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
fromPadicInt
`fromPadicInt` uses `WittVector.lift` to lift `TruncatedWittVector.zmodEquivTrunc` composed with `PadicInt.toZModPow` to a ring hom `ℤ_[p] →+* 𝕎 (ZMod p)`.
toPadicInt_comp_fromPadicInt : (toPadicInt p).comp (fromPadicInt p) = RingHom.id ℤ_[p] := by rw [← PadicInt.toZModPow_eq_iff_ext] intro n rw [← RingHom.comp_assoc, toPadicInt, PadicInt.lift_spec] simp only [fromPadicInt, toZModPow, RingHom.comp_id] rw [RingHom.comp_assoc, truncate_comp_lift, ← RingHom.comp_assoc] simp only [RingEquiv.symm_toRingHom_comp_toRingHom, RingHom.id_comp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
toPadicInt_comp_fromPadicInt
null
toPadicInt_comp_fromPadicInt_ext (x) : (toPadicInt p).comp (fromPadicInt p) x = RingHom.id ℤ_[p] x := by rw [toPadicInt_comp_fromPadicInt]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
toPadicInt_comp_fromPadicInt_ext
null
fromPadicInt_comp_toPadicInt : (fromPadicInt p).comp (toPadicInt p) = RingHom.id (𝕎 (ZMod p)) := by apply WittVector.hom_ext intro n rw [fromPadicInt, ← RingHom.comp_assoc, truncate_comp_lift, RingHom.comp_assoc] simp only [toPadicInt, toZModPow, RingHom.comp_id, PadicInt.lift_spec, RingHom.id_comp, ← RingHom.comp_assoc, RingEquiv.toRingHom_comp_symm_toRingHom]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
fromPadicInt_comp_toPadicInt
null
fromPadicInt_comp_toPadicInt_ext (x) : (fromPadicInt p).comp (toPadicInt p) x = RingHom.id (𝕎 (ZMod p)) x := by rw [fromPadicInt_comp_toPadicInt]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
fromPadicInt_comp_toPadicInt_ext
null
equiv : 𝕎 (ZMod p) ≃+* ℤ_[p] where toFun := toPadicInt p invFun := fromPadicInt p left_inv := fromPadicInt_comp_toPadicInt_ext _ right_inv := toPadicInt_comp_fromPadicInt_ext _ map_mul' := RingHom.map_mul _ map_add' := RingHom.map_add _
def
RingTheory
[ "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.WittVector.Identities", "Mathlib.NumberTheory.Padics.RingHoms" ]
Mathlib/RingTheory/WittVector/Compare.lean
equiv
The ring of Witt vectors over `ZMod p` is isomorphic to the ring of `p`-adic integers. This equivalence is witnessed by `WittVector.toPadicInt` with inverse `WittVector.fromPadicInt`.
le_coeff_eq_iff_le_sub_coeff_eq_zero {x y : 𝕎 k} {n : ℕ} : (∀ i < n, x.coeff i = y.coeff i) ↔ ∀ i < n, (x - y).coeff i = 0 := by calc _ ↔ x.truncate n = y.truncate n := by refine ⟨fun h => ?_, fun h i hi => ?_⟩ · ext i simp [h i] · rw [← coeff_truncate x ⟨i, hi⟩, ← coeff_truncate y ⟨i, hi⟩, h] _ ↔ (x - y).truncate n = 0 := by simp only [map_sub, sub_eq_zero] _ ↔ _ := by simp only [← mem_ker_truncate, RingHom.mem_ker]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Domain", "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.AdicCompletion.Basic" ]
Mathlib/RingTheory/WittVector/Complete.lean
le_coeff_eq_iff_le_sub_coeff_eq_zero
null
eq_zero_of_p_mul_eq_zero (x : 𝕎 k) (h : x * p = 0) : x = 0 := by rwa [← frobenius_verschiebung, map_eq_zero_iff _ (frobenius_bijective p k).injective, map_eq_zero_iff _ (verschiebung_injective p k)] at h
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Domain", "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.AdicCompletion.Basic" ]
Mathlib/RingTheory/WittVector/Complete.lean
eq_zero_of_p_mul_eq_zero
If `k` is a perfect ring of characteristic `p`, then the ring of Witt vectors `𝕎 k` is `p`-torsion free.
mem_span_p_iff_coeff_zero_eq_zero (x : 𝕎 k) : x ∈ (Ideal.span {(p : 𝕎 k)}) ↔ x.coeff 0 = 0 := by simp_rw [Ideal.mem_span_singleton, dvd_def, mul_comm] refine ⟨fun ⟨u, hu⟩ ↦ ?_, fun h ↦ ?_⟩ · rw [hu, mul_charP_coeff_zero] · use (frobeniusEquiv p k).symm (x.shift 1) calc _ = verschiebung (x.shift 1) := by simpa using eq_iterate_verschiebung (n := 1) (by simp [h]) _ = _ := by rw [← verschiebung_frobenius, ← frobeniusEquiv_apply, RingEquiv.apply_symm_apply (frobeniusEquiv p k) _]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Domain", "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.AdicCompletion.Basic" ]
Mathlib/RingTheory/WittVector/Complete.lean
mem_span_p_iff_coeff_zero_eq_zero
If `k` is a perfect ring of characteristic `p`, a Witt vector `x : 𝕎 k` falls in ideal generated by `p` if and only if its zeroth coefficient is `0`.
mem_span_p_pow_iff_le_coeff_eq_zero (x : 𝕎 k) (n : ℕ) : x ∈ (Ideal.span {(p ^ n : 𝕎 k)}) ↔ ∀ m, m < n → x.coeff m = 0 := by simp_rw [Ideal.mem_span_singleton, dvd_def, mul_comm] refine ⟨fun ⟨u, hu⟩ m hm ↦ ?_, fun h ↦ ?_⟩ · rw [hu, mul_pow_charP_coeff_zero _ hm] · use (frobeniusEquiv p k).symm^[n] (x.shift n) rw [← iterate_verschiebung_iterate_frobenius] calc _ = verschiebung^[n] (x.shift n) := by simpa using eq_iterate_verschiebung (x := x) (n := n) h _ = _ := by congr rw [← Function.comp_apply (f := frobenius^[n]), ← Function.Commute.comp_iterate] · rw [← WittVector.frobeniusEquiv_apply, ← RingEquiv.coe_trans] simp · rw [Function.Commute, Function.Semiconj, ← WittVector.frobeniusEquiv_apply] simp only [RingEquiv.apply_symm_apply, RingEquiv.symm_apply_apply, implies_true]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Domain", "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.AdicCompletion.Basic" ]
Mathlib/RingTheory/WittVector/Complete.lean
mem_span_p_pow_iff_le_coeff_eq_zero
If `k` is a perfect ring of characteristic `p`, a Witt vector `x : 𝕎 k` falls in ideal generated by `p ^ n` if and only if its initial `n` coefficients are `0`.
isAdicCompleteIdealSpanP : IsAdicComplete (Ideal.span {(p : 𝕎 k)}) (𝕎 k) where haus' := by intro _ h ext n simp only [smul_eq_mul, Ideal.mul_top] at h have := h (n + 1) simp only [Ideal.span_singleton_pow, SModEq.zero, mem_span_p_pow_iff_le_coeff_eq_zero] at this simpa using this n prec' := by intro x h use .mk p (fun n ↦ (x (n + 1)).coeff n) intro n simp only [Ideal.span_singleton_pow, smul_eq_mul, Ideal.mul_top, SModEq.sub_mem, mem_span_p_pow_iff_le_coeff_eq_zero, ← le_coeff_eq_iff_le_sub_coeff_eq_zero] at h ⊢ intro i hi exact (h hi i (Nat.lt_succ_self i)).symm
instance
RingTheory
[ "Mathlib.RingTheory.WittVector.Domain", "Mathlib.RingTheory.WittVector.Truncated", "Mathlib.RingTheory.AdicCompletion.Basic" ]
Mathlib/RingTheory/WittVector/Complete.lean
isAdicCompleteIdealSpanP
If `k` is a perfect ring of characteristic `p`, then the ring of Witt vectors `𝕎 k` is `p`-adically complete.
WittVector (p : ℕ) (R : Type*) where mk' :: /-- `x.coeff n` is the `n`th coefficient of the Witt vector `x`. This concept does not have a standard name in the literature. -/ coeff : ℕ → R
structure
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
WittVector
`WittVector p R` is the ring of `p`-typical Witt vectors over the commutative ring `R`, where `p` is a prime number. If `p` is invertible in `R`, this ring is isomorphic to `ℕ → R` (the product of `ℕ` copies of `R`). If `R` is a ring of characteristic `p`, then `WittVector p R` is a ring of characteristic `0`. The canonical example is `WittVector p (ZMod p)`, which is isomorphic to the `p`-adic integers `ℤ_[p]`.
WittVector.mk (p : ℕ) {R : Type*} (coeff : ℕ → R) : WittVector p R := mk' coeff variable {p : ℕ} /- We cannot make this `localized` notation, because the `p` on the RHS doesn't occur on the left Hiding the `p` in the notation is very convenient, so we opt for repeating the `local notation` in other files that use Witt vectors. -/ local notation "𝕎" => WittVector p -- type as `\bbW`
def
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
WittVector.mk
Construct a Witt vector `mk p x : 𝕎 R` from a sequence `x` of elements of `R`. This is preferred over `WittVector.mk'` because it has `p` explicit.
@[ext] ext {x y : 𝕎 R} (h : ∀ n, x.coeff n = y.coeff n) : x = y := by cases x cases y simp only at h simp [funext_iff, h] variable (p) @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
ext
null
coeff_mk (x : ℕ → R) : (mk p x).coeff = x := rfl /- These instances are not needed for the rest of the development, but it is interesting to establish early on that `WittVector p` is a lawful functor. -/
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
coeff_mk
null
wittZero : ℕ → MvPolynomial (Fin 0 × ℕ) ℤ := wittStructureInt p 0
def
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittZero
The polynomials used for defining the element `0` of the ring of Witt vectors.
wittOne : ℕ → MvPolynomial (Fin 0 × ℕ) ℤ := wittStructureInt p 1
def
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittOne
The polynomials used for defining the element `1` of the ring of Witt vectors.
wittAdd : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ := wittStructureInt p (X 0 + X 1)
def
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittAdd
The polynomials used for defining the addition of the ring of Witt vectors.
wittNSMul (n : ℕ) : ℕ → MvPolynomial (Fin 1 × ℕ) ℤ := wittStructureInt p (n • X (0 : (Fin 1)))
def
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittNSMul
The polynomials used for defining repeated addition of the ring of Witt vectors.
wittZSMul (n : ℤ) : ℕ → MvPolynomial (Fin 1 × ℕ) ℤ := wittStructureInt p (n • X (0 : (Fin 1)))
def
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittZSMul
The polynomials used for defining repeated addition of the ring of Witt vectors.
wittSub : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ := wittStructureInt p (X 0 - X 1)
def
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittSub
The polynomials used for describing the subtraction of the ring of Witt vectors.
wittMul : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ := wittStructureInt p (X 0 * X 1)
def
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittMul
The polynomials used for defining the multiplication of the ring of Witt vectors.
wittNeg : ℕ → MvPolynomial (Fin 1 × ℕ) ℤ := wittStructureInt p (-X 0)
def
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittNeg
The polynomials used for defining the negation of the ring of Witt vectors.
wittPow (n : ℕ) : ℕ → MvPolynomial (Fin 1 × ℕ) ℤ := wittStructureInt p (X 0 ^ n) variable {p}
def
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittPow
The polynomials used for defining repeated addition of the ring of Witt vectors.
peval {k : ℕ} (φ : MvPolynomial (Fin k × ℕ) ℤ) (x : Fin k → ℕ → R) : R := aeval (Function.uncurry x) φ
def
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
peval
An auxiliary definition used in `WittVector.eval`. Evaluates a polynomial whose variables come from the disjoint union of `k` copies of `ℕ`, with a curried evaluation `x`. This can be defined more generally but we use only a specific instance here.
eval {k : ℕ} (φ : ℕ → MvPolynomial (Fin k × ℕ) ℤ) (x : Fin k → 𝕎 R) : 𝕎 R := mk p fun n => peval (φ n) fun i => (x i).coeff
def
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
eval
Let `φ` be a family of polynomials, indexed by natural numbers, whose variables come from the disjoint union of `k` copies of `ℕ`, and let `xᵢ` be a Witt vector for `0 ≤ i < k`. `eval φ x` evaluates `φ` mapping the variable `X_(i, n)` to the `n`th coefficient of `xᵢ`. Instantiating `φ` with certain polynomials defined in `Mathlib/RingTheory/WittVector/StructurePolynomial.lean` establishes the ring operations on `𝕎 R`. For example, `WittVector.wittAdd` is such a `φ` with `k = 2`; evaluating this at `(x₀, x₁)` gives us the sum of two Witt vectors `x₀ + x₁`.
hasNatScalar : SMul ℕ (𝕎 R) := ⟨fun n x => eval (wittNSMul p n) ![x]⟩
instance
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
hasNatScalar
null
hasIntScalar : SMul ℤ (𝕎 R) := ⟨fun n x => eval (wittZSMul p n) ![x]⟩
instance
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
hasIntScalar
null
hasNatPow : Pow (𝕎 R) ℕ := ⟨fun x n => eval (wittPow p n) ![x]⟩
instance
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
hasNatPow
null
@[simp] wittZero_eq_zero (n : ℕ) : wittZero p n = 0 := by apply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective simp only [wittZero, wittStructureRat, bind₁, aeval_zero', constantCoeff_xInTermsOfW, map_zero, map_wittStructureInt] @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittZero_eq_zero
null
wittOne_zero_eq_one : wittOne p 0 = 1 := by apply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective simp only [wittOne, wittStructureRat, xInTermsOfW_zero, map_one, bind₁_X_right, map_wittStructureInt] @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittOne_zero_eq_one
null
wittOne_pos_eq_zero (n : ℕ) (hn : 0 < n) : wittOne p n = 0 := by apply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective simp only [wittOne, wittStructureRat, RingHom.map_zero, map_one, map_wittStructureInt] induction n using Nat.strong_induction_on with | h n IH => ?_ rw [xInTermsOfW_eq] simp only [map_mul, map_sub, map_sum, map_pow, bind₁_X_right, bind₁_C_right] rw [sub_mul, one_mul] rw [Finset.sum_eq_single 0] · simp only [invOf_eq_inv, one_mul, tsub_zero, pow_zero] simp only [one_pow, one_mul, xInTermsOfW_zero, sub_self, bind₁_X_right] · intro i hin hi0 rw [Finset.mem_range] at hin rw [IH _ hin (Nat.pos_of_ne_zero hi0), zero_pow (pow_ne_zero _ hp.1.ne_zero), mul_zero] · grind @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittOne_pos_eq_zero
null
wittAdd_zero : wittAdd p 0 = X (0, 0) + X (1, 0) := by apply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective simp only [wittAdd, wittStructureRat, map_add, rename_X, xInTermsOfW_zero, map_X, wittPolynomial_zero, bind₁_X_right, map_wittStructureInt] @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittAdd_zero
null
wittSub_zero : wittSub p 0 = X (0, 0) - X (1, 0) := by apply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective simp only [wittSub, wittStructureRat, map_sub, rename_X, xInTermsOfW_zero, map_X, wittPolynomial_zero, bind₁_X_right, map_wittStructureInt] @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittSub_zero
null
wittMul_zero : wittMul p 0 = X (0, 0) * X (1, 0) := by apply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective simp only [wittMul, wittStructureRat, rename_X, xInTermsOfW_zero, map_X, wittPolynomial_zero, map_mul, bind₁_X_right, map_wittStructureInt] @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittMul_zero
null
wittNeg_zero : wittNeg p 0 = -X (0, 0) := by apply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective simp only [wittNeg, wittStructureRat, rename_X, xInTermsOfW_zero, map_X, wittPolynomial_zero, map_neg, bind₁_X_right, map_wittStructureInt] @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittNeg_zero
null
constantCoeff_wittAdd (n : ℕ) : constantCoeff (wittAdd p n) = 0 := by apply constantCoeff_wittStructureInt p _ _ n simp only [add_zero, RingHom.map_add, constantCoeff_X] @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
constantCoeff_wittAdd
null
constantCoeff_wittSub (n : ℕ) : constantCoeff (wittSub p n) = 0 := by apply constantCoeff_wittStructureInt p _ _ n simp only [sub_zero, RingHom.map_sub, constantCoeff_X] @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
constantCoeff_wittSub
null
constantCoeff_wittMul (n : ℕ) : constantCoeff (wittMul p n) = 0 := by apply constantCoeff_wittStructureInt p _ _ n simp only [mul_zero, RingHom.map_mul, constantCoeff_X] @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
constantCoeff_wittMul
null
constantCoeff_wittNeg (n : ℕ) : constantCoeff (wittNeg p n) = 0 := by apply constantCoeff_wittStructureInt p _ _ n simp only [neg_zero, RingHom.map_neg, constantCoeff_X] @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
constantCoeff_wittNeg
null
constantCoeff_wittNSMul (m : ℕ) (n : ℕ) : constantCoeff (wittNSMul p m n) = 0 := by apply constantCoeff_wittStructureInt p _ _ n simp only [smul_zero, map_nsmul, constantCoeff_X] @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
constantCoeff_wittNSMul
null
constantCoeff_wittZSMul (z : ℤ) (n : ℕ) : constantCoeff (wittZSMul p z n) = 0 := by apply constantCoeff_wittStructureInt p _ _ n simp only [smul_zero, map_zsmul, constantCoeff_X]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
constantCoeff_wittZSMul
null
@[simp] zero_coeff (n : ℕ) : (0 : 𝕎 R).coeff n = 0 := show (aeval _ (wittZero p n) : R) = 0 by simp only [wittZero_eq_zero, map_zero] @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
zero_coeff
null
one_coeff_zero : (1 : 𝕎 R).coeff 0 = 1 := show (aeval _ (wittOne p 0) : R) = 1 by simp only [wittOne_zero_eq_one, map_one] @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
one_coeff_zero
null
one_coeff_eq_of_pos (n : ℕ) (hn : 0 < n) : coeff (1 : 𝕎 R) n = 0 := show (aeval _ (wittOne p n) : R) = 0 by simp only [hn, wittOne_pos_eq_zero, map_zero] variable {p R} @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
one_coeff_eq_of_pos
null
v2_coeff {p' R'} (x y : WittVector p' R') (i : Fin 2) : (![x, y] i).coeff = ![x.coeff, y.coeff] i := by fin_cases i <;> simp
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
v2_coeff
null
add_coeff (x y : 𝕎 R) (n : ℕ) : (x + y).coeff n = peval (wittAdd p n) ![x.coeff, y.coeff] := by simp [(· + ·), Add.add, eval]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
add_coeff
null
sub_coeff (x y : 𝕎 R) (n : ℕ) : (x - y).coeff n = peval (wittSub p n) ![x.coeff, y.coeff] := by simp [(· - ·), Sub.sub, eval]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
sub_coeff
null
mul_coeff (x y : 𝕎 R) (n : ℕ) : (x * y).coeff n = peval (wittMul p n) ![x.coeff, y.coeff] := by simp [(· * ·), Mul.mul, eval]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
mul_coeff
null
neg_coeff (x : 𝕎 R) (n : ℕ) : (-x).coeff n = peval (wittNeg p n) ![x.coeff] := by simp [Neg.neg, eval, Matrix.cons_fin_one]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
neg_coeff
null
nsmul_coeff (m : ℕ) (x : 𝕎 R) (n : ℕ) : (m • x).coeff n = peval (wittNSMul p m n) ![x.coeff] := by simp [(· • ·), SMul.smul, eval, Matrix.cons_fin_one]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
nsmul_coeff
null
zsmul_coeff (m : ℤ) (x : 𝕎 R) (n : ℕ) : (m • x).coeff n = peval (wittZSMul p m n) ![x.coeff] := by simp [(· • ·), SMul.smul, eval, Matrix.cons_fin_one]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
zsmul_coeff
null
pow_coeff (m : ℕ) (x : 𝕎 R) (n : ℕ) : (x ^ m).coeff n = peval (wittPow p m n) ![x.coeff] := by simp [(· ^ ·), Pow.pow, eval, Matrix.cons_fin_one]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
pow_coeff
null
add_coeff_zero (x y : 𝕎 R) : (x + y).coeff 0 = x.coeff 0 + y.coeff 0 := by simp [add_coeff, peval, Function.uncurry]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
add_coeff_zero
null