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
mul_coeff_zero (x y : 𝕎 R) : (x * y).coeff 0 = x.coeff 0 * y.coeff 0 := by simp [mul_coeff, peval, Function.uncurry]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
mul_coeff_zero
null
wittAdd_vars (n : ℕ) : (wittAdd p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1) := wittStructureInt_vars _ _ _
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittAdd_vars
null
wittSub_vars (n : ℕ) : (wittSub p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1) := wittStructureInt_vars _ _ _
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittSub_vars
null
wittMul_vars (n : ℕ) : (wittMul p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1) := wittStructureInt_vars _ _ _
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittMul_vars
null
wittNeg_vars (n : ℕ) : (wittNeg p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1) := wittStructureInt_vars _ _ _
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittNeg_vars
null
wittNSMul_vars (m : ℕ) (n : ℕ) : (wittNSMul p m n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1) := wittStructureInt_vars _ _ _
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittNSMul_vars
null
wittZSMul_vars (m : ℤ) (n : ℕ) : (wittZSMul p m n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1) := wittStructureInt_vars _ _ _
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittZSMul_vars
null
wittPow_vars (m : ℕ) (n : ℕ) : (wittPow p m n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1) := wittStructureInt_vars _ _ _
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.StructurePolynomial" ]
Mathlib/RingTheory/WittVector/Defs.lean
wittPow_vars
null
succNthValUnits (n : ℕ) (a : Units k) (A : 𝕎 k) (bs : Fin (n + 1) → k) : k := -↑(a⁻¹ ^ p ^ (n + 1)) * (A.coeff (n + 1) * ↑(a⁻¹ ^ p ^ (n + 1)) + nthRemainder p n (truncateFun (n + 1) A) bs)
def
RingTheory
[ "Mathlib.RingTheory.WittVector.Domain", "Mathlib.RingTheory.WittVector.MulCoeff", "Mathlib.RingTheory.DiscreteValuationRing.Basic", "Mathlib.Tactic.LinearCombination" ]
Mathlib/RingTheory/WittVector/DiscreteValuationRing.lean
succNthValUnits
This is the `n+1`st coefficient of our inverse.
noncomputable inverseCoeff (a : Units k) (A : 𝕎 k) : ℕ → k | 0 => ↑a⁻¹ | n + 1 => succNthValUnits n a A fun i => inverseCoeff a A i.val
def
RingTheory
[ "Mathlib.RingTheory.WittVector.Domain", "Mathlib.RingTheory.WittVector.MulCoeff", "Mathlib.RingTheory.DiscreteValuationRing.Basic", "Mathlib.Tactic.LinearCombination" ]
Mathlib/RingTheory/WittVector/DiscreteValuationRing.lean
inverseCoeff
Recursively defines the sequence of coefficients for the inverse to a Witt vector whose first entry is a unit.
mkUnit {a : Units k} {A : 𝕎 k} (hA : A.coeff 0 = a) : Units (𝕎 k) := Units.mkOfMulEqOne A (@WittVector.mk' p _ (inverseCoeff a A)) (by ext n induction n with | zero => simp [WittVector.mul_coeff_zero, inverseCoeff, hA] | succ n => ?_ let H_coeff := A.coeff (n + 1) * ↑(a⁻¹ ^ p ^ (n + 1)) + nthRemainder p n (truncateFun (n + 1) A) fun i : Fin (n + 1) => inverseCoeff a A i have H := Units.mul_inv (a ^ p ^ (n + 1)) linear_combination (norm := skip) -H_coeff * H have ha : (a : k) ^ p ^ (n + 1) = ↑(a ^ p ^ (n + 1)) := by norm_cast have ha_inv : (↑a⁻¹ : k) ^ p ^ (n + 1) = ↑(a ^ p ^ (n + 1))⁻¹ := by norm_cast simp only [nthRemainder_spec, inverseCoeff, succNthValUnits, hA, one_coeff_eq_of_pos, Nat.succ_pos', ha_inv, ha, inv_pow] ring!) @[simp]
def
RingTheory
[ "Mathlib.RingTheory.WittVector.Domain", "Mathlib.RingTheory.WittVector.MulCoeff", "Mathlib.RingTheory.DiscreteValuationRing.Basic", "Mathlib.Tactic.LinearCombination" ]
Mathlib/RingTheory/WittVector/DiscreteValuationRing.lean
mkUnit
Upgrade a Witt vector `A` whose first entry `A.coeff 0` is a unit to be, itself, a unit in `𝕎 k`.
coe_mkUnit {a : Units k} {A : 𝕎 k} (hA : A.coeff 0 = a) : (mkUnit hA : 𝕎 k) = A := rfl
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Domain", "Mathlib.RingTheory.WittVector.MulCoeff", "Mathlib.RingTheory.DiscreteValuationRing.Basic", "Mathlib.Tactic.LinearCombination" ]
Mathlib/RingTheory/WittVector/DiscreteValuationRing.lean
coe_mkUnit
null
isUnit_of_coeff_zero_ne_zero (x : 𝕎 k) (hx : x.coeff 0 ≠ 0) : IsUnit x := by let y : kˣ := Units.mk0 (x.coeff 0) hx have hy : x.coeff 0 = y := rfl exact (mkUnit hy).isUnit variable (p)
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Domain", "Mathlib.RingTheory.WittVector.MulCoeff", "Mathlib.RingTheory.DiscreteValuationRing.Basic", "Mathlib.Tactic.LinearCombination" ]
Mathlib/RingTheory/WittVector/DiscreteValuationRing.lean
isUnit_of_coeff_zero_ne_zero
null
irreducible : Irreducible (p : 𝕎 k) := by have hp : ¬IsUnit (p : 𝕎 k) := by intro hp simpa only [constantCoeff_apply, coeff_p_zero, not_isUnit_zero] using (constantCoeff : WittVector p k →+* _).isUnit_map hp refine ⟨hp, fun a b hab => ?_⟩ obtain ⟨ha0, hb0⟩ : a ≠ 0 ∧ b ≠ 0 := by rw [← mul_ne_zero_iff]; intro h; rw [h] at hab; exact p_nonzero p k hab obtain ⟨m, a, ha, rfl⟩ := verschiebung_nonzero ha0 obtain ⟨n, b, hb, rfl⟩ := verschiebung_nonzero hb0 cases m; · exact Or.inl (isUnit_of_coeff_zero_ne_zero a ha) rcases n with - | n; · exact Or.inr (isUnit_of_coeff_zero_ne_zero b hb) rw [iterate_verschiebung_mul] at hab apply_fun fun x => coeff x 1 at hab simp only [coeff_p_one, Nat.add_succ, add_comm _ n, Function.iterate_succ', Function.comp_apply, verschiebung_coeff_add_one, verschiebung_coeff_zero] at hab exact (one_ne_zero hab).elim
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Domain", "Mathlib.RingTheory.WittVector.MulCoeff", "Mathlib.RingTheory.DiscreteValuationRing.Basic", "Mathlib.Tactic.LinearCombination" ]
Mathlib/RingTheory/WittVector/DiscreteValuationRing.lean
irreducible
null
exists_eq_pow_p_mul (a : 𝕎 k) (ha : a ≠ 0) : ∃ (m : ℕ) (b : 𝕎 k), b.coeff 0 ≠ 0 ∧ a = (p : 𝕎 k) ^ m * b := by obtain ⟨m, c, hc, hcm⟩ := WittVector.verschiebung_nonzero ha obtain ⟨b, rfl⟩ := (frobenius_bijective p k).surjective.iterate m c rw [WittVector.iterate_frobenius_coeff] at hc have := congr_fun (WittVector.verschiebung_frobenius_comm.comp_iterate m) b simp only [Function.comp_apply] at this rw [← this] at hcm refine ⟨m, b, ?_, ?_⟩ · contrapose! hc simp [hc, zero_pow <| pow_ne_zero _ hp.out.ne_zero] · simp_rw [← mul_left_iterate (p : 𝕎 k) m] convert hcm using 2 ext1 x rw [mul_comm, ← WittVector.verschiebung_frobenius x]; rfl
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Domain", "Mathlib.RingTheory.WittVector.MulCoeff", "Mathlib.RingTheory.DiscreteValuationRing.Basic", "Mathlib.Tactic.LinearCombination" ]
Mathlib/RingTheory/WittVector/DiscreteValuationRing.lean
exists_eq_pow_p_mul
null
exists_eq_pow_p_mul' (a : 𝕎 k) (ha : a ≠ 0) : ∃ (m : ℕ) (b : Units (𝕎 k)), a = (p : 𝕎 k) ^ m * b := by obtain ⟨m, b, h₁, h₂⟩ := exists_eq_pow_p_mul a ha let b₀ := Units.mk0 (b.coeff 0) h₁ have hb₀ : b.coeff 0 = b₀ := rfl exact ⟨m, mkUnit hb₀, h₂⟩
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Domain", "Mathlib.RingTheory.WittVector.MulCoeff", "Mathlib.RingTheory.DiscreteValuationRing.Basic", "Mathlib.Tactic.LinearCombination" ]
Mathlib/RingTheory/WittVector/DiscreteValuationRing.lean
exists_eq_pow_p_mul'
null
isDiscreteValuationRing : IsDiscreteValuationRing (𝕎 k) := IsDiscreteValuationRing.ofHasUnitMulPowIrreducibleFactorization (by refine ⟨p, irreducible p, fun {x} hx => ?_⟩ obtain ⟨n, b, hb⟩ := exists_eq_pow_p_mul' x hx exact ⟨n, b, hb.symm⟩)
instance
RingTheory
[ "Mathlib.RingTheory.WittVector.Domain", "Mathlib.RingTheory.WittVector.MulCoeff", "Mathlib.RingTheory.DiscreteValuationRing.Basic", "Mathlib.Tactic.LinearCombination" ]
Mathlib/RingTheory/WittVector/DiscreteValuationRing.lean
isDiscreteValuationRing
The ring of Witt Vectors of a perfect field of positive characteristic is a DVR.
shift (x : 𝕎 R) (n : ℕ) : 𝕎 R := @mk' p R fun i => x.coeff (n + i)
def
RingTheory
[ "Mathlib.RingTheory.WittVector.Identities" ]
Mathlib/RingTheory/WittVector/Domain.lean
shift
`WittVector.verschiebung` translates the entries of a Witt vector upward, inserting 0s in the gaps. `WittVector.shift` does the opposite, removing the first entries. This is mainly useful as an auxiliary construction for `WittVector.verschiebung_nonzero`.
shift_coeff (x : 𝕎 R) (n k : ℕ) : (x.shift n).coeff k = x.coeff (n + k) := rfl variable [hp : Fact p.Prime] [CommRing R]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Identities" ]
Mathlib/RingTheory/WittVector/Domain.lean
shift_coeff
null
verschiebung_shift (x : 𝕎 R) (k : ℕ) (h : ∀ i < k + 1, x.coeff i = 0) : verschiebung (x.shift k.succ) = x.shift k := by ext ⟨j⟩ · rw [verschiebung_coeff_zero, shift_coeff, h] apply Nat.lt_succ_self · simp only [verschiebung_coeff_succ, shift] congr 1 rw [Nat.add_succ, add_comm, Nat.add_succ, add_comm]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Identities" ]
Mathlib/RingTheory/WittVector/Domain.lean
verschiebung_shift
null
eq_iterate_verschiebung {x : 𝕎 R} {n : ℕ} (h : ∀ i < n, x.coeff i = 0) : x = verschiebung^[n] (x.shift n) := by induction n with | zero => cases x; simp [shift] | succ k ih => dsimp; rw [verschiebung_shift] · exact ih fun i hi => h _ (hi.trans (Nat.lt_succ_self _)) · exact h
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Identities" ]
Mathlib/RingTheory/WittVector/Domain.lean
eq_iterate_verschiebung
null
verschiebung_nonzero {x : 𝕎 R} (hx : x ≠ 0) : ∃ n : ℕ, ∃ x' : 𝕎 R, x'.coeff 0 ≠ 0 ∧ x = verschiebung^[n] x' := by classical have hex : ∃ k : ℕ, x.coeff k ≠ 0 := by by_contra! hall apply hx ext i simp only [hall, zero_coeff] let n := Nat.find hex use n, x.shift n refine ⟨Nat.find_spec hex, eq_iterate_verschiebung fun i hi => not_not.mp ?_⟩ exact Nat.find_min hex hi /-!
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Identities" ]
Mathlib/RingTheory/WittVector/Domain.lean
verschiebung_nonzero
null
instIsDomain [CharP R p] [IsDomain R] : IsDomain (𝕎 R) := NoZeroDivisors.to_isDomain _
instance
RingTheory
[ "Mathlib.RingTheory.WittVector.Identities" ]
Mathlib/RingTheory/WittVector/Domain.lean
instIsDomain
null
frobeniusPolyRat (n : ℕ) : MvPolynomial ℕ ℚ := bind₁ (wittPolynomial p ℚ ∘ fun n => n + 1) (xInTermsOfW p ℚ n)
def
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
frobeniusPolyRat
The rational polynomials that give the coefficients of `frobenius x`, in terms of the coefficients of `x`. These polynomials actually have integral coefficients, see `frobeniusPoly` and `map_frobeniusPoly`.
bind₁_frobeniusPolyRat_wittPolynomial (n : ℕ) : bind₁ (frobeniusPolyRat p) (wittPolynomial p ℚ n) = wittPolynomial p ℚ (n + 1) := by delta frobeniusPolyRat rw [← bind₁_bind₁, bind₁_xInTermsOfW_wittPolynomial, bind₁_X_right, Function.comp_apply] local notation "v" => multiplicity
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
bind₁_frobeniusPolyRat_wittPolynomial
null
noncomputable frobeniusPolyAux : ℕ → MvPolynomial ℕ ℤ | n => X (n + 1) - ∑ i : Fin n, have _ := i.is_lt ∑ j ∈ range (p ^ (n - i)), (((X (i : ℕ) ^ p) ^ (p ^ (n - (i : ℕ)) - (j + 1)) : MvPolynomial ℕ ℤ) * (frobeniusPolyAux i) ^ (j + 1)) * C (((p ^ (n - i)).choose (j + 1) / (p ^ (n - i - v p (j + 1))) * ↑p ^ (j - v p (j + 1)) : ℕ) : ℤ) omit hp in
def
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
frobeniusPolyAux
An auxiliary polynomial over the integers, that satisfies `p * (frobeniusPolyAux p n) + X n ^ p = frobeniusPoly p n`. This makes it easy to show that `frobeniusPoly p n` is congruent to `X n ^ p` modulo `p`.
frobeniusPolyAux_eq (n : ℕ) : frobeniusPolyAux p n = X (n + 1) - ∑ i ∈ range n, ∑ j ∈ range (p ^ (n - i)), (X i ^ p) ^ (p ^ (n - i) - (j + 1)) * frobeniusPolyAux p i ^ (j + 1) * C ↑((p ^ (n - i)).choose (j + 1) / p ^ (n - i - v p (j + 1)) * ↑p ^ (j - v p (j + 1)) : ℕ) := by rw [frobeniusPolyAux, ← Fin.sum_univ_eq_sum_range]
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
frobeniusPolyAux_eq
null
frobeniusPoly (n : ℕ) : MvPolynomial ℕ ℤ := X n ^ p + C (p : ℤ) * frobeniusPolyAux p n /- Our next goal is to prove ```
def
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
frobeniusPoly
The polynomials that give the coefficients of `frobenius x`, in terms of the coefficients of `x`.
map_frobeniusPoly (n : ℕ) : MvPolynomial.map (Int.castRingHom ℚ) (frobeniusPoly p n) = frobeniusPolyRat p n ``` This lemma has a rather long proof, but it mostly boils down to applying induction, and then using the following two key facts at the right point. -/
lemma
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
map_frobeniusPoly
null
map_frobeniusPoly.key₁ (n j : ℕ) (hj : j < p ^ n) : p ^ (n - v p (j + 1)) ∣ (p ^ n).choose (j + 1) := by apply pow_dvd_of_le_emultiplicity rw [hp.out.emultiplicity_choose_prime_pow hj j.succ_ne_zero]
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
map_frobeniusPoly.key₁
A key divisibility fact for the proof of `WittVector.map_frobeniusPoly`.
map_frobeniusPoly.key₂ {n i j : ℕ} (hi : i ≤ n) (hj : j < p ^ (n - i)) : j - v p (j + 1) + n = i + j + (n - i - v p (j + 1)) := by generalize h : v p (j + 1) = m rsuffices ⟨h₁, h₂⟩ : m ≤ n - i ∧ m ≤ j · rw [tsub_add_eq_add_tsub h₂, add_comm i j, add_tsub_assoc_of_le (h₁.trans (Nat.sub_le n i)), add_assoc, tsub_right_comm, add_comm i, tsub_add_cancel_of_le (le_tsub_of_add_le_right ((le_tsub_iff_left hi).mp h₁))] have hle : p ^ m ≤ j + 1 := h ▸ Nat.le_of_dvd j.succ_pos (pow_multiplicity_dvd _ _) exact ⟨(Nat.pow_le_pow_iff_right hp.1.one_lt).1 (hle.trans hj), Nat.le_of_lt_succ ((m.lt_pow_self hp.1.one_lt).trans_le hle)⟩
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
map_frobeniusPoly.key₂
A key numerical identity needed for the proof of `WittVector.map_frobeniusPoly`.
map_frobeniusPoly (n : ℕ) : MvPolynomial.map (Int.castRingHom ℚ) (frobeniusPoly p n) = frobeniusPolyRat p n := by rw [frobeniusPoly, RingHom.map_add, RingHom.map_mul, RingHom.map_pow, map_C, map_X, eq_intCast, Int.cast_natCast, frobeniusPolyRat] refine Nat.strong_induction_on n ?_; clear n intro n IH rw [xInTermsOfW_eq] simp only [map_sum, map_sub, map_mul, map_pow (bind₁ _), bind₁_C_right] have h1 : (p : ℚ) ^ n * ⅟(p : ℚ) ^ n = 1 := by rw [← mul_pow, mul_invOf_self, one_pow] rw [bind₁_X_right, Function.comp_apply, wittPolynomial_eq_sum_C_mul_X_pow, sum_range_succ, sum_range_succ, tsub_self, add_tsub_cancel_left, pow_zero, pow_one, pow_one, sub_mul, add_mul, add_mul, mul_right_comm, mul_right_comm (C ((p : ℚ) ^ (n + 1))), ← C_mul, ← C_mul, pow_succ', mul_assoc (p : ℚ) ((p : ℚ) ^ n), h1, mul_one, C_1, one_mul, add_comm _ (X n ^ p), add_assoc, ← add_sub, add_right_inj, frobeniusPolyAux_eq, RingHom.map_sub, map_X, mul_sub, sub_eq_add_neg, add_comm _ (C (p : ℚ) * X (n + 1)), ← add_sub, add_right_inj, neg_eq_iff_eq_neg, neg_sub, eq_comm] simp only [map_sum, mul_sum, sum_mul, ← sum_sub_distrib] apply sum_congr rfl intro i hi rw [mem_range] at hi rw [← IH i hi] clear IH rw [add_comm (X i ^ p), add_pow, sum_range_succ', pow_zero, tsub_zero, Nat.choose_zero_right, one_mul, Nat.cast_one, mul_one, mul_add, add_mul, Nat.succ_sub (le_of_lt hi), Nat.succ_eq_add_one (n - i), pow_succ', pow_mul, add_sub_cancel_right, mul_sum, sum_mul] apply sum_congr rfl intro j hj rw [mem_range] at hj rw [RingHom.map_mul, RingHom.map_mul, RingHom.map_pow, RingHom.map_pow, RingHom.map_pow, RingHom.map_pow, RingHom.map_pow, map_C, map_X, mul_pow] rw [mul_comm (C (p : ℚ) ^ i), mul_comm _ ((X i ^ p) ^ _), mul_comm (C (p : ℚ) ^ (j + 1)), mul_comm (C (p : ℚ))] simp only [mul_assoc] apply congr_arg apply congr_arg rw [← C_eq_coe_nat] simp only [← RingHom.map_pow, ← C_mul] rw [C_inj] simp only [invOf_eq_inv, eq_intCast, inv_pow, Int.cast_natCast, Nat.cast_mul, Int.cast_mul] rw [Rat.natCast_div _ _ (map_frobeniusPoly.key₁ p (n - i) j hj)] push_cast linear_combination (norm := skip) -p / p ^ n / p ^ (n - i - v p (j + 1)) * (p ^ (n - i)).choose (j + 1) * congr((p:ℚ) ^ $(map_frobeniusPoly.key₂ p hi.le hj)) field_simp [hp.1.ne_zero] ring
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
map_frobeniusPoly
null
frobeniusPoly_zmod (n : ℕ) : MvPolynomial.map (Int.castRingHom (ZMod p)) (frobeniusPoly p n) = X n ^ p := by rw [frobeniusPoly, RingHom.map_add, RingHom.map_pow, RingHom.map_mul, map_X, map_C] simp only [Int.cast_natCast, add_zero, eq_intCast, ZMod.natCast_self, zero_mul, C_0] @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
frobeniusPoly_zmod
null
bind₁_frobeniusPoly_wittPolynomial (n : ℕ) : bind₁ (frobeniusPoly p) (wittPolynomial p ℤ n) = wittPolynomial p ℤ (n + 1) := by apply MvPolynomial.map_injective (Int.castRingHom ℚ) Int.cast_injective simp only [map_bind₁, map_frobeniusPoly, bind₁_frobeniusPolyRat_wittPolynomial, map_wittPolynomial] variable {p}
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
bind₁_frobeniusPoly_wittPolynomial
null
frobeniusFun (x : 𝕎 R) : 𝕎 R := mk p fun n => MvPolynomial.aeval x.coeff (frobeniusPoly p n) omit hp in
def
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
frobeniusFun
`frobeniusFun` is the function underlying the ring endomorphism `frobenius : 𝕎 R →+* frobenius 𝕎 R`.
coeff_frobeniusFun (x : 𝕎 R) (n : ℕ) : coeff (frobeniusFun x) n = MvPolynomial.aeval x.coeff (frobeniusPoly p n) := by rw [frobeniusFun, coeff_mk] variable (p) in
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
coeff_frobeniusFun
null
frobeniusFun_isPoly : IsPoly p fun R _ Rcr => @frobeniusFun p R _ Rcr := ⟨⟨frobeniusPoly p, by intros; funext n; apply coeff_frobeniusFun⟩⟩ @[ghost_simps]
instance
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
frobeniusFun_isPoly
`frobeniusFun` is tautologically a polynomial function. See also `frobenius_isPoly`.
ghostComponent_frobeniusFun (n : ℕ) (x : 𝕎 R) : ghostComponent n (frobeniusFun x) = ghostComponent (n + 1) x := by simp only [ghostComponent_apply, frobeniusFun, coeff_mk, ← bind₁_frobeniusPoly_wittPolynomial, aeval_bind₁]
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
ghostComponent_frobeniusFun
null
frobenius : 𝕎 R →+* 𝕎 R where toFun := frobeniusFun map_zero' := by refine IsPoly.ext (IsPoly.comp (hg := frobeniusFun_isPoly p) (hf := WittVector.zeroIsPoly)) (IsPoly.comp (hg := WittVector.zeroIsPoly) (hf := frobeniusFun_isPoly p)) ?_ _ 0 simp only [Function.comp_apply, map_zero, forall_const] ghost_simp map_one' := by refine IsPoly.ext (IsPoly.comp (hg := frobeniusFun_isPoly p) (hf := WittVector.oneIsPoly)) (IsPoly.comp (hg := WittVector.oneIsPoly) (hf := frobeniusFun_isPoly p)) ?_ _ 0 simp only [Function.comp_apply, map_one, forall_const] ghost_simp map_add' := by ghost_calc _ _; ghost_simp map_mul' := by ghost_calc _ _; ghost_simp
def
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
frobenius
If `R` has characteristic `p`, then there is a ring endomorphism that raises `r : R` to the power `p`. By applying `WittVector.map` to this endomorphism, we obtain a ring endomorphism `frobenius R p : 𝕎 R →+* 𝕎 R`. The underlying function of this morphism is `WittVector.frobeniusFun`.
coeff_frobenius (x : 𝕎 R) (n : ℕ) : coeff (frobenius x) n = MvPolynomial.aeval x.coeff (frobeniusPoly p n) := coeff_frobeniusFun _ _ @[ghost_simps]
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
coeff_frobenius
null
ghostComponent_frobenius (n : ℕ) (x : 𝕎 R) : ghostComponent n (frobenius x) = ghostComponent (n + 1) x := ghostComponent_frobeniusFun _ _ variable (p)
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
ghostComponent_frobenius
null
frobenius_isPoly : IsPoly p fun R _Rcr => @frobenius p R _ _Rcr := frobeniusFun_isPoly _
instance
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
frobenius_isPoly
`frobenius` is tautologically a polynomial function.
@[simp] coeff_frobenius_charP (x : 𝕎 R) (n : ℕ) : coeff (frobenius x) n = x.coeff n ^ p := by rw [coeff_frobenius] letI : Algebra (ZMod p) R := ZMod.algebra _ _ calc aeval (fun k => x.coeff k) (frobeniusPoly p n) = aeval (fun k => x.coeff k) (MvPolynomial.map (Int.castRingHom (ZMod p)) (frobeniusPoly p n)) := ?_ _ = aeval (fun k => x.coeff k) (X n ^ p : MvPolynomial ℕ (ZMod p)) := ?_ _ = x.coeff n ^ p := ?_ · conv_rhs => rw [aeval_eq_eval₂Hom, eval₂Hom_map_hom] apply eval₂Hom_congr (RingHom.ext_int _ _) rfl rfl · rw [frobeniusPoly_zmod] · rw [map_pow, aeval_X]
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
coeff_frobenius_charP
null
frobenius_eq_map_frobenius : @frobenius p R _ _ = map (_root_.frobenius R p) := by ext (x n) simp only [coeff_frobenius_charP, map_coeff, frobenius_def] @[simp]
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
frobenius_eq_map_frobenius
null
frobenius_zmodp (x : 𝕎 (ZMod p)) : frobenius x = x := by simp only [WittVector.ext_iff, coeff_frobenius_charP, ZMod.pow_card, forall_const] variable (R)
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
frobenius_zmodp
null
@[simps -fullyApplied] frobeniusEquiv [PerfectRing R p] : WittVector p R ≃+* WittVector p R := { (WittVector.frobenius : WittVector p R →+* WittVector p R) with toFun := WittVector.frobenius invFun := map (_root_.frobeniusEquiv R p).symm left_inv := fun f => ext fun n => by rw [frobenius_eq_map_frobenius] exact frobeniusEquiv_symm_apply_frobenius R p _ right_inv := fun f => ext fun n => by rw [frobenius_eq_map_frobenius] exact frobenius_apply_frobeniusEquiv_symm R p _ }
def
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
frobeniusEquiv
`WittVector.frobenius` as an equiv.
frobenius_bijective [PerfectRing R p] : Function.Bijective (@WittVector.frobenius p R _ _) := (frobeniusEquiv p R).bijective
theorem
RingTheory
[ "Mathlib.Algebra.Algebra.ZMod", "Mathlib.Data.Nat.Multiplicity", "Mathlib.FieldTheory.Perfect", "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/Frobenius.lean
frobenius_bijective
null
succNthDefiningPoly (n : ℕ) (a₁ a₂ : 𝕎 k) (bs : Fin (n + 1) → k) : Polynomial k := X ^ p * C (a₁.coeff 0 ^ p ^ (n + 1)) - X * C (a₂.coeff 0 ^ p ^ (n + 1)) + C (a₁.coeff (n + 1) * (bs 0 ^ p) ^ p ^ (n + 1) + nthRemainder p n (fun v => bs v ^ p) (truncateFun (n + 1) a₁) - a₂.coeff (n + 1) * bs 0 ^ p ^ (n + 1) - nthRemainder p n bs (truncateFun (n + 1) a₂))
def
RingTheory
[ "Mathlib.Data.Nat.Cast.WithTop", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.RingTheory.WittVector.DiscreteValuationRing" ]
Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
succNthDefiningPoly
The root of this polynomial determines the `n+1`st coefficient of our solution.
succNthDefiningPoly_degree [IsDomain k] (n : ℕ) (a₁ a₂ : 𝕎 k) (bs : Fin (n + 1) → k) (ha₁ : a₁.coeff 0 ≠ 0) (ha₂ : a₂.coeff 0 ≠ 0) : (succNthDefiningPoly p n a₁ a₂ bs).degree = p := by have : (X ^ p * C (a₁.coeff 0 ^ p ^ (n + 1))).degree = (p : WithBot ℕ) := by rw [degree_mul, degree_C] · simp only [Nat.cast_withBot, add_zero, degree_X, degree_pow, Nat.smul_one_eq_cast] · exact pow_ne_zero _ ha₁ have : (X ^ p * C (a₁.coeff 0 ^ p ^ (n + 1)) - X * C (a₂.coeff 0 ^ p ^ (n + 1))).degree = (p : WithBot ℕ) := by rw [degree_sub_eq_left_of_degree_lt, this] rw [this, degree_mul, degree_C, degree_X, add_zero] · exact mod_cast hp.out.one_lt · exact pow_ne_zero _ ha₂ rw [succNthDefiningPoly, degree_add_eq_left_of_degree_lt, this] apply lt_of_le_of_lt degree_C_le rw [this] exact mod_cast hp.out.pos
theorem
RingTheory
[ "Mathlib.Data.Nat.Cast.WithTop", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.RingTheory.WittVector.DiscreteValuationRing" ]
Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
succNthDefiningPoly_degree
null
root_exists (n : ℕ) (a₁ a₂ : 𝕎 k) (bs : Fin (n + 1) → k) (ha₁ : a₁.coeff 0 ≠ 0) (ha₂ : a₂.coeff 0 ≠ 0) : ∃ b : k, (succNthDefiningPoly p n a₁ a₂ bs).IsRoot b := IsAlgClosed.exists_root _ <| by simp only [succNthDefiningPoly_degree p n a₁ a₂ bs ha₁ ha₂, ne_eq, Nat.cast_eq_zero, hp.out.ne_zero, not_false_eq_true]
theorem
RingTheory
[ "Mathlib.Data.Nat.Cast.WithTop", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.RingTheory.WittVector.DiscreteValuationRing" ]
Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
root_exists
null
succNthVal (n : ℕ) (a₁ a₂ : 𝕎 k) (bs : Fin (n + 1) → k) (ha₁ : a₁.coeff 0 ≠ 0) (ha₂ : a₂.coeff 0 ≠ 0) : k := Classical.choose (root_exists p n a₁ a₂ bs ha₁ ha₂)
def
RingTheory
[ "Mathlib.Data.Nat.Cast.WithTop", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.RingTheory.WittVector.DiscreteValuationRing" ]
Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
succNthVal
This is the `n+1`st coefficient of our solution, projected from `root_exists`.
succNthVal_spec (n : ℕ) (a₁ a₂ : 𝕎 k) (bs : Fin (n + 1) → k) (ha₁ : a₁.coeff 0 ≠ 0) (ha₂ : a₂.coeff 0 ≠ 0) : (succNthDefiningPoly p n a₁ a₂ bs).IsRoot (succNthVal p n a₁ a₂ bs ha₁ ha₂) := Classical.choose_spec (root_exists p n a₁ a₂ bs ha₁ ha₂)
theorem
RingTheory
[ "Mathlib.Data.Nat.Cast.WithTop", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.RingTheory.WittVector.DiscreteValuationRing" ]
Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
succNthVal_spec
null
succNthVal_spec' (n : ℕ) (a₁ a₂ : 𝕎 k) (bs : Fin (n + 1) → k) (ha₁ : a₁.coeff 0 ≠ 0) (ha₂ : a₂.coeff 0 ≠ 0) : succNthVal p n a₁ a₂ bs ha₁ ha₂ ^ p * a₁.coeff 0 ^ p ^ (n + 1) + a₁.coeff (n + 1) * (bs 0 ^ p) ^ p ^ (n + 1) + nthRemainder p n (fun v => bs v ^ p) (truncateFun (n + 1) a₁) = succNthVal p n a₁ a₂ bs ha₁ ha₂ * a₂.coeff 0 ^ p ^ (n + 1) + a₂.coeff (n + 1) * bs 0 ^ p ^ (n + 1) + nthRemainder p n bs (truncateFun (n + 1) a₂) := by rw [← sub_eq_zero] have := succNthVal_spec p n a₁ a₂ bs ha₁ ha₂ simp only [Polynomial.eval_X, Polynomial.eval_C, Polynomial.eval_pow, succNthDefiningPoly, Polynomial.eval_mul, Polynomial.eval_add, Polynomial.eval_sub, Polynomial.IsRoot.def] at this convert this using 1 ring
theorem
RingTheory
[ "Mathlib.Data.Nat.Cast.WithTop", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.RingTheory.WittVector.DiscreteValuationRing" ]
Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
succNthVal_spec'
null
solution_pow (a₁ a₂ : 𝕎 k) : ∃ x : k, x ^ (p - 1) = a₂.coeff 0 / a₁.coeff 0 := IsAlgClosed.exists_pow_nat_eq _ <| tsub_pos_of_lt hp.out.one_lt
theorem
RingTheory
[ "Mathlib.Data.Nat.Cast.WithTop", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.RingTheory.WittVector.DiscreteValuationRing" ]
Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
solution_pow
null
solution (a₁ a₂ : 𝕎 k) : k := Classical.choose <| solution_pow p a₁ a₂
def
RingTheory
[ "Mathlib.Data.Nat.Cast.WithTop", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.RingTheory.WittVector.DiscreteValuationRing" ]
Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
solution
The base case (0th coefficient) of our solution vector.
solution_spec (a₁ a₂ : 𝕎 k) : solution p a₁ a₂ ^ (p - 1) = a₂.coeff 0 / a₁.coeff 0 := Classical.choose_spec <| solution_pow p a₁ a₂
theorem
RingTheory
[ "Mathlib.Data.Nat.Cast.WithTop", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.RingTheory.WittVector.DiscreteValuationRing" ]
Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
solution_spec
null
solution_nonzero {a₁ a₂ : 𝕎 k} (ha₁ : a₁.coeff 0 ≠ 0) (ha₂ : a₂.coeff 0 ≠ 0) : solution p a₁ a₂ ≠ 0 := by intro h have := solution_spec p a₁ a₂ rw [h, zero_pow] at this · simpa [ha₁, ha₂] using _root_.div_eq_zero_iff.mp this.symm · exact Nat.sub_ne_zero_of_lt hp.out.one_lt
theorem
RingTheory
[ "Mathlib.Data.Nat.Cast.WithTop", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.RingTheory.WittVector.DiscreteValuationRing" ]
Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
solution_nonzero
null
solution_spec' {a₁ : 𝕎 k} (ha₁ : a₁.coeff 0 ≠ 0) (a₂ : 𝕎 k) : solution p a₁ a₂ ^ p * a₁.coeff 0 = solution p a₁ a₂ * a₂.coeff 0 := by have := solution_spec p a₁ a₂ obtain ⟨q, hq⟩ := Nat.exists_eq_succ_of_ne_zero hp.out.ne_zero have hq' : q = p - 1 := by simp only [hq, tsub_zero, Nat.succ_sub_succ_eq_sub] conv_lhs => congr congr · skip · rw [hq] rw [pow_succ', hq', this] field_simp
theorem
RingTheory
[ "Mathlib.Data.Nat.Cast.WithTop", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.RingTheory.WittVector.DiscreteValuationRing" ]
Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
solution_spec'
null
frobeniusRotation {a₁ a₂ : 𝕎 k} (ha₁ : a₁.coeff 0 ≠ 0) (ha₂ : a₂.coeff 0 ≠ 0) : 𝕎 k := WittVector.mk p (frobeniusRotationCoeff p ha₁ ha₂)
def
RingTheory
[ "Mathlib.Data.Nat.Cast.WithTop", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.RingTheory.WittVector.DiscreteValuationRing" ]
Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
frobeniusRotation
Recursively defines the sequence of coefficients for `WittVector.frobeniusRotation`. -/ -- Constructions by well-founded recursion are by default irreducible. -- As we rely on definitional properties below, we mark this `@[semireducible]`. @[semireducible] noncomputable def frobeniusRotationCoeff {a₁ a₂ : 𝕎 k} (ha₁ : a₁.coeff 0 ≠ 0) (ha₂ : a₂.coeff 0 ≠ 0) : ℕ → k | 0 => solution p a₁ a₂ | n + 1 => succNthVal p n a₁ a₂ (fun i => frobeniusRotationCoeff ha₁ ha₂ i.val) ha₁ ha₂ /-- For nonzero `a₁` and `a₂`, `frobeniusRotation a₁ a₂` is a Witt vector that satisfies the equation `frobenius (frobeniusRotation a₁ a₂) * a₁ = (frobeniusRotation a₁ a₂) * a₂`.
frobeniusRotation_nonzero {a₁ a₂ : 𝕎 k} (ha₁ : a₁.coeff 0 ≠ 0) (ha₂ : a₂.coeff 0 ≠ 0) : frobeniusRotation p ha₁ ha₂ ≠ 0 := by intro h apply solution_nonzero p ha₁ ha₂ simpa [← h, frobeniusRotation, frobeniusRotationCoeff] using WittVector.zero_coeff p k 0
theorem
RingTheory
[ "Mathlib.Data.Nat.Cast.WithTop", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.RingTheory.WittVector.DiscreteValuationRing" ]
Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
frobeniusRotation_nonzero
null
frobenius_frobeniusRotation {a₁ a₂ : 𝕎 k} (ha₁ : a₁.coeff 0 ≠ 0) (ha₂ : a₂.coeff 0 ≠ 0) : frobenius (frobeniusRotation p ha₁ ha₂) * a₁ = frobeniusRotation p ha₁ ha₂ * a₂ := by ext n rcases n with - | n · simp only [WittVector.mul_coeff_zero, WittVector.coeff_frobenius_charP, frobeniusRotation] apply solution_spec' _ ha₁ · simp only [nthRemainder_spec, WittVector.coeff_frobenius_charP, frobeniusRotation] have := succNthVal_spec' p n a₁ a₂ (fun i : Fin (n + 1) => frobeniusRotationCoeff p ha₁ ha₂ i.val) ha₁ ha₂ simp only [frobeniusRotationCoeff, Fin.val_zero] at this convert this using 3 apply TruncatedWittVector.ext intro i simp only [WittVector.coeff_truncateFun, WittVector.coeff_frobenius_charP] rfl local notation "φ" => IsFractionRing.ringEquivOfRingEquiv (frobeniusEquiv p k) set_option linter.unusedSimpArgs false in
theorem
RingTheory
[ "Mathlib.Data.Nat.Cast.WithTop", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.RingTheory.WittVector.DiscreteValuationRing" ]
Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
frobenius_frobeniusRotation
null
exists_frobenius_solution_fractionRing_aux (m n : ℕ) (r' q' : 𝕎 k) (hr' : r'.coeff 0 ≠ 0) (hq' : q'.coeff 0 ≠ 0) (hq : (p : 𝕎 k) ^ n * q' ∈ nonZeroDivisors (𝕎 k)) : let b : 𝕎 k := frobeniusRotation p hr' hq' IsFractionRing.ringEquivOfRingEquiv (frobeniusEquiv p k) (algebraMap (𝕎 k) (FractionRing (𝕎 k)) b) * Localization.mk ((p : 𝕎 k) ^ m * r') ⟨(p : 𝕎 k) ^ n * q', hq⟩ = (p : Localization (nonZeroDivisors (𝕎 k))) ^ (m - n : ℤ) * algebraMap (𝕎 k) (FractionRing (𝕎 k)) b := by intro b have key : WittVector.frobenius b * r' = q' * b := by linear_combination frobenius_frobeniusRotation p hr' hq' have hq'' : algebraMap (𝕎 k) (FractionRing (𝕎 k)) q' ≠ 0 := by have hq''' : q' ≠ 0 := fun h => hq' (by simp [h]) simpa only [Ne, map_zero] using (IsFractionRing.injective (𝕎 k) (FractionRing (𝕎 k))).ne hq''' rw [zpow_sub₀ (FractionRing.p_nonzero p k)] simp [field, FractionRing.p_nonzero p k] convert congr_arg (fun x => algebraMap (𝕎 k) (FractionRing (𝕎 k)) x) key using 1 · simp only [RingHom.map_mul] · simp only [RingHom.map_mul]
theorem
RingTheory
[ "Mathlib.Data.Nat.Cast.WithTop", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.RingTheory.WittVector.DiscreteValuationRing" ]
Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
exists_frobenius_solution_fractionRing_aux
null
exists_frobenius_solution_fractionRing {a : FractionRing (𝕎 k)} (ha : a ≠ 0) : ∃ᵉ (b ≠ 0) (m : ℤ), φ b * a = (p : FractionRing (𝕎 k)) ^ m * b := by revert ha refine Localization.induction_on a ?_ rintro ⟨r, q, hq⟩ hrq have hq0 : q ≠ 0 := mem_nonZeroDivisors_iff_ne_zero.1 hq have hr0 : r ≠ 0 := fun h => hrq (by simp [h]) obtain ⟨m, r', hr', rfl⟩ := exists_eq_pow_p_mul r hr0 obtain ⟨n, q', hq', rfl⟩ := exists_eq_pow_p_mul q hq0 let b := frobeniusRotation p hr' hq' refine ⟨algebraMap (𝕎 k) (FractionRing (𝕎 k)) b, ?_, m - n, ?_⟩ · simpa only [map_zero] using (IsFractionRing.injective (WittVector p k) (FractionRing (WittVector p k))).ne (frobeniusRotation_nonzero p hr' hq') exact exists_frobenius_solution_fractionRing_aux p m n r' q' hr' hq' hq
theorem
RingTheory
[ "Mathlib.Data.Nat.Cast.WithTop", "Mathlib.FieldTheory.IsAlgClosed.Basic", "Mathlib.RingTheory.WittVector.DiscreteValuationRing" ]
Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean
exists_frobenius_solution_fractionRing
null
frobenius_verschiebung (x : 𝕎 R) : frobenius (verschiebung x) = x * p := by have : IsPoly p fun {R} [CommRing R] x ↦ frobenius (verschiebung x) := IsPoly.comp (hg := frobenius_isPoly p) (hf := verschiebung_isPoly) have : IsPoly p fun {R} [CommRing R] x ↦ x * p := mulN_isPoly p p ghost_calc x ghost_simp [mul_comm]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
frobenius_verschiebung
The composition of Frobenius and Verschiebung is multiplication by `p`.
verschiebung_zmod (x : 𝕎 (ZMod p)) : verschiebung x = x * p := by rw [← frobenius_verschiebung, frobenius_zmodp] variable (p R)
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
verschiebung_zmod
Verschiebung is the same as multiplication by `p` on the ring of Witt vectors of `ZMod p`.
coeff_p_pow [CharP R p] (i : ℕ) : ((p : 𝕎 R) ^ i).coeff i = 1 := by induction i with | zero => simp only [one_coeff_zero, pow_zero] | succ i h => rw [pow_succ, ← frobenius_verschiebung, coeff_frobenius_charP, verschiebung_coeff_succ, h, one_pow]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
coeff_p_pow
null
coeff_p_pow_eq_zero [CharP R p] {i j : ℕ} (hj : j ≠ i) : ((p : 𝕎 R) ^ i).coeff j = 0 := by induction i generalizing j with | zero => rw [pow_zero, one_coeff_eq_of_pos] exact Nat.pos_of_ne_zero hj | succ i hi => rw [pow_succ, ← frobenius_verschiebung, coeff_frobenius_charP] cases j · rw [verschiebung_coeff_zero, zero_pow hp.out.ne_zero] · rw [verschiebung_coeff_succ, hi (ne_of_apply_ne _ hj), zero_pow hp.out.ne_zero]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
coeff_p_pow_eq_zero
null
coeff_p [CharP R p] (i : ℕ) : (p : 𝕎 R).coeff i = if i = 1 then 1 else 0 := by split_ifs with hi · simpa only [hi, pow_one] using coeff_p_pow p R 1 · simpa only [pow_one] using coeff_p_pow_eq_zero p R hi @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
coeff_p
null
coeff_p_zero [CharP R p] : (p : 𝕎 R).coeff 0 = 0 := by rw [coeff_p, if_neg] exact zero_ne_one @[simp]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
coeff_p_zero
null
coeff_p_one [CharP R p] : (p : 𝕎 R).coeff 1 = 1 := by rw [coeff_p, if_pos rfl]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
coeff_p_one
null
p_nonzero [Nontrivial R] [CharP R p] : (p : 𝕎 R) ≠ 0 := by intro h simpa only [h, zero_coeff, zero_ne_one] using coeff_p_one p R
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
p_nonzero
null
FractionRing.p_nonzero [Nontrivial R] [CharP R p] : (p : FractionRing (𝕎 R)) ≠ 0 := by simpa using (IsFractionRing.injective (𝕎 R) (FractionRing (𝕎 R))).ne (WittVector.p_nonzero _ _) variable {p R}
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
FractionRing.p_nonzero
null
verschiebung_mul_frobenius (x y : 𝕎 R) : verschiebung (x * frobenius y) = verschiebung x * y := by have : IsPoly₂ p fun {R} [Rcr : CommRing R] x y ↦ verschiebung (x * frobenius y) := IsPoly.comp₂ (hg := verschiebung_isPoly) (hf := IsPoly₂.comp (hh := mulIsPoly₂) (hf := idIsPolyI' p) (hg := frobenius_isPoly p)) have : IsPoly₂ p fun {R} [CommRing R] x y ↦ verschiebung x * y := IsPoly₂.comp (hh := mulIsPoly₂) (hf := verschiebung_isPoly) (hg := idIsPolyI' p) ghost_calc x y rintro ⟨⟩ <;> ghost_simp [mul_assoc]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
verschiebung_mul_frobenius
The “projection formula” for Frobenius and Verschiebung.
mul_charP_coeff_zero [CharP R p] (x : 𝕎 R) : (x * p).coeff 0 = 0 := by rw [← frobenius_verschiebung, coeff_frobenius_charP, verschiebung_coeff_zero, zero_pow hp.out.ne_zero]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
mul_charP_coeff_zero
null
mul_charP_coeff_succ [CharP R p] (x : 𝕎 R) (i : ℕ) : (x * p).coeff (i + 1) = x.coeff i ^ p := by rw [← frobenius_verschiebung, coeff_frobenius_charP, verschiebung_coeff_succ]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
mul_charP_coeff_succ
null
mul_pow_charP_coeff_zero [CharP R p] (x : 𝕎 R) {m n : ℕ} (h : m < n) : (x * p ^ n).coeff m = 0 := by induction n generalizing m with | zero => contradiction | succ n ih => rw [pow_succ, ← mul_assoc] cases m with | zero => exact mul_charP_coeff_zero _ | succ m' => rw [mul_charP_coeff_succ, ih, zero_pow hp.out.ne_zero] simpa using h
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
mul_pow_charP_coeff_zero
null
mul_pow_charP_coeff_succ [CharP R p] (x : 𝕎 R) {m n : ℕ} : (x * p ^ n).coeff (m + n) = x.coeff m ^ (p ^ n) := by induction n generalizing m with | zero => simp | succ n ih => rw [pow_succ, ← mul_assoc, ← add_assoc, mul_charP_coeff_succ, pow_succ, pow_mul] congr exact ih
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
mul_pow_charP_coeff_succ
null
verschiebung_frobenius [CharP R p] (x : 𝕎 R) : verschiebung (frobenius x) = x * p := by ext ⟨i⟩ · rw [mul_charP_coeff_zero, verschiebung_coeff_zero] · rw [mul_charP_coeff_succ, verschiebung_coeff_succ, coeff_frobenius_charP]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
verschiebung_frobenius
null
verschiebung_frobenius_comm [CharP R p] : Function.Commute (verschiebung : 𝕎 R → 𝕎 R) frobenius := fun x => by rw [verschiebung_frobenius, frobenius_verschiebung] /-!
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
verschiebung_frobenius_comm
null
iterate_verschiebung_coeff_eq_zero (x : 𝕎 R) {n : ℕ} {m : ℕ} (h : m < n) : (verschiebung^[n] x).coeff m = 0 := by induction n generalizing m with | zero => contradiction | succ n ih => rw [iterate_succ_apply'] cases m with | zero => exact verschiebung_coeff_zero _ | succ m' => rw [verschiebung_coeff_succ, ih] simpa using h
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
iterate_verschiebung_coeff_eq_zero
null
iterate_verschiebung_coeff (x : 𝕎 R) (n k : ℕ) : (verschiebung^[n] x).coeff (k + n) = x.coeff k := by induction n with | zero => simp | succ k ih => rw [iterate_succ_apply', Nat.add_succ, verschiebung_coeff_succ]; exact ih
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
iterate_verschiebung_coeff
null
iterate_verschiebung_mul_left (x y : 𝕎 R) (i : ℕ) : verschiebung^[i] x * y = verschiebung^[i] (x * frobenius^[i] y) := by induction i generalizing y with | zero => simp | succ i ih => rw [iterate_succ_apply', ← verschiebung_mul_frobenius, ih, iterate_succ_apply', iterate_succ_apply]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
iterate_verschiebung_mul_left
null
iterate_verschiebung_mul (x y : 𝕎 R) (i j : ℕ) : verschiebung^[i] x * verschiebung^[j] y = verschiebung^[i + j] (frobenius^[j] x * frobenius^[i] y) := by calc _ = verschiebung^[i] (x * frobenius^[i] (verschiebung^[j] y)) := ?_ _ = verschiebung^[i] (x * verschiebung^[j] (frobenius^[i] y)) := ?_ _ = verschiebung^[i] (verschiebung^[j] (frobenius^[i] y) * x) := ?_ _ = verschiebung^[i] (verschiebung^[j] (frobenius^[i] y * frobenius^[j] x)) := ?_ _ = verschiebung^[i + j] (frobenius^[i] y * frobenius^[j] x) := ?_ _ = _ := ?_ · apply iterate_verschiebung_mul_left · rw [verschiebung_frobenius_comm.iterate_iterate] · rw [mul_comm] · rw [iterate_verschiebung_mul_left] · rw [iterate_add_apply] · rw [mul_comm]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
iterate_verschiebung_mul
null
iterate_frobenius_coeff (x : 𝕎 R) (i k : ℕ) : (frobenius^[i] x).coeff k = x.coeff k ^ p ^ i := by induction i with | zero => simp | succ i ih => rw [iterate_succ_apply', coeff_frobenius_charP, ih]; ring_nf
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
iterate_frobenius_coeff
null
iterate_verschiebung_mul_coeff (x y : 𝕎 R) (i j : ℕ) : (verschiebung^[i] x * verschiebung^[j] y).coeff (i + j) = x.coeff 0 ^ p ^ j * y.coeff 0 ^ p ^ i := by calc _ = (verschiebung^[i + j] (frobenius^[j] x * frobenius^[i] y)).coeff (i + j) := ?_ _ = (frobenius^[j] x * frobenius^[i] y).coeff 0 := ?_ _ = (frobenius^[j] x).coeff 0 * (frobenius^[i] y).coeff 0 := ?_ _ = _ := ?_ · rw [iterate_verschiebung_mul] · convert iterate_verschiebung_coeff (p := p) (R := R) _ _ _ using 2 rw [zero_add] · apply mul_coeff_zero · simp only [iterate_frobenius_coeff]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
iterate_verschiebung_mul_coeff
This is a slightly specialized form of [Hazewinkel, *Witt Vectors*][Haze09] 6.2 equation 5.
iterate_verschiebung_iterate_frobenius (x : 𝕎 R) (n : ℕ) : verschiebung^[n] (frobenius^[n] x) = x * (p ^ n) := by rw [← comp_apply (f := verschiebung^[n]), ← Function.Commute.comp_iterate verschiebung_frobenius_comm] induction n with | zero => simp | succ n ih => rw [iterate_succ_apply', ih, pow_succ, comp_apply, verschiebung_frobenius, mul_assoc]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Frobenius", "Mathlib.RingTheory.WittVector.Verschiebung", "Mathlib.RingTheory.WittVector.MulP" ]
Mathlib/RingTheory/WittVector/Identities.lean
iterate_verschiebung_iterate_frobenius
null
select (P : ℕ → Prop) (x : 𝕎 R) : 𝕎 R := mk p fun n => if P n then x.coeff n else 0
def
RingTheory
[ "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/InitTail.lean
select
`WittVector.select P x`, for a predicate `P : ℕ → Prop` is the Witt vector whose `n`-th coefficient is `x.coeff n` if `P n` is true, and `0` otherwise.
selectPoly (n : ℕ) : MvPolynomial ℕ ℤ := if P n then X n else 0
def
RingTheory
[ "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/InitTail.lean
selectPoly
The polynomial that witnesses that `WittVector.select` is a polynomial function. `selectPoly n` is `X n` if `P n` holds, and `0` otherwise.
coeff_select (x : 𝕎 R) (n : ℕ) : (select P x).coeff n = aeval x.coeff (selectPoly P n) := by dsimp [select, selectPoly] split_ifs with hi <;> simp
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/InitTail.lean
coeff_select
null
select_isPoly {P : ℕ → Prop} : IsPoly p fun _ _ x => select P x := by use selectPoly P rintro R _Rcr x funext i apply coeff_select variable [hp : Fact p.Prime]
instance
RingTheory
[ "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/InitTail.lean
select_isPoly
null
select_add_select_not : ∀ x : 𝕎 R, select P x + select (fun i => ¬P i) x = x := by have : IsPoly p fun {R} [CommRing R] x ↦ select P x + select (fun i ↦ ¬P i) x := IsPoly₂.diag (hf := IsPoly₂.comp) ghost_calc x intro n simp only [RingHom.map_add] suffices (bind₁ (selectPoly P)) (wittPolynomial p ℤ n) + (bind₁ (selectPoly fun i => ¬P i)) (wittPolynomial p ℤ n) = wittPolynomial p ℤ n by apply_fun aeval x.coeff at this simpa only [map_add, aeval_bind₁, ← coeff_select] simp only [wittPolynomial_eq_sum_C_mul_X_pow, selectPoly, map_sum, map_pow, map_mul, bind₁_X_right, bind₁_C_right, ← Finset.sum_add_distrib, ← mul_add] apply Finset.sum_congr rfl refine fun m _ => mul_eq_mul_left_iff.mpr (Or.inl ?_) rw [ite_pow, zero_pow (pow_ne_zero _ hp.out.ne_zero)] by_cases Pm : P m · rw [if_pos Pm, if_neg <| not_not_intro Pm, zero_pow Fin.pos'.ne', add_zero] · rwa [if_neg Pm, if_pos, zero_add]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/InitTail.lean
select_add_select_not
null
coeff_add_of_disjoint (x y : 𝕎 R) (h : ∀ n, x.coeff n = 0 ∨ y.coeff n = 0) : (x + y).coeff n = x.coeff n + y.coeff n := by let P : ℕ → Prop := fun n => y.coeff n = 0 haveI : DecidablePred P := Classical.decPred P set z := mk p fun n => if P n then x.coeff n else y.coeff n have hx : select P z = x := by ext1 n; rw [select, coeff_mk, coeff_mk] split_ifs with hn · rfl · rw [(h n).resolve_right hn] have hy : select (fun i => ¬P i) z = y := by ext1 n; rw [select, coeff_mk, coeff_mk] split_ifs with hn · exact hn.symm · rfl calc (x + y).coeff n = z.coeff n := by rw [← hx, ← hy, select_add_select_not P z] _ = x.coeff n + y.coeff n := by simp only [z, mk.eq_1] split_ifs with y0 · rw [y0, add_zero] · rw [h n |>.resolve_right y0, zero_add]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/InitTail.lean
coeff_add_of_disjoint
null
init (n : ℕ) : 𝕎 R → 𝕎 R := select fun i => i < n
def
RingTheory
[ "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/InitTail.lean
init
`WittVector.init n x` is the Witt vector of which the first `n` coefficients are those from `x` and all other coefficients are `0`. See `WittVector.tail` for the complementary part.
tail (n : ℕ) : 𝕎 R → 𝕎 R := select fun i => n ≤ i @[simp]
def
RingTheory
[ "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/InitTail.lean
tail
`WittVector.tail n x` is the Witt vector of which the first `n` coefficients are `0` and all other coefficients are those from `x`. See `WittVector.init` for the complementary part.
init_add_tail (x : 𝕎 R) (n : ℕ) : init n x + tail n x = x := by simp only [init, tail, ← not_lt, select_add_select_not]
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/InitTail.lean
init_add_tail
null
init_isPoly (n : ℕ) : IsPoly p fun _ _ => init n := select_isPoly (P := fun i => i < n)
theorem
RingTheory
[ "Mathlib.RingTheory.WittVector.Basic", "Mathlib.RingTheory.WittVector.IsPoly" ]
Mathlib/RingTheory/WittVector/InitTail.lean
init_isPoly
`init_ring` is an auxiliary tactic that discharges goals factoring `init` over ring operations. -/ syntax (name := initRing) "init_ring" (" using " term)? : tactic -- Porting note: this tactic requires that we turn hygiene off (note the free `n`). -- TODO: make this tactic hygienic. open Lean Elab Tactic in elab_rules : tactic | `(tactic| init_ring $[ using $a:term]?) => withMainContext <| set_option hygiene false in do evalTactic <|← `(tactic|( rw [WittVector.ext_iff] intro i simp only [WittVector.init, WittVector.select, WittVector.coeff_mk] split_ifs with hi <;> try {rfl} )) if let some e := a then evalTactic <|← `(tactic|( simp only [WittVector.add_coeff, WittVector.mul_coeff, WittVector.neg_coeff, WittVector.sub_coeff, WittVector.nsmul_coeff, WittVector.zsmul_coeff, WittVector.pow_coeff] apply MvPolynomial.eval₂Hom_congr' (RingHom.ext_int _ _) _ rfl rintro ⟨b, k⟩ h - replace h := $e:term p _ h simp only [Finset.mem_range, Finset.mem_product, true_and, Finset.mem_univ] at h have hk : k < n := by omega fin_cases b <;> simp only [Function.uncurry, Matrix.cons_val_zero, Matrix.head_cons, WittVector.coeff_mk, Matrix.cons_val_one, WittVector.mk, Fin.mk_zero, Matrix.cons_val', Matrix.empty_val', Matrix.cons_val_fin_one, Matrix.cons_val_zero, hk, if_true] )) @[simp] theorem init_init (x : 𝕎 R) (n : ℕ) : init n (init n x) = init n x := by init_ring section variable [Fact p.Prime] theorem init_add (x y : 𝕎 R) (n : ℕ) : init n (x + y) = init n (init n x + init n y) := by init_ring using wittAdd_vars theorem init_mul (x y : 𝕎 R) (n : ℕ) : init n (x * y) = init n (init n x * init n y) := by init_ring using wittMul_vars theorem init_neg (x : 𝕎 R) (n : ℕ) : init n (-x) = init n (-init n x) := by init_ring using wittNeg_vars theorem init_sub (x y : 𝕎 R) (n : ℕ) : init n (x - y) = init n (init n x - init n y) := by init_ring using wittSub_vars theorem init_nsmul (m : ℕ) (x : 𝕎 R) (n : ℕ) : init n (m • x) = init n (m • init n x) := by init_ring using fun p [Fact (Nat.Prime p)] n => wittNSMul_vars p m n theorem init_zsmul (m : ℤ) (x : 𝕎 R) (n : ℕ) : init n (m • x) = init n (m • init n x) := by init_ring using fun p [Fact (Nat.Prime p)] n => wittZSMul_vars p m n theorem init_pow (m : ℕ) (x : 𝕎 R) (n : ℕ) : init n (x ^ m) = init n (init n x ^ m) := by init_ring using fun p [Fact (Nat.Prime p)] n => wittPow_vars p m n end section variable (p) /-- `WittVector.init n x` is polynomial in the coefficients of `x`.
FractionRing.frobenius : K(p, k) ≃+* K(p, k) := IsFractionRing.ringEquivOfRingEquiv (frobeniusEquiv p k)
def
RingTheory
[ "Mathlib.RingTheory.WittVector.FrobeniusFractionField" ]
Mathlib/RingTheory/WittVector/Isocrystal.lean
FractionRing.frobenius
The fraction ring of the space of `p`-Witt vectors on `k` -/ scoped[Isocrystal] notation "K(" p ", " k ")" => FractionRing (WittVector p k) open Isocrystal section PerfectRing variable [IsDomain k] [CharP k p] [PerfectRing k p] /-! ### Frobenius-linear maps -/ /-- The Frobenius automorphism of `k` induces an automorphism of `K`.
FractionRing.frobeniusRingHom : K(p, k) →+* K(p, k) := FractionRing.frobenius p k @[inherit_doc] scoped[Isocrystal] notation "φ(" p ", " k ")" => WittVector.FractionRing.frobeniusRingHom p k
def
RingTheory
[ "Mathlib.RingTheory.WittVector.FrobeniusFractionField" ]
Mathlib/RingTheory/WittVector/Isocrystal.lean
FractionRing.frobeniusRingHom
The Frobenius automorphism of `k` induces an endomorphism of `K`. For notation purposes. Notation `φ(p, k)` in the `Isocrystal` namespace.
inv_pair₁ : RingHomInvPair φ(p, k) (FractionRing.frobenius p k).symm := RingHomInvPair.of_ringEquiv (FractionRing.frobenius p k)
instance
RingTheory
[ "Mathlib.RingTheory.WittVector.FrobeniusFractionField" ]
Mathlib/RingTheory/WittVector/Isocrystal.lean
inv_pair₁
null
inv_pair₂ : RingHomInvPair ((FractionRing.frobenius p k).symm : K(p, k) →+* K(p, k)) (FractionRing.frobenius p k) := RingHomInvPair.of_ringEquiv (FractionRing.frobenius p k).symm
instance
RingTheory
[ "Mathlib.RingTheory.WittVector.FrobeniusFractionField" ]
Mathlib/RingTheory/WittVector/Isocrystal.lean
inv_pair₂
null