X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Fdama%2Fmetric_lattice.ma;fp=helm%2Fsoftware%2Fmatita%2Fdama%2Fmetric_lattice.ma;h=cca6430983486656f7863db6224c02d4c7d22ed3;hb=11f667afbb87725dd5e243d4b3717d19f584a481;hp=be941208766b87cf310a3fa3b7d942f7d44d6078;hpb=5995a1924405fbc2f22d6ac154217b2548878be5;p=helm.git diff --git a/helm/software/matita/dama/metric_lattice.ma b/helm/software/matita/dama/metric_lattice.ma index be9412087..cca643098 100644 --- a/helm/software/matita/dama/metric_lattice.ma +++ b/helm/software/matita/dama/metric_lattice.ma @@ -89,102 +89,18 @@ cut ( δx y+ δy z ≈ δ(y∨x) (y∨z)+ δ(y∧x) (y∧z)); [ apply (le_rewr ??? (δx y+ δy z)); [assumption] apply le_reflexive] lapply (le_to_eqm ??? Lxy) as Dxm; lapply (le_to_eqm ??? Lyz) as Dym; lapply (le_to_eqj ??? Lxy) as Dxj; lapply (le_to_eqj ??? Lyz) as Dyj; clear Lxy Lyz; -apply (Eq≈ (δ(x∧y) y + δy z)); [apply feq_plusr; apply (meq_l ????? Dxm);] -apply (Eq≈ (δ(x∧y) (y∧z) + δy z)); [apply feq_plusr; apply (meq_r ????? Dym);] -apply (Eq≈ (δ(x∧y) (y∧z) + δ(x∨y) z)); [apply feq_plusl; apply (meq_l ????? Dxj);] -apply (Eq≈ (δ(x∧y) (y∧z) + δ(x∨y) (y∨z))); [apply feq_plusl; apply (meq_r ????? Dyj);] +apply (Eq≈ (δ(x∧y) y + δy z) (meq_l ????? Dxm)); +apply (Eq≈ (δ(x∧y) (y∧z) + δy z) (meq_r ????? Dym)); +apply (Eq≈ (δ(x∧y) (y∧z) + δ(x∨y) z) (meq_l ????? Dxj)); +apply (Eq≈ (δ(x∧y) (y∧z) + δ(x∨y) (y∨z)) (meq_r ????? Dyj)); apply (Eq≈ ? (plus_comm ???)); -apply (Eq≈ (δ(y∨x) (y∨z)+ δ(x∧y) (y∧z))); [apply feq_plusr; apply (meq_l ????? (join_comm ???));] +apply (Eq≈ (δ(y∨x) (y∨z)+ δ(x∧y) (y∧z)) (meq_l ????? (join_comm ?x y))); apply feq_plusl; -apply (Eq≈ (δ(y∧x) (y∧z))); [apply (meq_l ????? (meet_comm ???));] +apply (Eq≈ (δ(y∧x) (y∧z)) (meq_l ????? (meet_comm ?x y))); apply eq_reflexive; qed. -include "sequence.ma". -include "nat/plus.ma". -lemma ltwl: ∀a,b,c:nat. b + a < c → a < c. -intros 3 (x y z); elim y (H z IH H); [apply H] -apply IH; apply lt_S_to_lt; apply H; -qed. - -lemma ltwr: ∀a,b,c:nat. a + b < c → a < c. -intros 3 (x y z); rewrite > sym_plus; apply ltwl; -qed. - - -definition d2s ≝ - λR.λml:mlattice R.λs:sequence ml.λk.λn. δ (s n) k. -(* -notation "s ⇝ 'Zero'" non associative with precedence 50 for @{'tends0 $s }. - -interpretation "tends to" 'tends s x = - (cic:/matita/sequence/tends0.con _ s). -*) - -alias symbol "leq" = "ordered sets less or equal than". -alias symbol "and" = "constructive and". -alias symbol "exists" = "constructive exists (Type)". -theorem carabinieri: - ∀R.∀ml:mlattice R.∀an,bn,xn:sequence ml. - (∀n. (an n ≤ xn n) ∧ (xn n ≤ bn n)) → - ∀x:ml. tends0 ? (d2s ? ml an x) → tends0 ? (d2s ? ml bn x) → - tends0 ? (d2s ? ml xn x). -intros (R ml an bn xn H x Ha Hb); unfold tends0 in Ha Hb ⊢ %. unfold d2s in Ha Hb ⊢ %. -intros (e He); -alias num (instance 0) = "natural number". -elim (Ha (e/2) (divide_preserves_lt ??? He)) (n1 H1); clear Ha; -elim (Hb (e/3) (divide_preserves_lt ??? He)) (n2 H2); clear Hb; -constructor 1; [apply (n1 + n2);] intros (n3 Hn3); -lapply (ltwr ??? Hn3) as Hn1n3; lapply (ltwl ??? Hn3) as Hn2n3; -elim (H1 ? Hn1n3) (H3 H4); elim (H2 ? Hn2n3) (H5 H6); clear Hn1n3 Hn2n3; -elim (H n3) (H7 H8); clear H H1 H2; -lapply (le_to_eqm ??? H7) as Dxm; lapply (le_to_eqj ??? H7) as Dym; -(* the main step *) -cut (δ (xn n3) x ≤ δ (bn n3) x + δ (an n3) x + δ (an n3) x); [2: - apply (le_transitive ???? (mtineq ???? (an n3))); - lapply (le_mtri ????? H7 H8); - lapply (feq_plusr ? (- δ(xn n3) (bn n3)) ?? Hletin); - cut ( δ(an n3) (bn n3)+- δ(xn n3) (bn n3)≈( δ(an n3) (xn n3))); [2: - apply (Eq≈  (0 + δ(an n3) (xn n3)) ? (zero_neutral ??)); - apply (Eq≈  (δ(an n3) (xn n3) + 0) ? (plus_comm ???)); - apply (Eq≈  (δ(an n3) (xn n3) +  (-δ(xn n3) (bn n3) +  δ(xn n3) (bn n3))) ? (opp_inverse ??)); - apply (Eq≈  (δ(an n3) (xn n3) +  (δ(xn n3) (bn n3) + -δ(xn n3) (bn n3))) ? (plus_comm ?? (δ(xn n3) (bn n3)))); - apply (Eq≈  ? ? (eq_sym ??? (plus_assoc ????))); assumption;] clear Hletin1; - apply (le_rewl ???  ( δ(an n3) (xn n3)+ δ(an n3) x));[ - apply feq_plusr; apply msymmetric;] - apply (le_rewl ???  (δ(an n3) (bn n3)+- δ(xn n3) (bn n3)+ δ(an n3) x));[ - apply feq_plusr; assumption;] - clear Hcut Hletin Dym Dxm H8 H7 H6 H5 H4 H3; - apply (le_rewl ??? (- δ(xn n3) (bn n3)+ δ(an n3) (bn n3)+δ(an n3) x));[ - apply feq_plusr; apply plus_comm;] - apply (le_rewl ??? (- δ(xn n3) (bn n3)+ (δ(an n3) (bn n3)+δ(an n3) x)) (plus_assoc ????)); - apply (le_rewl ??? ((δ(an n3) (bn n3)+δ(an n3) x)+- δ(xn n3) (bn n3)) (plus_comm ???)); - apply lew_opp; [apply mpositive] apply fle_plusr; - apply (le_rewr ???? (plus_comm ???)); - apply (le_rewr ??? ( δ(an n3) x+ δx (bn n3)) (msymmetric ????)); - apply mtineq;] -split; [ - apply (lt_le_transitive ????? (mpositive ????)); - split; elim He; [apply le_zero_x_to_le_opp_x_zero; assumption;] - cases t1; [ - left; apply exc_zero_opp_x_to_exc_x_zero; - apply (Ex≫ ? (eq_opp_opp_x_x ??));assumption;] - right; apply exc_opp_x_zero_to_exc_zero_x; - apply (Ex≪ ? (eq_opp_opp_x_x ??)); assumption;] -clear Dxm Dym H7 H8 Hn3 H5 H3 n1 n2; -apply (le_lt_transitive ???? ? (core1 ?? He)); -apply (le_transitive ???? Hcut); -apply (le_transitive ??  (e/3+ δ(an n3) x+ δ(an n3) x)); [ - repeat apply fle_plusr; cases H6; assumption;] -apply (le_transitive ??  (e/3+ e/2 + δ(an n3) x)); [ - apply fle_plusr; apply fle_plusl; cases H4; assumption;] -apply (le_transitive ??  (e/3+ e/2 + e/2)); [ - apply fle_plusl; cases H4; assumption;] -apply le_reflexive; -qed. - - (* 3.17 conclusione: δ x y ≈ 0 *) (* 3.20 conclusione: δ x y ≈ 0 *) (* 3.21 sup forte