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; [ apply (λx.□_b (Ext⎽b x)); | intros; apply (†(†H));] qed.
37 lemma xxx : ∀x.carr x → carr1 (setoid1_of_setoid x). intros; assumption; qed.
41 ∀S:setoid.∀I:setoid.∀d:unary_morphism S S.∀p:ums I S.ums I S.
42 intros; constructor 1; [ apply (λi:I. u (c i));| intros; apply (†(†H));].
45 alias symbol "eq" = "setoid eq".
46 alias symbol "and" = "o-algebra binary meet".
47 record concrete_space : Type ≝
49 (*distr : is_distributive (form bp);*)
50 downarrow: unary_morphism (oa_P (form bp)) (oa_P (form bp));
51 downarrow_is_sat: is_saturation ? downarrow;
53 (Ext⎽bp q1 ∧ (Ext⎽bp q2)) = (Ext⎽bp ((downarrow q1) ∧ (downarrow q2)));
54 all_covered: Ext⎽bp (oa_one (form bp)) = oa_one (concr bp);
55 il2: ∀I:setoid.∀p:ums I (oa_P (form bp)).
56 downarrow (oa_join ? I (d_p_i ?? downarrow p)) =
57 oa_join ? I (d_p_i ?? downarrow p);
58 il1: ∀q.downarrow (A ? q) = A ? q
61 interpretation "o-concrete space downarrow" 'downarrow x = (fun_1 __ (downarrow _) x).
63 definition bp': concrete_space → basic_pair ≝ λc.bp c.
66 record convergent_relation_pair (CS1,CS2: concrete_space) : Type ≝
67 { rp:> arrows1 ? CS1 CS2;
70 extS ?? rp \sub\c (BPextS CS2 (b ↓ c)) =
71 BPextS CS1 ((extS ?? rp \sub\f b) ↓ (extS ?? rp \sub\f c));
73 extS ?? rp\sub\c (BPextS CS2 (form CS2)) = BPextS CS1 (form CS1)
76 definition rp' : ∀CS1,CS2. convergent_relation_pair CS1 CS2 → relation_pair CS1 CS2 ≝
77 λCS1,CS2,c. rp CS1 CS2 c.
81 definition convergent_relation_space_setoid: concrete_space → concrete_space → setoid1.
84 [ apply (convergent_relation_pair c c1)
87 apply (relation_pair_equality c c1 c2 c3);
88 | intros 1; apply refl1;
89 | intros 2; apply sym1;
90 | intros 3; apply trans1]]
93 definition rp'': ∀CS1,CS2.convergent_relation_space_setoid CS1 CS2 → arrows1 BP CS1 CS2 ≝
98 definition convergent_relation_space_composition:
99 ∀o1,o2,o3: concrete_space.
101 (convergent_relation_space_setoid o1 o2)
102 (convergent_relation_space_setoid o2 o3)
103 (convergent_relation_space_setoid o1 o3).
104 intros; constructor 1;
105 [ intros; whd in c c1 ⊢ %;
107 [ apply (fun1 ??? (comp1 BP ???)); [apply (bp o2) |*: apply rp; assumption]
109 change in ⊢ (? ? ? (? ? ? (? ? ? %) ?) ?) with (c1 \sub \c ∘ c \sub \c);
110 change in ⊢ (? ? ? ? (? ? ? ? (? ? ? ? ? (? ? ? (? ? ? %) ?) ?)))
111 with (c1 \sub \f ∘ c \sub \f);
112 change in ⊢ (? ? ? ? (? ? ? ? (? ? ? ? ? ? (? ? ? (? ? ? %) ?))))
113 with (c1 \sub \f ∘ c \sub \f);
114 apply (.= (extS_com ??????));
115 apply (.= (†(respects_converges ?????)));
116 apply (.= (respects_converges ?????));
117 apply (.= (†(((extS_com ??????) \sup -1)‡(extS_com ??????)\sup -1)));
119 | change in ⊢ (? ? ? (? ? ? (? ? ? %) ?) ?) with (c1 \sub \c ∘ c \sub \c);
120 apply (.= (extS_com ??????));
121 apply (.= (†(respects_all_covered ???)));
122 apply (.= respects_all_covered ???);
125 change with (b ∘ a = b' ∘ a');
126 change in H with (rp'' ?? a = rp'' ?? a');
127 change in H1 with (rp'' ?? b = rp ?? b');
132 definition CSPA: category1.
134 [ apply concrete_space
135 | apply convergent_relation_space_setoid
136 | intro; constructor 1;
140 apply (.= (equalset_extS_id_X_X ??));
141 apply (.= (†((equalset_extS_id_X_X ??)\sup -1‡
142 (equalset_extS_id_X_X ??)\sup -1)));
144 | apply (.= (equalset_extS_id_X_X ??));
146 | apply convergent_relation_space_composition
148 change with (a34 ∘ (a23 ∘ a12) = (a34 ∘ a23) ∘ a12);
152 change with (a ∘ id1 ? o1 = a);
153 apply (.= id_neutral_right1 ????);
156 change with (id1 ? o2 ∘ a = a);
157 apply (.= id_neutral_left1 ????);