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 / V34. The tactics of Mathlib

Mathlib.Tactic.Inclusion.Extension.IntervalDyadicReal.Rational

12 declarations. Mathlib docs · Source

Rational enclosures for interval_dyadic_real

This file defines inclusion operations for the interval_dyadic_real inclusion family which define dyadic interval enclosures for rational numbers.

def Inclusion.IntervalDyadicReal.precParam E1 #

Inclusion.InclusionParamDecl

The precision of dyadic approximations, defaulting to zero.

def Inclusion.IntervalDyadicReal.rat E1 #

ℚ → ℕ → Inclusion.Interval Dyadic

Enclose a rational number in a dyadic interval with precision prec.

theorem Inclusion.IntervalDyadicReal.ratCast_mem E1 #

∀ (q : ℚ) (prec : ℕ), ↑q ∈ Inclusion.IntervalDyadicReal.rat q prec

def Inclusion.IntervalDyadicReal.ratBall E1 #

ℤ → ℤ → ℕ → ℕ → Inclusion.Interval Dyadic

The interval [(c - r) / d, (c + r) / d], rounded outward to precision prec.

theorem Inclusion.IntervalDyadicReal.ratBall_mem E1 #

∀ {x : ℝ} {c r : ℤ} {d : ℕ}, |x - ↑c / ↑d| ≤ ↑r / ↑d → ∀ (prec : ℕ), x ∈ Inclusion.IntervalDyadicReal.ratBall c r d prec

def Inclusion.IntervalDyadicReal.natDiv E1 #

ℕ → ℕ → ℕ → Inclusion.Interval Dyadic

Efficiently enclose m / d in a dyadic interval with precision prec.

theorem Inclusion.IntervalDyadicReal.natDiv_eq_rat E1 #

∀ (m : ℕ) {d : ℕ} (prec : ℕ),
  0 < d → Inclusion.IntervalDyadicReal.natDiv m d prec = Inclusion.IntervalDyadicReal.rat (mkRat (↑m) d) prec

theorem Inclusion.IntervalDyadicReal.natDiv_mem E1 #

∀ (m : ℕ) {d : ℕ} (prec : ℕ), 0 < d → ↑m / ↑d ∈ Inclusion.IntervalDyadicReal.natDiv m d prec

def Inclusion.IntervalDyadicReal.natDivLower E1 #

ℕ → ℕ → ℕ → Dyadic

m / d rounded down to precision prec (the lower endpoint of natDiv m d prec). Unlike (m / d : ℚ).toDyadic prec, this does not normalise the fraction m / d and so avoids a potentially very expensive Nat.gcd computation.

theorem Inclusion.IntervalDyadicReal.natDivLower_eq E0 #

∀ (m d prec : ℕ), Inclusion.IntervalDyadicReal.natDivLower m d prec = (↑m / ↑d).toDyadic ↑prec

def Inclusion.IntervalDyadicReal.scientific E1 #

ℕ → Bool → ℕ → ℕ → Inclusion.Interval Dyadic

Enclose a scientific literal in a dyadic interval with precision prec.

theorem Inclusion.IntervalDyadicReal.scientific_mem E1 #

∀ (m : ℕ) (s : Bool) (e prec : ℕ), OfScientific.ofScientific m s e ∈ Inclusion.IntervalDyadicReal.scientific m s e prec