# Truncated Witt vectors #

The ring of truncated Witt vectors (of length n) is a quotient of the ring of Witt vectors. It retains the first n coefficients of each Witt vector. In this file, we set up the basic quotient API for this ring.

The ring of Witt vectors is the projective limit of all the rings of truncated Witt vectors.

## Main declarations #

• TruncatedWittVector: the underlying type of the ring of truncated Witt vectors
• TruncatedWittVector.instCommRing: the ring structure on truncated Witt vectors
• WittVector.truncate: the quotient homomorphism that truncates a Witt vector, to obtain a truncated Witt vector
• TruncatedWittVector.truncate: the homomorphism that truncates a truncated Witt vector of length n to one of length m (for some m ≤ n)
• WittVector.lift: the unique ring homomorphism into the ring of Witt vectors that is compatible with a family of ring homomorphisms to the truncated Witt vectors: this realizes the ring of Witt vectors as projective limit of the rings of truncated Witt vectors

## References #

• [Hazewinkel, Witt Vectors][Haze09]

• [Commelin and Lewis, Formalizing the Ring of Witt Vectors][CL21]

def TruncatedWittVector :
Type u_2 → Type u_2

A truncated Witt vector over R is a vector of elements of R, i.e., the first n coefficients of a Witt vector. We will define operations on this type that are compatible with the (untruncated) Witt vector operations.

TruncatedWittVector p n R takes a parameter p : ℕ that is not used in the definition. In practice, this number p is assumed to be a prime number, and under this assumption we construct a ring structure on TruncatedWittVector p n R. (TruncatedWittVector p₁ n R and TruncatedWittVector p₂ n R are definitionally equal as types but will have different ring operations.)

Equations
Instances For
instance instInhabitedTruncatedWittVector (p : ) (n : ) (R : Type u_2) [] :
Equations
• = { default := fun (x : Fin n) => default }
def TruncatedWittVector.mk (p : ) {n : } {R : Type u_1} (x : Fin nR) :

Create a TruncatedWittVector from a vector x.

Equations
Instances For
def TruncatedWittVector.coeff {p : } {n : } {R : Type u_1} (i : Fin n) (x : ) :
R

x.coeff i is the ith entry of x.

Equations
• = x i
Instances For
theorem TruncatedWittVector.ext {p : } {n : } {R : Type u_1} {x : } {y : } (h : ∀ (i : Fin n), ) :
x = y
theorem TruncatedWittVector.ext_iff {p : } {n : } {R : Type u_1} {x : } {y : } :
x = y ∀ (i : Fin n),
@[simp]
theorem TruncatedWittVector.coeff_mk {p : } {n : } {R : Type u_1} (x : Fin nR) (i : Fin n) :
= x i
@[simp]
theorem TruncatedWittVector.mk_coeff {p : } {n : } {R : Type u_1} (x : ) :
(TruncatedWittVector.mk p fun (i : Fin n) => ) = x
def TruncatedWittVector.out {p : } {n : } {R : Type u_1} [] (x : ) :

We can turn a truncated Witt vector x into a Witt vector by setting all coefficients after x to be 0.

Equations
Instances For
@[simp]
theorem TruncatedWittVector.coeff_out {p : } {n : } {R : Type u_1} [] (x : ) (i : Fin n) :
x.out.coeff i =
theorem TruncatedWittVector.out_injective {p : } {n : } {R : Type u_1} [] :
Function.Injective TruncatedWittVector.out
def WittVector.truncateFun {p : } (n : ) {R : Type u_1} (x : ) :

truncateFun n x uses the first n entries of x to construct a TruncatedWittVector, which has the same base p as x. This function is bundled into a ring homomorphism in WittVector.truncate

