]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/nlibrary/topology/igft.ma
3c97b9c25000735971c09018c1a1f4c42a6e86a3
[helm.git] / helm / software / matita / nlibrary / topology / igft.ma
1 (*DOCBEGIN
2
3 Matita Tutorial: inductively generated formal topologies
4 ======================================================== 
5
6 This is a not so short introduction to Matita, based on
7 the formalization of the paper
8
9 > Between formal topology and game theory: an
10 > explicit solution for the conditions for an
11 > inductive generation of formal topologies
12
13 by S.Berardi and S. Valentini. The tutorial is by Enrico Tassi. 
14
15 Orientering
16 -----------
17
18 TODO 
19
20 buttons, PG-interaction-model, sequent window, script window
21
22 The library, inclusion of `sets/sets.ma`, notation defined: Ω^A.
23 Symbols (see menu: View ▹ TeX/UTF-8 Table):
24
25 - ∀ `\Forall`
26 - λ `\lambda`
27 - ≝ `\def`
28 - → `->`
29
30 Virtuals, ALT-L, for example `I` changes into `𝕀`, finally `𝐈`.
31
32 The standard library and the `include` command
33 ----------------------------------------------
34
35 Some basic notions, like subset, membership, intersection and union
36 are part of the standard library of Matita.
37
38 These notions come with
39 some notation attached to them:
40
41 - A ∪ B `A \cup B`
42 - A ∩ B `A \cap B` 
43 - x ∈ A `x \in A` 
44 - Ω^A, that is the type of the subsets of A, `\Omega ^ A` 
45
46 The `include` command tells Matita to load a part of the library, 
47 in particular the part that we will use can be loaded as follows: 
48
49 DOCEND*)
50
51 include "sets/sets.ma".
52
53 (*HIDE*)
54 (* move away *)
55 nlemma subseteq_intersection_l: ∀A.∀U,V,W:Ω^A.U ⊆ W ∨ V ⊆ W → U ∩ V ⊆ W.
56 #A; #U; #V; #W; *; #H; #x; *; #xU; #xV; napply H; nassumption;
57 nqed.
58
59 nlemma subseteq_union_l: ∀A.∀U,V,W:Ω^A.U ⊆ W → V ⊆ W → U ∪ V ⊆ W.
60 #A; #U; #V; #W; #H; #H1; #x; *; #Hx; ##[ napply H; ##| napply H1; ##] nassumption;
61 nqed. 
62
63 nlemma subseteq_intersection_r: ∀A.∀U,V,W:Ω^A.W ⊆ U → W ⊆ V → W ⊆ U ∩ V.
64 #A; #U; #V; #W; #H1; #H2; #x; #Hx; @; ##[ napply H1; ##| napply H2; ##] nassumption;
65 nqed. 
66 (*UNHIDE*)
67
68 (*DOCBEGIN
69
70 Some basic results that we will use are also part of the sets library:
71
72 - subseteq\_union\_l: ∀A.∀U,V,W:Ω^A.U ⊆ W → V ⊆ W → U ∪ V ⊆ W
73 - subseteq\_intersection\_r: ∀A.∀U,V,W:Ω^A.W ⊆ U → W ⊆ V → W ⊆ U ∩ V
74
75 Defining Axiom set
76 ------------------
77
78 records, projections, types of projections..
79
80 DOCEND*)
81
82 nrecord Ax : Type[1] ≝ { 
83   S :> setoid;
84   I :  S → Type[0];
85   C :  ∀a:S. I a → Ω ^ S
86 }.
87
88 (*DOCBEGIN
89
90 Note that the field `S` was declared with `:>` instead of a simple `:`.
91 This declares the `S` projection to be a coercion. A coercion is 
92 a function case the system automatically inserts when it is needed.
93 In that case, the projection `S` has type `Ax → setoid`, and whenever
94 the expected type of a term is `setoid` while its type is `Ax`, the 
95 system inserts the coercion around it, to make the whole term well types.
96
97 When formalizing an algebraic structure, declaring the carrier as a 
98 coercion is a common practice, since it allows to write statements like
99
100     ∀G:Group.∀x:G.x * x^-1 = 1 
101
102 The quantification over `x` of type `G` is illtyped, since `G` is a term
103 (of type `Group`) and thus not a type. Since the carrier projection 
104 `carr` of `G` is a coercion, that maps a `Group` into the type of 
105 its elements, the system automatically inserts `carr` around `G`, 
106 obtaining `…∀x: carr G.…`. Coercions are also hidden by the system
107 when it displays a term.
108
109 In this particular case, the coercion `S` allows to write
110
111     ∀A:Ax.∀a:A.…
112
113 Since `A` is not a type, but it can be turned into a `setoid` by `S`
114 and a `setoid` can be turned into a type by its `carr` projection, the 
115 composed coercion `carr ∘ S` is silently inserted.
116
117 Implicit arguments
118 ------------------
119
120 Something that is not still satisfactory, in that the dependent type
121 of `I` and `C` are abstracted over the Axiom set. To obtain the
122 precise type of a term, you can use the `ncheck` command as follows.
123
124 DOCEND*) 
125
126 (* ncheck I. *)
127 (* ncheck C. *)
128
129 (*DOCBEGIN
130
131 One would like to write `I a` and not `I A a` under a context where
132 `A` is an axiom set and `a` has type `S A` (or thanks to the coercion
133 mecanism simply `A`). In Matita, a question mark represents an implicit
134 argument, i.e. a missing piece of information the system is asked to
135 infer. Matita performs some sort of type inference, thus writing
136 `I ? a` is enough: since the second argument of `I` is typed by the 
137 first one, the first one can be inferred just computing the type of `a`.
138
139 DOCEND*) 
140
141 (* ncheck (∀A:Ax.∀a:A.I ? a). *)
142
143 (*DOCBEGIN
144
145 This is still not completely satisfactory, since you have always type 
146 `?`; to fix this minor issue we have to introduce the notational
147 support built in Matita.
148
149 Notation for I and C
150 --------------------
151
152 Matita is quipped with a quite complex notational support,
153 allowing the user to define and use mathematical notations 
154 ([From Notation to Semantics: There and Back Again][1]). 
155
156 Since notations are usually ambiguous (e.g. the frequent overloading of 
157 symbols) Matita distinguishes between the term level, the 
158 content level, and the presentation level, allowing multiple 
159 mappings between the contenet and the term level. 
160
161 The mapping between the presentation level (i.e. what is typed on the 
162 keyboard and what is displayed in the sequent window) and the content
163 level is defined with the `notation` command. When followed by
164 `>`, it defines an input (only) notation.   
165
166 DOCEND*)
167
168 notation > "𝐈 term 90 a" non associative with precedence 70 for @{ 'I $a }.
169 notation > "𝐂 term 90 a term 90 i" non associative with precedence 70 for @{ 'C $a $i }.
170
171 (*DOCBEGIN
172
173 The forst notation defines the writing `𝐈 a` where `a` is a generic
174 term of precedence 90, the maximum one. This high precedence forces
175 parentheses around any term of a lower precedence. For example `𝐈 x`
176 would be accepted, since identifiers have precedence 90, but
177 `𝐈 f x` would be interpreted as `(𝐈 f) x`. In the latter case, parentheses
178 have to be put around `f x`, thus the accepted writing would be `𝐈 (f x)`.
179
180 To obtain the `𝐈` is enough to type `I` and then cycle between its
181 similar symbols with ALT-L. The same for `𝐂`. Notations cannot use
182 regular letters or the round parentheses, thus their variants (like the 
183 bold ones) have to be used.
184
185 The first notation associates `𝐈 a` with `'I $a` where `'I` is a 
186 new content element to which a term `$a` is passed.
187
188 Content elements have to be interpreted, and possibly multiple, 
189 incompatible, interpretations can be defined.
190
191 DOCEND*)
192
193 interpretation "I" 'I a = (I ? a).
194 interpretation "C" 'C a i = (C ? a i).
195
196 (*DOCBEGIN
197
198 The `interpretation` command allows to define the mapping between
199 the content level and the terms level. Here we associate the `I` and
200 `C` projections of the Axiom set record, where the Axiom set is an implicit 
201 argument `?` to be inferred by the system.
202
203 Interpretation are bi-directional, thus when displaying a term like 
204 `C _ a i`, the system looks for a presentation for the content element
205 `'C a i`. 
206
207 DOCEND*)
208
209 notation < "𝐈  \sub( ❨a❩ )" non associative with precedence 70 for @{ 'I $a }.
210 notation < "𝐂 \sub( ❨a,\emsp i❩ )" non associative with precedence 70 for @{ 'C $a $i }.
211
212 (*DOCBEGIN
213
214 For output purposes we can define more complex notations, for example
215 we can put bold parenteses around the arguments of `𝐈` and `𝐂`, decreasing
216 the size of the arguments and lowering their baseline (i.e. putting them
217 as subscript), separating them with a comma followed by a little space.
218
219 The first (technical) definition
220 --------------------------------
221
222
223
224 DOCEND*)
225
226 ndefinition cover_set : 
227   ∀c: ∀A:Ax.Ω^A → A → CProp[0]. ∀A:Ax.∀C,U:Ω^A. CProp[0] 
228 ≝ 
229   λc: ∀A:Ax.Ω^A → A → CProp[0]. λA,C,U.∀y.y ∈ C → c A U y.
230
231 ndefinition cover_set_interactive : 
232   ∀c: ∀A:Ax.Ω^A → A → CProp[0]. ∀A:Ax.∀C,U:Ω^A. CProp[0]. 
233 #cover; #A; #C; #U; napply (∀y:A.y ∈ C → ?); napply cover;
234 ##[ napply A;
235 ##| napply U;
236 ##| napply y;
237 ##]
238 nqed.
239
240 (* a \ltri b *)
241 notation "hvbox(a break ◃ b)" non associative with precedence 45
242 for @{ 'covers $a $b }.
243
244 interpretation "covers set temp" 'covers C U = (cover_set ?? C U).
245
246 ninductive cover (A : Ax) (U : Ω^A) : A → CProp[0] ≝ 
247 | creflexivity : ∀a:A. a ∈ U → cover ? U a
248 | cinfinity    : ∀a:A.∀i:𝐈 a. 𝐂 a i ◃ U → cover ? U a.
249 napply cover;
250 nqed.
251
252 interpretation "covers" 'covers a U = (cover ? U a).
253 (* interpretation "covers set" 'covers a U = (cover_set cover ? a U). *)
254
255 ndefinition fish_set ≝ λf:∀A:Ax.Ω^A → A → CProp[0].
256  λA,U,V.
257   ∃a.a ∈ V ∧ f A U a.
258
259 (* a \ltimes b *)
260 notation "hvbox(a break ⋉ b)" non associative with precedence 45
261 for @{ 'fish $a $b }. 
262
263 interpretation "fish set temp" 'fish A U = (fish_set ?? U A).
264
265 ncoinductive fish (A : Ax) (F : Ω^A) : A → CProp[0] ≝ 
266 | cfish : ∀a. a ∈ F → (∀i:𝐈 a .𝐂  a i ⋉ F) → fish A F a.
267 napply fish;
268 nqed.
269
270 interpretation "fish set" 'fish A U = (fish_set fish ? U A).
271 interpretation "fish" 'fish a U = (fish ? U a).
272
273 nlet corec fish_rec (A:Ax) (U: Ω^A)
274  (P: Ω^A) (H1: P ⊆ U)
275   (H2: ∀a:A. a ∈ P → ∀j: 𝐈 a. 𝐂 a j ≬ P):
276    ∀a:A. ∀p: a ∈ P. a ⋉ U ≝ ?.
277 #a; #p; napply cfish; (** screenshot "def-fish-rec". *)
278 ##[ napply H1; napply p;
279 ##| #i; ncases (H2 a p i); #x; *; #xC; #xP; @; ##[napply x]
280     @; ##[ napply xC ] napply (fish_rec ? U P); nassumption;
281 ##]
282 nqed.
283
284 notation "◃U" non associative with precedence 55
285 for @{ 'coverage $U }.
286
287 ndefinition coverage : ∀A:Ax.∀U:Ω^A.Ω^A ≝ λA,U.{ a | a ◃ U }.
288
289 interpretation "coverage cover" 'coverage U = (coverage ? U).
290
291 ndefinition cover_equation : ∀A:Ax.∀U,X:Ω^A.CProp[0] ≝  λA,U,X. 
292   ∀a.a ∈ X ↔ (a ∈ U ∨ ∃i:𝐈 a.∀y.y ∈ 𝐂 a i → y ∈ X).  
293
294 ntheorem coverage_cover_equation : ∀A,U. cover_equation A U (◃U).
295 #A; #U; #a; @; #H;
296 ##[ nelim H; #b; (* manca clear *)
297     ##[ #bU; @1; nassumption;
298     ##| #i; #CaiU; #IH; @2; @ i; #c; #cCbi; ncases (IH ? cCbi);
299         ##[ #E; @; napply E;
300         ##| #_; napply CaiU; nassumption; ##] ##]
301 ##| ncases H; ##[ #E; @; nassumption]
302     *; #j; #Hj; @2 j; #w; #wC; napply Hj; nassumption;
303 ##]
304 nqed. 
305
306 ntheorem coverage_min_cover_equation : 
307   ∀A,U,W. cover_equation A U W → ◃U ⊆ W.
308 #A; #U; #W; #H; #a; #aU; nelim aU; #b;
309 ##[ #bU; ncases (H b); #_; #H1; napply H1; @1; nassumption;
310 ##| #i; #CbiU; #IH; ncases (H b); #_; #H1; napply H1; @2; @i; napply IH;
311 ##]
312 nqed.
313
314 notation "⋉F" non associative with precedence 55
315 for @{ 'fished $F }.
316
317 ndefinition fished : ∀A:Ax.∀F:Ω^A.Ω^A ≝ λA,F.{ a | a ⋉ F }.
318
319 interpretation "fished fish" 'fished F = (fished ? F).
320
321 ndefinition fish_equation : ∀A:Ax.∀F,X:Ω^A.CProp[0] ≝ λA,F,X.
322   ∀a. a ∈ X ↔ a ∈ F ∧ ∀i:𝐈 a.∃y.y ∈ 𝐂 a i ∧ y ∈ X. 
323   
324 ntheorem fised_fish_equation : ∀A,F. fish_equation A F (⋉F).
325 #A; #F; #a; @; (* bug, fare case sotto diverso da farlo sopra *) #H; ncases H;
326 ##[ #b; #bF; #H2; @ bF; #i; ncases (H2 i); #c; *; #cC; #cF; @c; @ cC;
327     napply cF;  
328 ##| #aF; #H1; @ aF; napply H1;
329 ##]
330 nqed.
331
332 ntheorem fised_max_fish_equation : ∀A,F,G. fish_equation A F G → G ⊆ ⋉F.
333 #A; #F; #G; #H; #a; #aG; napply (fish_rec … aG);
334 #b; ncases (H b); #H1; #_; #bG; ncases (H1 bG); #E1; #E2; nassumption; 
335 nqed. 
336
337 nrecord nAx : Type[2] ≝ { 
338   nS:> setoid; (*Type[0];*)
339   nI: nS → Type[0];
340   nD: ∀a:nS. nI a → Type[0];
341   nd: ∀a:nS. ∀i:nI a. nD a i → nS
342 }.
343
344 (*
345 TYPE f A → B, g : B → A, f ∘ g = id, g ∘ g = id.
346
347 a = b → I a = I b
348 *)
349
350 notation "𝐃 \sub ( ❨a,\emsp i❩ )" non associative with precedence 70 for @{ 'D $a $i }.
351 notation "𝐝 \sub ( ❨a,\emsp i,\emsp j❩ )" non associative with precedence 70 for @{ 'd $a $i $j}.
352
353 notation > "𝐃 term 90 a term 90 i" non associative with precedence 70 for @{ 'D $a $i }.
354 notation > "𝐝 term 90 a term 90 i term 90 j" non associative with precedence 70 for @{ 'd $a $i $j}.
355
356 interpretation "D" 'D a i = (nD ? a i).
357 interpretation "d" 'd a i j = (nd ? a i j).
358 interpretation "new I" 'I a = (nI ? a).
359
360 ndefinition image ≝ λA:nAx.λa:A.λi. { x | ∃j:𝐃 a i. x = 𝐝 a i j }.
361
362 notation > "𝐈𝐦  [𝐝 term 90 a term 90 i]" non associative with precedence 70 for @{ 'Im $a $i }.
363 notation "𝐈𝐦  [𝐝 \sub ( ❨a,\emsp i❩ )]" non associative with precedence 70 for @{ 'Im $a $i }.
364
365 interpretation "image" 'Im a i = (image ? a i).
366
367 ndefinition Ax_of_nAx : nAx → Ax.
368 #A; @ A (nI ?); #a; #i; napply (𝐈𝐦 [𝐝 a i]);
369 nqed.
370
371 ninductive sigma (A : Type[0]) (P : A → CProp[0]) : Type[0] ≝ 
372  sig_intro : ∀x:A.P x → sigma A P. 
373
374 interpretation "sigma" 'sigma \eta.p = (sigma ? p). 
375
376 ndefinition nAx_of_Ax : Ax → nAx.
377 #A; @ A (I ?);
378 ##[ #a; #i; napply (Σx:A.x ∈ 𝐂 a i);
379 ##| #a; #i; *; #x; #_; napply x;
380 ##]
381 nqed.
382
383 ninductive Ord (A : nAx) : Type[0] ≝ 
384  | oO : Ord A
385  | oS : Ord A → Ord A
386  | oL : ∀a:A.∀i.∀f:𝐃 a i → Ord A. Ord A.
387
388 notation "Λ term 90 f" non associative with precedence 50 for @{ 'oL $f }.
389 notation "x+1" non associative with precedence 50 for @{'oS $x }.
390
391 interpretation "ordinals Lambda" 'oL f = (oL ? ? ? f).
392 interpretation "ordinals Succ" 'oS x = (oS ? x).
393
394 nlet rec famU (A : nAx) (U : Ω^A) (x : Ord A) on x : Ω^A ≝ 
395   match x with
396   [ oO ⇒ U
397   | oS y ⇒ let Un ≝ famU A U y in Un ∪ { x | ∃i.𝐈𝐦[𝐝 x i] ⊆ Un} 
398   | oL a i f ⇒ { x | ∃j.x ∈ famU A U (f j) } ].
399   
400 notation < "term 90 U \sub (term 90 x)" non associative with precedence 50 for @{ 'famU $U $x }.
401 notation > "U ⎽ term 90 x" non associative with precedence 50 for @{ 'famU $U $x }.
402
403 interpretation "famU" 'famU U x = (famU ? U x).
404   
405 ndefinition ord_coverage : ∀A:nAx.∀U:Ω^A.Ω^A ≝ λA,U.{ y | ∃x:Ord A. y ∈ famU ? U x }.
406
407 ndefinition ord_cover_set ≝ λc:∀A:nAx.Ω^A → Ω^A.λA,C,U.
408   ∀y.y ∈ C → y ∈ c A U.
409
410 interpretation "coverage new cover" 'coverage U = (ord_coverage ? U).
411 interpretation "new covers set" 'covers a U = (ord_cover_set ord_coverage ? a U).
412 interpretation "new covers" 'covers a U = (mem ? (ord_coverage ? U) a).
413
414 ntheorem new_coverage_reflexive:
415   ∀A:nAx.∀U:Ω^A.∀a. a ∈ U → a ◃ U.
416 #A; #U; #a; #H; @ (oO A); napply H;
417 nqed.
418
419 nlemma ord_subset:
420   ∀A:nAx.∀a:A.∀i,f,U.∀j:𝐃 a i.U⎽(f j) ⊆ U⎽(Λ f).
421 #A; #a; #i; #f; #U; #j; #b; #bUf; @ j; nassumption;
422 nqed.
423
424 naxiom AC : ∀A,a,i,U.(∀j:𝐃 a i.∃x:Ord A.𝐝 a i j ∈ U⎽x) → (Σf.∀j:𝐃 a i.𝐝 a i j ∈ U⎽(f j)).
425
426 naxiom setoidification :
427   ∀A:nAx.∀a,b:A.∀U.a=b → b ∈ U → a ∈ U.
428
429 (*DOCBEGIN
430
431 Bla Bla, 
432
433 <div id="figure1" class="img" ><img src="figure1.png"/>foo</div>
434
435 DOCEND*)
436
437 alias symbol "covers" = "new covers".
438 alias symbol "covers" = "new covers set".
439 alias symbol "covers" = "new covers".
440 alias symbol "covers" = "new covers set".
441 alias symbol "covers" = "new covers".
442 alias symbol "covers" = "new covers set".
443 alias symbol "covers" = "new covers".
444 alias symbol "covers" = "new covers set".
445 alias symbol "covers" = "new covers".
446 ntheorem new_coverage_infinity:
447   ∀A:nAx.∀U:Ω^A.∀a:A. (∃i:𝐈 a. 𝐈𝐦[𝐝 a i] ◃ U) → a ◃ U.
448 #A; #U; #a;(** screenshot "figure1". *)  
449 *; #i; #H; nnormalize in H;
450 ncut (∀y:𝐃 a i.∃x:Ord A.𝐝 a i y ∈ U⎽x); ##[
451   #y; napply H; @ y; napply #; ##] #H'; 
452 ncases (AC … H'); #f; #Hf;
453 ncut (∀j.𝐝 a i j ∈ U⎽(Λ f));
454   ##[ #j; napply (ord_subset … f … (Hf j));##] #Hf';
455 @ ((Λ f)+1); @2; nwhd; @i; #x; *; #d; #Hd; 
456 napply (setoidification … Hd); napply Hf';
457 nqed.
458
459 nlemma new_coverage_min :  
460   ∀A:nAx.∀U:qpowerclass A.∀V.U ⊆ V → (∀a:A.∀i.𝐈𝐦[𝐝 a i] ⊆ V → a ∈ V) → ◃(pc ? U) ⊆ V.
461 #A; #U; #V; #HUV; #Im;  #b; *; #o; ngeneralize in match b; nchange with ((pc ? U)⎽o ⊆ V);
462 nelim o;
463 ##[ #b; #bU0; napply HUV; napply bU0;
464 ##| #p; #IH; napply subseteq_union_l; ##[ nassumption; ##]
465     #x; *; #i; #H; napply (Im ? i); napply (subseteq_trans … IH); napply H;
466 ##| #a; #i; #f; #IH; #x; *; #d; napply IH; ##]
467 nqed.
468
469 nlet rec famF (A: nAx) (F : Ω^A) (x : Ord A) on x : Ω^A ≝ 
470   match x with
471   [ oO ⇒ F
472   | oS o ⇒ let Fo ≝ famF A F o in Fo ∩ { x | ∀i:𝐈 x.∃j:𝐃 x i.𝐝 x i j ∈ Fo } 
473   | oL a i f ⇒ { x | ∀j:𝐃 a i.x ∈ famF A F (f j) }
474   ].
475
476 interpretation "famF" 'famU U x = (famF ? U x).
477
478 ndefinition ord_fished : ∀A:nAx.∀F:Ω^A.Ω^A ≝ λA,F.{ y | ∀x:Ord A. y ∈ F⎽x }.
479
480 interpretation "fished new fish" 'fished U = (ord_fished ? U).
481 interpretation "new fish" 'fish a U = (mem ? (ord_fished ? U) a).
482
483 ntheorem new_fish_antirefl:
484  ∀A:nAx.∀F:Ω^A.∀a. a ⋉ F → a ∈ F.
485 #A; #F; #a; #H; nlapply (H (oO ?)); #aFo; napply aFo;
486 nqed.
487
488 nlemma co_ord_subset:
489  ∀A:nAx.∀F:Ω^A.∀a,i.∀f:𝐃 a i → Ord A.∀j. F⎽(Λ f) ⊆ F⎽(f j).
490 #A; #F; #a; #i; #f; #j; #x; #H; napply H;
491 nqed.
492
493 naxiom AC_dual : 
494   ∀A:nAx.∀a:A.∀i,F. (∀f:𝐃 a i → Ord A.∃x:𝐃 a i.𝐝 a i x ∈ F⎽(f x)) → ∃j:𝐃 a i.∀x:Ord A.𝐝 a i j ∈ F⎽x.
495
496
497 ntheorem new_fish_compatible: 
498  ∀A:nAx.∀F:Ω^A.∀a. a ⋉ F → ∀i:𝐈 a.∃j:𝐃 a i.𝐝 a i j ⋉ F.
499 #A; #F; #a; #aF; #i; nnormalize;
500 napply AC_dual; #f;
501 nlapply (aF (Λf+1)); #aLf;
502 nchange in aLf with (a ∈ F⎽(Λ f) ∧ ∀i:𝐈 a.∃j:𝐃 a i.𝐝 a i j ∈ F⎽(Λ f));
503 ncut (∃j:𝐃 a i.𝐝 a i j ∈ F⎽(f j));##[
504   ncases aLf; #_; #H; nlapply (H i); *; #j; #Hj; @j; napply Hj;##] #aLf';
505 napply aLf';
506 nqed.
507
508 ntheorem max_new_fished: 
509   ∀A:nAx.∀G,F:Ω^A.G ⊆ F → (∀a.a ∈ G → ∀i.𝐈𝐦[𝐝 a i] ≬ G) → G ⊆ ⋉F.
510 #A; #G; #F; #GF; #H; #b; #HbG; #o; ngeneralize in match HbG; ngeneralize in match b;
511 nchange with (G ⊆ F⎽o);
512 nelim o;
513 ##[ napply GF;
514 ##| #p; #IH; napply (subseteq_intersection_r … IH);
515     #x; #Hx; #i; ncases (H … Hx i); #c; *; *; #d; #Ed; #cG;
516     @d; napply IH; napply (setoidification … Ed^-1); napply cG;   
517 ##| #a; #i; #f; #Hf; nchange with (G ⊆ { y | ∀x. y ∈ F⎽(f x) }); 
518     #b; #Hb; #d; napply (Hf d); napply Hb;
519 ##]
520 nqed.
521
522 (*DOCBEGIN
523
524 [1]: http://upsilon.cc/~zack/research/publications/notation.pdf 
525
526 *)