]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/nlibrary/topology/cantor.ma
822c88fc0dfe4f8488c873c9e6130062b262cd7b
[helm.git] / helm / software / matita / nlibrary / topology / cantor.ma
1
2
3 include "topology/igft.ma".
4
5 ntheorem axiom_cond: âˆ€A:Ax.∀a:A.∀i:𝐈 a.a â—ƒ đ‚ a i.
6 #A; #a; #i; @2 i; #x; #H; @; napply H;
7 nqed.
8
9 nlemma hint_auto1 : âˆ€A,U,V. (∀x.x âˆˆ U â†’ x â—ƒ V) â†’ cover_set cover A U V.
10 nnormalize; nauto.
11 nqed.
12
13 alias symbol "covers" (instance 1) = "covers".
14 alias symbol "covers" (instance 2) = "covers set".
15 alias symbol "covers" (instance 3) = "covers".
16 ntheorem transitivity: âˆ€A:Ax.∀a:A.∀U,V. a â—ƒ U â†’ U â—ƒ V â†’ a â—ƒ V.
17 #A; #a; #U; #V; #aU; #UV;
18 nelim aU;
19 ##[ #c; #H; nauto; 
20 ##| #c; #i; #HCU; #H; @2 i; nauto; 
21 ##]
22 nqed.
23
24 ndefinition emptyset: âˆ€A.Ί^A â‰ ÎťA.{x | False}.
25
26 notation "∅" non associative with precedence 90 for @{ 'empty }.
27 interpretation "empty" 'empty = (emptyset ?).
28
29 naxiom EM : âˆ€A:Ax.∀a:A.∀i_star.(a âˆˆ đ‚ a i_star) âˆ¨ ÂŹ( a âˆˆ đ‚ a i_star).
30
31 ntheorem th2_3 :
32   âˆ€A:Ax.∀a:A. a â—ƒ âˆ… â†’ âˆƒi. ÂŹ a âˆˆ đ‚ a i.
33 #A; #a; #H; nelim H;
34 ##[ #n; *;
35 ##| #b; #i_star; #IH1; #IH2;
36     ncases (EM â€Ś b i_star);
37     ##[##2: (* nauto; *) #W; @i_star; napply W;
38     ##| nauto;
39     ##]
40 ##] 
41 nqed.
42
43 ninductive eq1 (A : Type[0]) : Type[0] â†’ CProp[0] â‰ 
44 | refl1 : eq1 A A.
45
46 notation "hvbox( a break âˆź b)" non associative with precedence 40 
47 for @{ 'eqT $a $b }.
48
49 interpretation "eq between types" 'eqT a b = (eq1 a b).
50
51 ninductive unit : Type[0] â‰ one : unit.
52
53 nrecord uAx : Type[1] â‰ {
54   uax_ : Ax;
55   with_ : âˆ€a:uax_.𝐈 a âˆź unit
56 }.
57
58 ndefinition uax : uAx â†’ Ax.
59 #A; @ (uax_ A) (Îťx.unit); #a; #_; napply (𝐂 a ?);  nlapply one; ncases (with_ A a); nauto; 
60 nqed.
61
62 ncoercion uax : âˆ€u:uAx. Ax â‰ uax on _u : uAx to Ax.
63
64 naxiom A: Type[0].
65 naxiom S: A â†’ ÎŠ^A.
66
67 ndefinition axs: uAx.
68 @; ##[ @ A (Îť_.unit) (Îťa,x.S a); ##| #_; @; ##]
69 nqed.
70  
71 alias id "S" = "cic:/matita/ng/topology/igft/S.fix(0,0,1)".
72 unification hint 0 â‰” ;
73          x â‰Ÿ axs  
74   (* -------------- *) âŠ˘
75          S x â‰Ą A. 
76
77
78 ntheorem col2_4 :
79   âˆ€A:uAx.∀a:A. a â—ƒ âˆ… â†’ ÂŹ a âˆˆ đ‚ a ?. ##[ (* bug *) ##2: nnormalize; napply one; ##]
80 #A; #a; #H; nelim H;
81 ##[ #n; *;
82 ##| #b; #i_star; #IH1; #IH2; #H3; nlapply (IH2 â€Ś H3); #H4; nauto;
83 ##] 
84 nqed.
85
86 ndefinition Z : ÎŠ^axs â‰ { x | x â—ƒ âˆ… }.
87
88 ntheorem cover_monotone: âˆ€A:Ax.∀a:A.∀U,V.U âŠ† V â†’ a â—ƒ U â†’ a â—ƒ V.
89 #A; #a; #U; #V; #HUV; #H; nelim H;
90 ##[ nauto;
91 ##| #b; #i; #HCU; #W; @2 i; #x; nauto; ##]
92 nqed.
93
94 ntheorem th3_1: ÂŹâˆƒa:axs.Z âŠ† S a âˆ§ S a âŠ† Z.
95 *; #a; *; #ZSa; #SaZ; 
96 ncut (a â—ƒ Z); ##[
97   nlapply (axiom_cond â€Ś a one); #AxCon; nchange in AxCon with (a â—ƒ S a);
98   (* nauto; *) napply (cover_monotone â€Ś AxCon); nassumption; ##] #H; 
99 ncut (a â—ƒ âˆ…); ##[ napply (transitivity â€Ś H); #x; #E; napply E; ##] #H1;
100 ncut (ÂŹ a âˆˆ S a); ##[ napply (col2_4 â€Ś H1); ##] #H2;
101 ncut (a âˆˆ S a); ##[ napply ZSa; napply H1; ##] #H3;
102 nauto;
103 nqed.
104
105 include "nat/nat.ma".
106
107 naxiom phi : nat â†’ nat â†’ nat.
108
109 notation > "ϕ" non associative with precedence 90 for @{ 'phi }.
110 interpretation "phi" 'phi = phi.
111  
112 notation < "ϕ a i" non associative with precedence 90 for @{ 'phi2 $a $i}.
113 interpretation "phi2" 'phi2 a i = (phi a i). 
114 notation < "ϕ a" non associative with precedence 90 for @{ 'phi1 $a }.
115 interpretation "phi2" 'phi1 a = (phi a). 
116
117 ndefinition caxs : uAx. 
118 @; ##[ @ nat (Îť_.unit); #a; #_; napply { x | Ď• a x = O } ##| #_; @; ##]
119 nqed.
120
121
122 alias id "S" = "cic:/matita/ng/topology/igft/S.fix(0,0,1)".
123 unification hint 0 â‰” ;
124          x â‰Ÿ caxs  
125   (* -------------- *) âŠ˘
126          S x â‰Ą nat. 
127
128 naxiom h : nat â†’ nat. 
129
130 naxiom Ph : âˆ€x.h x = O â†’ x â—ƒ âˆ….
131
132 ninductive eq2 (A : Type[1]) (a : A) : A â†’ CProp[0] â‰ 
133 | refl2 : eq2 A a a.
134
135 interpretation "eq2" 'eq T a b = (eq2 T a b).
136
137 ntheorem th_ch3: ÂŹâˆƒa:caxs.∀x.ϕ a x = h x.
138 *; #a; #H; 
139 ncut ((𝐂 a one) âŠ† { x | x â—ƒ âˆ… }); (* bug *) 
140 nchange in xx with { x | h x
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155    
156                      
157 ntheorem cantor: âˆ€a:axs. ÂŹ (Z âŠ† R a âˆ§ R a âŠ† Z).
158 #a; *; #ZRa; #RaZ;
159 ncut (a â—ƒ R a); ##[ @2; ##[ napply one; ##]  #x; #H; @; napply H; ##] #H1;
160 ncut (a â—ƒ âˆ…); ##[
161   napply (cover_trans â€Ś H1); 
162   #x; #H; nlapply (RaZ â€Ś H); #ABS; napply ABS; ##] #H2;
163 ncut (a âˆˆ R a); ##[ napply ZRa; napply H2; ##] #H3;
164 nelim H2 in H3; 
165 ##[ nauto. 
166 ##| nnormalize; nauto.  ##] (* se lo lancio su entrambi fallisce di width *)
167 nqed.
168
169 ninductive deduct (A : nAx) (U : ÎŠ^A) : A â†’ CProp[0] â‰ 
170 | drefl : âˆ€a.a âˆˆ U â†’ deduct A U a
171 | dcut  : âˆ€a.∀i:𝐈 a. (∀y:𝐃 a i.deduct A U (𝐝 a i y)) â†’ deduct A U a. 
172
173 notation " a âŠ˘ b " non associative with precedence 45 for @{ 'deduct $a $b }.
174 interpretation "deduct" 'deduct a b = (deduct ? b a).
175
176 ntheorem th2_3_1 : âˆ€A:nAx.∀a:A.∀i:𝐈 a. a âŠ˘ đˆđŚ[𝐝 a i].
177 #A; #a; #i;
178 ncut (∀y:𝐃 a i.𝐝 a i y âŠ˘ đˆđŚ[𝐝 a i]); ##[ #y; @; @y; @; ##] #H1;
179 napply (dcut â€Ś i); nassumption;
180 nqed.
181
182 ntheorem th2_3_2 : 
183   âˆ€A:nAx.∀a:A.∀i:𝐈 a.∀U,V. a âŠ˘ U â†’ (∀u.u âˆˆ U â†’ u âŠ˘ V) â†’ a âŠ˘ V.
184 #A; #a; #i; #U; #V; #aU; #xUxV; 
185 nelim aU;
186 ##[ nassumption;
187 ##| #b; #i; #dU; #dV; @2 i; nassumption;
188 ##]
189 nqed.
190
191 ntheorem th2_3 :
192   âˆ€A:nAx. 
193     (∀a:A.∀i_star.(∃y:𝐃 a i_star.𝐝 a i_star y = a) âˆ¨ ÂŹ(∃y:𝐃 a i_star.𝐝 a i_star y = a)) â†’ 
194   âˆ€a:A. a â—ƒ âˆ… â†’ âˆƒi:𝐈 a. ÂŹ a \in Z
195 #A; #EM; #a; #H; nelim H;
196 ##[ #n; *;
197 ##| #b; #i_star; #IH1; #IH2;
198     ncases (EM b i_star);
199     ##[##2: #W; @i_star; napply W;
200     ##| *; #y_star; #E; nlapply (IH2 y_star); nrewrite > E; #OK; napply OK;
201     ##]
202 ##] 
203 nqed.
204
205 ninductive eq1 (A : Type[0]) : Type[0] â†’ CProp[0] â‰ 
206 | refl1 : eq1 A A.
207
208 notation "hvbox( a break âˆź b)" non associative with precedence 40 
209 for @{ 'eqT $a $b }.
210
211 interpretation "eq between types" 'eqT a b = (eq1 a b).
212
213 nrecord uAx : Type[1] â‰ {
214   uax_ : Ax;
215   with_ : âˆ€a:uax_.𝐈 a âˆź unit
216 }.
217
218 ndefinition uax : uAx â†’ Ax.
219 *; #A; #E; @ A (Îťx.unit); #a; ncases (E a); 
220 ##[ #i; napply (𝐃 a i);
221 ##| #i; nnormalize; #j; napply (𝐝 a i j);
222 ##]
223 nqed.
224
225 ncoercion uax : âˆ€u:unAx. nAx â‰ uax on _u : unAx to nAx. 
226
227
228 nlemma cor_2_5 : âˆ€A:unAx.∀a:A.∀i.a âŠ˘ âˆ… â†’ ÂŹ(a âˆˆ đˆđŚ[𝐝 a i]).
229 #A; #a; #i; #H; nelim H in i; 
230 ##[ #w; *; 
231 ##| #a; #i; #IH1; #IH2;
232
233
234
235