feat(library/algebra/field): add missing theorems to field

This commit is contained in:
Rob Lewis 2015-07-28 15:42:40 -04:00 committed by Leonardo de Moura
parent b4b08aca32
commit f88038c3e7
2 changed files with 6 additions and 2 deletions

View file

@ -297,8 +297,6 @@ section field
theorem div_div_div_div (Hb : b ≠ 0) (Hc : c ≠ 0) (Hd : d ≠ 0) : (a / b) / (c / d) = (a * d) / (b * c) :=
by rewrite [(div_div_eq_mul_div Hc Hd), (div_mul_eq_mul_div), (div_div_eq_div_mul Hb Hc)]
-- remaining to transfer from Isabelle fields: ordered fields
end field
structure discrete_field [class] (A : Type) extends field A :=

View file

@ -297,6 +297,12 @@ section linear_ordered_field
... = (a * 2) / 2 : by rewrite left_distrib
... = a : by rewrite [@mul_div_cancel A _ _ _ two_ne_zero]
theorem sub_self_div_two : a - a / 2 = a / 2 :=
by rewrite [-{a}add_halves at {1}, add_sub_cancel]
theorem div_two_sub_self : a / 2 - a = - (a / 2) :=
by rewrite [-{a}add_halves at {2}, sub_add_eq_sub_sub, sub_self, zero_sub]
theorem nonneg_le_nonneg_of_squares_le (Ha : a ≥ 0) (Hb : b ≥ 0) (H : a * a ≤ b * b) : a ≤ b :=
begin
apply le_of_not_gt,