File: Mathlib/RingTheory/PowerSeries/Trunc.lean

full_name: PowerSeries.trunc
code: /-- The `n`th truncation of a formal power series to a polynomial -/
def trunc (n : ℕ) (φ : R⟦X⟧) : R[X] 
goal: Polynomial R

full_name: PowerSeries.coeff_trunc
code: theorem coeff_trunc (m) (n) (φ : R⟦X⟧) :
    (trunc n φ).coeff m = if m < n then coeff R m φ else 0 
goal: (PowerSeries.trunc n φ).coeff m = if m < n then (PowerSeries.coeff R m) φ else 0

full_name: PowerSeries.trunc_zero
code: @[simp]
theorem trunc_zero (n) : trunc n (0 : R⟦X⟧) = 0 
goal: PowerSeries.trunc n 0 = 0

full_name: PowerSeries.trunc_one
code: @[simp]
theorem trunc_one (n) : trunc (n + 1) (1 : R⟦X⟧) = 1 
goal: PowerSeries.trunc (n + 1) 1 = 1

full_name: PowerSeries.trunc_C
code: @[simp]
theorem trunc_C (n) (a : R) : trunc (n + 1) (C R a) = Polynomial.C a 
goal: PowerSeries.trunc (n + 1) ((PowerSeries.C R) a) = Polynomial.C a

full_name: PowerSeries.trunc_add
code: @[simp]
theorem trunc_add (n) (φ ψ : R⟦X⟧) : trunc n (φ + ψ) = trunc n φ + trunc n ψ 
goal: PowerSeries.trunc n (φ + ψ) = PowerSeries.trunc n φ + PowerSeries.trunc n ψ

full_name: PowerSeries.trunc_succ
code: theorem trunc_succ (f : R⟦X⟧) (n : ℕ) :
    trunc n.succ f = trunc n f + Polynomial.monomial n (coeff R n f) 
goal: PowerSeries.trunc n.succ f = PowerSeries.trunc n f + (Polynomial.monomial n) ((PowerSeries.coeff R n) f)

full_name: PowerSeries.natDegree_trunc_lt
code: theorem natDegree_trunc_lt (f : R⟦X⟧) (n) : (trunc (n + 1) f).natDegree < n + 1 
goal: (PowerSeries.trunc (n + 1) f).natDegree < n + 1

full_name: PowerSeries.trunc_zero'
code: @[simp] lemma trunc_zero' {f : R⟦X⟧} : trunc 0 f = 0 
goal: PowerSeries.trunc 0 f = 0

full_name: PowerSeries.degree_trunc_lt
code: theorem degree_trunc_lt (f : R⟦X⟧) (n) : (trunc n f).degree < n 
goal: (PowerSeries.trunc n f).degree < ↑n

full_name: PowerSeries.eval₂_trunc_eq_sum_range
code: theorem eval₂_trunc_eq_sum_range {S : Type*} [Semiring S] (s : S) (G : R →+* S) (n) (f : R⟦X⟧) :
    (trunc n f).eval₂ G s = ∑ i ∈ range n, G (coeff R i f) * s ^ i 
goal: Polynomial.eval₂ G s (PowerSeries.trunc n f) = ∑ i ∈ Finset.range n, G ((PowerSeries.coeff R i) f) * s ^ i

full_name: PowerSeries.trunc_X
code: @[simp] theorem trunc_X (n) : trunc (n + 2) X = (Polynomial.X : R[X]) 
goal: PowerSeries.trunc (n + 2) PowerSeries.X = Polynomial.X

full_name: PowerSeries.trunc_X_of
code: lemma trunc_X_of {n : ℕ} (hn : 2 ≤ n) : trunc n X = (Polynomial.X : R[X]) 
goal: PowerSeries.trunc n PowerSeries.X = Polynomial.X

full_name: PowerSeries.trunc_trunc_of_le
code: theorem trunc_trunc_of_le {n m} (f : R⟦X⟧) (hnm : n ≤ m := by rfl) :
    trunc n ↑(trunc m f) = trunc n f 
