The rational numbers are a commutative ring #
This file contains the commutative ring instance on the rational numbers.
See note [foundational algebra order theory].
Instances #
Extra instances to short-circuit type class resolution #
These also prevent non-computable instances being used to construct these instances non-computably.
Miscellaneous lemmas #
theorem
Rat.divInt_div_divInt_cancel_left
{x : ℤ}
(hx : x ≠ 0)
(n d : ℤ)
:
divInt n x / divInt d x = divInt n d
theorem
Rat.divInt_div_divInt_cancel_right
{x : ℤ}
(hx : x ≠ 0)
(n d : ℤ)
:
divInt x n / divInt x d = divInt d n
@[simp]
theorem
Rat.divInt_pow
(num : ℕ)
(den : ℤ)
(n : ℕ)
:
divInt (↑num) den ^ n = divInt (↑num ^ n) (den ^ n)
@[simp]