Floor Function for Non-negative Rational Numbers #
Summary #
We define the FloorSemiring instance on ℚ≥0, and relate its operators to NNRat.cast.
Note that we cannot talk about Int.fract, which currently only works for rings.
Tags #
nnrat, rationals, ℚ≥0, floor
Equations
- One or more equations did not get rendered due to their size.
@[simp]
theorem
NNRat.floor_cast
{K : Type u_1}
[Semifield K]
[LinearOrder K]
[IsStrictOrderedRing K]
[FloorSemiring K]
(x : ℚ≥0)
:
@[simp]
theorem
NNRat.ceil_cast
{K : Type u_1}
[Semifield K]
[LinearOrder K]
[IsStrictOrderedRing K]
[FloorSemiring K]
(x : ℚ≥0)
:
@[simp]
theorem
NNRat.intFloor_cast
{K : Type u_1}
[Field K]
[LinearOrder K]
[IsStrictOrderedRing K]
[FloorRing K]
(x : ℚ≥0)
:
@[simp]
theorem
NNRat.intCeil_cast
{K : Type u_1}
[Field K]
[LinearOrder K]
[IsStrictOrderedRing K]
[FloorRing K]
(x : ℚ≥0)
:
theorem
Mathlib.Meta.NormNum.IsNat.natCeil
{R : Type u_1}
[Semiring R]
[LinearOrder R]
[IsStrictOrderedRing R]
[FloorSemiring R]
(r : R)
(m : ℕ)
:
theorem
Mathlib.Meta.NormNum.IsInt.natCeil
{R : Type u_1}
[Ring R]
[LinearOrder R]
[IsStrictOrderedRing R]
[FloorSemiring R]
(r : R)
(m : ℕ)
:
IsInt r (Int.negOfNat m) → IsNat ⌈r⌉₊ 0
theorem
Mathlib.Meta.NormNum.IsNNRat.natCeil
{R : Type u_1}
[Semifield R]
[LinearOrder R]
[IsStrictOrderedRing R]
[FloorSemiring R]
(r : R)
(n d : ℕ)
(h : IsNNRat r n d)
(res : ℕ)
(hres : ⌈↑n / ↑d⌉₊ = res)
:
theorem
Mathlib.Meta.NormNum.IsRat.natCeil
{R : Type u_1}
[Field R]
[LinearOrder R]
[IsStrictOrderedRing R]
[FloorSemiring R]
(r : R)
(n d : ℕ)
(h : IsRat r (Int.negOfNat n) d)
: