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 "o-basic_pairs.ma".
16 include "o-saturations.ma".
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)).
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)).
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)).
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)).
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));]
40 lemma xxx : ∀x.carr x → carr1 (setoid1_of_setoid x). intros; assumption; qed.
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));].
50 alias symbol "eq" = "setoid eq".
51 alias symbol "and" = "o-algebra binary meet".
52 record concrete_space : Type ≝
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;
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:setoid.∀p:ums 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
66 interpretation "o-concrete space downarrow" 'downarrow x = (fun_1 __ (downarrow _) x).
68 definition bp': concrete_space → basic_pair ≝ λc.bp c.
71 record convergent_relation_pair (CS1,CS2: concrete_space) : Type ≝
72 { rp:> arrows1 ? CS1 CS2;
75 extS ?? rp \sub\c (BPextS CS2 (b ↓ c)) =
76 BPextS CS1 ((extS ?? rp \sub\f b) ↓ (extS ?? rp \sub\f c));
78 extS ?? rp\sub\c (BPextS CS2 (form CS2)) = BPextS CS1 (form CS1)
81 definition rp' : ∀CS1,CS2. convergent_relation_pair CS1 CS2 → relation_pair CS1 CS2 ≝
82 λCS1,CS2,c. rp CS1 CS2 c.
86 definition convergent_relation_space_setoid: concrete_space → concrete_space → setoid1.
89 [ apply (convergent_relation_pair c c1)
92 apply (relation_pair_equality c c1 c2 c3);
93 | intros 1; apply refl1;
94 | intros 2; apply sym1;
95 | intros 3; apply trans1]]
98 definition rp'': ∀CS1,CS2.convergent_relation_space_setoid CS1 CS2 → arrows1 BP CS1 CS2 ≝
103 definition convergent_relation_space_composition:
104 ∀o1,o2,o3: concrete_space.
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 ⊢ %;
112 [ apply (fun1 ??? (comp1 BP ???)); [apply (bp o2) |*: apply rp; assumption]
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)));
124 | change in ⊢ (? ? ? (? ? ? (? ? ? %) ?) ?) with (c1 \sub \c ∘ c \sub \c);
125 apply (.= (extS_com ??????));
126 apply (.= (†(respects_all_covered ???)));
127 apply (.= respects_all_covered ???);
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');
137 definition CSPA: category1.
139 [ apply concrete_space
140 | apply convergent_relation_space_setoid
141 | intro; constructor 1;
145 apply (.= (equalset_extS_id_X_X ??));
146 apply (.= (†((equalset_extS_id_X_X ??)\sup -1‡
147 (equalset_extS_id_X_X ??)\sup -1)));
149 | apply (.= (equalset_extS_id_X_X ??));
151 | apply convergent_relation_space_composition
153 change with (a34 ∘ (a23 ∘ a12) = (a34 ∘ a23) ∘ a12);
157 change with (a ∘ id1 ? o1 = a);
158 apply (.= id_neutral_right1 ????);
161 change with (id1 ? o2 ∘ a = a);
162 apply (.= id_neutral_left1 ????);