]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/library/formal_topology/o-algebra.ma
more notation
[helm.git] / helm / software / matita / library / formal_topology / o-algebra.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 "formal_topology/categories.ma".
16
17 inductive bool : Type0 := true : bool | false : bool.
18
19 lemma BOOL : objs1 SET.
20 constructor 1; [apply bool] constructor 1;
21 [ intros (x y); apply (match x with [ true ⇒ match y with [ true ⇒ True | _ ⇒ False] | false ⇒ match y with [ true ⇒ False | false ⇒ True ]]);
22 | whd; simplify; intros; cases x; apply I;
23 | whd; simplify; intros 2; cases x; cases y; simplify; intros; assumption;
24 | whd; simplify; intros 3; cases x; cases y; cases z; simplify; intros; 
25   try assumption; apply I]
26 qed.
27
28 lemma IF_THEN_ELSE_p :
29   ∀S:setoid1.∀a,b:S.∀x,y:BOOL.x = y → 
30     (λm.match m with [ true ⇒ a | false ⇒ b ]) x =
31     (λm.match m with [ true ⇒ a | false ⇒ b ]) y.
32 whd in ⊢ (?→?→?→%→?);
33 intros; cases x in e; cases y; simplify; intros; try apply refl1; whd in e; cases e;
34 qed.
35
36 interpretation "unary morphism comprehension with no proof" 'comprehension T P = 
37   (mk_unary_morphism T ? P ?).
38 interpretation "unary morphism1 comprehension with no proof" 'comprehension T P = 
39   (mk_unary_morphism1 T ? P ?).
40
41 notation > "hvbox({ ident i ∈ s | term 19 p | by })" with precedence 90
42 for @{ 'comprehension_by $s (λ${ident i}. $p) $by}.
43 notation < "hvbox({ ident i ∈ s | term 19 p })" with precedence 90
44 for @{ 'comprehension_by $s (λ${ident i}:$_. $p) $by}.
45
46 interpretation "unary morphism comprehension with proof" 'comprehension_by s \eta.f p = 
47   (mk_unary_morphism s ? f p).
48 interpretation "unary morphism1 comprehension with proof" 'comprehension_by s \eta.f p = 
49   (mk_unary_morphism1 s ? f p).
50
51 (* per il set-indexing vedere capitolo BPTools (foundational tools), Sect. 0.3.4 complete
52    lattices, Definizione 0.9 *)
53 (* USARE L'ESISTENZIALE DEBOLE *)
54
55 definition if_then_else ≝ λT:Type.λe,t,f.match e return λ_.T with [ true ⇒ t | false ⇒ f].
56 notation > "'If' term 19 e 'then' term 19 t 'else' term 90 f" non associative with precedence 19 for @{ 'if_then_else $e $t $f }.
57 notation < "'If' \nbsp term 19 e \nbsp 'then' \nbsp term 19 t \nbsp 'else' \nbsp term 90 f \nbsp" non associative with precedence 19 for @{ 'if_then_else $e $t $f }.
58 interpretation "Formula if_then_else" 'if_then_else e t f = (if_then_else ? e t f).
59
60 notation > "hvbox(a break ≤ b)" non associative with precedence 45 for @{oa_leq $a $b}.
61 notation > "a >< b" non associative with precedence 45 for @{oa_overlap $a $b}.
62 notation > "⋁ p" non associative with precedence 45 for @{oa_join ? $p}.
63 notation > "⋀ p" non associative with precedence 45 for @{oa_meet ? $p}.
64 notation > "𝟙" non associative with precedence 90 for @{oa_one}. 
65 notation > "𝟘" non associative with precedence 90 for @{oa_zero}. 
66 record OAlgebra : Type2 := {
67   oa_P :> SET1;
68   oa_leq : oa_P × oa_P ⇒_1 CPROP;
69   oa_overlap: oa_P × oa_P ⇒_1 CPROP;
70   oa_meet: ∀I:SET.(I ⇒_2 oa_P) ⇒_2. oa_P;
71   oa_join: ∀I:SET.(I ⇒_2 oa_P) ⇒_2. oa_P;
72   oa_one: oa_P;
73   oa_zero: oa_P;
74   oa_leq_refl: ∀a:oa_P. a ≤ a; 
75   oa_leq_antisym: ∀a,b:oa_P.a ≤ b → b ≤ a → a = b;
76   oa_leq_trans: ∀a,b,c:oa_P.a ≤ b → b ≤ c → a ≤ c;
77   oa_overlap_sym: ∀a,b:oa_P.a >< b → b >< a;
78   oa_meet_inf: ∀I:SET.∀p_i:I ⇒_2 oa_P.∀p:oa_P.p ≤ (⋀ p_i) = (∀i:I.p ≤ (p_i i));
79   oa_join_sup: ∀I:SET.∀p_i:I ⇒_2 oa_P.∀p:oa_P.(⋁ p_i) ≤ p = (∀i:I.p_i i ≤ p);
80   oa_zero_bot: ∀p:oa_P.𝟘 ≤ p;
81   oa_one_top: ∀p:oa_P.p ≤ 𝟙;
82   oa_overlap_preserves_meet_: ∀p,q:oa_P.p >< q → 
83         p >< (⋀ { x ∈ BOOL | If x then p else q | IF_THEN_ELSE_p oa_P p q });
84   oa_join_split: ∀I:SET.∀p.∀q:I ⇒_2 oa_P.p >< (⋁ q) = (∃i:I.p >< (q i));
85   (*oa_base : setoid;
86   1) enum non e' il nome giusto perche' non e' suriettiva
87   2) manca (vedere altro capitolo) la "suriettivita'" come immagine di insiemi di oa_base
88   oa_enum : ums oa_base oa_P;
89   oa_density: ∀p,q.(∀i.oa_overlap p (oa_enum i) → oa_overlap q (oa_enum i)) → oa_leq p q
90   *)
91   oa_density: ∀p,q.(∀r.p >< r → q >< r) → p ≤ q
92 }.
93
94 notation "hvbox(a break ≤ b)" non associative with precedence 45 for @{ 'leq $a $b }.
95
96 interpretation "o-algebra leq" 'leq a b = (fun21 ??? (oa_leq ?) a b).
97
98 notation "hovbox(a mpadded width -150% (>)< b)" non associative with precedence 45
99 for @{ 'overlap $a $b}.
100 interpretation "o-algebra overlap" 'overlap a b = (fun21 ??? (oa_overlap ?) a b).
101
102 notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (∧) \below (\emsp) \nbsp term 90 p)" 
103 non associative with precedence 50 for @{ 'oa_meet $p }.
104 notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (∧) \below (ident i ∈  I) break term 90 p)" 
105 non associative with precedence 50 for @{ 'oa_meet_mk (λ${ident i}:$I.$p) }.
106
107 notation > "hovbox(∧ f)" non associative with precedence 60
108 for @{ 'oa_meet $f }.
109 interpretation "o-algebra meet" 'oa_meet f = 
110   (fun12 ?? (oa_meet ??) f).
111 interpretation "o-algebra meet with explicit function" 'oa_meet_mk f = 
112   (fun12 ?? (oa_meet ??) (mk_unary_morphism1 ?? f ?)).
113
114 notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (∨) \below (\emsp) \nbsp term 90 p)" 
115 non associative with precedence 50 for @{ 'oa_join $p }.
116 notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (∨) \below (ident i ∈  I) break term 90 p)" 
117 non associative with precedence 50 for @{ 'oa_join_mk (λ${ident i}:$I.$p) }.
118
119 notation > "hovbox(∨ f)" non associative with precedence 60
120 for @{ 'oa_join $f }.
121 interpretation "o-algebra join" 'oa_join f = 
122   (fun12 ?? (oa_join ??) f).
123 interpretation "o-algebra join with explicit function" 'oa_join_mk f = 
124   (fun12 ?? (oa_join ??) (mk_unary_morphism ?? f ?)).
125
126 definition binary_meet : ∀O:OAlgebra. O × O ⇒_1 O.
127 intros; split;
128 [ intros (p q); 
129   apply (∧ { x ∈ BOOL | match x with [ true ⇒ p | false ⇒ q ] | IF_THEN_ELSE_p ? p q });
130 | intros; lapply (prop12 ? O (oa_meet O BOOL));
131    [2: apply ({ x ∈ BOOL | match x with [ true ⇒ a | false ⇒ b ] | IF_THEN_ELSE_p ? a b });
132    |3: apply ({ x ∈ BOOL | match x with [ true ⇒ a' | false ⇒ b' ] | IF_THEN_ELSE_p ? a' b' });
133    | apply Hletin;]
134   intro x; simplify; cases x; simplify; assumption;]
135 qed.
136
137 interpretation "o-algebra binary meet" 'and a b = 
138   (fun21 ??? (binary_meet ?) a b).
139
140 prefer coercion Type1_OF_OAlgebra.
141
142 definition binary_join : ∀O:OAlgebra. O × O ⇒_1 O.
143 intros; split;
144 [ intros (p q); 
145   apply (∨ { x ∈ BOOL | match x with [ true ⇒ p | false ⇒ q ] | IF_THEN_ELSE_p ? p q });
146 | intros; lapply (prop12 ? O (oa_join O BOOL));
147    [2: apply ({ x ∈ BOOL | match x with [ true ⇒ a | false ⇒ b ] | IF_THEN_ELSE_p ? a b });
148    |3: apply ({ x ∈ BOOL | match x with [ true ⇒ a' | false ⇒ b' ] | IF_THEN_ELSE_p ? a' b' });
149    | apply Hletin;]
150   intro x; simplify; cases x; simplify; assumption;]
151 qed.
152
153 interpretation "o-algebra binary join" 'or a b = 
154   (fun21 ??? (binary_join ?) a b).
155
156 lemma oa_overlap_preservers_meet: ∀O:OAlgebra.∀p,q:O.p >< q → p >< (p ∧ q).
157 intros;  lapply (oa_overlap_preserves_meet_ O p q f) as H; clear f;
158 (** screenshot "screenoa". *)
159 assumption;
160 qed.
161
162 notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (∨) \below (\emsp) \nbsp term 90 p)" 
163 non associative with precedence 49 for @{ 'oa_join $p }.
164 notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (∨) \below (ident i ∈  I) break term 90 p)" 
165 non associative with precedence 49 for @{ 'oa_join_mk (λ${ident i}:$I.$p) }.
166 notation < "hovbox(a ∨ b)" left associative with precedence 49
167 for @{ 'oa_join_mk (λ${ident i}:$_.match $i with [ true ⇒ $a | false ⇒ $b ]) }.
168
169 notation > "hovbox(∨ f)" non associative with precedence 59
170 for @{ 'oa_join $f }.
171 notation > "hovbox(a ∨ b)" left associative with precedence 49
172 for @{ 'oa_join (mk_unary_morphism BOOL ? (λx__:bool.match x__ with [ true ⇒ $a | false ⇒ $b ]) (IF_THEN_ELSE_p ? $a $b)) }.
173
174 interpretation "o-algebra join" 'oa_join f = 
175   (fun12 ?? (oa_join ??) f).
176 interpretation "o-algebra join with explicit function" 'oa_join_mk f = 
177   (fun12 ?? (oa_join ??) (mk_unary_morphism ?? f ?)).
178
179 record ORelation (P,Q : OAlgebra) : Type2 ≝ {
180   or_f_ : P ⇒_2 Q;
181   or_f_minus_star_ : P ⇒_2 Q;
182   or_f_star_ : Q ⇒_2 P;
183   or_f_minus_ : Q ⇒_2 P;
184   or_prop1_ : ∀p,q. (or_f_ p ≤ q) = (p ≤ or_f_star_ q);
185   or_prop2_ : ∀p,q. (or_f_minus_ p ≤ q) = (p ≤ or_f_minus_star_ q);
186   or_prop3_ : ∀p,q. (or_f_ p >< q) = (p >< or_f_minus_ q)
187 }.
188
189 definition ORelation_setoid : OAlgebra → OAlgebra → setoid2.
190 intros (P Q);
191 constructor 1;
192 [ apply (ORelation P Q);
193 | constructor 1;
194    (* tenere solo una uguaglianza e usare la proposizione 9.9 per
195       le altre (unicita' degli aggiunti e del simmetrico) *)
196    [ apply (λp,q. And42 
197              (or_f_minus_star_ ?? p = or_f_minus_star_ ?? q) 
198              (or_f_minus_ ?? p = or_f_minus_ ?? q) 
199              (or_f_ ?? p = or_f_ ?? q) 
200              (or_f_star_ ?? p = or_f_star_ ?? q)); 
201    | whd; simplify; intros; repeat split; intros; apply refl2;
202    | whd; simplify; intros; cases a; clear a; split; 
203      intro a; apply sym1; generalize in match a;assumption;
204    | whd; simplify; intros; cases a; cases a1; clear a a1; split; intro a;
205      [ apply (.= (e a)); apply e4;
206      | apply (.= (e1 a)); apply e5;
207      | apply (.= (e2 a)); apply e6;
208      | apply (.= (e3 a)); apply e7;]]]
209 qed.
210
211 definition ORelation_of_ORelation_setoid : 
212   ∀P,Q.ORelation_setoid P Q → ORelation P Q ≝ λP,Q,x.x.
213 coercion ORelation_of_ORelation_setoid.
214
215 definition or_f_minus_star: ∀P,Q:OAlgebra.(ORelation_setoid P Q) ⇒_2 (P ⇒_2 Q).
216  intros; constructor 1;
217   [ apply or_f_minus_star_;
218   | intros; cases e; assumption]
219 qed.
220
221 definition or_f: ∀P,Q:OAlgebra.(ORelation_setoid P Q) ⇒_2 (P ⇒_2 Q).
222  intros; constructor 1;
223   [ apply or_f_;
224   | intros; cases e; assumption]
225 qed.
226
227 definition or_f_minus: ∀P,Q:OAlgebra.(ORelation_setoid P Q) ⇒_2 (Q ⇒_2 P).
228  intros; constructor 1;
229   [ apply or_f_minus_;
230   | intros; cases e; assumption]
231 qed.
232
233 definition or_f_star: ∀P,Q:OAlgebra.(ORelation_setoid P Q) ⇒_2 (Q ⇒_2 P).
234  intros; constructor 1;
235   [ apply or_f_star_;
236   | intros; cases e; assumption]
237 qed.
238
239 lemma arrows1_of_ORelation_setoid : ∀P,Q. ORelation_setoid P Q → (P ⇒_2 Q). 
240 intros; apply (or_f ?? c);
241 qed.
242 coercion arrows1_of_ORelation_setoid.
243
244 notation "r \sup *" non associative with precedence 90 for @{'OR_f_star $r}.
245 notation > "r *" non associative with precedence 90 for @{'OR_f_star $r}.
246
247 notation "r \sup (⎻* )" non associative with precedence 90 for @{'OR_f_minus_star $r}.
248 notation > "r⎻*" non associative with precedence 90 for @{'OR_f_minus_star $r}.
249
250 notation "r \sup ⎻" non associative with precedence 90 for @{'OR_f_minus $r}.
251 notation > "r⎻" non associative with precedence 90 for @{'OR_f_minus $r}.
252
253 interpretation "o-relation f⎻*" 'OR_f_minus_star r = (fun12 ?? (or_f_minus_star ? ?) r).
254 interpretation "o-relation f⎻" 'OR_f_minus r = (fun12 ?? (or_f_minus ? ?) r).
255 interpretation "o-relation f*" 'OR_f_star r = (fun12 ?? (or_f_star ? ?) r).
256
257 definition or_prop1 : ∀P,Q:OAlgebra.∀F:ORelation_setoid P Q.∀p,q.
258    (F p ≤ q) = (p ≤ F* q).
259 intros; apply (or_prop1_ ?? F p q);
260 qed.
261
262 definition or_prop2 : ∀P,Q:OAlgebra.∀F:ORelation_setoid P Q.∀p,q.
263    (F⎻ p ≤ q) = (p ≤ F⎻* q).
264 intros; apply (or_prop2_ ?? F p q);
265 qed.
266
267 definition or_prop3 : ∀P,Q:OAlgebra.∀F:ORelation_setoid P Q.∀p,q.
268    (F p >< q) = (p >< F⎻ q).
269 intros; apply (or_prop3_ ?? F p q);
270 qed.
271
272 definition ORelation_composition : ∀P,Q,R. 
273   (ORelation_setoid P Q) × (ORelation_setoid Q R) ⇒_2 (ORelation_setoid P R).
274 intros;
275 constructor 1;
276 [ intros (F G);
277   constructor 1;
278   [ apply (G ∘ F);
279   | apply rule (G⎻* ∘ F⎻* );
280   | apply (F* ∘ G* );
281   | apply (F⎻ ∘ G⎻);
282   | intros; 
283     change with ((G (F p) ≤ q) = (p ≤ (F* (G* q))));
284     apply (.= (or_prop1 :?));
285     apply (or_prop1 :?);
286   | intros;
287     change with ((F⎻ (G⎻ p) ≤ q) = (p ≤ (G⎻* (F⎻* q))));
288     apply (.= (or_prop2 :?));
289     apply or_prop2 ; 
290   | intros; change with ((G (F (p)) >< q) = (p >< (F⎻ (G⎻ q))));
291     apply (.= (or_prop3 :?));
292     apply or_prop3;
293   ]
294 | intros; split; simplify; 
295    [3: unfold arrows1_of_ORelation_setoid; apply ((†e)‡(†e1));
296    |1: apply ((†e)‡(†e1));
297    |2,4: apply ((†e1)‡(†e));]]
298 qed.
299
300 definition OA : category2.
301 split;
302 [ apply (OAlgebra);
303 | intros; apply (ORelation_setoid o o1);
304 | intro O; split;
305   [1,2,3,4: apply id2;
306   |5,6,7:intros; apply refl1;] 
307 | apply ORelation_composition;
308 | intros (P Q R S F G H); split;
309    [ change with (H⎻* ∘ G⎻* ∘ F⎻* = H⎻* ∘ (G⎻* ∘ F⎻* ));
310      apply (comp_assoc2 ????? (F⎻* ) (G⎻* ) (H⎻* ));
311    | apply ((comp_assoc2 ????? (H⎻) (G⎻) (F⎻))^-1);
312    | apply ((comp_assoc2 ????? F G H)^-1);
313    | apply ((comp_assoc2 ????? H* G* F* ));]
314 | intros; split; unfold ORelation_composition; simplify; apply id_neutral_left2;
315 | intros; split; unfold ORelation_composition; simplify; apply id_neutral_right2;]
316 qed.
317
318 definition OAlgebra_of_objs2_OA: objs2 OA → OAlgebra ≝ λx.x.
319 coercion OAlgebra_of_objs2_OA.
320
321 definition ORelation_setoid_of_arrows2_OA: 
322   ∀P,Q. arrows2 OA P Q → ORelation_setoid P Q ≝ λP,Q,c.c.
323 coercion ORelation_setoid_of_arrows2_OA.
324
325 prefer coercion Type_OF_objs2.
326
327 notation > "B ⇒_\o2 C" right associative with precedence 72 for @{'arrows2_OA $B $C}.
328 notation "B ⇒\sub (\o 2) C" right associative with precedence 72 for @{'arrows2_OA $B $C}.
329 interpretation "'arrows2_OA" 'arrows2_OA A B = (arrows2 OA A B).
330
331 (* qui la notazione non va *)
332 lemma leq_to_eq_join: ∀S:OA.∀p,q:S. p ≤ q → q = (binary_join ? p q).
333  intros;
334  apply oa_leq_antisym;
335   [ apply oa_density; intros;
336     apply oa_overlap_sym;
337     unfold binary_join; simplify;
338     apply (. (oa_join_split : ?));
339     exists; [ apply false ]
340     apply oa_overlap_sym;
341     assumption
342   | unfold binary_join; simplify;
343     apply (. (oa_join_sup : ?)); intro;
344     cases i; whd in ⊢ (? ? ? ? ? % ?);
345      [ assumption | apply oa_leq_refl ]]
346 qed.
347
348 lemma overlap_monotone_left: ∀S:OA.∀p,q,r:S. p ≤ q → p >< r → q >< r.
349  intros;
350  apply (. (leq_to_eq_join : ?)‡#);
351   [ apply f;
352   | skip
353   | apply oa_overlap_sym;
354     unfold binary_join; simplify;
355     apply (. (oa_join_split : ?));
356     exists [ apply true ]
357     apply oa_overlap_sym;
358     assumption; ]
359 qed.
360
361 (* Part of proposition 9.9 *)
362 lemma f_minus_image_monotone: ∀S,T.∀R:arrows2 OA S T.∀p,q. p ≤ q → R⎻ p ≤ R⎻ q.
363  intros;
364  apply (. (or_prop2 : ?));
365  apply oa_leq_trans; [2: apply f; | skip | apply (. (or_prop2 : ?)^ -1); apply oa_leq_refl;]
366 qed.
367  
368 (* Part of proposition 9.9 *)
369 lemma f_minus_star_image_monotone: ∀S,T.∀R:arrows2 OA S T.∀p,q. p ≤ q → R⎻* p ≤ R⎻* q.
370  intros;
371  apply (. (or_prop2 : ?)^ -1);
372  apply oa_leq_trans; [3: apply f; | skip | apply (. (or_prop2 : ?)); apply oa_leq_refl;]
373 qed.
374
375 (* Part of proposition 9.9 *)
376 lemma f_image_monotone: ∀S,T.∀R:arrows2 OA S T.∀p,q. p ≤ q → R p ≤ R q.
377  intros;
378  apply (. (or_prop1 : ?));
379  apply oa_leq_trans; [2: apply f; | skip | apply (. (or_prop1 : ?)^ -1); apply oa_leq_refl;]
380 qed.
381
382 (* Part of proposition 9.9 *)
383 lemma f_star_image_monotone: ∀S,T.∀R:arrows2 OA S T.∀p,q. p ≤ q → R* p ≤ R* q.
384  intros;
385  apply (. (or_prop1 : ?)^ -1);
386  apply oa_leq_trans; [3: apply f; | skip | apply (. (or_prop1 : ?)); apply oa_leq_refl;]
387 qed.
388
389 lemma lemma_10_2_a: ∀S,T.∀R:arrows2 OA S T.∀p. p ≤ R⎻* (R⎻ p).
390  intros;
391  apply (. (or_prop2 : ?)^-1);
392  apply oa_leq_refl.
393 qed.
394
395 lemma lemma_10_2_b: ∀S,T.∀R:arrows2 OA S T.∀p. R⎻ (R⎻* p) ≤ p.
396  intros;
397  apply (. (or_prop2 : ?));
398  apply oa_leq_refl.
399 qed.
400
401 lemma lemma_10_2_c: ∀S,T.∀R:arrows2 OA S T.∀p. p ≤ R* (R p).
402  intros;
403  apply (. (or_prop1 : ?)^-1);
404  apply oa_leq_refl.
405 qed.
406
407 lemma lemma_10_2_d: ∀S,T.∀R:arrows2 OA S T.∀p. R (R* p) ≤ p.
408  intros;
409  apply (. (or_prop1 : ?));
410  apply oa_leq_refl.
411 qed.
412
413 lemma lemma_10_3_a: ∀S,T.∀R:arrows2 OA S T.∀p. R⎻ (R⎻* (R⎻ p)) = R⎻ p.
414  intros; apply oa_leq_antisym;
415   [ apply lemma_10_2_b;
416   | apply f_minus_image_monotone;
417     apply lemma_10_2_a; ]
418 qed.
419
420 lemma lemma_10_3_b: ∀S,T.∀R:arrows2 OA S T.∀p. R* (R (R* p)) = R* p.
421  intros; apply oa_leq_antisym;
422   [ apply f_star_image_monotone;
423     apply (lemma_10_2_d ?? R p);
424   | apply lemma_10_2_c; ]
425 qed.
426
427 lemma lemma_10_3_c: ∀S,T.∀R:arrows2 OA S T.∀p. R (R* (R p)) = R p.
428  intros; apply oa_leq_antisym;
429   [ apply lemma_10_2_d;
430   | apply f_image_monotone;
431     apply (lemma_10_2_c ?? R p); ]
432 qed.
433
434 lemma lemma_10_3_d: ∀S,T.∀R:arrows2 OA S T.∀p. R⎻* (R⎻ (R⎻* p)) = R⎻* p.
435  intros; apply oa_leq_antisym;
436   [ apply f_minus_star_image_monotone;
437     apply (lemma_10_2_b ?? R p);
438   | apply lemma_10_2_a; ]
439 qed.
440
441 lemma lemma_10_4_a: ∀S,T.∀R:arrows2 OA S T.∀p. R⎻* (R⎻ (R⎻* (R⎻ p))) = R⎻* (R⎻ p).
442  intros; apply (†(lemma_10_3_a ?? R p));
443 qed.
444
445 lemma lemma_10_4_b: ∀S,T.∀R:arrows2 OA S T.∀p. R (R* (R (R* p))) = R (R* p).
446 intros; unfold in ⊢ (? ? ? % %); apply (†(lemma_10_3_b ?? R p));
447 qed.
448
449 lemma oa_overlap_sym': ∀o:OA.∀U,V:o. (U >< V) = (V >< U).
450  intros; split; intro; apply oa_overlap_sym; assumption.
451 qed.