The floor of the square root of n.
Equations
- HexArith.Nat.floorSqrt n = if n = 0 then 0 else HexArith.Nat.sqrtAux✝ n (2 * n.log2 + 1) (HexArith.Nat.sqrtInit✝ n)
Instances For
The least natural number whose square is at least n.
Equations
Instances For
The square of HexArith.Nat.ceilSqrt applied to n is at least n. This is the executable upper-square
bound used by the Mignotte coefficient norm chain: in the perfect-square branch
of the ceiling square root, equality holds; in the non-perfect-square branch,
the bound follows from the Newton iterator invariant.