1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "metric_space.ma".
18 record mlattice_ (R : todgroup) : Type ≝ {
19 ml_mspace_: metric_space R;
21 ml_with: ms_carr ? ml_mspace_ = Type_OF_lattice ml_lattice
24 lemma ml_mspace: ∀R.mlattice_ R → metric_space R.
25 intros (R ml); apply (mk_metric_space R (Type_OF_mlattice_ ? ml));
26 unfold Type_OF_mlattice_; cases (ml_with ? ml); simplify;
27 [apply (metric ? (ml_mspace_ ? ml));|apply (mpositive ? (ml_mspace_ ? ml));
28 |apply (mreflexive ? (ml_mspace_ ? ml));|apply (msymmetric ? (ml_mspace_ ? ml));
29 |apply (mtineq ? (ml_mspace_ ? ml))]
32 coercion cic:/matita/metric_lattice/ml_mspace.con.
34 alias symbol "plus" = "Abelian group plus".
35 alias symbol "leq" = "Excess less or equal than".
36 record mlattice (R : todgroup) : Type ≝ {
37 ml_carr :> mlattice_ R;
38 ml_prop1: ∀a,b:ml_carr. 0 < δ a b → a # b;
39 ml_prop2: ∀a,b,c:ml_carr. δ (a∨b) (a∨c) + δ (a∧b) (a∧c) ≤ (δ b c)
42 interpretation "Metric lattice leq" 'leq a b =
43 (le (excess_OF_mlattice1 _ _) a b).
44 interpretation "Metric lattice geq" 'geq a b =
45 (le (excess_OF_mlattice _ _) a b).
47 lemma eq_to_ndlt0: ∀R.∀ml:mlattice R.∀a,b:ml. a ≈ b → ¬ 0 < δ a b.
48 intros (R ml a b E); intro H; apply E; apply ml_prop1;
52 lemma eq_to_dzero: ∀R.∀ml:mlattice R.∀x,y:ml.x ≈ y → δ x y ≈ 0.
53 intros (R ml x y H); intro H1; apply H; clear H;
54 apply ml_prop1; split [apply mpositive] apply ap_symmetric;
58 lemma meq_l: ∀R.∀ml:mlattice R.∀x,y,z:ml. x≈z → δx y ≈ δz y.
59 intros (R ml x y z); apply le_le_eq;
60 [ apply (le_transitive ???? (mtineq ???y z));
61 apply (le_rewl ??? (0+δz y) (eq_to_dzero ???? H));
62 apply (le_rewl ??? (δz y) (zero_neutral ??)); apply le_reflexive;
63 | apply (le_transitive ???? (mtineq ???y x));
64 apply (le_rewl ??? (0+δx y) (eq_to_dzero ??z x H));
65 apply (le_rewl ??? (δx y) (zero_neutral ??)); apply le_reflexive;]
69 lemma meq_r: ∀R.∀ml:mlattice R.∀x,y,z:ml. x≈z → δy x ≈ δy z.
70 intros; apply (eq_trans ???? (msymmetric ??y x));
71 apply (eq_trans ????? (msymmetric ??z y)); apply meq_l; assumption;
74 lemma dap_to_lt: ∀R.∀ml:mlattice R.∀x,y:ml. δ x y # 0 → 0 < δ x y.
75 intros; split [apply mpositive] apply ap_symmetric; assumption;
78 lemma dap_to_ap: ∀R.∀ml:mlattice R.∀x,y:ml. δ x y # 0 → x # y.
79 intros (R ml x y H); apply ml_prop1; split; [apply mpositive;]
80 apply ap_symmetric; assumption;
85 ∀R.∀ml:mlattice R.∀x,y,z:ml. x ≤ y → y ≤ z → δ x z ≈ δ x y + δ y z.
86 intros (R ml x y z Lxy Lyz); apply le_le_eq; [apply mtineq]
87 apply (le_transitive ????? (ml_prop2 ?? (y) ??));
88 cut ( δx y+ δy z ≈ δ(y∨x) (y∨z)+ δ(y∧x) (y∧z)); [
89 apply (le_rewr ??? (δx y+ δy z)); [assumption] apply le_reflexive]
90 lapply (le_to_eqm y x Lxy) as Dxm; lapply (le_to_eqm z y Lyz) as Dym;
91 lapply (le_to_eqj x y Lxy) as Dxj; lapply (le_to_eqj y z Lyz) as Dyj; clear Lxy Lyz;
93 apply (Eq≈ (δ(x∧y) y + δy z) (meq_l ????? Dxm));
94 apply (Eq≈ (δ(x∧y) (y∧z) + δy z) (meq_r ????? Dym));
95 apply (Eq≈ (δ(x∧y) (y∧z) + δ(y∨x) z));[
96 apply feq_plusl; apply meq_l; clear Dyj Dxm Dym; assumption]
97 apply (Eq≈ (δ(x∧y) (y∧z) + δ(y∨x) (z∨y))); [
98 apply (feq_plusl ? (δ(x∧y) (y∧z)) ?? (meq_r ??? (y∨x) ? Dyj));]
99 apply (Eq≈ ? (plus_comm ???));
100 apply (Eq≈ (δ(y∨x) (y∨z)+ δ(x∧y) (y∧z)));[
101 apply feq_plusr; apply meq_r; apply (join_comm ??);]
103 apply (Eq≈ (δ(y∧x) (y∧z)) (meq_l ????? (meet_comm ??)));
108 (* 3.17 conclusione: δ x y ≈ 0 *)
109 (* 3.20 conclusione: δ x y ≈ 0 *)
111 strong_sup x ≝ ∀n. s n ≤ x ∧ ∀y x ≰ y → ∃n. s n ≰ y
112 strong_sup_zoli x ≝ ∀n. s n ≤ x ∧ ∄y. y#x ∧ y ≤ x
114 (* 3.22 sup debole (più piccolo dei maggioranti) *)
115 (* 3.23 conclusion: δ x sup(...) ≈ 0 *)
116 (* 3.25 vero nel reticolo e basta (niente δ) *)
117 (* 3.36 conclusion: δ x y ≈ 0 *)