Dyadic numbers #
This file contains auxiliary theorems for dyadic numbers, which should get upstreamed to Mathlib.
For Mathlib #
theorem dvd_iff_le_of_mem_powers {m n : ℕ} (hm : m ∈ Submonoid.powers 2) (hn : n ∈ Submonoid.powers 2) :
@[instance_reducible]
Equations
- Dyadic.instInhabited_combinatorialGames = { default := 0 }
Constructor for the fraction m / n.
Equations
- Dyadic.mkRat m h = Dyadic.ofIntWithPrec m ↑(Submonoid.log ⟨n, h⟩)
Instances For
@[simp]
@[simp]
@[simp]
theorem Dyadic.eq_mkRat_of_den_le {x : Dyadic} {n : ℕ} (h : x.den ≤ n) (hn : n ∈ Submonoid.powers 2) :
∃ (m : ℤ), x = Dyadic.mkRat m hn
Coercion as a RingHom.
Equations
- Dyadic.toRatRingHom = { toFun := Dyadic.toRat, map_one' := Dyadic.toRatRingHom._proof_1, map_mul' := Dyadic.toRat_mul, map_zero' := Dyadic.toRatRingHom._proof_2, map_add' := Dyadic.toRat_add }