1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| A.Asperti, C.Sacerdoti Coen, *)
8 (* ||A|| E.Tassi, S.Zacchiroli *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU Lesser General Public License Version 2.1 *)
13 (**************************************************************************)
15 (* ********************************************************************** *)
16 (* Progetto FreeScale *)
18 (* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
19 (* Sviluppo: 2008-2010 *)
21 (* ********************************************************************** *)
23 include "common/pts.ma".
25 (* ********************************** *)
26 (* SOTTOINSIEME MINIMALE DELLA TEORIA *)
27 (* ********************************** *)
29 (* logic/connectives.ma *)
31 ninductive True: Prop ≝
34 ninductive False: Prop ≝.
36 ndefinition Not: Prop → Prop ≝
39 interpretation "logical not" 'not x = (Not x).
41 nlemma absurd : ∀A,C:Prop.A → ¬A → C.
48 nlemma not_to_not : ∀A,B:Prop. (A → B) → ((¬B) → (¬A)).
55 nlemma prop_to_nnprop : ∀P.P → ¬¬P.
56 #P; nnormalize; #H; #H1;
60 ninductive And2 (A,B:Prop) : Prop ≝
61 conj2 : A → B → (And2 A B).
63 interpretation "logical and" 'and x y = (And2 x y).
65 nlemma proj2_1: ∀A,B:Prop.A ∧ B → A.
67 napply (And2_ind A B … H);
72 nlemma proj2_2: ∀A,B:Prop.A ∧ B → B.
74 napply (And2_ind A B … H);
79 ninductive And3 (A,B,C:Prop) : Prop ≝
80 conj3 : A → B → C → (And3 A B C).
82 nlemma proj3_1: ∀A,B,C:Prop.And3 A B C → A.
84 napply (And3_ind A B C … H);
89 nlemma proj3_2: ∀A,B,C:Prop.And3 A B C → B.
91 napply (And3_ind A B C … H);
96 nlemma proj3_3: ∀A,B,C:Prop.And3 A B C → C.
98 napply (And3_ind A B C … H);
103 ninductive And4 (A,B,C,D:Prop) : Prop ≝
104 conj4 : A → B → C → D → (And4 A B C D).
106 nlemma proj4_1: ∀A,B,C,D:Prop.And4 A B C D → A.
108 napply (And4_ind A B C D … H);
113 nlemma proj4_2: ∀A,B,C,D:Prop.And4 A B C D → B.
115 napply (And4_ind A B C D … H);
120 nlemma proj4_3: ∀A,B,C,D:Prop.And4 A B C D → C.
122 napply (And4_ind A B C D … H);
127 nlemma proj4_4: ∀A,B,C,D:Prop.And4 A B C D → D.
129 napply (And4_ind A B C D … H);
134 ninductive And5 (A,B,C,D,E:Prop) : Prop ≝
135 conj5 : A → B → C → D → E → (And5 A B C D E).
137 nlemma proj5_1: ∀A,B,C,D,E:Prop.And5 A B C D E → A.
138 #A; #B; #C; #D; #E; #H;
139 napply (And5_ind A B C D E … H);
140 #H1; #H2; #H3; #H4; #H5;
144 nlemma proj5_2: ∀A,B,C,D,E:Prop.And5 A B C D E → B.
145 #A; #B; #C; #D; #E; #H;
146 napply (And5_ind A B C D E … H);
147 #H1; #H2; #H3; #H4; #H5;
151 nlemma proj5_3: ∀A,B,C,D,E:Prop.And5 A B C D E → C.
152 #A; #B; #C; #D; #E; #H;
153 napply (And5_ind A B C D E … H);
154 #H1; #H2; #H3; #H4; #H5;
158 nlemma proj5_4: ∀A,B,C,D,E:Prop.And5 A B C D E → D.
159 #A; #B; #C; #D; #E; #H;
160 napply (And5_ind A B C D E … H);
161 #H1; #H2; #H3; #H4; #H5;
165 nlemma proj5_5: ∀A,B,C,D,E:Prop.And5 A B C D E → E.
166 #A; #B; #C; #D; #E; #H;
167 napply (And5_ind A B C D E … H);
168 #H1; #H2; #H3; #H4; #H5;
172 ninductive Or2 (A,B:Prop) : Prop ≝
173 or2_intro1 : A → (Or2 A B)
174 | or2_intro2 : B → (Or2 A B).
176 interpretation "logical or" 'or x y = (Or2 x y).
178 ndefinition decidable ≝ λA:Prop.A ∨ (¬A).
181 : ∀P1,P2,Q:Prop.Or2 P1 P2 → ∀f1:P1 → Q.∀f2:P2 → Q.Q.
182 #P1; #P2; #Q; #H; #f1; #f2;
183 napply (Or2_ind P1 P2 ? f1 f2 ?);
187 nlemma symmetric_or2 : ∀P1,P2.Or2 P1 P2 → Or2 P2 P1.
189 napply (or2_elim P1 P2 ? H);
190 ##[ ##1: #H1; napply (or2_intro2 P2 P1 H1)
191 ##| ##2: #H1; napply (or2_intro1 P2 P1 H1)
195 ninductive Or3 (A,B,C:Prop) : Prop ≝
196 or3_intro1 : A → (Or3 A B C)
197 | or3_intro2 : B → (Or3 A B C)
198 | or3_intro3 : C → (Or3 A B C).
201 : ∀P1,P2,P3,Q:Prop.Or3 P1 P2 P3 → ∀f1:P1 → Q.∀f2:P2 → Q.∀f3:P3 → Q.Q.
202 #P1; #P2; #P3; #Q; #H; #f1; #f2; #f3;
203 napply (Or3_ind P1 P2 P3 ? f1 f2 f3 ?);
207 nlemma symmetric_or3_12 : ∀P1,P2,P3:Prop.Or3 P1 P2 P3 → Or3 P2 P1 P3.
209 napply (or3_elim P1 P2 P3 ? H);
210 ##[ ##1: #H1; napply (or3_intro2 P2 P1 P3 H1)
211 ##| ##2: #H1; napply (or3_intro1 P2 P1 P3 H1)
212 ##| ##3: #H1; napply (or3_intro3 P2 P1 P3 H1)
216 nlemma symmetric_or3_13 : ∀P1,P2,P3:Prop.Or3 P1 P2 P3 → Or3 P3 P2 P1.
218 napply (or3_elim P1 P2 P3 ? H);
219 ##[ ##1: #H1; napply (or3_intro3 P3 P2 P1 H1)
220 ##| ##2: #H1; napply (or3_intro2 P3 P2 P1 H1)
221 ##| ##3: #H1; napply (or3_intro1 P3 P2 P1 H1)
225 nlemma symmetric_or3_23 : ∀P1,P2,P3:Prop.Or3 P1 P2 P3 → Or3 P1 P3 P2.
227 napply (or3_elim P1 P2 P3 ? H);
228 ##[ ##1: #H1; napply (or3_intro1 P1 P3 P2 H1)
229 ##| ##2: #H1; napply (or3_intro3 P1 P3 P2 H1)
230 ##| ##3: #H1; napply (or3_intro2 P1 P3 P2 H1)
234 ninductive Or4 (A,B,C,D:Prop) : Prop ≝
235 or4_intro1 : A → (Or4 A B C D)
236 | or4_intro2 : B → (Or4 A B C D)
237 | or4_intro3 : C → (Or4 A B C D)
238 | or4_intro4 : D → (Or4 A B C D).
241 : ∀P1,P2,P3,P4,Q:Prop.Or4 P1 P2 P3 P4 → ∀f1:P1 → Q.∀f2:P2 → Q.
242 ∀f3:P3 → Q.∀f4:P4 → Q.Q.
243 #P1; #P2; #P3; #P4; #Q; #H; #f1; #f2; #f3; #f4;
244 napply (Or4_ind P1 P2 P3 P4 ? f1 f2 f3 f4 ?);
248 nlemma symmetric_or4_12 : ∀P1,P2,P3,P4:Prop.Or4 P1 P2 P3 P4 → Or4 P2 P1 P3 P4.
249 #P1; #P2; #P3; #P4; #H;
250 napply (or4_elim P1 P2 P3 P4 ? H);
251 ##[ ##1: #H1; napply (or4_intro2 P2 P1 P3 P4 H1)
252 ##| ##2: #H1; napply (or4_intro1 P2 P1 P3 P4 H1)
253 ##| ##3: #H1; napply (or4_intro3 P2 P1 P3 P4 H1)
254 ##| ##4: #H1; napply (or4_intro4 P2 P1 P3 P4 H1)
258 nlemma symmetric_or4_13 : ∀P1,P2,P3,P4:Prop.Or4 P1 P2 P3 P4 → Or4 P3 P2 P1 P4.
259 #P1; #P2; #P3; #P4; #H;
260 napply (or4_elim P1 P2 P3 P4 ? H);
261 ##[ ##1: #H1; napply (or4_intro3 P3 P2 P1 P4 H1)
262 ##| ##2: #H1; napply (or4_intro2 P3 P2 P1 P4 H1)
263 ##| ##3: #H1; napply (or4_intro1 P3 P2 P1 P4 H1)
264 ##| ##4: #H1; napply (or4_intro4 P3 P2 P1 P4 H1)
268 nlemma symmetric_or4_14 : ∀P1,P2,P3,P4:Prop.Or4 P1 P2 P3 P4 → Or4 P4 P2 P3 P1.
269 #P1; #P2; #P3; #P4; #H;
270 napply (or4_elim P1 P2 P3 P4 ? H);
271 ##[ ##1: #H1; napply (or4_intro4 P4 P2 P3 P1 H1)
272 ##| ##2: #H1; napply (or4_intro2 P4 P2 P3 P1 H1)
273 ##| ##3: #H1; napply (or4_intro3 P4 P2 P3 P1 H1)
274 ##| ##4: #H1; napply (or4_intro1 P4 P2 P3 P1 H1)
278 nlemma symmetric_or4_23 : ∀P1,P2,P3,P4:Prop.Or4 P1 P2 P3 P4 → Or4 P1 P3 P2 P4.
279 #P1; #P2; #P3; #P4; #H;
280 napply (or4_elim P1 P2 P3 P4 ? H);
281 ##[ ##1: #H1; napply (or4_intro1 P1 P3 P2 P4 H1)
282 ##| ##2: #H1; napply (or4_intro3 P1 P3 P2 P4 H1)
283 ##| ##3: #H1; napply (or4_intro2 P1 P3 P2 P4 H1)
284 ##| ##4: #H1; napply (or4_intro4 P1 P3 P2 P4 H1)
288 nlemma symmetric_or4_24 : ∀P1,P2,P3,P4:Prop.Or4 P1 P2 P3 P4 → Or4 P1 P4 P3 P2.
289 #P1; #P2; #P3; #P4; #H;
290 napply (or4_elim P1 P2 P3 P4 ? H);
291 ##[ ##1: #H1; napply (or4_intro1 P1 P4 P3 P2 H1)
292 ##| ##2: #H1; napply (or4_intro4 P1 P4 P3 P2 H1)
293 ##| ##3: #H1; napply (or4_intro3 P1 P4 P3 P2 H1)
294 ##| ##4: #H1; napply (or4_intro2 P1 P4 P3 P2 H1)
298 nlemma symmetric_or4_34 : ∀P1,P2,P3,P4:Prop.Or4 P1 P2 P3 P4 → Or4 P1 P2 P4 P3.
299 #P1; #P2; #P3; #P4; #H;
300 napply (or4_elim P1 P2 P3 P4 ? H);
301 ##[ ##1: #H1; napply (or4_intro1 P1 P2 P4 P3 H1)
302 ##| ##2: #H1; napply (or4_intro2 P1 P2 P4 P3 H1)
303 ##| ##3: #H1; napply (or4_intro4 P1 P2 P4 P3 H1)
304 ##| ##4: #H1; napply (or4_intro3 P1 P2 P4 P3 H1)
308 ninductive Or5 (A,B,C,D,E:Prop) : Prop ≝
309 or5_intro1 : A → (Or5 A B C D E)
310 | or5_intro2 : B → (Or5 A B C D E)
311 | or5_intro3 : C → (Or5 A B C D E)
312 | or5_intro4 : D → (Or5 A B C D E)
313 | or5_intro5 : E → (Or5 A B C D E).
316 : ∀P1,P2,P3,P4,P5,Q:Prop.Or5 P1 P2 P3 P4 P5 → ∀f1:P1 → Q.∀f2:P2 → Q.
317 ∀f3:P3 → Q.∀f4:P4 → Q.∀f5:P5 → Q.Q.
318 #P1; #P2; #P3; #P4; #P5; #Q; #H; #f1; #f2; #f3; #f4; #f5;
319 napply (Or5_ind P1 P2 P3 P4 P5 ? f1 f2 f3 f4 f5 ?);
323 nlemma symmetric_or5_12 : ∀P1,P2,P3,P4,P5:Prop.Or5 P1 P2 P3 P4 P5 → Or5 P2 P1 P3 P4 P5.
324 #P1; #P2; #P3; #P4; #P5; #H;
325 napply (or5_elim P1 P2 P3 P4 P5 ? H);
326 ##[ ##1: #H1; napply (or5_intro2 P2 P1 P3 P4 P5 H1)
327 ##| ##2: #H1; napply (or5_intro1 P2 P1 P3 P4 P5 H1)
328 ##| ##3: #H1; napply (or5_intro3 P2 P1 P3 P4 P5 H1)
329 ##| ##4: #H1; napply (or5_intro4 P2 P1 P3 P4 P5 H1)
330 ##| ##5: #H1; napply (or5_intro5 P2 P1 P3 P4 P5 H1)
334 nlemma symmetric_or5_13 : ∀P1,P2,P3,P4,P5:Prop.Or5 P1 P2 P3 P4 P5 → Or5 P3 P2 P1 P4 P5.
335 #P1; #P2; #P3; #P4; #P5; #H;
336 napply (or5_elim P1 P2 P3 P4 P5 ? H);
337 ##[ ##1: #H1; napply (or5_intro3 P3 P2 P1 P4 P5 H1)
338 ##| ##2: #H1; napply (or5_intro2 P3 P2 P1 P4 P5 H1)
339 ##| ##3: #H1; napply (or5_intro1 P3 P2 P1 P4 P5 H1)
340 ##| ##4: #H1; napply (or5_intro4 P3 P2 P1 P4 P5 H1)
341 ##| ##5: #H1; napply (or5_intro5 P3 P2 P1 P4 P5 H1)
345 nlemma symmetric_or5_14 : ∀P1,P2,P3,P4,P5:Prop.Or5 P1 P2 P3 P4 P5 → Or5 P4 P2 P3 P1 P5.
346 #P1; #P2; #P3; #P4; #P5; #H;
347 napply (or5_elim P1 P2 P3 P4 P5 ? H);
348 ##[ ##1: #H1; napply (or5_intro4 P4 P2 P3 P1 P5 H1)
349 ##| ##2: #H1; napply (or5_intro2 P4 P2 P3 P1 P5 H1)
350 ##| ##3: #H1; napply (or5_intro3 P4 P2 P3 P1 P5 H1)
351 ##| ##4: #H1; napply (or5_intro1 P4 P2 P3 P1 P5 H1)
352 ##| ##5: #H1; napply (or5_intro5 P4 P2 P3 P1 P5 H1)
356 nlemma symmetric_or5_15 : ∀P1,P2,P3,P4,P5:Prop.Or5 P1 P2 P3 P4 P5 → Or5 P5 P2 P3 P4 P1.
357 #P1; #P2; #P3; #P4; #P5; #H;
358 napply (or5_elim P1 P2 P3 P4 P5 ? H);
359 ##[ ##1: #H1; napply (or5_intro5 P5 P2 P3 P4 P1 H1)
360 ##| ##2: #H1; napply (or5_intro2 P5 P2 P3 P4 P1 H1)
361 ##| ##3: #H1; napply (or5_intro3 P5 P2 P3 P4 P1 H1)
362 ##| ##4: #H1; napply (or5_intro4 P5 P2 P3 P4 P1 H1)
363 ##| ##5: #H1; napply (or5_intro1 P5 P2 P3 P4 P1 H1)
367 nlemma symmetric_or5_23 : ∀P1,P2,P3,P4,P5:Prop.Or5 P1 P2 P3 P4 P5 → Or5 P1 P3 P2 P4 P5.
368 #P1; #P2; #P3; #P4; #P5; #H;
369 napply (or5_elim P1 P2 P3 P4 P5 ? H);
370 ##[ ##1: #H1; napply (or5_intro1 P1 P3 P2 P4 P5 H1)
371 ##| ##2: #H1; napply (or5_intro3 P1 P3 P2 P4 P5 H1)
372 ##| ##3: #H1; napply (or5_intro2 P1 P3 P2 P4 P5 H1)
373 ##| ##4: #H1; napply (or5_intro4 P1 P3 P2 P4 P5 H1)
374 ##| ##5: #H1; napply (or5_intro5 P1 P3 P2 P4 P5 H1)
378 nlemma symmetric_or5_24 : ∀P1,P2,P3,P4,P5:Prop.Or5 P1 P2 P3 P4 P5 → Or5 P1 P4 P3 P2 P5.
379 #P1; #P2; #P3; #P4; #P5; #H;
380 napply (or5_elim P1 P2 P3 P4 P5 ? H);
381 ##[ ##1: #H1; napply (or5_intro1 P1 P4 P3 P2 P5 H1)
382 ##| ##2: #H1; napply (or5_intro4 P1 P4 P3 P2 P5 H1)
383 ##| ##3: #H1; napply (or5_intro3 P1 P4 P3 P2 P5 H1)
384 ##| ##4: #H1; napply (or5_intro2 P1 P4 P3 P2 P5 H1)
385 ##| ##5: #H1; napply (or5_intro5 P1 P4 P3 P2 P5 H1)
389 nlemma symmetric_or5_25 : ∀P1,P2,P3,P4,P5:Prop.Or5 P1 P2 P3 P4 P5 → Or5 P1 P5 P3 P4 P2.
390 #P1; #P2; #P3; #P4; #P5; #H;
391 napply (or5_elim P1 P2 P3 P4 P5 ? H);
392 ##[ ##1: #H1; napply (or5_intro1 P1 P5 P3 P4 P2 H1)
393 ##| ##2: #H1; napply (or5_intro5 P1 P5 P3 P4 P2 H1)
394 ##| ##3: #H1; napply (or5_intro3 P1 P5 P3 P4 P2 H1)
395 ##| ##4: #H1; napply (or5_intro4 P1 P5 P3 P4 P2 H1)
396 ##| ##5: #H1; napply (or5_intro2 P1 P5 P3 P4 P2 H1)
400 nlemma symmetric_or5_34 : ∀P1,P2,P3,P4,P5:Prop.Or5 P1 P2 P3 P4 P5 → Or5 P1 P2 P4 P3 P5.
401 #P1; #P2; #P3; #P4; #P5; #H;
402 napply (or5_elim P1 P2 P3 P4 P5 ? H);
403 ##[ ##1: #H1; napply (or5_intro1 P1 P2 P4 P3 P5 H1)
404 ##| ##2: #H1; napply (or5_intro2 P1 P2 P4 P3 P5 H1)
405 ##| ##3: #H1; napply (or5_intro4 P1 P2 P4 P3 P5 H1)
406 ##| ##4: #H1; napply (or5_intro3 P1 P2 P4 P3 P5 H1)
407 ##| ##5: #H1; napply (or5_intro5 P1 P2 P4 P3 P5 H1)
411 nlemma symmetric_or5_35 : ∀P1,P2,P3,P4,P5:Prop.Or5 P1 P2 P3 P4 P5 → Or5 P1 P2 P5 P4 P3.
412 #P1; #P2; #P3; #P4; #P5; #H;
413 napply (or5_elim P1 P2 P3 P4 P5 ? H);
414 ##[ ##1: #H1; napply (or5_intro1 P1 P2 P5 P4 P3 H1)
415 ##| ##2: #H1; napply (or5_intro2 P1 P2 P5 P4 P3 H1)
416 ##| ##3: #H1; napply (or5_intro5 P1 P2 P5 P4 P3 H1)
417 ##| ##4: #H1; napply (or5_intro4 P1 P2 P5 P4 P3 H1)
418 ##| ##5: #H1; napply (or5_intro3 P1 P2 P5 P4 P3 H1)
422 nlemma symmetric_or5_45 : ∀P1,P2,P3,P4,P5:Prop.Or5 P1 P2 P3 P4 P5 → Or5 P1 P2 P3 P5 P4.
423 #P1; #P2; #P3; #P4; #P5; #H;
424 napply (or5_elim P1 P2 P3 P4 P5 ? H);
425 ##[ ##1: #H1; napply (or5_intro1 P1 P2 P3 P5 P4 H1)
426 ##| ##2: #H1; napply (or5_intro2 P1 P2 P3 P5 P4 H1)
427 ##| ##3: #H1; napply (or5_intro3 P1 P2 P3 P5 P4 H1)
428 ##| ##4: #H1; napply (or5_intro5 P1 P2 P3 P5 P4 H1)
429 ##| ##5: #H1; napply (or5_intro4 P1 P2 P3 P5 P4 H1)
433 ninductive ex (A:Type) (Q:A → Prop) : Prop ≝
434 ex_intro: ∀x:A.Q x → ex A Q.
436 interpretation "exists" 'exists x = (ex ? x).
438 ninductive ex2 (A:Type) (Q,R:A → Prop) : Prop ≝
439 ex_intro2: ∀x:A.Q x → R x → ex2 A Q R.
441 (* higher_order_defs/relations *)
443 ndefinition relation : Type → Type ≝
446 ndefinition reflexive : ∀A:Type.∀R:relation A.Prop ≝
449 ndefinition symmetric : ∀A:Type.∀R:relation A.Prop ≝
450 λA.λR.∀x,y:A.R x y → R y x.
452 ndefinition transitive : ∀A:Type.∀R:relation A.Prop ≝
453 λA.λR.∀x,y,z:A.R x y → R y z → R x z.
455 ndefinition irreflexive : ∀A:Type.∀R:relation A.Prop ≝
456 λA.λR.∀x:A.¬ (R x x).
458 ndefinition cotransitive : ∀A:Type.∀R:relation A.Prop ≝
459 λA.λR.∀x,y:A.R x y → ∀z:A. R x z ∨ R z y.
461 ndefinition tight_apart : ∀A:Type.∀eq,ap:relation A.Prop ≝
462 λA.λeq,ap.∀x,y:A. (¬ (ap x y) → eq x y) ∧ (eq x y → ¬ (ap x y)).
464 ndefinition antisymmetric : ∀A:Type.∀R:relation A.Prop ≝
465 λA.λR.∀x,y:A.R x y → ¬ (R y x).
467 (* logic/equality.ma *)
469 ninductive eq (A:Type) (x:A) : A → Prop ≝
472 ndefinition refl ≝ refl_eq.
474 interpretation "leibnitz's equality" 'eq t x y = (eq t x y).
476 interpretation "leibnitz's non-equality" 'neq t x y = (Not (eq t x y)).
478 nlemma eq_f : ∀T1,T2:Type.∀x,y:T1.∀f:T1 → T2.x = y → (f x) = (f y).
479 #T1; #T2; #x; #y; #f; #H;
484 nlemma eq_f2 : ∀T1,T2,T3:Type.∀x1,y1:T1.∀x2,y2:T2.∀f:T1 → T2 → T3.x1 = y1 → x2 = y2 → f x1 x2 = f y1 y2.
485 #T1; #T2; #T3; #x1; #y1; #x2; #y2; #f; #H1; #H2;
491 nlemma neqf_to_neq : ∀T1,T2:Type.∀x,y:T1.∀f:T1 → T2.((f x) ≠ (f y)) → x ≠ y.
492 #T1; #T2; #x; #y; #f;
494 napply (H (eq_f … H1)).
497 nlemma symmetric_eq: ∀A:Type. symmetric A (eq A).
505 nlemma eq_ind_r: ∀A:Type[0].∀x:A.∀P:A → Prop.P x → ∀y:A.y=x → P y.
506 #A; #x; #P; #H; #y; #H1;
507 nrewrite < (symmetric_eq … H1);
511 ndefinition R0 ≝ λT:Type[0].λt:T.t.
513 ndefinition R1 ≝ eq_rect_Type0.
518 ∀T1:∀x0:T0. a0=x0 → Type[0].
519 ∀a1:T1 a0 (refl_eq ? a0).
520 ∀T2:∀x0:T0. ∀p0:a0=x0. ∀x1:T1 x0 p0. R1 ?? T1 a1 ? p0 = x1 → Type[0].
521 ∀a2:T2 a0 (refl_eq ? a0) a1 (refl_eq ? a1).
525 ∀e1:R1 ?? T1 a1 ? e0 = b1.
527 #T0;#a0;#T1;#a1;#T2;#a2;#b0;#e0;#b1;#e1;
528 napply (eq_rect_Type0 ????? e1);
529 napply (R1 ?? ? ?? e0);
536 ∀T1:∀x0:T0. a0=x0 → Type[0].
537 ∀a1:T1 a0 (refl_eq ? a0).
538 ∀T2:∀x0:T0. ∀p0:a0=x0. ∀x1:T1 x0 p0. R1 ?? T1 a1 ? p0 = x1 → Type[0].
539 ∀a2:T2 a0 (refl_eq ? a0) a1 (refl_eq ? a1).
540 ∀T3:∀x0:T0. ∀p0:a0=x0. ∀x1:T1 x0 p0.∀p1:R1 ?? T1 a1 ? p0 = x1.
541 ∀x2:T2 x0 p0 x1 p1.R2 ???? T2 a2 x0 p0 ? p1 = x2 → Type[0].
542 ∀a3:T3 a0 (refl_eq ? a0) a1 (refl_eq ? a1) a2 (refl_eq ? a2).
546 ∀e1:R1 ?? T1 a1 ? e0 = b1.
548 ∀e2:R2 ???? T2 a2 b0 e0 ? e1 = b2.
549 T3 b0 e0 b1 e1 b2 e2.
550 #T0;#a0;#T1;#a1;#T2;#a2;#T3;#a3;#b0;#e0;#b1;#e1;#b2;#e2;
551 napply (eq_rect_Type0 ????? e2);
552 napply (R2 ?? ? ???? e0 ? e1);
559 ∀T1:∀x0:T0. eq T0 a0 x0 → Type[0].
560 ∀a1:T1 a0 (refl_eq T0 a0).
561 ∀T2:∀x0:T0. ∀p0:eq (T0 …) a0 x0. ∀x1:T1 x0 p0.eq (T1 …) (R1 T0 a0 T1 a1 x0 p0) x1 → Type[0].
562 ∀a2:T2 a0 (refl_eq T0 a0) a1 (refl_eq (T1 a0 (refl_eq T0 a0)) a1).
563 ∀T3:∀x0:T0. ∀p0:eq (T0 …) a0 x0. ∀x1:T1 x0 p0.∀p1:eq (T1 …) (R1 T0 a0 T1 a1 x0 p0) x1.
564 ∀x2:T2 x0 p0 x1 p1.eq (T2 …) (R2 T0 a0 T1 a1 T2 a2 x0 p0 x1 p1) x2 → Type[0].
565 ∀a3:T3 a0 (refl_eq T0 a0) a1 (refl_eq (T1 a0 (refl_eq T0 a0)) a1)
566 a2 (refl_eq (T2 a0 (refl_eq T0 a0) a1 (refl_eq (T1 a0 (refl_eq T0 a0)) a1)) a2).
567 ∀T4:∀x0:T0. ∀p0:eq (T0 …) a0 x0. ∀x1:T1 x0 p0.∀p1:eq (T1 …) (R1 T0 a0 T1 a1 x0 p0) x1.
568 ∀x2:T2 x0 p0 x1 p1.∀p2:eq (T2 …) (R2 T0 a0 T1 a1 T2 a2 x0 p0 x1 p1) x2.
569 ∀x3:T3 x0 p0 x1 p1 x2 p2.∀p3:eq (T3 …) (R3 T0 a0 T1 a1 T2 a2 T3 a3 x0 p0 x1 p1 x2 p2) x3.
571 ∀a4:T4 a0 (refl_eq T0 a0) a1 (refl_eq (T1 a0 (refl_eq T0 a0)) a1)
572 a2 (refl_eq (T2 a0 (refl_eq T0 a0) a1 (refl_eq (T1 a0 (refl_eq T0 a0)) a1)) a2)
573 a3 (refl_eq (T3 a0 (refl_eq T0 a0) a1 (refl_eq (T1 a0 (refl_eq T0 a0)) a1)
574 a2 (refl_eq (T2 a0 (refl_eq T0 a0) a1 (refl_eq (T1 a0 (refl_eq T0 a0)) a1)) a2))
579 ∀e1:eq (T1 …) (R1 T0 a0 T1 a1 b0 e0) b1.
581 ∀e2:eq (T2 …) (R2 T0 a0 T1 a1 T2 a2 b0 e0 b1 e1) b2.
582 ∀b3: T3 b0 e0 b1 e1 b2 e2.
583 ∀e3:eq (T3 …) (R3 T0 a0 T1 a1 T2 a2 T3 a3 b0 e0 b1 e1 b2 e2) b3.
584 T4 b0 e0 b1 e1 b2 e2 b3 e3.
585 #T0;#a0;#T1;#a1;#T2;#a2;#T3;#a3;#T4;#a4;#b0;#e0;#b1;#e1;#b2;#e2;#b3;#e3;
586 napply (eq_rect_Type0 ????? e3);
587 napply (R3 ????????? e0 ? e1 ? e2);
591 naxiom streicherK : ∀T:Type[0].∀t:T.∀P:t = t → Type[2].P (refl ? t) → ∀p.P p.
593 nlemma symmetric_neq : ∀T:Type.∀x,y:T.x ≠ y → y ≠ x.
597 nrewrite > H1 in H:(%); #H;
598 napply (H (refl_eq …)).
601 ndefinition relationT : Type → Type → Type ≝
604 ndefinition symmetricT: ∀A,T:Type.∀R:relationT A T.Prop ≝
605 λA,T.λR.∀x,y:A.R x y = R y x.
607 ndefinition associative : ∀A:Type.∀R:relationT A A.Prop ≝
608 λA.λR.∀x,y,z:A.R (R x y) z = R x (R y z).