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 #
Equations
- One or more equations did not get rendered due to their size.
The characteristic of ℚ
is 0.
Stacks Tag 09FS (Second part.)
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 : ℤ)
:
Rat.divInt n x / Rat.divInt d x = Rat.divInt n d
theorem
Rat.divInt_div_divInt_cancel_right
{x : ℤ}
(hx : x ≠ 0)
(n d : ℤ)
:
Rat.divInt x n / Rat.divInt x d = Rat.divInt d n
@[simp]
theorem
Rat.divInt_pow
(num : ℕ)
(den : ℤ)
(n : ℕ)
:
Rat.divInt (↑num) den ^ n = Rat.divInt (↑num ^ n) (den ^ n)
@[deprecated Rat.natCast_eq_divInt]
Alias of Rat.natCast_eq_divInt
.