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 (**************************************************************************)
17 include "metric_space.ma".
19 record premetric_lattice_ (R : todgroup) : Type ≝ {
20 pml_carr:> metric_space R;
21 meet: pml_carr → pml_carr → pml_carr;
22 join: pml_carr → pml_carr → pml_carr
25 interpretation "valued lattice meet" 'and a b = (meet ? ? a b).
27 interpretation "valued lattice join" 'or a b = (join ? ? a b).
29 record premetric_lattice_props (R : todgroup) (ml : premetric_lattice_ R) : Prop ≝ {
30 prop1a: ∀a : ml.δ (a ∧ a) a ≈ 0;
31 prop1b: ∀a : ml.δ (a ∨ a) a ≈ 0;
32 prop2a: ∀a,b: ml. δ (a ∨ b) (b ∨ a) ≈ 0;
33 prop2b: ∀a,b: ml. δ (a ∧ b) (b ∧ a) ≈ 0;
34 prop3a: ∀a,b,c: ml. δ (a ∨ (b ∨ c)) ((a ∨ b) ∨ c) ≈ 0;
35 prop3b: ∀a,b,c: ml. δ (a ∧ (b ∧ c)) ((a ∧ b) ∧ c) ≈ 0;
36 prop4a: ∀a,b: ml. δ (a ∨ (a ∧ b)) a ≈ 0;
37 prop4b: ∀a,b: ml. δ (a ∧ (a ∨ b)) a ≈ 0;
38 prop5: ∀a,b,c: ml. δ (a ∨ b) (a ∨ c) + δ (a ∧ b) (a ∧ c) ≤ δ b c
41 record pmlattice (R : todgroup) : Type ≝ {
42 carr :> premetric_lattice_ R;
43 ispremetriclattice:> premetric_lattice_props R carr
48 lemma lattice_of_pmlattice: ∀R: todgroup. pmlattice R → lattice.
49 intros (R pml); not ported to duality
50 apply (mk_lattice (apart_of_metric_space ? pml));
51 [apply (join ? pml)|apply (meet ? pml)
52 |3,4,5,6,7,8,9,10: intros (x y z); whd; intro H; whd in H; cases H (LE AP);]
53 [apply (prop1b ? pml pml x); |apply (prop1a ? pml pml x);
54 |apply (prop2a ? pml pml x y); |apply (prop2b ? pml pml x y);
55 |apply (prop3a ? pml pml x y z);|apply (prop3b ? pml pml x y z);
56 |apply (prop4a ? pml pml x y); |apply (prop4b ? pml pml x y);]
57 try (apply ap_symmetric; assumption); intros 4 (x y z H); change with (0 < (δ y z));
58 [ change in H with (0 < δ (x ∨ y) (x ∨ z));
59 apply (lt_le_transitive ???? H);
60 apply (le0plus_le ???? (mpositive ? pml ??) (prop5 ? pml pml x y z));
61 | change in H with (0 < δ (x ∧ y) (x ∧ z));
62 apply (lt_le_transitive ???? H);
63 apply (le0plus_le ???? (mpositive ? pml (x∨y) (x∨z)));
64 apply (le_rewl ??? ? (plus_comm ???));
65 apply (prop5 ? pml pml);]
68 coercion cic:/matita/premetric_lattice/lattice_of_pmlattice.con.