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 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));]
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));
28 record concrete_space : Type2 ≝
30 (*distr : is_distributive (form bp);*)
31 downarrow: unary_morphism1 (form bp) (form bp);
32 downarrow_is_sat: is_o_saturation ? downarrow;
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
42 interpretation "o-concrete space downarrow" 'downarrow x =
43 (fun11 __ (downarrow _) x).
45 definition bp': concrete_space → basic_pair ≝ λc.bp c.
48 definition bp'': concrete_space → objs2 BP.
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);
58 alias symbol "prop2" = "prop21".
59 alias symbol "prop1" = "prop11".
63 interpretation "concrete_space binary ↓" 'fintersects a b = (fun21 _ _ _ (binary_downarrow _) a b).
65 record convergent_relation_pair (CS1,CS2: concrete_space) : Type2 ≝
66 { rp:> arrows2 ? CS1 CS2;
68 ∀b,c. eq1 ? (rp\sub\c⎻ (Ext⎽CS2 (b ↓ c))) (Ext⎽CS1 (rp\sub\f⎻ b ↓ rp\sub\f⎻ c));
70 eq1 ? (rp\sub\c⎻ (Ext⎽CS2 (oa_one (form CS2))))
71 (Ext⎽CS1 (oa_one (form CS1)))
74 definition rp' : ∀CS1,CS2. convergent_relation_pair CS1 CS2 → relation_pair CS1 CS2 ≝
75 λCS1,CS2,c. rp CS1 CS2 c.
78 definition convergent_relation_space_setoid: concrete_space → concrete_space → setoid2.
81 [ apply (convergent_relation_pair c c1)
84 apply (relation_pair_equality c c1 c2 c3);
85 | intros 1; apply refl2;
86 | intros 2; apply sym2;
87 | intros 3; apply trans2]]
91 definition rp'': ∀CS1,CS2.carr2 (convergent_relation_space_setoid CS1 CS2) → arrows2 BP CS1 CS2 ≝
96 definition rp''': ∀CS1,CS2.Type_OF_setoid21 (convergent_relation_space_setoid CS1 CS2) → arrows2 BP CS1 CS2 ≝
100 definition rp'''': ∀CS1,CS2.Type_OF_setoid21 (convergent_relation_space_setoid CS1 CS2) → carr2 (arrows2 BP CS1 CS2) ≝
104 definition convergent_relation_space_composition:
105 ∀o1,o2,o3: concrete_space.
107 (convergent_relation_space_setoid o1 o2)
108 (convergent_relation_space_setoid o2 o3)
109 (convergent_relation_space_setoid o1 o3).
110 intros; constructor 1;
111 [ intros; whd in t t1 ⊢ %;
115 change in ⊢ (? ? ? % ?) with (t\sub\c⎻ (t1\sub\c⎻ (Ext⎽o3 (b↓c))));
116 unfold FunClass_1_OF_Type_OF_setoid21;
117 alias symbol "trans" = "trans1".
118 apply (.= († (respects_converges : ?)));
119 apply (respects_converges ?? t (t1\sub\f⎻ b) (t1\sub\f⎻ c));
120 | change in ⊢ (? ? ? % ?) with (t\sub\c⎻ (t1\sub\c⎻ (Ext⎽o3 (oa_one (form o3)))));
121 unfold FunClass_1_OF_Type_OF_setoid21;
122 apply (.= (†(respects_all_covered :?)));
123 apply rule (respects_all_covered ?? t);]
125 change with (b ∘ a = b' ∘ a');
126 change in e with (rp'' ?? a = rp'' ?? a');
127 change in e1 with (rp'' ?? b = rp ?? b');
131 definition CSPA: category2.
133 [ apply concrete_space
134 | apply convergent_relation_space_setoid
135 | intro; constructor 1;
137 | intros; apply refl1;
139 | apply convergent_relation_space_composition
140 | intros; simplify; whd in a12 a23 a34;
141 change with (a34 ∘ (a23 ∘ a12) = (a34 ∘ a23) ∘ a12);
144 change with (a ∘ id2 BP o1 = a);
145 apply (id_neutral_right2 : ?);
147 change with (id2 ? o2 ∘ a = a);
148 apply (id_neutral_left2 : ?);]