Equations
Instances For
@[simp]
theorem WittVector.coeff_truncateFun {p : } {n : } {R : Type u_1} (x : ) (i : Fin n) :
= x.coeff i
@[simp]
theorem WittVector.out_truncateFun {p : } {n : } {R : Type u_1} [] (x : ) :
().out =
@[simp]
theorem TruncatedWittVector.truncateFun_out {p : } {n : } {R : Type u_1} [] (x : ) :
instance TruncatedWittVector.instZero (p : ) [hp : Fact ()] (n : ) (R : Type u_1) [] :
Zero ()
Equations
• = { zero := }
instance TruncatedWittVector.instOne (p : ) [hp : Fact ()] (n : ) (R : Type u_1) [] :
One ()
Equations
• = { one := }
instance TruncatedWittVector.instNatCast (p : ) [hp : Fact ()] (n : ) (R : Type u_1) [] :
Equations
• = { natCast := fun (i : ) => }
instance TruncatedWittVector.instIntCast (p : ) [hp : Fact ()] (n : ) (R : Type u_1) [] :
Equations
• = { intCast := fun (i : ) => }
instance TruncatedWittVector.instAdd (p : ) [hp : Fact ()] (n : ) (R : Type u_1) [] :
Equations
instance TruncatedWittVector.instMul (p : ) [hp : Fact ()] (n : ) (R : Type u_1) [] :
Mul ()
Equations
instance TruncatedWittVector.instNeg (p : ) [hp : Fact ()] (n : ) (R : Type u_1) [] :
Neg ()
Equations
instance TruncatedWittVector.instSub (p : ) [hp : Fact ()] (n : ) (R : Type u_1) [] :
Sub ()
Equations
instance TruncatedWittVector.hasNatScalar (p : ) [hp : Fact ()] (n : ) (R : Type u_1) [] :
Equations
instance TruncatedWittVector.hasIntScalar (p : ) [hp : Fact ()] (n : ) (R : Type u_1) [] :
Equations
instance TruncatedWittVector.hasNatPow (p : ) [hp : Fact ()] (n : ) (R : Type u_1) [] :
Pow ()
Equations
@[simp]
theorem TruncatedWittVector.coeff_zero (p : ) [hp : Fact ()] (n : ) (R : Type u_1) [] (i : Fin n) :

A macro tactic used to prove that truncateFun respects ring operations.

Equations
Instances For
theorem WittVector.truncateFun_surjective (p : ) (n : ) (R : Type u_1) [] :
@[simp]
theorem WittVector.truncateFun_zero (p : ) [hp : Fact ()] (n : ) (R : Type u_1) [] :
@[simp]
theorem WittVector.truncateFun_one (p : ) [hp : Fact ()] (n : ) (R : Type u_1) [] :
@[simp]
theorem WittVector.truncateFun_add {p : } [hp : Fact ()] (n : ) {R : Type u_1} [] (x : ) (y : ) :
@[simp]
theorem WittVector.truncateFun_mul {p : } [hp : Fact ()] (n : ) {R : Type u_1} [] (x : ) (y : ) :
theorem WittVector.truncateFun_neg {p : } [hp : Fact ()] (n : ) {R : Type u_1} [] (x : ) :
theorem WittVector.truncateFun_sub {p : } [hp : Fact ()] (n : ) {R : Type u_1} [] (x : ) (y : ) :
theorem WittVector.truncateFun_nsmul {p : } [hp : Fact ()] (n : ) {R : Type u_1} [] (m : ) (x : ) :
theorem WittVector.truncateFun_zsmul {p : } [hp : Fact ()] (n : ) {R : Type u_1} [] (m : ) (x : ) :
theorem WittVector.truncateFun_pow {p : } [hp : Fact ()] (n : ) {R : Type u_1} [] (x : ) (m : ) :
theorem WittVector.truncateFun_natCast {p : } [hp : Fact ()] (n : ) {R : Type u_1} [] (m : ) :
= m
@[deprecated WittVector.truncateFun_natCast]
theorem WittVector.truncateFun_nat_cast {p : } [hp : Fact ()] (n : ) {R : Type u_1} [] (m : ) :
= m

