File: Mathlib/RingTheory/WittVector/Defs.lean

full_name: WittVector
code: /-- `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]`. -/
structure 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
goal: Type u_1

full_name: WittVector.coeff
code: /-- `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]`. -/
structure 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
goal: ℕ → R

full_name: WittVector.mk'
code: /-- `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]`. -/
structure 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
goal: 𝕎 R

full_name: WittVector.mk
code: /-- Construct a Witt vector `mk p x : 𝕎 R` from a sequence `x` of elements of `R`. -/
def WittVector.mk (p : ℕ) {R : Type*} (coeff : ℕ → R) : WittVector p R 
goal: 𝕎 R

full_name: _aux_Mathlib_RingTheory_WittVector_Defs___unexpand_WittVector_1
code: local notation "𝕎" => WittVector p
goal: Lean.PrettyPrinter.Unexpander

full_name: _aux_Mathlib_RingTheory_WittVector_Defs___macroRules_term𝕎_1
code: local notation "𝕎" => WittVector p
goal: Lean.Macro

full_name: WittVector.ext
code: @[ext]
theorem ext {x y : 𝕎 R} (h : ∀ n, x.coeff n = y.coeff n) : x = y 
goal: x = y

full_name: WittVector.ext_iff
code: theorem ext_iff {x y : 𝕎 R} : x = y ↔ ∀ n, x.coeff n = y.coeff n 
goal: x = y ↔ ∀ (n : ℕ), x.coeff n = y.coeff n

full_name: WittVector.coeff_mk
code: theorem coeff_mk (x : ℕ → R) : (mk p x).coeff = x 
goal: (WittVector.mk p x).coeff = x

full_name: WittVector.instFunctor
code: instance : Functor (WittVector p) 
goal: Functor 𝕎

full_name: WittVector.instLawfulFunctor
code: instance : LawfulFunctor (WittVector p) 
goal: LawfulFunctor 𝕎

full_name: WittVector.wittZero
code: /-- The polynomials used for defining the element `0` of the ring of Witt vectors. -/
def wittZero : ℕ → MvPolynomial (Fin 0 × ℕ) ℤ 
goal: ℕ → MvPolynomial (Fin 0 × ℕ) ℤ

full_name: WittVector.wittOne
code: /-- The polynomials used for defining the element `1` of the ring of Witt vectors. -/
def wittOne : ℕ → MvPolynomial (Fin 0 × ℕ) ℤ 
goal: ℕ → MvPolynomial (Fin 0 × ℕ) ℤ

full_name: WittVector.wittAdd
code: /-- The polynomials used for defining the addition of the ring of Witt vectors. -/
def wittAdd : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ 
goal: ℕ → MvPolynomial (Fin 2 × ℕ) ℤ

full_name: WittVector.wittNSMul
code: /-- The polynomials used for defining repeated addition of the ring of Witt vectors. -/
def wittNSMul (n : ℕ) : ℕ → MvPolynomial (Fin 1 × ℕ) ℤ 
goal: ℕ → MvPolynomial (Fin 1 × ℕ) ℤ

full_name: WittVector.wittZSMul
code: /-- The polynomials used for defining repeated addition of the ring of Witt vectors. -/
def wittZSMul (n : ℤ) : ℕ → MvPolynomial (Fin 1 × ℕ) ℤ 
goal: ℕ → MvPolynomial (Fin 1 × ℕ) ℤ

full_name: WittVector.wittSub
code: /-- The polynomials used for describing the subtraction of the ring of Witt vectors. -/
def wittSub : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ 
goal: ℕ → MvPolynomial (Fin 2 × ℕ) ℤ

full_name: WittVector.wittMul
code: /-- The polynomials used for defining the multiplication of the ring of Witt vectors. -/
def wittMul : ℕ → MvPolynomial (Fin 2 × ℕ) ℤ 
goal: ℕ → MvPolynomial (Fin 2 × ℕ) ℤ

full_name: WittVector.wittNeg
code: /-- The polynomials used for defining the negation of the ring of Witt vectors. -/
def wittNeg : ℕ → MvPolynomial (Fin 1 × ℕ) ℤ 
goal: ℕ → MvPolynomial (Fin 1 × ℕ) ℤ

full_name: WittVector.wittPow
code: /-- The polynomials used for defining repeated addition of the ring of Witt vectors. -/
def wittPow (n : ℕ) : ℕ → MvPolynomial (Fin 1 × ℕ) ℤ 
goal: ℕ → MvPolynomial (Fin 1 × ℕ) ℤ

full_name: WittVector.peval
code: /-- 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. -/
def peval {k : ℕ} (φ : MvPolynomial (Fin k × ℕ) ℤ) (x : Fin k → ℕ → R) : R 
goal: R

