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)
: