The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V02. Numbers

Mathlib.Data.Rat.NatSqrt.Defs

4 declarations. Mathlib docs · Source

def Nat.ratSqrt E1 #

ℕ → ℕ → ℚ

Approximate the square root of a natural number as a rational number, to within 1 / prec.

theorem Nat.ratSqrt_nonneg E1 #

∀ (x prec : ℕ), 0 ≤ x.ratSqrt prec

theorem Nat.ratSqrt_sq_le E1 #

∀ (x : ℕ) {prec : ℕ}, 0 < prec → x.ratSqrt prec ^ 2 ≤ ↑x

theorem Nat.lt_ratSqrt_add_inv_prec_sq E1 #

∀ (x : ℕ) {prec : ℕ}, 0 < prec → ↑x < (x.ratSqrt prec + 1 / ↑prec) ^ 2