Floor Function for Rational Numbers #
Summary #
We define the FloorRing
instance on ℚ
. Some technical lemmas relating floor
to integer
division and modulo arithmetic are derived as well as some simple inequalities.
Tags #
rat, rationals, ℚ, floor
@[simp]
@[simp]
theorem
Nat.coprime_sub_mul_floor_rat_div_of_coprime
{n : ℕ}
{d : ℕ}
(n_coprime_d : Nat.Coprime n d)
:
Nat.Coprime (Int.natAbs (↑n - ↑d * ⌊↑n / ↑d⌋)) d