]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/library/formal_topology/o-algebra.ma
Preparing for 0.5.9 release.
[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 interpretation "o-relation f⎻*" 'OR_f_minus_star r = (fun12 ?? (or_f_minus_star ? ?) r).
245 interpretation "o-relation f⎻" 'OR_f_minus r = (fun12 ?? (or_f_minus ? ?) r).
246 interpretation "o-relation f*" 'OR_f_star r = (fun12 ?? (or_f_star ? ?) r).
247
248 definition or_prop1 : ∀P,Q:OAlgebra.∀F:ORelation_setoid P Q.∀p,q.
249    (F p ≤ q) =_1 (p ≤ F* q).
250 intros; apply (or_prop1_ ?? F p q);
251 qed.
252
253 definition or_prop2 : ∀P,Q:OAlgebra.∀F:ORelation_setoid P Q.∀p,q.
254    (F⎻ p ≤ q) = (p ≤ F⎻* q).
255 intros; apply (or_prop2_ ?? F p q);
256 qed.
257
258 definition or_prop3 : ∀P,Q:OAlgebra.∀F:ORelation_setoid P Q.∀p,q.
259    (F p >< q) = (p >< F⎻ q).
260 intros; apply (or_prop3_ ?? F p q);
261 qed.
262
263 definition ORelation_composition : ∀P,Q,R. 
264   (ORelation_setoid P Q) × (ORelation_setoid Q R) ⇒_2 (ORelation_setoid P R).
265 intros;
266 constructor 1;
267 [ intros (F G);
268   constructor 1;
269   [ apply (G ∘ F);
270   | apply rule (G⎻* ∘ F⎻* );
271   | apply (F* ∘ G* );
272   | apply (F⎻ ∘ G⎻);
273   | intros; 
274     change with ((G (F p) ≤ q) = (p ≤ (F* (G* q))));
275     apply (.= (or_prop1 :?));
276     apply (or_prop1 :?);
277   | intros;
278     change with ((F⎻ (G⎻ p) ≤ q) = (p ≤ (G⎻* (F⎻* q))));
279     apply (.= (or_prop2 :?));
280     apply or_prop2 ; 
281   | intros; change with ((G (F (p)) >< q) = (p >< (F⎻ (G⎻ q))));
282     apply (.= (or_prop3 :?));
283     apply or_prop3;
284   ]
285 | intros; split; simplify; 
286    [3: unfold arrows1_of_ORelation_setoid; apply ((†e)‡(†e1));
287    |1: apply ((†e)‡(†e1));
288    |2,4: apply ((†e1)‡(†e));]]
289 qed.
290
291 definition OA : category2.
292 split;
293 [ apply (OAlgebra);
294 | intros; apply (ORelation_setoid o o1);
295 | intro O; split;
296   [1,2,3,4: apply id2;
297   |5,6,7:intros; apply refl1;] 
298 | apply ORelation_composition;
299 | intros (P Q R S F G H); split;
300    [ change with (H⎻* ∘ G⎻* ∘ F⎻* = H⎻* ∘ (G⎻* ∘ F⎻* ));
301      apply (comp_assoc2 ????? (F⎻* ) (G⎻* ) (H⎻* ));
302    | apply ((comp_assoc2 ????? (H⎻) (G⎻) (F⎻))^-1);
303    | apply ((comp_assoc2 ????? F G H)^-1);
304    | apply ((comp_assoc2 ????? H* G* F* ));]
305 | intros; split; unfold ORelation_composition; simplify; apply id_neutral_left2;
306 | intros; split; unfold ORelation_composition; simplify; apply id_neutral_right2;]
307 qed.
308
309 definition OAlgebra_of_objs2_OA: objs2 OA → OAlgebra ≝ λx.x.
310 coercion OAlgebra_of_objs2_OA.
311
312 definition ORelation_setoid_of_arrows2_OA: 
313   ∀P,Q. arrows2 OA P Q → ORelation_setoid P Q ≝ λP,Q,c.c.
314 coercion ORelation_setoid_of_arrows2_OA.
315
316 prefer coercion Type_OF_objs2.
317
318 notation > "B ⇒_\o2 C" right associative with precedence 72 for @{'arrows2_OA $B $C}.
319 notation "B ⇒\sub (\o 2) C" right associative with precedence 72 for @{'arrows2_OA $B $C}.
320 interpretation "'arrows2_OA" 'arrows2_OA A B = (arrows2 OA A B).
321
322 (* qui la notazione non va *)
323 lemma leq_to_eq_join: ∀S:OA.∀p,q:S. p ≤ q → q = (binary_join ? p q).
324  intros;
325  apply oa_leq_antisym;
326   [ apply oa_density; intros;
327     apply oa_overlap_sym;
328     unfold binary_join; simplify;
329     apply (. (oa_join_split : ?));
330     exists; [ apply false ]
331     apply oa_overlap_sym;
332     assumption
333   | unfold binary_join; simplify;
334     apply (. (oa_join_sup : ?)); intro;
335     cases i; whd in ⊢ (? ? ? ? ? % ?);
336      [ assumption | apply oa_leq_refl ]]
337 qed.
338
339 lemma overlap_monotone_left: ∀S:OA.∀p,q,r:S. p ≤ q → p >< r → q >< r.
340  intros;
341  apply (. (leq_to_eq_join : ?)‡#);
342   [ apply f;
343   | skip
344   | apply oa_overlap_sym;
345     unfold binary_join; simplify;
346     apply (. (oa_join_split : ?));
347     exists [ apply true ]
348     apply oa_overlap_sym;
349     assumption; ]
350 qed.
351
352 (* Part of proposition 9.9 *)
353 lemma f_minus_image_monotone: ∀S,T.∀R:arrows2 OA S T.∀p,q. p ≤ q → R⎻ p ≤ R⎻ q.
354  intros;
355  apply (. (or_prop2 : ?));
356  apply oa_leq_trans; [2: apply f; | skip | apply (. (or_prop2 : ?)^ -1); apply oa_leq_refl;]
357 qed.
358  
359 (* Part of proposition 9.9 *)
360 lemma f_minus_star_image_monotone: ∀S,T.∀R:arrows2 OA S T.∀p,q. p ≤ q → R⎻* p ≤ R⎻* q.
361  intros;
362  apply (. (or_prop2 : ?)^ -1);
363  apply oa_leq_trans; [3: apply f; | skip | apply (. (or_prop2 : ?)); apply oa_leq_refl;]
364 qed.
365
366 (* Part of proposition 9.9 *)
367 lemma f_image_monotone: ∀S,T.∀R:arrows2 OA S T.∀p,q. p ≤ q → R p ≤ R q.
368  intros;
369  apply (. (or_prop1 : ?));
370  apply oa_leq_trans; [2: apply f; | skip | apply (. (or_prop1 : ?)^ -1); apply oa_leq_refl;]
371 qed.
372
373 (* Part of proposition 9.9 *)
374 lemma f_star_image_monotone: ∀S,T.∀R:arrows2 OA S T.∀p,q. p ≤ q → R* p ≤ R* q.
375  intros;
376  apply (. (or_prop1 : ?)^ -1);
377  apply oa_leq_trans; [3: apply f; | skip | apply (. (or_prop1 : ?)); apply oa_leq_refl;]
378 qed.
379
380 lemma lemma_10_2_a: ∀S,T.∀R:arrows2 OA S T.∀p. p ≤ R⎻* (R⎻ p).
381  intros;
382  apply (. (or_prop2 : ?)^-1);
383  apply oa_leq_refl.
384 qed.
385
386 lemma lemma_10_2_b: ∀S,T.∀R:arrows2 OA S T.∀p. R⎻ (R⎻* p) ≤ p.
387  intros;
388  apply (. (or_prop2 : ?));
389  apply oa_leq_refl.
390 qed.
391
392 lemma lemma_10_2_c: ∀S,T.∀R:arrows2 OA S T.∀p. p ≤ R* (R p).
393  intros;
394  apply (. (or_prop1 : ?)^-1);
395  apply oa_leq_refl.
396 qed.
397
398 lemma lemma_10_2_d: ∀S,T.∀R:arrows2 OA S T.∀p. R (R* p) ≤ p.
399  intros;
400  apply (. (or_prop1 : ?));
401  apply oa_leq_refl.
402 qed.
403
404 lemma lemma_10_3_a: ∀S,T.∀R:arrows2 OA S T.∀p. R⎻ (R⎻* (R⎻ p)) = R⎻ p.
405  intros; apply oa_leq_antisym;
406   [ apply lemma_10_2_b;
407   | apply f_minus_image_monotone;
408     apply lemma_10_2_a; ]
409 qed.
410
411 lemma lemma_10_3_b: ∀S,T.∀R:arrows2 OA S T.∀p. R* (R (R* p)) = R* p.
412  intros; apply oa_leq_antisym;
413   [ apply f_star_image_monotone;
414     apply (lemma_10_2_d ?? R p);
415   | apply lemma_10_2_c; ]
416 qed.
417
418 lemma lemma_10_3_c: ∀S,T.∀R:arrows2 OA S T.∀p. R (R* (R p)) = R p.
419  intros; apply oa_leq_antisym;
420   [ apply lemma_10_2_d;
421   | apply f_image_monotone;
422     apply (lemma_10_2_c ?? R p); ]
423 qed.
424
425 lemma lemma_10_3_d: ∀S,T.∀R:arrows2 OA S T.∀p. R⎻* (R⎻ (R⎻* p)) = R⎻* p.
426  intros; apply oa_leq_antisym;
427   [ apply f_minus_star_image_monotone;
428     apply (lemma_10_2_b ?? R p);
429   | apply lemma_10_2_a; ]
430 qed.
431
432 lemma lemma_10_4_a: ∀S,T.∀R:arrows2 OA S T.∀p. R⎻* (R⎻ (R⎻* (R⎻ p))) = R⎻* (R⎻ p).
433  intros; apply (†(lemma_10_3_a ?? R p));
434 qed.
435
436 lemma lemma_10_4_b: ∀S,T.∀R:arrows2 OA S T.∀p. R (R* (R (R* p))) = R (R* p).
437 intros; unfold in ⊢ (? ? ? % %); apply (†(lemma_10_3_b ?? R p));
438 qed.
439
440 lemma oa_overlap_sym': ∀o:OA.∀U,V:o. (U >< V) = (V >< U).
441  intros; split; intro; apply oa_overlap_sym; assumption.
442 qed.