def
Hex.TSeries.compHorner
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
(a b : TSeries R n)
:
TSeries R n
The reference Horner composition.
Equations
- a.compHorner b = Hex.TSeries.compHornerUpTo✝ n a b
Instances For
def
Hex.TSeries.compBrentKungUpTo
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
(m : Nat)
(a b : TSeries R n)
:
TSeries R n
Brent--Kung composition computed only below precision m.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Hex.TSeries.compBrentKung
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
(a b : TSeries R n)
:
TSeries R n
Full-precision Brent--Kung composition.
Equations
- a.compBrentKung b = Hex.TSeries.compBrentKungUpTo n a b
Instances For
def
Hex.TSeries.compUpTo
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
(m : Nat)
(a b : TSeries R n)
:
TSeries R n
Bounded composition used by Newton reversion.
Equations
- Hex.TSeries.compUpTo m a b = Hex.TSeries.compBrentKungUpTo m a b
Instances For
def
Hex.TSeries.comp
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
(a b : TSeries R n)
:
TSeries R n
Substitute b into a, using Brent--Kung composition.
Equations
- a.comp b = Hex.TSeries.compUpTo n a b
Instances For
theorem
Hex.TSeries.compHorner_spec
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
(a b : TSeries R n)
:
a.compHorner b = List.foldl (fun (acc : TSeries R n) (k : Nat) => acc + C (a.coeff k) * b.pow k) 0 (List.range n)
Horner composition is the finite coefficient-scaled power sum.
theorem
Hex.TSeries.comp_eq_horner
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
(a b : TSeries R n)
(h : b.coeff 0 = 0)
:
Brent--Kung and Horner agree under the zero-constant substitution condition.
theorem
Hex.TSeries.comp_spec
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
(a b : TSeries R n)
(h : b.coeff 0 = 0)
:
Composition is the finite truncated sum of coefficient-scaled powers.
@[simp]
Substituting x leaves a series unchanged.
@[simp]
theorem
Hex.TSeries.comp_zero
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
(b : TSeries R n)
(h : b.coeff 0 = 0)
:
Substituting into the zero series gives zero.
@[simp]
theorem
Hex.TSeries.comp_zero_right
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
(a : TSeries R n)
:
Substitution of zero extracts the outer constant coefficient.
@[simp]
theorem
Hex.TSeries.comp_one
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
(b : TSeries R n)
(h : b.coeff 0 = 0)
:
Substituting into the one series gives one.
theorem
Hex.TSeries.Agree.compUpTo
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
(p : Nat)
(a b : TSeries R n)
(h : b.coeff 0 = 0)
:
Agree p (TSeries.compUpTo p a b) (a.comp b)
Bounded substitution agrees with full substitution throughout its work prefix.