feat(library/algebra/ordered_group): add missing theorems to ordered group

This commit is contained in:
Rob Lewis 2015-07-28 00:49:51 -04:00 committed by Rob Lewis
parent ebbad9e70d
commit 2fdf1e599e
2 changed files with 16 additions and 5 deletions

View file

@ -654,6 +654,21 @@ section
apply abs_add_le_abs_add_abs,
apply le.refl
end
theorem dist_bdd_within_interval {a b lb ub : A} (H : lb < ub) (Hal : lb ≤ a) (Hau : a ≤ ub)
(Hbl : lb ≤ b) (Hbu : b ≤ ub) : abs (a - b) ≤ ub - lb :=
begin
cases (decidable.em (b ≤ a)) with [Hba, Hba],
rewrite (abs_of_nonneg (iff.mpr !sub_nonneg_iff_le Hba)),
apply sub_le_sub,
apply Hau,
apply Hbl,
rewrite [abs_of_neg (iff.mpr !sub_neg_iff_lt (lt_of_not_ge Hba)), neg_sub],
apply sub_le_sub,
apply Hbu,
apply Hal
end
end
end

View file

@ -623,10 +623,6 @@ theorem under_seq'_lt_over_seq' : ∀ m n : , under_seq' m < over_seq' n :=
theorem under_seq'_lt_over_seq'_single : ∀ n : , under_seq' n < over_seq' n :=
by intros; apply under_seq_lt_over_seq
theorem dist_bdd_within_interval {a b lb ub : } (H : lb < ub) (Hal : lb ≤ a) (Hau : a ≤ ub)
(Hbl : lb ≤ b) (Hbu : b ≤ ub) : rat.abs (a - b) ≤ ub - lb := sorry
--theorem over_dist (n : ) : abs (over - over_seq n) ≤ (over - under) / rat.pow 2 n := sorry
theorem under_seq_mono_helper (i k : ) : under_seq i ≤ under_seq (i + k) :=
@ -708,7 +704,7 @@ theorem regular_lemma_helper {s : seq} {m n : +} (Hm : m ≤ n)
cases (H m n Hm) with [T1under, T1over],
cases (H m m (!pnat.le.refl)) with [T2under, T2over],
apply rat.le.trans,
apply dist_bdd_within_interval,
apply rat.dist_bdd_within_interval,
apply under_seq'_lt_over_seq'_single,
rotate 1,
repeat assumption,