Order for Rational Numbers #
Summary #
We define the order on ℚ
, prove that ℚ
is a discrete, linearly ordered field, and define
functions such as abs
and sqrt
that depend on this order.
Notations #
/.
is infix notation forrat.mk
.
Tags #
rat, rationals, field, ℚ, numerator, denominator, num, denom, order, ordering, sqrt, abs
@[protected, instance]
@[protected, instance]
Equations
- rat.decidable_le a b = show decidable (b - a).nonneg, from (b - a).decidable_nonneg
@[protected, instance]
Equations
- rat.linear_order = {le := rat.le, lt := partial_order.lt._default rat.le, le_refl := rat.le_refl, le_trans := rat.le_trans, lt_iff_le_not_le := rat.linear_order._proof_1, le_antisymm := rat.le_antisymm, le_total := rat.le_total, decidable_le := λ (a b : ℚ), (b - a).decidable_nonneg, decidable_eq := λ (a b : ℚ), rat.decidable_eq a b, decidable_lt := decidable_lt_of_decidable_le (λ (a b : ℚ), (b - a).decidable_nonneg), max := max_default (λ (a b : ℚ), (b - a).decidable_nonneg), max_def := rat.linear_order._proof_3, min := min_default (λ (a b : ℚ), (b - a).decidable_nonneg), min_def := rat.linear_order._proof_4}
@[protected, instance]
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
@[protected, instance]
Equations
- rat.linear_ordered_field = {add := field.add rat.field, add_assoc := _, zero := field.zero rat.field, zero_add := _, add_zero := _, nsmul := field.nsmul rat.field, nsmul_zero' := _, nsmul_succ' := _, neg := field.neg rat.field, sub := field.sub rat.field, sub_eq_add_neg := _, zsmul := field.zsmul rat.field, zsmul_zero' := _, zsmul_succ' := _, zsmul_neg' := _, add_left_neg := _, add_comm := _, mul := field.mul rat.field, mul_assoc := _, one := field.one rat.field, one_mul := _, mul_one := _, npow := field.npow rat.field, npow_zero' := _, npow_succ' := _, left_distrib := _, right_distrib := _, le := linear_order.le rat.linear_order, lt := linear_order.lt rat.linear_order, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, add_le_add_left := rat.linear_ordered_field._proof_1, zero_le_one := rat.linear_ordered_field._proof_2, mul_pos := rat.linear_ordered_field._proof_3, le_total := _, decidable_le := linear_order.decidable_le rat.linear_order, decidable_eq := linear_order.decidable_eq rat.linear_order, decidable_lt := linear_order.decidable_lt rat.linear_order, max := max rat.linear_order, max_def := _, min := min rat.linear_order, min_def := _, exists_pair_ne := _, mul_comm := _, inv := field.inv rat.field, div := field.div rat.field, div_eq_mul_inv := _, zpow := field.zpow rat.field, zpow_zero' := _, zpow_succ' := _, zpow_neg' := _, mul_inv_cancel := _, inv_zero := _}
@[protected, instance]
@[protected, instance]
@[protected, instance]
@[protected, instance]
@[protected, instance]
@[protected, instance]
@[protected, instance]
@[protected, instance]
@[protected, instance]