Alias of WittVector.truncateFun_natCast.

theorem WittVector.truncateFun_intCast {p : } [hp : Fact ()] (n : ) {R : Type u_1} [] (m : ) :
= m
@[deprecated WittVector.truncateFun_intCast]
theorem WittVector.truncateFun_int_cast {p : } [hp : Fact ()] (n : ) {R : Type u_1} [] (m : ) :
= m

Alias of WittVector.truncateFun_intCast.

instance TruncatedWittVector.instCommRing (p : ) [hp : Fact ()] (n : ) (R : Type u_1) [] :
Equations
noncomputable def WittVector.truncate {p : } [hp : Fact ()] (n : ) {R : Type u_1} [] :

truncate n is a ring homomorphism that truncates x to its first n entries to obtain a TruncatedWittVector, which has the same base p as x.

Equations
• = { toFun := , map_one' := , map_mul' := , map_zero' := , map_add' := }
Instances For
theorem WittVector.truncate_surjective (p : ) [hp : Fact ()] (n : ) (R : Type u_1) [] :
@[simp]
theorem WittVector.coeff_truncate {p : } [hp : Fact ()] {n : } {R : Type u_1} [] (x : ) (i : Fin n) :
= x.coeff i
theorem WittVector.mem_ker_truncate {p : } [hp : Fact ()] (n : ) {R : Type u_1} [] (x : ) :
i < n, x.coeff i = 0
@[simp]
theorem WittVector.truncate_mk' (p : ) [hp : Fact ()] (n : ) {R : Type u_1} [] (f : R) :
{ coeff := f } = TruncatedWittVector.mk p fun (k : Fin n) => f k
def TruncatedWittVector.truncate {p : } [hp : Fact ()] {n : } {R : Type u_1} [] {m : } (hm : n m) :

A ring homomorphism that truncates a truncated Witt vector of length m to a truncated Witt vector of length n, for n ≤ m.

Equations
• = (.liftOfRightInverse TruncatedWittVector.out ) ⟨,
Instances For
@[simp]
theorem TruncatedWittVector.truncate_comp_wittVector_truncate {p : } [hp : Fact ()] {n : } {R : Type u_1} [] {m : } (hm : n m) :
.comp =
@[simp]
theorem TruncatedWittVector.truncate_wittVector_truncate {p : } [hp : Fact ()] {n : } {R : Type u_1} [] {m : } (hm : n m) (x : ) :
( x) = x
@[simp]
theorem TruncatedWittVector.truncate_truncate {p : } [hp : Fact ()] {R : Type u_1} [] {n₁ : } {n₂ : } {n₃ : } (h1 : n₁ n₂) (h2 : n₂ n₃) (x : ) :
@[simp]
theorem TruncatedWittVector.truncate_comp {p : } [hp : Fact ()] {R : Type u_1} [] {n₁ : } {n₂ : } {n₃ : } (h1 : n₁ n₂) (h2 : n₂ n₃) :
theorem TruncatedWittVector.truncate_surjective {p : } [hp : Fact ()] {n : } {R : Type u_1} [] {m : } (hm : n m) :
@[simp]
theorem TruncatedWittVector.coeff_truncate {p : } [hp : Fact ()] {n : } {R : Type u_1} [] {m : } (hm : n m) (i : Fin n) (x : ) :
instance TruncatedWittVector.instFintype {p : } {n : } {R : Type u_2} [] :
Equations
• TruncatedWittVector.instFintype = Pi.fintype
theorem TruncatedWittVector.card (p : ) (n : ) {R : Type u_2} [] :
theorem TruncatedWittVector.iInf_ker_truncate {p : } [hp : Fact ()] {R : Type u_1} [] :
⨅ (i : ), =
def WittVector.liftFun {p : } [hp : Fact ()] {R : Type u_1} [] {S : Type u_2} [] (f : (k : ) → S →+* ) (s : S) :