goal: PowerSeries.trunc n ↑(PowerSeries.trunc m f) = PowerSeries.trunc n f

full_name: PowerSeries.trunc_trunc
code: @[simp] theorem trunc_trunc {n} (f : R⟦X⟧) : trunc n ↑(trunc n f) = trunc n f 
goal: PowerSeries.trunc n ↑(PowerSeries.trunc n f) = PowerSeries.trunc n f

full_name: PowerSeries.trunc_trunc_mul
code: @[simp] theorem trunc_trunc_mul {n} (f g : R ⟦X⟧) :
    trunc n ((trunc n f) * g : R⟦X⟧) = trunc n (f * g) 
goal: PowerSeries.trunc n (↑(PowerSeries.trunc n f) * g) = PowerSeries.trunc n (f * g)

full_name: PowerSeries.trunc_mul_trunc
code: @[simp] theorem trunc_mul_trunc {n} (f g : R ⟦X⟧) :
    trunc n (f * (trunc n g) : R⟦X⟧) = trunc n (f * g) 
goal: PowerSeries.trunc n (f * ↑(PowerSeries.trunc n g)) = PowerSeries.trunc n (f * g)

full_name: PowerSeries.trunc_trunc_mul_trunc
code: theorem trunc_trunc_mul_trunc {n} (f g : R⟦X⟧) :
    trunc n (trunc n f * trunc n g : R⟦X⟧) = trunc n (f * g) 
goal: PowerSeries.trunc n (↑(PowerSeries.trunc n f) * ↑(PowerSeries.trunc n g)) = PowerSeries.trunc n (f * g)

full_name: PowerSeries.trunc_trunc_pow
code: @[simp] theorem trunc_trunc_pow (f : R⟦X⟧) (n a : ℕ) :
    trunc n ((trunc n f : R⟦X⟧) ^ a) = trunc n (f ^ a) 
goal: PowerSeries.trunc n (↑(PowerSeries.trunc n f) ^ a) = PowerSeries.trunc n (f ^ a)

full_name: PowerSeries.trunc_coe_eq_self
code: theorem trunc_coe_eq_self {n} {f : R[X]} (hn : natDegree f < n) : trunc n (f : R⟦X⟧) = f 
goal: PowerSeries.trunc n ↑f = f

full_name: PowerSeries.coeff_coe_trunc_of_lt
code: /-- The function `coeff n : R⟦X⟧ → R` is continuous. I.e. `coeff n f` depends only on a sufficiently
long truncation of the power series `f`. -/
theorem coeff_coe_trunc_of_lt {n m} {f : R⟦X⟧} (h : n < m) :
    coeff R n (trunc m f) = coeff R n f 
goal: (PowerSeries.coeff R n) ↑(PowerSeries.trunc m f) = (PowerSeries.coeff R n) f

full_name: PowerSeries.coeff_mul_eq_coeff_trunc_mul_trunc₂
code: /-- The `n`-th coefficient of `f*g` may be calculated
from the truncations of `f` and `g`. -/
theorem coeff_mul_eq_coeff_trunc_mul_trunc₂ {n a b} (f g) (ha : n < a) (hb : n < b) :
    coeff R n (f * g) = coeff R n (trunc a f * trunc b g) 
goal: (PowerSeries.coeff R n) (f * g) = (PowerSeries.coeff R n) (↑(PowerSeries.trunc a f) * ↑(PowerSeries.trunc b g))

full_name: PowerSeries.coeff_mul_eq_coeff_trunc_mul_trunc
code: theorem coeff_mul_eq_coeff_trunc_mul_trunc {d n} (f g) (h : d < n) :
    coeff R d (f * g) = coeff R d (trunc n f * trunc n g) 
goal: (PowerSeries.coeff R d) (f * g) = (PowerSeries.coeff R d) (↑(PowerSeries.trunc n f) * ↑(PowerSeries.trunc n g))