]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/formal_topology/overlap/o-concrete_spaces.ma
ums got rid of
[helm.git] / helm / software / matita / contribs / formal_topology / overlap / o-concrete_spaces.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 "o-basic_pairs.ma".
16 include "o-saturations.ma".
17
18 notation "□ \sub b" non associative with precedence 90 for @{'box $b}.
19 notation > "□_term 90 b" non associative with precedence 90 for @{'box $b}.
20 interpretation "Universal image ⊩⎻*" 'box x = (or_f_minus_star _ _ (rel x)).
21  
22 notation "◊ \sub b" non associative with precedence 90 for @{'diamond $b}.
23 notation > "◊_term 90 b" non associative with precedence 90 for @{'diamond $b}.
24 interpretation "Existential image ⊩" 'diamond x = (or_f _ _ (rel x)).
25
26 notation "'Rest' \sub b" non associative with precedence 90 for @{'rest $b}.
27 notation > "'Rest'⎽term 90 b" non associative with precedence 90 for @{'rest $b}.
28 interpretation "Universal pre-image ⊩*" 'rest x = (or_f_star _ _ (rel x)).
29
30 notation "'Ext' \sub b" non associative with precedence 90 for @{'ext $b}.
31 notation > "'Ext'⎽term 90 b" non associative with precedence 90 for @{'ext $b}.
32 interpretation "Existential pre-image ⊩⎻" 'ext x = (or_f_minus _ _ (rel x)).
33
34 definition A : ∀b:BP. unary_morphism (oa_P (form b)) (oa_P (form b)).
35 intros; constructor 1;
36  [ apply (λx.□_b (Ext⎽b x));
37  | do 2 unfold FunClass_1_OF_carr1; intros; apply  (†(†H));]
38 qed.
39
40 lemma xxx : ∀x.carr x → carr1 (setoid1_of_setoid x). intros; assumption; qed.
41 coercion xxx.
42
43 definition d_p_i : 
44   ∀S,I:SET.∀d:unary_morphism S S.∀p:arrows1 SET I S.arrows1 SET I S.
45 intros; constructor 1;
46  [ apply (λi:I. u (c i));
47  | unfold FunClass_1_OF_carr1; intros; apply (†(†H));].
48 qed.
49
50 alias symbol "eq" = "setoid eq".
51 alias symbol "and" = "o-algebra binary meet".
52 record concrete_space : Type ≝
53  { bp:> BP;
54    (*distr : is_distributive (form bp);*)
55    downarrow: unary_morphism (oa_P (form bp)) (oa_P (form bp));
56    downarrow_is_sat: is_saturation ? downarrow;
57    converges: ∀q1,q2.
58      (Ext⎽bp q1 ∧ (Ext⎽bp q2)) = (Ext⎽bp ((downarrow q1) ∧ (downarrow q2)));
59    all_covered: Ext⎽bp (oa_one (form bp)) = oa_one (concr bp);
60    il2: ∀I:SET.∀p:arrows1 SET I (oa_P (form bp)).
61      downarrow (oa_join ? I (d_p_i ?? downarrow p)) =
62      oa_join ? I (d_p_i ?? downarrow p);
63    il1: ∀q.downarrow (A ? q) = A ? q
64  }.
65
66 interpretation "o-concrete space downarrow" 'downarrow x = (fun_1 __ (downarrow _) x).
67
68 definition bp': concrete_space → basic_pair ≝ λc.bp c.
69 coercion bp'.
70
71 record convergent_relation_pair (CS1,CS2: concrete_space) : Type ≝
72  { rp:> arrows1 ? CS1 CS2;
73    respects_converges:
74     ∀b,c.
75      extS ?? rp \sub\c (BPextS CS2 (b ↓ c)) =
76      BPextS CS1 ((extS ?? rp \sub\f b) ↓ (extS ?? rp \sub\f c));
77    respects_all_covered:
78     extS ?? rp\sub\c (BPextS CS2 (form CS2)) = BPextS CS1 (form CS1)
79  }.
80
81 definition rp' : ∀CS1,CS2. convergent_relation_pair CS1 CS2 → relation_pair CS1 CS2 ≝
82  λCS1,CS2,c. rp CS1 CS2 c.
83  
84 coercion rp'.
85
86 definition convergent_relation_space_setoid: concrete_space → concrete_space → setoid1.
87  intros;
88  constructor 1;
89   [ apply (convergent_relation_pair c c1)
90   | constructor 1;
91      [ intros;
92        apply (relation_pair_equality c c1 c2 c3);
93      | intros 1; apply refl1;
94      | intros 2; apply sym1; 
95      | intros 3; apply trans1]]
96 qed.
97
98 definition rp'': ∀CS1,CS2.convergent_relation_space_setoid CS1 CS2 → arrows1 BP CS1 CS2 ≝
99  λCS1,CS2,c.rp ?? c.
100
101 coercion rp''.
102
103 definition convergent_relation_space_composition:
104  ∀o1,o2,o3: concrete_space.
105   binary_morphism1
106    (convergent_relation_space_setoid o1 o2)
107    (convergent_relation_space_setoid o2 o3)
108    (convergent_relation_space_setoid o1 o3).
109  intros; constructor 1;
110      [ intros; whd in c c1 ⊢ %;
111        constructor 1;
112         [ apply (fun1 ??? (comp1 BP ???)); [apply (bp o2) |*: apply rp; assumption]
113         | intros;
114           change in ⊢ (? ? ? (? ? ? (? ? ? %) ?) ?) with (c1 \sub \c ∘ c \sub \c);
115           change in ⊢ (? ? ? ? (? ? ? ? (? ? ? ? ? (? ? ? (? ? ? %) ?) ?)))
116             with (c1 \sub \f ∘ c \sub \f);
117           change in ⊢ (? ? ? ? (? ? ? ? (? ? ? ? ? ? (? ? ? (? ? ? %) ?))))
118             with (c1 \sub \f ∘ c \sub \f);
119           apply (.= (extS_com ??????));
120           apply (.= (†(respects_converges ?????)));
121           apply (.= (respects_converges ?????));
122           apply (.= (†(((extS_com ??????) \sup -1)‡(extS_com ??????)\sup -1)));
123           apply refl1;
124         | change in ⊢ (? ? ? (? ? ? (? ? ? %) ?) ?) with (c1 \sub \c ∘ c \sub \c);
125           apply (.= (extS_com ??????));
126           apply (.= (†(respects_all_covered ???)));
127           apply (.= respects_all_covered ???);
128           apply refl1]
129      | intros;
130        change with (b ∘ a = b' ∘ a');
131        change in H with (rp'' ?? a = rp'' ?? a');
132        change in H1 with (rp'' ?? b = rp ?? b');
133        apply (.= (H‡H1));
134        apply refl1]
135 qed.
136
137 definition CSPA: category1.
138  constructor 1;
139   [ apply concrete_space
140   | apply convergent_relation_space_setoid
141   | intro; constructor 1;
142      [ apply id1
143      | intros;
144        unfold id; simplify;
145        apply (.= (equalset_extS_id_X_X ??));
146        apply (.= (†((equalset_extS_id_X_X ??)\sup -1‡
147                     (equalset_extS_id_X_X ??)\sup -1)));
148        apply refl1;
149      | apply (.= (equalset_extS_id_X_X ??));
150        apply refl1]
151   | apply convergent_relation_space_composition
152   | intros; simplify;
153     change with (a34 ∘ (a23 ∘ a12) = (a34 ∘ a23) ∘ a12);
154     apply (.= ASSOC1);
155     apply refl1
156   | intros; simplify;
157     change with (a ∘ id1 ? o1 = a);
158     apply (.= id_neutral_right1 ????);
159     apply refl1
160   | intros; simplify;
161     change with (id1 ? o2 ∘ a = a);
162     apply (.= id_neutral_left1 ????);
163     apply refl1]
164 qed.