Given a family fₖ : S → TruncatedWittVector p k R and s : S, we produce a Witt vector by defining the kth entry to be the final entry of fₖ s.

Equations
Instances For
@[simp]
theorem WittVector.truncate_liftFun {p : } [hp : Fact ()] (n : ) {R : Type u_1} [] {S : Type u_2} [] {f : (k : ) → S →+* } (f_compat : ∀ (k₁ k₂ : ) (hk : k₁ k₂), .comp (f k₂) = f k₁) (s : S) :
() = (f n) s
def WittVector.lift {p : } [hp : Fact ()] {R : Type u_1} [] {S : Type u_2} [] (f : (k : ) → S →+* ) (f_compat : ∀ (k₁ k₂ : ) (hk : k₁ k₂), .comp (f k₂) = f k₁) :

Given compatible ring homs from S into TruncatedWittVector n for each n, we can lift these to a ring hom S → 𝕎 R.

lift defines the universal property of 𝕎 R as the inverse limit of TruncatedWittVector n.

Equations
• WittVector.lift f f_compat = { toFun := , map_one' := , map_mul' := , map_zero' := , map_add' := }
Instances For
@[simp]
theorem WittVector.truncate_lift {p : } [hp : Fact ()] (n : ) {R : Type u_1} [] {S : Type u_2} [] {f : (k : ) → S →+* } (f_compat : ∀ (k₁ k₂ : ) (hk : k₁ k₂), .comp (f k₂) = f k₁) (s : S) :
((WittVector.lift (fun (k₂ : ) => f k₂) f_compat) s) = (f n) s
@[simp]
theorem WittVector.truncate_comp_lift {p : } [hp : Fact ()] (n : ) {R : Type u_1} [] {S : Type u_2} [] {f : (k : ) → S →+* } (f_compat : ∀ (k₁ k₂ : ) (hk : k₁ k₂), .comp (f k₂) = f k₁) :
.comp (WittVector.lift (fun (k₂ : ) => f k₂) f_compat) = f n
theorem WittVector.lift_unique {p : } [hp : Fact ()] {R : Type u_1} [] {S : Type u_2} [] {f : (k : ) → S →+* } (f_compat : ∀ (k₁ k₂ : ) (hk : k₁ k₂), .comp (f k₂) = f k₁) (g : S →+* ) (g_compat : ∀ (k : ), .comp g = f k) :
WittVector.lift (fun (k₂ : ) => f k₂) f_compat = g

The uniqueness part of the universal property of 𝕎 R.

@[simp]
theorem WittVector.liftEquiv_symm_apply_coe {p : } [hp : Fact ()] {R : Type u_1} [] {S : Type u_2} [] (g : S →+* ) (k : ) :
(WittVector.liftEquiv.symm g) k = .comp g
@[simp]
theorem WittVector.liftEquiv_apply {p : } [hp : Fact ()] {R : Type u_1} [] {S : Type u_2} [] (f : { f : (k : ) → S →+* // ∀ (k₁ k₂ : ) (hk : k₁ k₂), .comp (f k₂) = f k₁ }) :
WittVector.liftEquiv f =
def WittVector.liftEquiv {p : } [hp : Fact ()] {R : Type u_1} [] {S : Type u_2} [] :
{ f : (k : ) → S →+* // ∀ (k₁ k₂ : ) (hk : k₁ k₂), .comp (f k₂) = f k₁ } (S →+* )

The universal property of 𝕎 R as projective limit of truncated Witt vector rings.

Equations
• One or more equations did not get rendered due to their size.
Instances For
theorem WittVector.hom_ext {p : } [hp : Fact ()] {R : Type u_1} [] {S : Type u_2} [] (g₁ : S →+* ) (g₂ : S →+* ) (h : ∀ (k : ), .comp g₁ = .comp g₂) :
g₁ = g₂