def
Hex.TSeries.sqrtStep
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
(a : TSeries R n)
(halfInv : R)
(z : TSeries R n)
(m : Nat)
:
TSeries R n
One bounded inverse-square-root Newton update.
Equations
- a.sqrtStep halfInv z m = Hex.TSeries.mulUpTo m (Hex.TSeries.mulUpTo m z (Hex.TSeries.C (1 + 1 + 1) - Hex.TSeries.mulUpTo m a (Hex.TSeries.mulUpTo m z z))) (Hex.TSeries.C halfInv)
Instances For
def
Hex.TSeries.sqrtUpTo
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
(m : Nat)
(a : TSeries R n)
(r v : R)
:
TSeries R n
Lift the supplied root through a bounded precision.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Hex.TSeries.sqrtOfRoot
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
(a : TSeries R n)
(r v : R)
:
TSeries R n
The square root of a above r, given a witness inverting 2*r.
Equations
- a.sqrtOfRoot r v = Hex.TSeries.sqrtUpTo n a r v
Instances For
def
Hex.TSeries.sqrt?
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
[DecidableEq R]
[UnitOps R]
(a : TSeries R n)
(r : R)
:
Check the supplied constant root and look up the inverse needed to lift it.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Hex.TSeries.sqrtUpTo_agree
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
(m : Nat)
(a : TSeries R n)
(r v : R)
(hr : r * r = a.coeff 0)
(hv : (1 + 1) * r * v = 1)
:
Agree m (sqrtUpTo m a r v) (a.sqrtOfRoot r v)
Bounded square-root lifting agrees with the full lift throughout the requested prefix.
theorem
Hex.TSeries.sqrt?_isSome_iff
{R : Type u}
{n : Nat}
[Lean.Grind.CommRing R]
[DecidableEq R]
[UnitOps R]
[LawfulUnitOps R]
(a : TSeries R n)
(r : R)
:
Optional square-root lifting has the precision-sensitive success condition required by the zero and one coefficient cases.