]> matita.cs.unibo.it Git - helm.git/blob - helm/software/matita/nlibrary/logic/destruct_bb.ma
308f8bebeb91ed3b554cca708bb4e6fbd0eb1124
[helm.git] / helm / software / matita / nlibrary / logic / destruct_bb.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 "logic/equality.ma".
16
17 ninductive unit: Type[0] ≝ k: unit.
18
19 ninductive bool: unit → Type[0] ≝ true : bool k | false : bool k.
20
21 nlemma foo: true = false → False. #H; ndestruct;
22 nqed.
23
24 (* nlemma prova : ∀T:Type[0].∀a,b:T.∀e:a = b.
25                ∀P:∀x,y:T.x=y→Prop.P a a (refl T a) → P a b e.
26 #T;#a;#b;#e;#P;#H;
27 nrewrite < e;*)
28
29 ninductive I1 : Type[0] ≝
30 | k1 : I1.
31
32 ninductive I2 : I1 → Type[0] ≝
33 | k2 : ∀x.I2 x.
34
35 ninductive I3 : ∀x:I1.I2 x → Type[0] ≝
36 | k3 : ∀x,y.I3 x y.
37
38 ninductive I4 : ∀x,y.I3 x y → Type[0] ≝
39 | k4 : ∀x,y.∀z:I3 x y.I4 x y z.
40
41 (*alias id "eq" = "cic:/matita/ng/logic/equality/eq.ind(1,0,2)".
42 alias id "refl" = "cic:/matita/ng/logic/equality/eq.con(0,1,2)".*)
43
44 ninductive II : Type[0] ≝
45 | kII1 : ∀x,y,z.∀w:I4 x y z.II
46 | kII2 : ∀x,y,z.∀w:I4 x y z.II.
47
48 (* nlemma foo : ∀a,b,c,d,e,f,g,h. kII1 a b c d = kII2 e f g h → True.
49 #a;#b;#c;#d;#e;#f;#g;#h;#H;
50 ndiscriminate H;
51 nqed. *)
52
53 nlemma faof : ∀a,b,c,d,e,f,g,h.∀Heq:kII1 a b c d = kII1 e f g h.
54               ∀P:(∀a,b,c,d.kII1 a b c d = kII1 e f g h → Prop).
55               P e f g h (refl ??) → P a b c d Heq.
56 #a;#b;#c;#d;#e;#f;#g;#h;#Heq;#P;#HP;
57 ndestruct;
58 napply HP;
59 nqed.