Documentation

Complexity.Foundations.Data.Nat.SqrtRatio

Computing a floor involving a square root #

Main results #

This elementary arithmetic bridge is original adaptation code. It lets finite algorithms use integer arithmetic while retaining their real-valued capacity specifications.

theorem Nat.sqrt_div_eq_floor_div_sqrt (a b : ℕ) :
(a ^ 2 / b).sqrt = ⌊↑a / √↑b⌋₊

A computable integer formula for the floor of a quotient by a square root.