Documentation

Mathlib.Tactic.Inclusion.Extension.IntervalDyadicReal.Dyadic

Dyadic rationals #

This file provides general API for Dyadic rationals that are used in Mathlib but not available in core.

@[simp]
theorem Inclusion.IntervalDyadicReal.Dyadic.ofOdd_pos {n k : ℤ} {hn : n % 2 = 1} :
0 < Dyadic.ofOdd n k hn ↔ 0 < n
@[simp]
theorem Inclusion.IntervalDyadicReal.Dyadic.ofOdd_nonneg {n k : ℤ} {hn : n % 2 = 1} :
0 ≤ Dyadic.ofOdd n k hn ↔ 0 ≤ n
theorem Inclusion.IntervalDyadicReal.Dyadic.toRat_step (prec : ℤ) :
↑(step prec) = (1 / 2) ^ prec
theorem Inclusion.IntervalDyadicReal.Dyadic.toRat_step_real (prec : ℤ) :
↑↑(step prec) = (1 / 2) ^ prec
theorem Inclusion.IntervalDyadicReal.Dyadic.toRat_step_add_one (prec : ℤ) :
↑(step (prec + 1)) = ↑(step prec) / 2
theorem Inclusion.IntervalDyadicReal.Dyadic.step_eq_add (prec : ℤ) :
step prec = step (prec + 1) + step (prec + 1)
theorem Inclusion.IntervalDyadicReal.Dyadic.abs_toRat_toDyadic_le_real {x : ℚ} {prec : ℤ} :
|↑x - ↑↑(x.toDyadic prec)| ≤ ↑↑(step prec)
@[simp]
theorem Inclusion.IntervalDyadicReal.Dyadic.ofOdd_shiftLeft {k e : ℤ} {hk : k % 2 = 1} {a : ℤ} :
Dyadic.ofOdd k e hk <<< a = Dyadic.ofOdd k (e - a) hk
@[simp]
theorem Inclusion.IntervalDyadicReal.Dyadic.ofOdd_shiftRight {k e : ℤ} {hk : k % 2 = 1} {a : ℤ} :
Dyadic.ofOdd k e hk >>> a = Dyadic.ofOdd k (e + a) hk
@[simp]
theorem Inclusion.IntervalDyadicReal.Dyadic.toRat_shiftLeft (d : Dyadic) (a : ℤ) :
↑(d <<< a) = ↑d * 2 ^ a
@[simp]

Interpret a dyadic rational as a real number.

Equations
Instances For

    Dyadic.toReal as an additive monoid homomorphism.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Dyadic.toReal as an order embedding.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For