Documentation

Mathlib.Algebra.Field.Rat

The rational numbers form a field #

This file contains the field instance on the rational numbers.

See note [foundational algebra order theory].

Tags #

rat, rationals, field, โ„š, numerator, denominator, num, denom

Extra instances to short-circuit type class resolution #

These also prevent non-computable instances being used to construct these instances non-computably.

theorem Rat.div_nonneg {a b : โ„š} (ha : 0 โ‰ค a) (hb : 0 โ‰ค b) :
0 โ‰ค a / b
@[simp]
theorem NNRat.coe_div (p q : โ„šโ‰ฅ0) :
โ†‘(p / q) = โ†‘p / โ†‘q
@[simp]
theorem NNRat.coe_zpow (p : โ„šโ‰ฅ0) (n : โ„ค) :
โ†‘(p ^ n) = โ†‘p ^ n
@[simp]
theorem NNRat.num_div_den (q : โ„šโ‰ฅ0) :
โ†‘q.num / โ†‘q.den = q