]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/formal_topology/overlap/o-concrete_spaces.ma
Some work on o-algebras towards the proof that a and j are saturation/reduction
[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 definition A : ∀b:BP. unary_morphism1 (form b) (form b).
19 intros; constructor 1;
20  [ apply (λx.□_b (Ext⎽b x));
21  | do 2 unfold FunClass_1_OF_Type_OF_setoid21; intros; apply  (†(†e));]
22 qed.
23
24 lemma down_p : ∀S:SET1.∀I:SET.∀u:S⇒S.∀c:arrows2 SET1 I S.∀a:I.∀a':I.a=a'→u (c a)=u (c a').
25 intros; apply (†(†e));
26 qed.
27
28 record concrete_space : Type2 ≝
29  { bp:> BP;
30    (*distr : is_distributive (form bp);*)
31    downarrow: unary_morphism1 (form bp) (form bp);
32    downarrow_is_sat: is_o_saturation ? downarrow;
33    converges: ∀q1,q2.
34      (Ext⎽bp q1 ∧ (Ext⎽bp q2)) = (Ext⎽bp ((downarrow q1) ∧ (downarrow q2)));
35    all_covered: Ext⎽bp (oa_one (form bp)) = oa_one (concr bp);
36    il2: ∀I:SET.∀p:arrows2 SET1 I (form bp).
37      downarrow (∨ { x ∈ I | downarrow (p x) | down_p ???? }) =
38      ∨ { x ∈ I | downarrow (p x) | down_p ???? };
39    il1: ∀q.downarrow (A ? q) = A ? q
40  }.
41
42 interpretation "o-concrete space downarrow" 'downarrow x = 
43   (fun11 __ (downarrow _) x).
44
45 definition bp': concrete_space → basic_pair ≝ λc.bp c.
46 coercion bp'.
47
48 definition bp'': concrete_space → objs2 BP.
49  intro; apply (bp' c);
50 qed.
51 coercion bp''.
52
53 definition binary_downarrow : 
54   ∀C:concrete_space.binary_morphism1 (form C) (form C) (form C).
55 intros; constructor 1;
56 [ intros; apply (↓ t ∧ ↓ t1);
57 | intros;
58   alias symbol "prop2" = "prop21".
59   alias symbol "prop1" = "prop11".
60   apply ((†e)‡(†e1));]
61 qed.
62
63 interpretation "concrete_space binary ↓" 'fintersects a b = (fun21 _ _ _ (binary_downarrow _) a b).
64
65 record convergent_relation_pair (CS1,CS2: concrete_space) : Type2 ≝
66  { rp:> arrows2 ? CS1 CS2;
67    respects_converges:
68     ∀b,c. eq1 ? (rp\sub\c⎻ (Ext⎽CS2 (b ↓ c))) (Ext⎽CS1 (rp\sub\f⎻ b ↓ rp\sub\f⎻ c));
69    respects_all_covered:
70      eq1 ? (rp\sub\c⎻ (Ext⎽CS2 (oa_one (form CS2))))
71            (Ext⎽CS1 (oa_one (form CS1)))
72  }.
73
74 definition rp' : ∀CS1,CS2. convergent_relation_pair CS1 CS2 → relation_pair CS1 CS2 ≝
75  λCS1,CS2,c. rp CS1 CS2 c.
76 coercion rp'.
77
78 definition convergent_relation_space_setoid: concrete_space → concrete_space → setoid2.
79  intros;
80  constructor 1;
81   [ apply (convergent_relation_pair c c1)
82   | constructor 1;
83      [ intros;
84        apply (relation_pair_equality c c1 c2 c3);
85      | intros 1; apply refl2;
86      | intros 2; apply sym2; 
87      | intros 3; apply trans2]]
88 qed.
89
90
91 definition rp'': ∀CS1,CS2.carr2 (convergent_relation_space_setoid CS1 CS2) → arrows2 BP CS1 CS2 ≝
92  λCS1,CS2,c.rp ?? c.
93 coercion rp''.
94
95 definition rp''': ∀CS1,CS2.Type_OF_setoid2 (convergent_relation_space_setoid CS1 CS2) → arrows2 BP CS1 CS2 ≝
96  λCS1,CS2,c.rp ?? c.
97 coercion rp'''.
98
99 definition rp'''': ∀CS1,CS2.Type_OF_setoid2 (convergent_relation_space_setoid CS1 CS2) → carr2 (arrows2 BP CS1 CS2) ≝
100  λCS1,CS2,c.rp ?? c.
101 coercion rp''''.
102
103 definition convergent_relation_space_composition:
104  ∀o1,o2,o3: concrete_space.
105   binary_morphism2
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 t t1 ⊢ %;
111        constructor 1;
112         [ apply (t1 ∘ t);
113         | intros;
114           change in ⊢ (? ? ? % ?) with (t\sub\c⎻ (t1\sub\c⎻ (Ext⎽o3 (b↓c))));
115           unfold FunClass_1_OF_Type_OF_setoid21;
116           alias symbol "trans" = "trans1".
117           apply (.= († (respects_converges : ?)));
118           apply (respects_converges ?? t (t1\sub\f⎻ b) (t1\sub\f⎻ c));
119         | change in ⊢ (? ? ? % ?) with (t\sub\c⎻ (t1\sub\c⎻ (Ext⎽o3 (oa_one (form o3)))));
120           unfold FunClass_1_OF_Type_OF_setoid21;
121           apply (.= (†(respects_all_covered :?)));
122           apply rule (respects_all_covered ?? t);]
123      | intros;
124        change with (b ∘ a = b' ∘ a'); 
125        change in e with (rp'' ?? a = rp'' ?? a');
126        change in e1 with (rp'' ?? b = rp ?? b');
127        apply (e‡e1);]
128 qed.
129
130 definition CSPA: category2.
131  constructor 1;
132   [ apply concrete_space
133   | apply convergent_relation_space_setoid
134   | intro; constructor 1;
135      [ apply id2
136      | intros; apply refl1;
137      | apply refl1]
138   | apply convergent_relation_space_composition
139   | intros; simplify; whd in a12 a23 a34;
140     change with (a34 ∘ (a23 ∘ a12) = (a34 ∘ a23) ∘ a12);
141     apply rule ASSOC;
142   | intros; simplify;
143     change with (a ∘ id2 ? o1 = a);
144     apply (id_neutral_right2 : ?);
145   | intros; simplify;
146     change with (id2 ? o2 ∘ a = a);
147     apply (id_neutral_left2 : ?);]
148 qed.