]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/dama/sandwich_corollary.ma
8dafe1f63bcfed57912df44f4625c2ce08061043
[helm.git] / helm / software / matita / dama / sandwich_corollary.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "sandwich.ma".
16
17 include "metric_lattice.ma".
18
19 (* 3.17 *)
20 lemma tends_uniq:
21   ∀R.∀ml:mlattice R.∀xn:sequence ml.
22   ∀x,y:apart_of_metric_space ? ml. 
23   (* BUG: it inserts a compesoed coercion instead of an hand made one, 
24      what to do? prefer the human made one or allow to kill a coercion? 
25    *)
26      xn ⇝ x → xn ⇝ y → x ≈ y.
27 intros (R ml xn x y H1 H2); unfold tends0 in H1 H2; unfold d2s in H1 H2;
28 intro Axy; lapply (ap2delta R ml x y Axy) as ge0;
29 cases (H1 (δ x y/1) (divide_preserves_lt ??? ge0)) (n1 Hn1); clear H1; 
30 cases (H2 (δ x y/1) (divide_preserves_lt ??? ge0)) (n2 Hn2); clear H2;
31 letin N ≝ (S (n2 + n1));
32 cases (Hn1 N ?) (H1 H2); [apply (ltwr ? n2); rewrite < sym_plus; apply le_n;]
33 cases (Hn2 N ?) (H3 H4); [apply (ltwl ? n1); rewrite < sym_plus; apply le_n;]
34 clear H1 H3 Hn2 Hn1 N ge0 Axy; lapply (mtineq ?? x y (xn (S (n2+n1)))) as H5;
35 cut ( δx (xn (S (n2+n1)))+ δ(xn (S (n2+n1))) y <   δx y/1 + δ(xn (S (n2+n1))) y) as H6;[2:
36   apply flt_plusr; apply (Lt≪ ? (msymmetric ????)); assumption]
37 lapply (le_lt_transitive ???? H5 H6) as H7; clear H6;
38 cut (δx y/1+ δ(xn (S (n2+n1))) y < δx y/1+  δx y/1) as H6; [2:apply flt_plusl; assumption]
39 lapply (lt_transitive ???? H7 H6) as ABS; clear H6 H7 H4 H5 H2 n1 n2 xn;
40 lapply (divpow ? (δ x y) 1) as D; lapply (Lt≪ ? (eq_sym ??? D) ABS) as H;
41 change in H with ( δx y/1+ δx y/1< δx y/1+ δx y/1);
42 apply (lt_coreflexive ?? H);
43 qed.
44
45 (* 3.18 *)