]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/contribs/formal_topology/overlap/o-algebra.ma
better notation for oalgebra
[helm.git] / helm / software / matita / contribs / formal_topology / overlap / 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 "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
56 notation > "A × B ⇉2,1 C" non associative with precedence 70 for @{binary_morphism1 $A $B $C}.
57 notation > "A × B ⇉2,2 C" non associative with precedence 70 for @{binary_morphism2 $A $B $C}.
58 notation > "B ⇉1,1 C" non associative with precedence 80 for @{arrows1 SET $B $C}.
59 notation > "B ⇉1,2 C" non associative with precedence 80 for @{unary_morphism2 $B $C}.
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 record OAlgebra : Type2 := {
65   oa_P :> SET1;
66   oa_leq : oa_P × oa_P ⇉2,1 CPROP;
67   oa_overlap: oa_P × oa_P ⇉2,1 CPROP;
68   oa_meet: ∀I:SET.(I ⇒ oa_P) ⇉1,2 oa_P;
69   oa_join: ∀I:SET.(I ⇒ oa_P) ⇉1,2 oa_P;
70   oa_one: oa_P;
71   oa_zero: oa_P;
72   oa_leq_refl: ∀a:oa_P. a ≤ a; 
73   oa_leq_antisym: ∀a,b:oa_P.a ≤ b → b ≤ a → a = b;
74   oa_leq_trans: ∀a,b,c:oa_P.a ≤ b → b ≤ c → a ≤ c;
75   oa_overlap_sym: ∀a,b:oa_P.a >< b → b >< a;
76   oa_meet_inf: ∀I:SET.∀p_i:I ⇒ oa_P.∀p:oa_P.p ≤ (⋀ p_i) = (∀i:I.p ≤ (p_i i));
77   oa_join_sup: ∀I:SET.∀p_i:I ⇒ oa_P.∀p:oa_P.(⋁ p_i) ≤ p = (∀i:I.p_i i ≤ p);
78   oa_zero_bot: ∀p:oa_P.oa_zero ≤ p;
79   oa_one_top: ∀p:oa_P.p ≤ oa_one;
80   oa_overlap_preserves_meet_: 
81       ∀p,q:oa_P.p >< q → 
82         p >< (⋀ { x ∈ BOOL | match x with [ true ⇒ p | false ⇒ q ] | IF_THEN_ELSE_p oa_P p q });
83   oa_join_split: ∀I:SET.∀p.∀q:I ⇒ oa_P.p >< (⋁ q) = (∃i:I.p >< (q i));
84   (*oa_base : setoid;
85   1) enum non e' il nome giusto perche' non e' suriettiva
86   2) manca (vedere altro capitolo) la "suriettivita'" come immagine di insiemi di oa_base
87   oa_enum : ums oa_base oa_P;
88   oa_density: ∀p,q.(∀i.oa_overlap p (oa_enum i) → oa_overlap q (oa_enum i)) → oa_leq p q
89   *)
90   oa_density: ∀p,q.(∀r.p >< r → q >< r) → p ≤ q
91 }.
92
93 notation "hvbox(a break ≤ b)" non associative with precedence 45 for @{ 'leq $a $b }.
94
95 interpretation "o-algebra leq" 'leq a b = (fun21 ??? (oa_leq ?) a b).
96
97 notation "hovbox(a mpadded width -150% (>)< b)" non associative with precedence 45
98 for @{ 'overlap $a $b}.
99 interpretation "o-algebra overlap" 'overlap a b = (fun21 ??? (oa_overlap ?) a b).
100
101 notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (∧) \below (\emsp) \nbsp term 90 p)" 
102 non associative with precedence 50 for @{ 'oa_meet $p }.
103 notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (∧) \below (ident i ∈  I) break term 90 p)" 
104 non associative with precedence 50 for @{ 'oa_meet_mk (λ${ident i}:$I.$p) }.
105
106 notation > "hovbox(∧ f)" non associative with precedence 60
107 for @{ 'oa_meet $f }.
108 interpretation "o-algebra meet" 'oa_meet f = 
109   (fun12 ?? (oa_meet ??) f).
110 interpretation "o-algebra meet with explicit function" 'oa_meet_mk f = 
111   (fun12 ?? (oa_meet ??) (mk_unary_morphism ?? f ?)).
112
113 notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (∨) \below (\emsp) \nbsp term 90 p)" 
114 non associative with precedence 50 for @{ 'oa_join $p }.
115 notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (∨) \below (ident i ∈  I) break term 90 p)" 
116 non associative with precedence 50 for @{ 'oa_join_mk (λ${ident i}:$I.$p) }.
117
118 notation > "hovbox(∨ f)" non associative with precedence 60
119 for @{ 'oa_join $f }.
120 interpretation "o-algebra join" 'oa_join f = 
121   (fun12 ?? (oa_join ??) f).
122 interpretation "o-algebra join with explicit function" 'oa_join_mk f = 
123   (fun12 ?? (oa_join ??) (mk_unary_morphism ?? f ?)).
124
125 definition binary_meet : ∀O:OAlgebra. binary_morphism1 O O O.
126 intros; split;
127 [ intros (p q); 
128   apply (∧ { x ∈ BOOL | match x with [ true ⇒ p | false ⇒ q ] | IF_THEN_ELSE_p ? p q });
129 | intros; lapply (prop12 ? O (oa_meet O BOOL));
130    [2: apply ({ x ∈ BOOL | match x with [ true ⇒ a | false ⇒ b ] | IF_THEN_ELSE_p ? a b });
131    |3: apply ({ x ∈ BOOL | match x with [ true ⇒ a' | false ⇒ b' ] | IF_THEN_ELSE_p ? a' b' });
132    | apply Hletin;]
133   intro x; simplify; cases x; simplify; assumption;]
134 qed.
135
136 interpretation "o-algebra binary meet" 'and a b = 
137   (fun21 ??? (binary_meet ?) a b).
138
139 prefer coercion Type1_OF_OAlgebra.
140
141 definition binary_join : ∀O:OAlgebra. binary_morphism1 O O O.
142 intros; split;
143 [ intros (p q); 
144   apply (∨ { x ∈ BOOL | match x with [ true ⇒ p | false ⇒ q ] | IF_THEN_ELSE_p ? p q });
145 | intros; lapply (prop12 ? O (oa_join O BOOL));
146    [2: apply ({ x ∈ BOOL | match x with [ true ⇒ a | false ⇒ b ] | IF_THEN_ELSE_p ? a b });
147    |3: apply ({ x ∈ BOOL | match x with [ true ⇒ a' | false ⇒ b' ] | IF_THEN_ELSE_p ? a' b' });
148    | apply Hletin;]
149   intro x; simplify; cases x; simplify; assumption;]
150 qed.
151
152 interpretation "o-algebra binary join" 'or a b = 
153   (fun21 ??? (binary_join ?) a b).
154
155 lemma oa_overlap_preservers_meet: ∀O:OAlgebra.∀p,q:O.p >< q → p >< (p ∧ q).
156 (* next change to avoid universe inconsistency *)
157 change in ⊢ (?→%→%→?) with (Type1_OF_OAlgebra O);
158 intros;  lapply (oa_overlap_preserves_meet_ O p q f);
159 lapply (prop21 O O CPROP (oa_overlap O) p p ? (p ∧ q) # ?);
160 [3: apply (if ?? (Hletin1)); apply Hletin;|skip] apply refl1;
161 qed.
162
163 notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (∨) \below (\emsp) \nbsp term 90 p)" 
164 non associative with precedence 49 for @{ 'oa_join $p }.
165 notation < "hovbox(mstyle scriptlevel 1 scriptsizemultiplier 1.7 (∨) \below (ident i ∈  I) break term 90 p)" 
166 non associative with precedence 49 for @{ 'oa_join_mk (λ${ident i}:$I.$p) }.
167 notation < "hovbox(a ∨ b)" left associative with precedence 49
168 for @{ 'oa_join_mk (λ${ident i}:$_.match $i with [ true ⇒ $a | false ⇒ $b ]) }.
169
170 notation > "hovbox(∨ f)" non associative with precedence 59
171 for @{ 'oa_join $f }.
172 notation > "hovbox(a ∨ b)" left associative with precedence 49
173 for @{ 'oa_join (mk_unary_morphism BOOL ? (λx__:bool.match x__ with [ true ⇒ $a | false ⇒ $b ]) (IF_THEN_ELSE_p ? $a $b)) }.
174
175 interpretation "o-algebra join" 'oa_join f = 
176   (fun12 ?? (oa_join ??) f).
177 interpretation "o-algebra join with explicit function" 'oa_join_mk f = 
178   (fun12 ?? (oa_join ??) (mk_unary_morphism ?? f ?)).
179
180 record ORelation (P,Q : OAlgebra) : Type2 ≝ {
181   or_f_ : carr2 (P ⇒ Q);
182   or_f_minus_star_ : carr2(P ⇒ Q);
183   or_f_star_ : carr2(Q ⇒ P);
184   or_f_minus_ : carr2(Q ⇒ P);
185   or_prop1_ : ∀p,q. (or_f_ p ≤ q) = (p ≤ or_f_star_ q);
186   or_prop2_ : ∀p,q. (or_f_minus_ p ≤ q) = (p ≤ or_f_minus_star_ q);
187   or_prop3_ : ∀p,q. (or_f_ p >< q) = (p >< or_f_minus_ q)
188 }.
189
190 definition ORelation_setoid : OAlgebra → OAlgebra → setoid2.
191 intros (P Q);
192 constructor 1;
193 [ apply (ORelation P Q);
194 | constructor 1;
195    (* tenere solo una uguaglianza e usare la proposizione 9.9 per
196       le altre (unicita' degli aggiunti e del simmetrico) *)
197    [ apply (λp,q. And42 
198              (or_f_minus_star_ ?? p = or_f_minus_star_ ?? q) 
199              (or_f_minus_ ?? p = or_f_minus_ ?? q) 
200              (or_f_ ?? p = or_f_ ?? q) 
201              (or_f_star_ ?? p = or_f_star_ ?? q)); 
202    | whd; simplify; intros; repeat split; intros; apply refl2;
203    | whd; simplify; intros; cases a; clear a; split; 
204      intro a; apply sym1; generalize in match a;assumption;
205    | whd; simplify; intros; cases a; cases a1; clear a a1; split; intro a;
206      [ apply (.= (e a)); apply e4;
207      | apply (.= (e1 a)); apply e5;
208      | apply (.= (e2 a)); apply e6;
209      | apply (.= (e3 a)); apply e7;]]]
210 qed.
211
212 definition ORelation_of_ORelation_setoid : 
213   ∀P,Q.ORelation_setoid P Q → ORelation P Q ≝ λP,Q,x.x.
214 coercion ORelation_of_ORelation_setoid.
215
216 definition or_f_minus_star:
217  ∀P,Q:OAlgebra.unary_morphism2 (ORelation_setoid P Q) (P ⇒ Q).
218  intros; constructor 1;
219   [ apply or_f_minus_star_;
220   | intros; cases e; assumption]
221 qed.
222
223 definition or_f: ∀P,Q:OAlgebra.unary_morphism2 (ORelation_setoid P Q) (P ⇒ Q).
224  intros; constructor 1;
225   [ apply or_f_;
226   | intros; cases e; assumption]
227 qed.
228
229 definition or_f_minus: ∀P,Q:OAlgebra.unary_morphism2 (ORelation_setoid P Q) (Q ⇒ P).
230  intros; constructor 1;
231   [ apply or_f_minus_;
232   | intros; cases e; assumption]
233 qed.
234
235 definition or_f_star: ∀P,Q:OAlgebra.unary_morphism2 (ORelation_setoid P Q) (Q ⇒ P).
236  intros; constructor 1;
237   [ apply or_f_star_;
238   | intros; cases e; assumption]
239 qed.
240
241 lemma arrows1_of_ORelation_setoid : ∀P,Q. ORelation_setoid P Q → (P ⇒ Q). 
242 intros; apply (or_f ?? c);
243 qed.
244 coercion arrows1_of_ORelation_setoid.
245
246 notation "r \sup *" non associative with precedence 90 for @{'OR_f_star $r}.
247 notation > "r *" non associative with precedence 90 for @{'OR_f_star $r}.
248
249 notation "r \sup (⎻* )" non associative with precedence 90 for @{'OR_f_minus_star $r}.
250 notation > "r⎻*" non associative with precedence 90 for @{'OR_f_minus_star $r}.
251
252 notation "r \sup ⎻" non associative with precedence 90 for @{'OR_f_minus $r}.
253 notation > "r⎻" non associative with precedence 90 for @{'OR_f_minus $r}.
254
255 interpretation "o-relation f⎻*" 'OR_f_minus_star r = (fun12 ?? (or_f_minus_star ? ?) r).
256 interpretation "o-relation f⎻" 'OR_f_minus r = (fun12 ?? (or_f_minus ? ?) r).
257 interpretation "o-relation f*" 'OR_f_star r = (fun12 ?? (or_f_star ? ?) r).
258
259 definition or_prop1 : ∀P,Q:OAlgebra.∀F:ORelation_setoid P Q.∀p,q.
260    (F p ≤ q) = (p ≤ F* q).
261 intros; apply (or_prop1_ ?? F p q);
262 qed.
263
264 definition or_prop2 : ∀P,Q:OAlgebra.∀F:ORelation_setoid P Q.∀p,q.
265    (F⎻ p ≤ q) = (p ≤ F⎻* q).
266 intros; apply (or_prop2_ ?? F p q);
267 qed.
268
269 definition or_prop3 : ∀P,Q:OAlgebra.∀F:ORelation_setoid P Q.∀p,q.
270    (F p >< q) = (p >< F⎻ q).
271 intros; apply (or_prop3_ ?? F p q);
272 qed.
273
274 definition ORelation_composition : ∀P,Q,R. 
275   binary_morphism2 (ORelation_setoid P Q) (ORelation_setoid Q R) (ORelation_setoid P R).
276 intros;
277 constructor 1;
278 [ intros (F G);
279   constructor 1;
280   [ apply (G ∘ F);
281   | apply rule (G⎻* ∘ F⎻* );
282   | apply (F* ∘ G* );
283   | apply (F⎻ ∘ G⎻);
284   | intros; 
285     change with ((G (F p) ≤ q) = (p ≤ (F* (G* q))));
286     apply (.= (or_prop1 :?));
287     apply (or_prop1 :?);
288   | intros;
289     change with ((F⎻ (G⎻ p) ≤ q) = (p ≤ (G⎻* (F⎻* q))));
290     apply (.= (or_prop2 :?));
291     apply or_prop2 ; 
292   | intros; change with ((G (F (p)) >< q) = (p >< (F⎻ (G⎻ q))));
293     apply (.= (or_prop3 :?));
294     apply or_prop3;
295   ]
296 | intros; split; simplify; 
297    [3: unfold arrows1_of_ORelation_setoid; apply ((†e)‡(†e1));
298    |1: apply ((†e)‡(†e1));
299    |2,4: apply ((†e1)‡(†e));]]
300 qed.
301
302 definition OA : category2.
303 split;
304 [ apply (OAlgebra);
305 | intros; apply (ORelation_setoid o o1);
306 | intro O; split;
307   [1,2,3,4: apply id2;
308   |5,6,7:intros; apply refl1;] 
309 | apply ORelation_composition;
310 | intros (P Q R S F G H); split;
311    [ change with (H⎻* ∘ G⎻* ∘ F⎻* = H⎻* ∘ (G⎻* ∘ F⎻* ));
312      apply (comp_assoc2 ????? (F⎻* ) (G⎻* ) (H⎻* ));
313    | apply ((comp_assoc2 ????? (H⎻) (G⎻) (F⎻))^-1);
314    | apply ((comp_assoc2 ????? F G H)^-1);
315    | apply ((comp_assoc2 ????? H* G* F* ));]
316 | intros; split; unfold ORelation_composition; simplify; apply id_neutral_left2;
317 | intros; split; unfold ORelation_composition; simplify; apply id_neutral_right2;]
318 qed.
319
320 definition OAlgebra_of_objs2_OA: objs2 OA → OAlgebra ≝ λx.x.
321 coercion OAlgebra_of_objs2_OA.
322
323 definition ORelation_setoid_of_arrows2_OA: 
324   ∀P,Q. arrows2 OA P Q → ORelation_setoid P Q ≝ λP,Q,c.c.
325 coercion ORelation_setoid_of_arrows2_OA.
326
327 prefer coercion Type_OF_objs2.
328
329 (* alias symbol "eq" = "setoid1 eq". *)
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.