DEFINITION csuba_gen_abbr()
TYPE =
∀g:G
.∀d1:C
.∀c:C
.∀u:T
.csuba g (CHead d1 (Bind Abbr) u) c
→ex2 C λd2:C.eq C c (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2
BODY =
assume g: G
assume d1: C
assume c: C
assume u: T
suppose H: csuba g (CHead d1 (Bind Abbr) u) c
assume y: C
suppose H0: csuba g y c
we proceed by induction on H0 to prove
eq C y (CHead d1 (Bind Abbr) u)
→ex2 C λd2:C.eq C c (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2
case csuba_sort : n:nat ⇒
the thesis becomes
∀H1:eq C (CSort n) (CHead d1 (Bind Abbr) u)
.ex2 C λd2:C.eq C (CSort n) (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2
suppose H1: eq C (CSort n) (CHead d1 (Bind Abbr) u)
(H2)
we proceed by induction on H1 to prove
<λ:C.Prop>
CASE CHead d1 (Bind Abbr) u OF
CSort ⇒True
| CHead ⇒False
case refl_equal : ⇒
the thesis becomes <λ:C.Prop> CASE CSort n OF CSort ⇒True | CHead ⇒False
consider I
we proved True
<λ:C.Prop> CASE CSort n OF CSort ⇒True | CHead ⇒False
<λ:C.Prop>
CASE CHead d1 (Bind Abbr) u OF
CSort ⇒True
| CHead ⇒False
end of H2
consider H2
we proved
<λ:C.Prop>
CASE CHead d1 (Bind Abbr) u OF
CSort ⇒True
| CHead ⇒False
that is equivalent to False
we proceed by induction on the previous result to prove ex2 C λd2:C.eq C (CSort n) (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2
we proved ex2 C λd2:C.eq C (CSort n) (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2
∀H1:eq C (CSort n) (CHead d1 (Bind Abbr) u)
.ex2 C λd2:C.eq C (CSort n) (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2
case csuba_head : c1:C c2:C H1:csuba g c1 c2 k:K u0:T ⇒
the thesis becomes
∀H3:eq C (CHead c1 k u0) (CHead d1 (Bind Abbr) u)
.ex2 C λd2:C.eq C (CHead c2 k u0) (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2
(H2) by induction hypothesis we know
eq C c1 (CHead d1 (Bind Abbr) u)
→ex2 C λd2:C.eq C c2 (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2
suppose H3: eq C (CHead c1 k u0) (CHead d1 (Bind Abbr) u)
(H4)
by (f_equal . . . . . H3)
we proved
eq
C
<λ:C.C> CASE CHead c1 k u0 OF CSort ⇒c1 | CHead c0 ⇒c0
<λ:C.C> CASE CHead d1 (Bind Abbr) u OF CSort ⇒c1 | CHead c0 ⇒c0
eq
C
λe:C.<λ:C.C> CASE e OF CSort ⇒c1 | CHead c0 ⇒c0 (CHead c1 k u0)
λe:C.<λ:C.C> CASE e OF CSort ⇒c1 | CHead c0 ⇒c0 (CHead d1 (Bind Abbr) u)
end of H4
(h1)
(H5)
by (f_equal . . . . . H3)
we proved
eq
K
<λ:C.K> CASE CHead c1 k u0 OF CSort ⇒k | CHead k0 ⇒k0
<λ:C.K> CASE CHead d1 (Bind Abbr) u OF CSort ⇒k | CHead k0 ⇒k0
eq
K
λe:C.<λ:C.K> CASE e OF CSort ⇒k | CHead k0 ⇒k0 (CHead c1 k u0)
λe:C.<λ:C.K> CASE e OF CSort ⇒k | CHead k0 ⇒k0 (CHead d1 (Bind Abbr) u)
end of H5
(h1)
(H6)
by (f_equal . . . . . H3)
we proved
eq
T
<λ:C.T> CASE CHead c1 k u0 OF CSort ⇒u0 | CHead t⇒t
<λ:C.T> CASE CHead d1 (Bind Abbr) u OF CSort ⇒u0 | CHead t⇒t
eq
T
λe:C.<λ:C.T> CASE e OF CSort ⇒u0 | CHead t⇒t (CHead c1 k u0)
λe:C.<λ:C.T> CASE e OF CSort ⇒u0 | CHead t⇒t (CHead d1 (Bind Abbr) u)
end of H6
suppose H7: eq K k (Bind Abbr)
suppose H8: eq C c1 d1
(h1)
(H10)
we proceed by induction on H8 to prove csuba g d1 c2
case refl_equal : ⇒
the thesis becomes the hypothesis H1
csuba g d1 c2
end of H10
by (refl_equal . .)
we proved eq C (CHead c2 (Bind Abbr) u) (CHead c2 (Bind Abbr) u)
by (ex_intro2 . . . . previous H10)
we proved
ex2
C
λd2:C.eq C (CHead c2 (Bind Abbr) u) (CHead d2 (Bind Abbr) u)
λd2:C.csuba g d1 d2
by (eq_ind_r . . . previous . H7)
ex2 C λd2:C.eq C (CHead c2 k u) (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2
end of h1
(h2)
consider H6
we proved
eq
T
<λ:C.T> CASE CHead c1 k u0 OF CSort ⇒u0 | CHead t⇒t
<λ:C.T> CASE CHead d1 (Bind Abbr) u OF CSort ⇒u0 | CHead t⇒t
eq T u0 u
end of h2
by (eq_ind_r . . . h1 . h2)
we proved ex2 C λd2:C.eq C (CHead c2 k u0) (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2
eq K k (Bind Abbr)
→(eq C c1 d1
→ex2 C λd2:C.eq C (CHead c2 k u0) (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2)
end of h1
(h2)
consider H5
we proved
eq
K
<λ:C.K> CASE CHead c1 k u0 OF CSort ⇒k | CHead k0 ⇒k0
<λ:C.K> CASE CHead d1 (Bind Abbr) u OF CSort ⇒k | CHead k0 ⇒k0
eq K k (Bind Abbr)
end of h2
by (h1 h2)
eq C c1 d1
→ex2 C λd2:C.eq C (CHead c2 k u0) (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2
end of h1
(h2)
consider H4
we proved
eq
C
<λ:C.C> CASE CHead c1 k u0 OF CSort ⇒c1 | CHead c0 ⇒c0
<λ:C.C> CASE CHead d1 (Bind Abbr) u OF CSort ⇒c1 | CHead c0 ⇒c0
eq C c1 d1
end of h2
by (h1 h2)
we proved ex2 C λd2:C.eq C (CHead c2 k u0) (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2
∀H3:eq C (CHead c1 k u0) (CHead d1 (Bind Abbr) u)
.ex2 C λd2:C.eq C (CHead c2 k u0) (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2
case csuba_void : c1:C c2:C :csuba g c1 c2 b:B :not (eq B b Void) u1:T u2:T ⇒
the thesis becomes
∀H4:eq C (CHead c1 (Bind Void) u1) (CHead d1 (Bind Abbr) u)
.ex2
C
λd2:C.eq C (CHead c2 (Bind b) u2) (CHead d2 (Bind Abbr) u)
λd2:C.csuba g d1 d2
() by induction hypothesis we know
eq C c1 (CHead d1 (Bind Abbr) u)
→ex2 C λd2:C.eq C c2 (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2
suppose H4: eq C (CHead c1 (Bind Void) u1) (CHead d1 (Bind Abbr) u)
(H5)
we proceed by induction on H4 to prove
<λ:C.Prop>
CASE CHead d1 (Bind Abbr) u OF
CSort ⇒False
| CHead k ⇒
<λ:K.Prop>
CASE k OF
Bind b0⇒<λ:B.Prop> CASE b0 OF Abbr⇒False | Abst⇒False | Void⇒True
| Flat ⇒False
case refl_equal : ⇒
the thesis becomes
<λ:C.Prop>
CASE CHead c1 (Bind Void) u1 OF
CSort ⇒False
| CHead k ⇒
<λ:K.Prop>
CASE k OF
Bind b0⇒<λ:B.Prop> CASE b0 OF Abbr⇒False | Abst⇒False | Void⇒True
| Flat ⇒False
consider I
we proved True
<λ:C.Prop>
CASE CHead c1 (Bind Void) u1 OF
CSort ⇒False
| CHead k ⇒
<λ:K.Prop>
CASE k OF
Bind b0⇒<λ:B.Prop> CASE b0 OF Abbr⇒False | Abst⇒False | Void⇒True
| Flat ⇒False
<λ:C.Prop>
CASE CHead d1 (Bind Abbr) u OF
CSort ⇒False
| CHead k ⇒
<λ:K.Prop>
CASE k OF
Bind b0⇒<λ:B.Prop> CASE b0 OF Abbr⇒False | Abst⇒False | Void⇒True
| Flat ⇒False
end of H5
consider H5
we proved
<λ:C.Prop>
CASE CHead d1 (Bind Abbr) u OF
CSort ⇒False
| CHead k ⇒
<λ:K.Prop>
CASE k OF
Bind b0⇒<λ:B.Prop> CASE b0 OF Abbr⇒False | Abst⇒False | Void⇒True
| Flat ⇒False
that is equivalent to False
we proceed by induction on the previous result to prove
ex2
C
λd2:C.eq C (CHead c2 (Bind b) u2) (CHead d2 (Bind Abbr) u)
λd2:C.csuba g d1 d2
we proved
ex2
C
λd2:C.eq C (CHead c2 (Bind b) u2) (CHead d2 (Bind Abbr) u)
λd2:C.csuba g d1 d2
∀H4:eq C (CHead c1 (Bind Void) u1) (CHead d1 (Bind Abbr) u)
.ex2
C
λd2:C.eq C (CHead c2 (Bind b) u2) (CHead d2 (Bind Abbr) u)
λd2:C.csuba g d1 d2
case csuba_abst : c1:C c2:C :csuba g c1 c2 t:T a:A :arity g c1 t (asucc g a) u0:T :arity g c2 u0 a ⇒
the thesis becomes
∀H5:eq C (CHead c1 (Bind Abst) t) (CHead d1 (Bind Abbr) u)
.ex2
C
λd2:C.eq C (CHead c2 (Bind Abbr) u0) (CHead d2 (Bind Abbr) u)
λd2:C.csuba g d1 d2
() by induction hypothesis we know
eq C c1 (CHead d1 (Bind Abbr) u)
→ex2 C λd2:C.eq C c2 (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2
suppose H5: eq C (CHead c1 (Bind Abst) t) (CHead d1 (Bind Abbr) u)
(H6)
we proceed by induction on H5 to prove
<λ:C.Prop>
CASE CHead d1 (Bind Abbr) u OF
CSort ⇒False
| CHead k ⇒
<λ:K.Prop>
CASE k OF
Bind b⇒<λ:B.Prop> CASE b OF Abbr⇒False | Abst⇒True | Void⇒False
| Flat ⇒False
case refl_equal : ⇒
the thesis becomes
<λ:C.Prop>
CASE CHead c1 (Bind Abst) t OF
CSort ⇒False
| CHead k ⇒
<λ:K.Prop>
CASE k OF
Bind b⇒<λ:B.Prop> CASE b OF Abbr⇒False | Abst⇒True | Void⇒False
| Flat ⇒False
consider I
we proved True
<λ:C.Prop>
CASE CHead c1 (Bind Abst) t OF
CSort ⇒False
| CHead k ⇒
<λ:K.Prop>
CASE k OF
Bind b⇒<λ:B.Prop> CASE b OF Abbr⇒False | Abst⇒True | Void⇒False
| Flat ⇒False
<λ:C.Prop>
CASE CHead d1 (Bind Abbr) u OF
CSort ⇒False
| CHead k ⇒
<λ:K.Prop>
CASE k OF
Bind b⇒<λ:B.Prop> CASE b OF Abbr⇒False | Abst⇒True | Void⇒False
| Flat ⇒False
end of H6
consider H6
we proved
<λ:C.Prop>
CASE CHead d1 (Bind Abbr) u OF
CSort ⇒False
| CHead k ⇒
<λ:K.Prop>
CASE k OF
Bind b⇒<λ:B.Prop> CASE b OF Abbr⇒False | Abst⇒True | Void⇒False
| Flat ⇒False
that is equivalent to False
we proceed by induction on the previous result to prove
ex2
C
λd2:C.eq C (CHead c2 (Bind Abbr) u0) (CHead d2 (Bind Abbr) u)
λd2:C.csuba g d1 d2
we proved
ex2
C
λd2:C.eq C (CHead c2 (Bind Abbr) u0) (CHead d2 (Bind Abbr) u)
λd2:C.csuba g d1 d2
∀H5:eq C (CHead c1 (Bind Abst) t) (CHead d1 (Bind Abbr) u)
.ex2
C
λd2:C.eq C (CHead c2 (Bind Abbr) u0) (CHead d2 (Bind Abbr) u)
λd2:C.csuba g d1 d2
we proved
eq C y (CHead d1 (Bind Abbr) u)
→ex2 C λd2:C.eq C c (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2
we proved
∀y:C
.csuba g y c
→(eq C y (CHead d1 (Bind Abbr) u)
→ex2 C λd2:C.eq C c (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2)
by (insert_eq . . . . previous H)
we proved ex2 C λd2:C.eq C c (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2
we proved
∀g:G
.∀d1:C
.∀c:C
.∀u:T
.csuba g (CHead d1 (Bind Abbr) u) c
→ex2 C λd2:C.eq C c (CHead d2 (Bind Abbr) u) λd2:C.csuba g d1 d2