full_name: WittVector.eval
code: /-- 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₁`.
-/
def eval {k : ℕ} (φ : ℕ → MvPolynomial (Fin k × ℕ) ℤ) (x : Fin k → 𝕎 R) : 𝕎 R 
goal: 𝕎 R

full_name: WittVector.instZero
code: instance : Zero (𝕎 R) 
goal: Zero (𝕎 R)

full_name: WittVector.instInhabited
code: instance : Inhabited (𝕎 R) 
goal: Inhabited (𝕎 R)

full_name: WittVector.instOne
code: instance : One (𝕎 R) 
goal: One (𝕎 R)

full_name: WittVector.instAdd
code: instance : Add (𝕎 R) 
goal: Add (𝕎 R)

full_name: WittVector.instSub
code: instance : Sub (𝕎 R) 
goal: Sub (𝕎 R)

full_name: WittVector.hasNatScalar
code: instance hasNatScalar : SMul ℕ (𝕎 R) 
goal: SMul ℕ (𝕎 R)

full_name: WittVector.hasIntScalar
code: instance hasIntScalar : SMul ℤ (𝕎 R) 
goal: SMul ℤ (𝕎 R)

full_name: WittVector.instMul
code: instance : Mul (𝕎 R) 
goal: Mul (𝕎 R)

full_name: WittVector.instNeg
code: instance : Neg (𝕎 R) 
goal: Neg (𝕎 R)

full_name: WittVector.hasNatPow
code: instance hasNatPow : Pow (𝕎 R) ℕ 
goal: Pow (𝕎 R) ℕ

full_name: WittVector.instNatCast
code: instance : NatCast (𝕎 R) 
goal: NatCast (𝕎 R)

full_name: WittVector.instIntCast
code: instance : IntCast (𝕎 R) 
goal: IntCast (𝕎 R)

full_name: WittVector.wittZero_eq_zero
code: @[simp]
theorem wittZero_eq_zero (n : ℕ) : wittZero p n = 0 
goal: WittVector.wittZero p n = 0

full_name: WittVector.wittOne_zero_eq_one
code: @[simp]
theorem wittOne_zero_eq_one : wittOne p 0 = 1 
goal: WittVector.wittOne p 0 = 1

full_name: WittVector.wittOne_pos_eq_zero
code: @[simp]
theorem wittOne_pos_eq_zero (n : ℕ) (hn : 0 < n) : wittOne p n = 0 
goal: WittVector.wittOne p n = 0

full_name: WittVector.wittAdd_zero
code: @[simp]
theorem wittAdd_zero : wittAdd p 0 = X (0, 0) + X (1, 0) 
goal: WittVector.wittAdd p 0 = MvPolynomial.X (0, 0) + MvPolynomial.X (1, 0)

full_name: WittVector.wittSub_zero
code: @[simp]
theorem wittSub_zero : wittSub p 0 = X (0, 0) - X (1, 0) 
goal: WittVector.wittSub p 0 = MvPolynomial.X (0, 0) - MvPolynomial.X (1, 0)

full_name: WittVector.wittMul_zero
code: @[simp]
theorem wittMul_zero : wittMul p 0 = X (0, 0) * X (1, 0) 
goal: WittVector.wittMul p 0 = MvPolynomial.X (0, 0) * MvPolynomial.X (1, 0)

full_name: WittVector.wittNeg_zero
code: @[simp]
theorem wittNeg_zero : wittNeg p 0 = -X (0, 0) 
goal: WittVector.wittNeg p 0 = -MvPolynomial.X (0, 0)

full_name: WittVector.constantCoeff_wittAdd
code: @[simp]
theorem constantCoeff_wittAdd (n : ℕ) : constantCoeff (wittAdd p n) = 0 
goal: MvPolynomial.constantCoeff (WittVector.wittAdd p n) = 0

full_name: WittVector.constantCoeff_wittSub
code: @[simp]
theorem constantCoeff_wittSub (n : ℕ) : constantCoeff (wittSub p n) = 0 
goal: MvPolynomial.constantCoeff (WittVector.wittSub p n) = 0

full_name: WittVector.constantCoeff_wittMul
code: @[simp]
theorem constantCoeff_wittMul (n : ℕ) : constantCoeff (wittMul p n) = 0 
goal: MvPolynomial.constantCoeff (WittVector.wittMul p n) = 0

full_name: WittVector.constantCoeff_wittNeg
code: @[simp]
theorem constantCoeff_wittNeg (n : ℕ) : constantCoeff (wittNeg p n) = 0 
goal: MvPolynomial.constantCoeff (WittVector.wittNeg p n) = 0

full_name: WittVector.constantCoeff_wittNSMul
code: @[simp]
theorem constantCoeff_wittNSMul (m : ℕ) (n : ℕ) : constantCoeff (wittNSMul p m n) = 0 
goal: MvPolynomial.constantCoeff (WittVector.wittNSMul p m n) = 0

full_name: WittVector.constantCoeff_wittZSMul
code: @[simp]
theorem constantCoeff_wittZSMul (z : ℤ) (n : ℕ) : constantCoeff (wittZSMul p z n) = 0 
goal: MvPolynomial.constantCoeff (WittVector.wittZSMul p z n) = 0

full_name: WittVector.zero_coeff
code: @[simp]
theorem zero_coeff (n : ℕ) : (0 : 𝕎 R).coeff n = 0 
goal: WittVector.coeff 0 n = 0

full_name: WittVector.one_coeff_zero
code: @[simp]
theorem one_coeff_zero : (1 : 𝕎 R).coeff 0 = 1 
goal: WittVector.coeff 1 0 = 1

full_name: WittVector.one_coeff_eq_of_pos
code: @[simp]
theorem one_coeff_eq_of_pos (n : ℕ) (hn : 0 < n) : coeff (1 : 𝕎 R) n = 0 
goal: WittVector.coeff 1 n = 0

full_name: WittVector.v2_coeff
code: @[simp]
theorem v2_coeff {p' R'} (x y : WittVector p' R') (i : Fin 2) :
    (![x, y] i).coeff = ![x.coeff, y.coeff] i 
goal: (![x, y] i).coeff = ![x.coeff, y.coeff] i

full_name: WittVector.add_coeff
code: theorem add_coeff (x y : 𝕎 R) (n : ℕ) :
    (x + y).coeff n = peval (wittAdd p n) ![x.coeff, y.coeff] 
goal: (x + y).coeff n = WittVector.peval (WittVector.wittAdd p n) ![x.coeff, y.coeff]

full_name: WittVector.sub_coeff
code: theorem sub_coeff (x y : 𝕎 R) (n : ℕ) :
    (x - y).coeff n = peval (wittSub p n) ![x.coeff, y.coeff] 
goal: (x - y).coeff n = WittVector.peval (WittVector.wittSub p n) ![x.coeff, y.coeff]

full_name: WittVector.mul_coeff
code: theorem mul_coeff (x y : 𝕎 R) (n : ℕ) :
    (x * y).coeff n = peval (wittMul p n) ![x.coeff, y.coeff] 
goal: (x * y).coeff n = WittVector.peval (WittVector.wittMul p n) ![x.coeff, y.coeff]

full_name: WittVector.neg_coeff
code: theorem neg_coeff (x : 𝕎 R) (n : ℕ) : (-x).coeff n = peval (wittNeg p n) ![x.coeff] 
goal: (-x).coeff n = WittVector.peval (WittVector.wittNeg p n) ![x.coeff]

full_name: WittVector.nsmul_coeff
code: theorem nsmul_coeff (m : ℕ) (x : 𝕎 R) (n : ℕ) :
    (m • x).coeff n = peval (wittNSMul p m n) ![x.coeff] 
goal: (m • x).coeff n = WittVector.peval (WittVector.wittNSMul p m n) ![x.coeff]

full_name: WittVector.zsmul_coeff
code: theorem zsmul_coeff (m : ℤ) (x : 𝕎 R) (n : ℕ) :
    (m • x).coeff n = peval (wittZSMul p m n) ![x.coeff] 
goal: (m • x).coeff n = WittVector.peval (WittVector.wittZSMul p m n) ![x.coeff]

full_name: WittVector.pow_coeff
code: theorem pow_coeff (m : ℕ) (x : 𝕎 R) (n : ℕ) :
    (x ^ m).coeff n = peval (wittPow p m n) ![x.coeff] 
goal: (x ^ m).coeff n = WittVector.peval (WittVector.wittPow p m n) ![x.coeff]

full_name: WittVector.add_coeff_zero
code: theorem add_coeff_zero (x y : 𝕎 R) : (x + y).coeff 0 = x.coeff 0 + y.coeff 0 
goal: (x + y).coeff 0 = x.coeff 0 + y.coeff 0

full_name: WittVector.mul_coeff_zero
code: theorem mul_coeff_zero (x y : 𝕎 R) : (x * y).coeff 0 = x.coeff 0 * y.coeff 0 
goal: (x * y).coeff 0 = x.coeff 0 * y.coeff 0

full_name: WittVector.wittAdd_vars
code: theorem wittAdd_vars (n : ℕ) : (wittAdd p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1) 
goal: (WittVector.wittAdd p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1)

full_name: WittVector.wittSub_vars
code: theorem wittSub_vars (n : ℕ) : (wittSub p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1) 
goal: (WittVector.wittSub p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1)

full_name: WittVector.wittMul_vars
code: theorem wittMul_vars (n : ℕ) : (wittMul p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1) 
goal: (WittVector.wittMul p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1)

full_name: WittVector.wittNeg_vars
code: theorem wittNeg_vars (n : ℕ) : (wittNeg p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1) 
goal: (WittVector.wittNeg p n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1)

full_name: WittVector.wittNSMul_vars
code: theorem wittNSMul_vars (m : ℕ) (n : ℕ) :
    (wittNSMul p m n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1) 
goal: (WittVector.wittNSMul p m n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1)

full_name: WittVector.wittZSMul_vars
code: theorem wittZSMul_vars (m : ℤ) (n : ℕ) :
    (wittZSMul p m n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1) 
goal: (WittVector.wittZSMul p m n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1)

full_name: WittVector.wittPow_vars
code: theorem wittPow_vars (m : ℕ) (n : ℕ) : (wittPow p m n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1) 
goal: (WittVector.wittPow p m n).vars ⊆ Finset.univ ×ˢ Finset.range (n + 1)