DEFINITION csubst0_drop_lt()
TYPE =
∀n:nat
.∀i:nat
.lt n i
→∀c1:C
.∀c2:C
.∀v:T
.csubst0 i v c1 c2
→∀e:C
.drop n O c1 e
→(or4
drop n O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop n O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k n)) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop n O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k n)) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop n O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k n)) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k n)) v e1 e2)
BODY =
assume n: nat
we proceed by induction on n to prove
∀i:nat
.lt n i
→∀c1:C
.∀c2:C
.∀v:T
.csubst0 i v c1 c2
→∀e:C
.drop n O c1 e
→(or4
drop n O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop n O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k n)) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop n O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k n)) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop n O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k n)) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k n)) v e1 e2)
case O : ⇒
the thesis becomes
∀i:nat
.lt O i
→∀c1:C
.∀c2:C
.∀v:T
.csubst0 i v c1 c2
→∀e:C
.drop O O c1 e
→(or4
drop O O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop O O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k O)) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop O O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k O)) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop O O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k O)) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k O)) v e1 e2)
assume i: nat
suppose : lt O i
assume c1: C
assume c2: C
assume v: T
suppose H0: csubst0 i v c1 c2
assume e: C
suppose H1: drop O O c1 e
by (drop_gen_refl . . H1)
we proved eq C c1 e
we proceed by induction on the previous result to prove
or4
drop O O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop O O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k O)) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop O O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k O)) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop O O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k O)) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k O)) v e1 e2
case refl_equal : ⇒
the thesis becomes
or4
drop O O c2 c1
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C c1 (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop O O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k O)) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C c1 (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop O O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k O)) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C c1 (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop O O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k O)) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k O)) v e1 e2
we proceed by induction on H0 to prove
or4
drop O O c2 c1
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C c1 (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop O O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k O)) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C c1 (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop O O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k O)) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C c1 (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop O O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k O)) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k O)) v e1 e2
case csubst0_snd : k:K i0:nat v0:T u1:T u2:T H2:subst0 i0 v0 u1 u2 c:C ⇒
the thesis becomes
or4
drop O O (CHead c k u2) (CHead c k u1)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead c k u1) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop O O (CHead c k u2) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s k i0) (s k0 O)) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead c k u1) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop O O (CHead c k u2) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead c k u1) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop O O (CHead c k u2) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s k i0) (s k0 O)) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2
(H3)
by (s_arith0 . .)
we proved eq nat (minus (s k i0) (s k O)) i0
by (eq_ind_r . . . H2 . previous)
subst0 (minus (s k i0) (s k O)) v0 u1 u2
end of H3
(h1)
by (refl_equal . .)
eq C (CHead c k u1) (CHead c k u1)
end of h1
(h2)
by (drop_refl .)
drop O O (CHead c k u2) (CHead c k u2)
end of h2
by (ex3_4_intro . . . . . . . . . . . h1 h2 H3)
we proved
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead c k u1) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop O O (CHead c k u2) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s k i0) (s k0 O)) v0 u w
by (or4_intro1 . . . . previous)
or4
drop O O (CHead c k u2) (CHead c k u1)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead c k u1) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop O O (CHead c k u2) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s k i0) (s k0 O)) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead c k u1) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop O O (CHead c k u2) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead c k u1) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop O O (CHead c k u2) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s k i0) (s k0 O)) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2
case csubst0_fst : k:K i0:nat c3:C c4:C v0:T H2:csubst0 i0 v0 c3 c4 u:T ⇒
the thesis becomes
or4
drop O O (CHead c4 k u) (CHead c3 k u)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu0:T.λ:T.eq C (CHead c3 k u) (CHead e0 k0 u0)
λk0:K.λe0:C.λ:T.λw:T.drop O O (CHead c4 k u) (CHead e0 k0 w)
λk0:K.λ:C.λu0:T.λw:T.subst0 (minus (s k i0) (s k0 O)) v0 u0 w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu0:T.eq C (CHead c3 k u) (CHead e1 k0 u0)
λk0:K.λ:C.λe2:C.λu0:T.drop O O (CHead c4 k u) (CHead e2 k0 u0)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu0:T.λ:T.eq C (CHead c3 k u) (CHead e1 k0 u0)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop O O (CHead c4 k u) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu0:T.λw:T.subst0 (minus (s k i0) (s k0 O)) v0 u0 w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2
(H3) by induction hypothesis we know
or4
drop O O c4 c3
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C c3 (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop O O c4 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i0 (s k0 O)) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C c3 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop O O c4 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i0 (s k0 O)) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C c3 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop O O c4 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i0 (s k0 O)) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i0 (s k0 O)) v0 e1 e2
(H4)
by (s_arith0 . .)
we proved eq nat (minus (s k i0) (s k O)) i0
by (eq_ind_r . . . H2 . previous)
csubst0 (minus (s k i0) (s k O)) v0 c3 c4
end of H4
(h1)
by (refl_equal . .)
eq C (CHead c3 k u) (CHead c3 k u)
end of h1
(h2)
by (drop_refl .)
drop O O (CHead c4 k u) (CHead c4 k u)
end of h2
by (ex3_4_intro . . . . . . . . . . . h1 h2 H4)
we proved
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu0:T.eq C (CHead c3 k u) (CHead e1 k0 u0)
λk0:K.λ:C.λe2:C.λu0:T.drop O O (CHead c4 k u) (CHead e2 k0 u0)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2
by (or4_intro2 . . . . previous)
or4
drop O O (CHead c4 k u) (CHead c3 k u)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu0:T.λ:T.eq C (CHead c3 k u) (CHead e0 k0 u0)
λk0:K.λe0:C.λ:T.λw:T.drop O O (CHead c4 k u) (CHead e0 k0 w)
λk0:K.λ:C.λu0:T.λw:T.subst0 (minus (s k i0) (s k0 O)) v0 u0 w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu0:T.eq C (CHead c3 k u) (CHead e1 k0 u0)
λk0:K.λ:C.λe2:C.λu0:T.drop O O (CHead c4 k u) (CHead e2 k0 u0)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu0:T.λ:T.eq C (CHead c3 k u) (CHead e1 k0 u0)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop O O (CHead c4 k u) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu0:T.λw:T.subst0 (minus (s k i0) (s k0 O)) v0 u0 w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2
case csubst0_both : k:K i0:nat v0:T u1:T u2:T H2:subst0 i0 v0 u1 u2 c3:C c4:C H3:csubst0 i0 v0 c3 c4 ⇒
the thesis becomes
or4
drop O O (CHead c4 k u2) (CHead c3 k u1)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead c3 k u1) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop O O (CHead c4 k u2) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s k i0) (s k0 O)) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead c3 k u1) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop O O (CHead c4 k u2) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead c3 k u1) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop O O (CHead c4 k u2) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s k i0) (s k0 O)) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2
() by induction hypothesis we know
or4
drop O O c4 c3
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C c3 (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop O O c4 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i0 (s k0 O)) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C c3 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop O O c4 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i0 (s k0 O)) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C c3 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop O O c4 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i0 (s k0 O)) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i0 (s k0 O)) v0 e1 e2
(H5)
by (s_arith0 . .)
we proved eq nat (minus (s k i0) (s k O)) i0
by (eq_ind_r . . . H2 . previous)
subst0 (minus (s k i0) (s k O)) v0 u1 u2
end of H5
(H6)
by (s_arith0 . .)
we proved eq nat (minus (s k i0) (s k O)) i0
by (eq_ind_r . . . H3 . previous)
csubst0 (minus (s k i0) (s k O)) v0 c3 c4
end of H6
(h1)
by (refl_equal . .)
eq C (CHead c3 k u1) (CHead c3 k u1)
end of h1
(h2)
by (drop_refl .)
drop O O (CHead c4 k u2) (CHead c4 k u2)
end of h2
by (ex4_5_intro . . . . . . . . . . . . . . h1 h2 H5 H6)
we proved
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead c3 k u1) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop O O (CHead c4 k u2) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s k i0) (s k0 O)) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2
by (or4_intro3 . . . . previous)
or4
drop O O (CHead c4 k u2) (CHead c3 k u1)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead c3 k u1) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop O O (CHead c4 k u2) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s k i0) (s k0 O)) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead c3 k u1) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop O O (CHead c4 k u2) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead c3 k u1) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop O O (CHead c4 k u2) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s k i0) (s k0 O)) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s k i0) (s k0 O)) v0 e1 e2
or4
drop O O c2 c1
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C c1 (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop O O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k O)) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C c1 (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop O O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k O)) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C c1 (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop O O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k O)) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k O)) v e1 e2
we proved
or4
drop O O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop O O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k O)) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop O O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k O)) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop O O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k O)) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k O)) v e1 e2
∀i:nat
.lt O i
→∀c1:C
.∀c2:C
.∀v:T
.csubst0 i v c1 c2
→∀e:C
.drop O O c1 e
→(or4
drop O O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop O O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k O)) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop O O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k O)) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop O O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k O)) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k O)) v e1 e2)
case S : n0:nat ⇒
the thesis becomes
∀i:nat
.∀H:lt (S n0) i
.∀c1:C
.∀c2:C
.∀v:T
.csubst0 i v c1 c2
→∀e:C
.drop (S n0) O c1 e
→(or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2)
(IHn) by induction hypothesis we know
∀i:nat
.lt n0 i
→∀c1:C
.∀c2:C
.∀v:T
.csubst0 i v c1 c2
→∀e:C
.drop n0 O c1 e
→(or4
drop n0 O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop n0 O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k n0)) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop n0 O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k n0)) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop n0 O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k n0)) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k n0)) v e1 e2)
assume i: nat
suppose H: lt (S n0) i
assume c1: C
we proceed by induction on c1 to prove
∀c2:C
.∀v:T
.csubst0 i v c1 c2
→∀e:C
.drop (S n0) O c1 e
→(or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2)
case CSort : n1:nat ⇒
the thesis becomes
∀c2:C
.∀v:T
.csubst0 i v (CSort n1) c2
→∀e:C
.∀H1:drop (S n0) O (CSort n1) e
.or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
assume c2: C
assume v: T
suppose : csubst0 i v (CSort n1) c2
assume e: C
suppose H1: drop (S n0) O (CSort n1) e
by (drop_gen_sort . . . . H1)
we proved and3 (eq C e (CSort n1)) (eq nat (S n0) O) (eq nat O O)
we proceed by induction on the previous result to prove
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
case and3_intro : H2:eq C e (CSort n1) H3:eq nat (S n0) O :eq nat O O ⇒
the thesis becomes
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
(H5)
we proceed by induction on H3 to prove <λ:nat.Prop> CASE O OF O⇒False | S ⇒True
case refl_equal : ⇒
the thesis becomes <λ:nat.Prop> CASE S n0 OF O⇒False | S ⇒True
consider I
we proved True
<λ:nat.Prop> CASE S n0 OF O⇒False | S ⇒True
<λ:nat.Prop> CASE O OF O⇒False | S ⇒True
end of H5
consider H5
we proved <λ:nat.Prop> CASE O OF O⇒False | S ⇒True
that is equivalent to False
we proceed by induction on the previous result to prove
or4
drop (S n0) O c2 (CSort n1)
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C (CSort n1) (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C (CSort n1) (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C (CSort n1) (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
we proved
or4
drop (S n0) O c2 (CSort n1)
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C (CSort n1) (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C (CSort n1) (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C (CSort n1) (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
by (eq_ind_r . . . previous . H2)
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
we proved
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
∀c2:C
.∀v:T
.csubst0 i v (CSort n1) c2
→∀e:C
.∀H1:drop (S n0) O (CSort n1) e
.or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
case CHead : c:C k:K t:T ⇒
the thesis becomes
∀c2:C
.∀v:T
.∀H1:csubst0 i v (CHead c k t) c2
.∀e:C
.∀H2:drop (S n0) O (CHead c k t) e
.or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
(H0) by induction hypothesis we know
∀c2:C
.∀v:T
.csubst0 i v c c2
→∀e:C
.drop (S n0) O c e
→(or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2)
assume c2: C
assume v: T
suppose H1: csubst0 i v (CHead c k t) c2
assume e: C
suppose H2: drop (S n0) O (CHead c k t) e
by (csubst0_gen_head . . . . . . H1)
we proved
or3
ex3_2
T
nat
λ:T.λj:nat.eq nat i (s k j)
λu2:T.λ:nat.eq C c2 (CHead c k u2)
λu2:T.λj:nat.subst0 j v t u2
ex3_2
C
nat
λ:C.λj:nat.eq nat i (s k j)
λc2:C.λ:nat.eq C c2 (CHead c2 k t)
λc2:C.λj:nat.csubst0 j v c c2
ex4_3
T
C
nat
λ:T.λ:C.λj:nat.eq nat i (s k j)
λu2:T.λc2:C.λ:nat.eq C c2 (CHead c2 k u2)
λu2:T.λ:C.λj:nat.subst0 j v t u2
λ:T.λc2:C.λj:nat.csubst0 j v c c2
we proceed by induction on the previous result to prove
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
case or3_intro0 : H3:ex3_2 T nat λ:T.λj:nat.eq nat i (s k j) λu2:T.λ:nat.eq C c2 (CHead c k u2) λu2:T.λj:nat.subst0 j v t u2 ⇒
the thesis becomes
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
we proceed by induction on H3 to prove
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
case ex3_2_intro : x0:T x1:nat H4:eq nat i (s k x1) H5:eq C c2 (CHead c k x0) :subst0 x1 v t x0 ⇒
the thesis becomes
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
(H7)
we proceed by induction on H4 to prove
∀c3:C
.∀v0:T
.csubst0 (s k x1) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s k x1) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s k x1) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s k x1) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s k x1) (s k0 (S n0))) v0 e1 e2)
case refl_equal : ⇒
the thesis becomes the hypothesis H0
∀c3:C
.∀v0:T
.csubst0 (s k x1) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s k x1) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s k x1) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s k x1) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s k x1) (s k0 (S n0))) v0 e1 e2)
end of H7
(H8)
we proceed by induction on H4 to prove lt (S n0) (s k x1)
case refl_equal : ⇒
the thesis becomes the hypothesis H
lt (S n0) (s k x1)
end of H8
by (drop_gen_drop . . . . . H2)
we proved drop (r k n0) O c e
assume b: B
suppose H9: drop (r (Bind b) n0) O c e
suppose :
∀c3:C
.∀v0:T
.csubst0 (s (Bind b) x1) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 e1 e2)
suppose : lt (S n0) (s (Bind b) x1)
by (drop_drop . . . . H9 .)
we proved drop (S n0) O (CHead c (Bind b) x0) e
by (or4_intro0 . . . . previous)
we proved
or4
drop (S n0) O (CHead c (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead c (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead c (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead c (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
∀H9:drop (r (Bind b) n0) O c e
.∀c3:C
.∀v0:T
.csubst0 (s (Bind b) x1) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 e1 e2)
→(lt (S n0) (s (Bind b) x1)
→(or4
drop (S n0) O (CHead c (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead c (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead c (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead c (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2))
assume f: F
suppose H9: drop (r (Flat f) n0) O c e
suppose :
∀c3:C
.∀v0:T
.csubst0 (s (Flat f) x1) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 e1 e2)
suppose : lt (S n0) (s (Flat f) x1)
by (drop_drop . . . . H9 .)
we proved drop (S n0) O (CHead c (Flat f) x0) e
by (or4_intro0 . . . . previous)
we proved
or4
drop (S n0) O (CHead c (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead c (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead c (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead c (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
∀H9:drop (r (Flat f) n0) O c e
.∀c3:C
.∀v0:T
.csubst0 (s (Flat f) x1) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 e1 e2)
→(lt (S n0) (s (Flat f) x1)
→(or4
drop (S n0) O (CHead c (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead c (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead c (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead c (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2))
by (previous . previous H7 H8)
we proved
or4
drop (S n0) O (CHead c k x0) e
ex3_4
K
C
T
T
λk1:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k1 u)
λk1:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead c k x0) (CHead e0 k1 w)
λk1:K.λ:C.λu:T.λw:T.subst0 (minus (s k x1) (s k1 (S n0))) v u w
ex3_4
K
C
C
T
λk1:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k1 u)
λk1:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead c k x0) (CHead e2 k1 u)
λk1:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s k x1) (s k1 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk1:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k1 u)
λk1:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead c k x0) (CHead e2 k1 w)
λk1:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s k x1) (s k1 (S n0))) v u w
λk1:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s k x1) (s k1 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H4)
we proved
or4
drop (S n0) O (CHead c k x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead c k x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead c k x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead c k x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H5)
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
case or3_intro1 : H3:ex3_2 C nat λ:C.λj:nat.eq nat i (s k j) λc3:C.λ:nat.eq C c2 (CHead c3 k t) λc3:C.λj:nat.csubst0 j v c c3 ⇒
the thesis becomes
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
we proceed by induction on H3 to prove
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
case ex3_2_intro : x0:C x1:nat H4:eq nat i (s k x1) H5:eq C c2 (CHead x0 k t) H6:csubst0 x1 v c x0 ⇒
the thesis becomes
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
(H7)
we proceed by induction on H4 to prove
∀c3:C
.∀v0:T
.csubst0 (s k x1) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s k x1) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s k x1) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s k x1) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s k x1) (s k0 (S n0))) v0 e1 e2)
case refl_equal : ⇒
the thesis becomes the hypothesis H0
∀c3:C
.∀v0:T
.csubst0 (s k x1) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s k x1) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s k x1) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s k x1) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s k x1) (s k0 (S n0))) v0 e1 e2)
end of H7
(H8)
we proceed by induction on H4 to prove lt (S n0) (s k x1)
case refl_equal : ⇒
the thesis becomes the hypothesis H
lt (S n0) (s k x1)
end of H8
by (drop_gen_drop . . . . . H2)
we proved drop (r k n0) O c e
assume b: B
suppose H9: drop (r (Bind b) n0) O c e
suppose :
∀c3:C
.∀v0:T
.csubst0 (s (Bind b) x1) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 e1 e2)
suppose H11: lt (S n0) (s (Bind b) x1)
(H12)
(h1)
consider H11
we proved lt (S n0) (s (Bind b) x1)
that is equivalent to le (S (S n0)) (S x1)
by (le_S_n . . previous)
we proved le (S n0) x1
lt n0 x1
end of h1
(h2)
consider H9
we proved drop (r (Bind b) n0) O c e
drop n0 O c e
end of h2
by (IHn . h1 . . . H6 . h2)
or4
drop n0 O x0 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop n0 O x0 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus x1 (s k n0)) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop n0 O x0 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus x1 (s k n0)) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop n0 O x0 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus x1 (s k n0)) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus x1 (s k n0)) v e1 e2
end of H12
we proceed by induction on H12 to prove
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
case or4_intro0 : H13:drop n0 O x0 e ⇒
the thesis becomes
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
consider H13
we proved drop n0 O x0 e
that is equivalent to drop (r (Bind b) n0) O x0 e
by (drop_drop . . . . previous .)
we proved drop (S n0) O (CHead x0 (Bind b) t) e
by (or4_intro0 . . . . previous)
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
case or4_intro1 : H13:ex3_4 K C T T λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u) λk0:K.λe0:C.λ:T.λw:T.drop n0 O x0 (CHead e0 k0 w) λk0:K.λ:C.λu:T.λw:T.subst0 (minus x1 (s k0 n0)) v u w ⇒
the thesis becomes
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
we proceed by induction on H13 to prove
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
case ex3_4_intro : x2:K x3:C x4:T x5:T H14:eq C e (CHead x3 x2 x4) H15:drop n0 O x0 (CHead x3 x2 x5) H16:subst0 (minus x1 (s x2 n0)) v x4 x5 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
(h1)
by (refl_equal . .)
eq C (CHead x3 x2 x4) (CHead x3 x2 x4)
end of h1
(h2)
consider H15
we proved drop n0 O x0 (CHead x3 x2 x5)
that is equivalent to drop (r (Bind b) n0) O x0 (CHead x3 x2 x5)
by (drop_drop . . . . previous .)
drop (S n0) O (CHead x0 (Bind b) t) (CHead x3 x2 x5)
end of h2
(h3)
(h1)
consider H16
we proved subst0 (minus x1 (s x2 n0)) v x4 x5
subst0 (minus (s (Bind b) x1) (S (s x2 n0))) v x4 x5
end of h1
(h2)
by (s_S . .)
eq nat (s x2 (S n0)) (S (s x2 n0))
end of h2
by (eq_ind_r . . . h1 . h2)
subst0 (minus (s (Bind b) x1) (s x2 (S n0))) v x4 x5
end of h3
by (ex3_4_intro . . . . . . . . . . . h1 h2 h3)
we proved
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead x3 x2 x4) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
by (or4_intro1 . . . . previous)
we proved
or4
drop (S n0) O (CHead x0 (Bind b) t) (CHead x3 x2 x4)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead x3 x2 x4) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead x3 x2 x4) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead x3 x2 x4) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H14)
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
case or4_intro2 : H13:ex3_4 K C C T λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u) λk0:K.λ:C.λe2:C.λu:T.drop n0 O x0 (CHead e2 k0 u) λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus x1 (s k0 n0)) v e1 e2 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
we proceed by induction on H13 to prove
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
case ex3_4_intro : x2:K x3:C x4:C x5:T H14:eq C e (CHead x3 x2 x5) H15:drop n0 O x0 (CHead x4 x2 x5) H16:csubst0 (minus x1 (s x2 n0)) v x3 x4 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
(h1)
by (refl_equal . .)
eq C (CHead x3 x2 x5) (CHead x3 x2 x5)
end of h1
(h2)
consider H15
we proved drop n0 O x0 (CHead x4 x2 x5)
that is equivalent to drop (r (Bind b) n0) O x0 (CHead x4 x2 x5)
by (drop_drop . . . . previous .)
drop (S n0) O (CHead x0 (Bind b) t) (CHead x4 x2 x5)
end of h2
(h3)
(h1)
consider H16
we proved csubst0 (minus x1 (s x2 n0)) v x3 x4
csubst0 (minus (s (Bind b) x1) (S (s x2 n0))) v x3 x4
end of h1
(h2)
by (s_S . .)
eq nat (s x2 (S n0)) (S (s x2 n0))
end of h2
by (eq_ind_r . . . h1 . h2)
csubst0 (minus (s (Bind b) x1) (s x2 (S n0))) v x3 x4
end of h3
by (ex3_4_intro . . . . . . . . . . . h1 h2 h3)
we proved
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead x3 x2 x5) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
by (or4_intro2 . . . . previous)
we proved
or4
drop (S n0) O (CHead x0 (Bind b) t) (CHead x3 x2 x5)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead x3 x2 x5) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead x3 x2 x5) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead x3 x2 x5) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H14)
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
case or4_intro3 : H13:ex4_5 K C C T T λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u) λk0:K.λ:C.λe2:C.λ:T.λw:T.drop n0 O x0 (CHead e2 k0 w) λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus x1 (s k0 n0)) v u w λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus x1 (s k0 n0)) v e1 e2 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
we proceed by induction on H13 to prove
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
case ex4_5_intro : x2:K x3:C x4:C x5:T x6:T H14:eq C e (CHead x3 x2 x5) H15:drop n0 O x0 (CHead x4 x2 x6) H16:subst0 (minus x1 (s x2 n0)) v x5 x6 H17:csubst0 (minus x1 (s x2 n0)) v x3 x4 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
(h1)
by (refl_equal . .)
eq C (CHead x3 x2 x5) (CHead x3 x2 x5)
end of h1
(h2)
consider H15
we proved drop n0 O x0 (CHead x4 x2 x6)
that is equivalent to drop (r (Bind b) n0) O x0 (CHead x4 x2 x6)
by (drop_drop . . . . previous .)
drop (S n0) O (CHead x0 (Bind b) t) (CHead x4 x2 x6)
end of h2
(h3)
(h1)
consider H16
we proved subst0 (minus x1 (s x2 n0)) v x5 x6
subst0 (minus (s (Bind b) x1) (S (s x2 n0))) v x5 x6
end of h1
(h2)
by (s_S . .)
eq nat (s x2 (S n0)) (S (s x2 n0))
end of h2
by (eq_ind_r . . . h1 . h2)
subst0 (minus (s (Bind b) x1) (s x2 (S n0))) v x5 x6
end of h3
(h4)
(h1)
consider H17
we proved csubst0 (minus x1 (s x2 n0)) v x3 x4
csubst0 (minus (s (Bind b) x1) (S (s x2 n0))) v x3 x4
end of h1
(h2)
by (s_S . .)
eq nat (s x2 (S n0)) (S (s x2 n0))
end of h2
by (eq_ind_r . . . h1 . h2)
csubst0 (minus (s (Bind b) x1) (s x2 (S n0))) v x3 x4
end of h4
by (ex4_5_intro . . . . . . . . . . . . . . h1 h2 h3 h4)
we proved
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead x3 x2 x5) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
by (or4_intro3 . . . . previous)
we proved
or4
drop (S n0) O (CHead x0 (Bind b) t) (CHead x3 x2 x5)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead x3 x2 x5) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead x3 x2 x5) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead x3 x2 x5) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H14)
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
we proved
or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
∀H9:drop (r (Bind b) n0) O c e
.∀c3:C
.∀v0:T
.csubst0 (s (Bind b) x1) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v0 e1 e2)
→∀H11:lt (S n0) (s (Bind b) x1)
.or4
drop (S n0) O (CHead x0 (Bind b) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Bind b) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x1) (s k0 (S n0))) v e1 e2
assume f: F
suppose H9: drop (r (Flat f) n0) O c e
suppose H10:
∀c3:C
.∀v0:T
.csubst0 (s (Flat f) x1) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 e1 e2)
suppose : lt (S n0) (s (Flat f) x1)
(H12)
(h1)
consider H6
we proved csubst0 x1 v c x0
csubst0 (s (Flat f) x1) v c x0
end of h1
(h2)
consider H9
we proved drop (r (Flat f) n0) O c e
drop (S n0) O c e
end of h2
by (H10 . . h1 . h2)
or4
drop (S n0) O x0 e
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O x0 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O x0 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O x0 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
end of H12
consider H12
we proved
or4
drop (S n0) O x0 e
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O x0 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O x0 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O x0 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
that is equivalent to
or4
drop (S n0) O x0 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O x0 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus x1 (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O x0 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus x1 (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O x0 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus x1 (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus x1 (s k0 (S n0))) v e1 e2
we proceed by induction on the previous result to prove
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
case or4_intro0 : H13:drop (S n0) O x0 e ⇒
the thesis becomes
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
consider H13
we proved drop (S n0) O x0 e
that is equivalent to drop (r (Flat f) n0) O x0 e
by (drop_drop . . . . previous .)
we proved drop (S n0) O (CHead x0 (Flat f) t) e
by (or4_intro0 . . . . previous)
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
case or4_intro1 : H13:ex3_4 K C T T λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u) λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O x0 (CHead e0 k0 w) λk0:K.λ:C.λu:T.λw:T.subst0 (minus x1 (s k0 (S n0))) v u w ⇒
the thesis becomes
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
we proceed by induction on H13 to prove
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
case ex3_4_intro : x2:K x3:C x4:T x5:T H14:eq C e (CHead x3 x2 x4) H15:drop (S n0) O x0 (CHead x3 x2 x5) H16:subst0 (minus x1 (s x2 (S n0))) v x4 x5 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
(h1)
by (refl_equal . .)
eq C (CHead x3 x2 x4) (CHead x3 x2 x4)
end of h1
(h2)
consider H15
we proved drop (S n0) O x0 (CHead x3 x2 x5)
that is equivalent to drop (r (Flat f) n0) O x0 (CHead x3 x2 x5)
by (drop_drop . . . . previous .)
drop (S n0) O (CHead x0 (Flat f) t) (CHead x3 x2 x5)
end of h2
(h3)
consider H16
we proved subst0 (minus x1 (s x2 (S n0))) v x4 x5
subst0 (minus (s (Flat f) x1) (s x2 (S n0))) v x4 x5
end of h3
by (ex3_4_intro . . . . . . . . . . . h1 h2 h3)
we proved
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead x3 x2 x4) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
by (or4_intro1 . . . . previous)
we proved
or4
drop (S n0) O (CHead x0 (Flat f) t) (CHead x3 x2 x4)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead x3 x2 x4) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead x3 x2 x4) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead x3 x2 x4) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H14)
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
case or4_intro2 : H13:ex3_4 K C C T λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u) λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O x0 (CHead e2 k0 u) λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus x1 (s k0 (S n0))) v e1 e2 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
we proceed by induction on H13 to prove
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
case ex3_4_intro : x2:K x3:C x4:C x5:T H14:eq C e (CHead x3 x2 x5) H15:drop (S n0) O x0 (CHead x4 x2 x5) H16:csubst0 (minus x1 (s x2 (S n0))) v x3 x4 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
(h1)
by (refl_equal . .)
eq C (CHead x3 x2 x5) (CHead x3 x2 x5)
end of h1
(h2)
consider H15
we proved drop (S n0) O x0 (CHead x4 x2 x5)
that is equivalent to drop (r (Flat f) n0) O x0 (CHead x4 x2 x5)
by (drop_drop . . . . previous .)
drop (S n0) O (CHead x0 (Flat f) t) (CHead x4 x2 x5)
end of h2
(h3)
consider H16
we proved csubst0 (minus x1 (s x2 (S n0))) v x3 x4
csubst0 (minus (s (Flat f) x1) (s x2 (S n0))) v x3 x4
end of h3
by (ex3_4_intro . . . . . . . . . . . h1 h2 h3)
we proved
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead x3 x2 x5) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
by (or4_intro2 . . . . previous)
we proved
or4
drop (S n0) O (CHead x0 (Flat f) t) (CHead x3 x2 x5)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead x3 x2 x5) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead x3 x2 x5) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead x3 x2 x5) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H14)
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
case or4_intro3 : H13:ex4_5 K C C T T λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u) λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O x0 (CHead e2 k0 w) λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus x1 (s k0 (S n0))) v u w λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus x1 (s k0 (S n0))) v e1 e2 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
we proceed by induction on H13 to prove
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
case ex4_5_intro : x2:K x3:C x4:C x5:T x6:T H14:eq C e (CHead x3 x2 x5) H15:drop (S n0) O x0 (CHead x4 x2 x6) H16:subst0 (minus x1 (s x2 (S n0))) v x5 x6 H17:csubst0 (minus x1 (s x2 (S n0))) v x3 x4 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
(h1)
by (refl_equal . .)
eq C (CHead x3 x2 x5) (CHead x3 x2 x5)
end of h1
(h2)
consider H15
we proved drop (S n0) O x0 (CHead x4 x2 x6)
that is equivalent to drop (r (Flat f) n0) O x0 (CHead x4 x2 x6)
by (drop_drop . . . . previous .)
drop (S n0) O (CHead x0 (Flat f) t) (CHead x4 x2 x6)
end of h2
(h3)
consider H16
we proved subst0 (minus x1 (s x2 (S n0))) v x5 x6
subst0 (minus (s (Flat f) x1) (s x2 (S n0))) v x5 x6
end of h3
(h4)
consider H17
we proved csubst0 (minus x1 (s x2 (S n0))) v x3 x4
csubst0 (minus (s (Flat f) x1) (s x2 (S n0))) v x3 x4
end of h4
by (ex4_5_intro . . . . . . . . . . . . . . h1 h2 h3 h4)
we proved
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead x3 x2 x5) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
by (or4_intro3 . . . . previous)
we proved
or4
drop (S n0) O (CHead x0 (Flat f) t) (CHead x3 x2 x5)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead x3 x2 x5) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead x3 x2 x5) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead x3 x2 x5) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H14)
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
we proved
or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
∀H9:drop (r (Flat f) n0) O c e
.∀H10:∀c3:C
.∀v0:T
.csubst0 (s (Flat f) x1) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v0 e1 e2)
.lt (S n0) (s (Flat f) x1)
→(or4
drop (S n0) O (CHead x0 (Flat f) t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 (Flat f) t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x1) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x1) (s k0 (S n0))) v e1 e2)
by (previous . previous H7 H8)
we proved
or4
drop (S n0) O (CHead x0 k t) e
ex3_4
K
C
T
T
λk1:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k1 u)
λk1:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 k t) (CHead e0 k1 w)
λk1:K.λ:C.λu:T.λw:T.subst0 (minus (s k x1) (s k1 (S n0))) v u w
ex3_4
K
C
C
T
λk1:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k1 u)
λk1:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 k t) (CHead e2 k1 u)
λk1:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s k x1) (s k1 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk1:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k1 u)
λk1:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 k t) (CHead e2 k1 w)
λk1:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s k x1) (s k1 (S n0))) v u w
λk1:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s k x1) (s k1 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H4)
we proved
or4
drop (S n0) O (CHead x0 k t) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x0 k t) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x0 k t) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x0 k t) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H5)
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
case or3_intro2 : H3:ex4_3 T C nat λ:T.λ:C.λj:nat.eq nat i (s k j) λu2:T.λc3:C.λ:nat.eq C c2 (CHead c3 k u2) λu2:T.λ:C.λj:nat.subst0 j v t u2 λ:T.λc3:C.λj:nat.csubst0 j v c c3 ⇒
the thesis becomes
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
we proceed by induction on H3 to prove
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
case ex4_3_intro : x0:T x1:C x2:nat H4:eq nat i (s k x2) H5:eq C c2 (CHead x1 k x0) :subst0 x2 v t x0 H7:csubst0 x2 v c x1 ⇒
the thesis becomes
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
(H8)
we proceed by induction on H4 to prove
∀c3:C
.∀v0:T
.csubst0 (s k x2) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s k x2) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s k x2) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s k x2) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s k x2) (s k0 (S n0))) v0 e1 e2)
case refl_equal : ⇒
the thesis becomes the hypothesis H0
∀c3:C
.∀v0:T
.csubst0 (s k x2) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s k x2) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s k x2) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s k x2) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s k x2) (s k0 (S n0))) v0 e1 e2)
end of H8
(H9)
we proceed by induction on H4 to prove lt (S n0) (s k x2)
case refl_equal : ⇒
the thesis becomes the hypothesis H
lt (S n0) (s k x2)
end of H9
by (drop_gen_drop . . . . . H2)
we proved drop (r k n0) O c e
assume b: B
suppose H10: drop (r (Bind b) n0) O c e
suppose :
∀c3:C
.∀v0:T
.csubst0 (s (Bind b) x2) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v0 e1 e2)
suppose H12: lt (S n0) (s (Bind b) x2)
(H13)
(h1)
consider H12
we proved lt (S n0) (s (Bind b) x2)
that is equivalent to le (S (S n0)) (S x2)
by (le_S_n . . previous)
we proved le (S n0) x2
lt n0 x2
end of h1
(h2)
consider H10
we proved drop (r (Bind b) n0) O c e
drop n0 O c e
end of h2
by (IHn . h1 . . . H7 . h2)
or4
drop n0 O x1 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop n0 O x1 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus x2 (s k n0)) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop n0 O x1 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus x2 (s k n0)) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop n0 O x1 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus x2 (s k n0)) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus x2 (s k n0)) v e1 e2
end of H13
we proceed by induction on H13 to prove
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
case or4_intro0 : H14:drop n0 O x1 e ⇒
the thesis becomes
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
consider H14
we proved drop n0 O x1 e
that is equivalent to drop (r (Bind b) n0) O x1 e
by (drop_drop . . . . previous .)
we proved drop (S n0) O (CHead x1 (Bind b) x0) e
by (or4_intro0 . . . . previous)
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
case or4_intro1 : H14:ex3_4 K C T T λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u) λk0:K.λe0:C.λ:T.λw:T.drop n0 O x1 (CHead e0 k0 w) λk0:K.λ:C.λu:T.λw:T.subst0 (minus x2 (s k0 n0)) v u w ⇒
the thesis becomes
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
we proceed by induction on H14 to prove
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
case ex3_4_intro : x3:K x4:C x5:T x6:T H15:eq C e (CHead x4 x3 x5) H16:drop n0 O x1 (CHead x4 x3 x6) H17:subst0 (minus x2 (s x3 n0)) v x5 x6 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
(h1)
by (refl_equal . .)
eq C (CHead x4 x3 x5) (CHead x4 x3 x5)
end of h1
(h2)
consider H16
we proved drop n0 O x1 (CHead x4 x3 x6)
that is equivalent to drop (r (Bind b) n0) O x1 (CHead x4 x3 x6)
by (drop_drop . . . . previous .)
drop (S n0) O (CHead x1 (Bind b) x0) (CHead x4 x3 x6)
end of h2
(h3)
(h1)
consider H17
we proved subst0 (minus x2 (s x3 n0)) v x5 x6
subst0 (minus (s (Bind b) x2) (S (s x3 n0))) v x5 x6
end of h1
(h2)
by (s_S . .)
eq nat (s x3 (S n0)) (S (s x3 n0))
end of h2
by (eq_ind_r . . . h1 . h2)
subst0 (minus (s (Bind b) x2) (s x3 (S n0))) v x5 x6
end of h3
by (ex3_4_intro . . . . . . . . . . . h1 h2 h3)
we proved
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead x4 x3 x5) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
by (or4_intro1 . . . . previous)
we proved
or4
drop (S n0) O (CHead x1 (Bind b) x0) (CHead x4 x3 x5)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead x4 x3 x5) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead x4 x3 x5) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead x4 x3 x5) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H15)
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
case or4_intro2 : H14:ex3_4 K C C T λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u) λk0:K.λ:C.λe2:C.λu:T.drop n0 O x1 (CHead e2 k0 u) λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus x2 (s k0 n0)) v e1 e2 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
we proceed by induction on H14 to prove
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
case ex3_4_intro : x3:K x4:C x5:C x6:T H15:eq C e (CHead x4 x3 x6) H16:drop n0 O x1 (CHead x5 x3 x6) H17:csubst0 (minus x2 (s x3 n0)) v x4 x5 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
(h1)
by (refl_equal . .)
eq C (CHead x4 x3 x6) (CHead x4 x3 x6)
end of h1
(h2)
consider H16
we proved drop n0 O x1 (CHead x5 x3 x6)
that is equivalent to drop (r (Bind b) n0) O x1 (CHead x5 x3 x6)
by (drop_drop . . . . previous .)
drop (S n0) O (CHead x1 (Bind b) x0) (CHead x5 x3 x6)
end of h2
(h3)
(h1)
consider H17
we proved csubst0 (minus x2 (s x3 n0)) v x4 x5
csubst0 (minus (s (Bind b) x2) (S (s x3 n0))) v x4 x5
end of h1
(h2)
by (s_S . .)
eq nat (s x3 (S n0)) (S (s x3 n0))
end of h2
by (eq_ind_r . . . h1 . h2)
csubst0 (minus (s (Bind b) x2) (s x3 (S n0))) v x4 x5
end of h3
by (ex3_4_intro . . . . . . . . . . . h1 h2 h3)
we proved
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead x4 x3 x6) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
by (or4_intro2 . . . . previous)
we proved
or4
drop (S n0) O (CHead x1 (Bind b) x0) (CHead x4 x3 x6)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead x4 x3 x6) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead x4 x3 x6) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead x4 x3 x6) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H15)
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
case or4_intro3 : H14:ex4_5 K C C T T λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u) λk0:K.λ:C.λe2:C.λ:T.λw:T.drop n0 O x1 (CHead e2 k0 w) λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus x2 (s k0 n0)) v u w λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus x2 (s k0 n0)) v e1 e2 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
we proceed by induction on H14 to prove
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
case ex4_5_intro : x3:K x4:C x5:C x6:T x7:T H15:eq C e (CHead x4 x3 x6) H16:drop n0 O x1 (CHead x5 x3 x7) H17:subst0 (minus x2 (s x3 n0)) v x6 x7 H18:csubst0 (minus x2 (s x3 n0)) v x4 x5 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
(h1)
by (refl_equal . .)
eq C (CHead x4 x3 x6) (CHead x4 x3 x6)
end of h1
(h2)
consider H16
we proved drop n0 O x1 (CHead x5 x3 x7)
that is equivalent to drop (r (Bind b) n0) O x1 (CHead x5 x3 x7)
by (drop_drop . . . . previous .)
drop (S n0) O (CHead x1 (Bind b) x0) (CHead x5 x3 x7)
end of h2
(h3)
(h1)
consider H17
we proved subst0 (minus x2 (s x3 n0)) v x6 x7
subst0 (minus (s (Bind b) x2) (S (s x3 n0))) v x6 x7
end of h1
(h2)
by (s_S . .)
eq nat (s x3 (S n0)) (S (s x3 n0))
end of h2
by (eq_ind_r . . . h1 . h2)
subst0 (minus (s (Bind b) x2) (s x3 (S n0))) v x6 x7
end of h3
(h4)
(h1)
consider H18
we proved csubst0 (minus x2 (s x3 n0)) v x4 x5
csubst0 (minus (s (Bind b) x2) (S (s x3 n0))) v x4 x5
end of h1
(h2)
by (s_S . .)
eq nat (s x3 (S n0)) (S (s x3 n0))
end of h2
by (eq_ind_r . . . h1 . h2)
csubst0 (minus (s (Bind b) x2) (s x3 (S n0))) v x4 x5
end of h4
by (ex4_5_intro . . . . . . . . . . . . . . h1 h2 h3 h4)
we proved
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead x4 x3 x6) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
by (or4_intro3 . . . . previous)
we proved
or4
drop (S n0) O (CHead x1 (Bind b) x0) (CHead x4 x3 x6)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead x4 x3 x6) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead x4 x3 x6) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead x4 x3 x6) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H15)
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
we proved
or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
∀H10:drop (r (Bind b) n0) O c e
.∀c3:C
.∀v0:T
.csubst0 (s (Bind b) x2) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v0 e1 e2)
→∀H12:lt (S n0) (s (Bind b) x2)
.or4
drop (S n0) O (CHead x1 (Bind b) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Bind b) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Bind b) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Bind b) x2) (s k0 (S n0))) v e1 e2
assume f: F
suppose H10: drop (r (Flat f) n0) O c e
suppose H11:
∀c3:C
.∀v0:T
.csubst0 (s (Flat f) x2) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v0 e1 e2)
suppose : lt (S n0) (s (Flat f) x2)
(H13)
(h1)
consider H7
we proved csubst0 x2 v c x1
csubst0 (s (Flat f) x2) v c x1
end of h1
(h2)
consider H10
we proved drop (r (Flat f) n0) O c e
drop (S n0) O c e
end of h2
by (H11 . . h1 . h2)
or4
drop (S n0) O x1 e
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O x1 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O x1 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O x1 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
end of H13
consider H13
we proved
or4
drop (S n0) O x1 e
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O x1 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O x1 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O x1 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
that is equivalent to
or4
drop (S n0) O x1 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O x1 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus x2 (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O x1 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus x2 (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O x1 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus x2 (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus x2 (s k0 (S n0))) v e1 e2
we proceed by induction on the previous result to prove
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
case or4_intro0 : H14:drop (S n0) O x1 e ⇒
the thesis becomes
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
consider H14
we proved drop (S n0) O x1 e
that is equivalent to drop (r (Flat f) n0) O x1 e
by (drop_drop . . . . previous .)
we proved drop (S n0) O (CHead x1 (Flat f) x0) e
by (or4_intro0 . . . . previous)
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
case or4_intro1 : H14:ex3_4 K C T T λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u) λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O x1 (CHead e0 k0 w) λk0:K.λ:C.λu:T.λw:T.subst0 (minus x2 (s k0 (S n0))) v u w ⇒
the thesis becomes
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
we proceed by induction on H14 to prove
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
case ex3_4_intro : x3:K x4:C x5:T x6:T H15:eq C e (CHead x4 x3 x5) H16:drop (S n0) O x1 (CHead x4 x3 x6) H17:subst0 (minus x2 (s x3 (S n0))) v x5 x6 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
(h1)
by (refl_equal . .)
eq C (CHead x4 x3 x5) (CHead x4 x3 x5)
end of h1
(h2)
consider H16
we proved drop (S n0) O x1 (CHead x4 x3 x6)
that is equivalent to drop (r (Flat f) n0) O x1 (CHead x4 x3 x6)
by (drop_drop . . . . previous .)
drop (S n0) O (CHead x1 (Flat f) x0) (CHead x4 x3 x6)
end of h2
(h3)
consider H17
we proved subst0 (minus x2 (s x3 (S n0))) v x5 x6
subst0 (minus (s (Flat f) x2) (s x3 (S n0))) v x5 x6
end of h3
by (ex3_4_intro . . . . . . . . . . . h1 h2 h3)
we proved
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead x4 x3 x5) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
by (or4_intro1 . . . . previous)
we proved
or4
drop (S n0) O (CHead x1 (Flat f) x0) (CHead x4 x3 x5)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead x4 x3 x5) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead x4 x3 x5) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead x4 x3 x5) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H15)
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
case or4_intro2 : H14:ex3_4 K C C T λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u) λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O x1 (CHead e2 k0 u) λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus x2 (s k0 (S n0))) v e1 e2 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
we proceed by induction on H14 to prove
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
case ex3_4_intro : x3:K x4:C x5:C x6:T H15:eq C e (CHead x4 x3 x6) H16:drop (S n0) O x1 (CHead x5 x3 x6) H17:csubst0 (minus x2 (s x3 (S n0))) v x4 x5 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
(h1)
by (refl_equal . .)
eq C (CHead x4 x3 x6) (CHead x4 x3 x6)
end of h1
(h2)
consider H16
we proved drop (S n0) O x1 (CHead x5 x3 x6)
that is equivalent to drop (r (Flat f) n0) O x1 (CHead x5 x3 x6)
by (drop_drop . . . . previous .)
drop (S n0) O (CHead x1 (Flat f) x0) (CHead x5 x3 x6)
end of h2
(h3)
consider H17
we proved csubst0 (minus x2 (s x3 (S n0))) v x4 x5
csubst0 (minus (s (Flat f) x2) (s x3 (S n0))) v x4 x5
end of h3
by (ex3_4_intro . . . . . . . . . . . h1 h2 h3)
we proved
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead x4 x3 x6) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
by (or4_intro2 . . . . previous)
we proved
or4
drop (S n0) O (CHead x1 (Flat f) x0) (CHead x4 x3 x6)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead x4 x3 x6) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead x4 x3 x6) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead x4 x3 x6) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H15)
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
case or4_intro3 : H14:ex4_5 K C C T T λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u) λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O x1 (CHead e2 k0 w) λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus x2 (s k0 (S n0))) v u w λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus x2 (s k0 (S n0))) v e1 e2 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
we proceed by induction on H14 to prove
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
case ex4_5_intro : x3:K x4:C x5:C x6:T x7:T H15:eq C e (CHead x4 x3 x6) H16:drop (S n0) O x1 (CHead x5 x3 x7) H17:subst0 (minus x2 (s x3 (S n0))) v x6 x7 H18:csubst0 (minus x2 (s x3 (S n0))) v x4 x5 ⇒
the thesis becomes
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
(h1)
by (refl_equal . .)
eq C (CHead x4 x3 x6) (CHead x4 x3 x6)
end of h1
(h2)
consider H16
we proved drop (S n0) O x1 (CHead x5 x3 x7)
that is equivalent to drop (r (Flat f) n0) O x1 (CHead x5 x3 x7)
by (drop_drop . . . . previous .)
drop (S n0) O (CHead x1 (Flat f) x0) (CHead x5 x3 x7)
end of h2
(h3)
consider H17
we proved subst0 (minus x2 (s x3 (S n0))) v x6 x7
subst0 (minus (s (Flat f) x2) (s x3 (S n0))) v x6 x7
end of h3
(h4)
consider H18
we proved csubst0 (minus x2 (s x3 (S n0))) v x4 x5
csubst0 (minus (s (Flat f) x2) (s x3 (S n0))) v x4 x5
end of h4
by (ex4_5_intro . . . . . . . . . . . . . . h1 h2 h3 h4)
we proved
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead x4 x3 x6) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
by (or4_intro3 . . . . previous)
we proved
or4
drop (S n0) O (CHead x1 (Flat f) x0) (CHead x4 x3 x6)
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C (CHead x4 x3 x6) (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C (CHead x4 x3 x6) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C (CHead x4 x3 x6) (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H15)
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
we proved
or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
∀H10:drop (r (Flat f) n0) O c e
.∀H11:∀c3:C
.∀v0:T
.csubst0 (s (Flat f) x2) v0 c c3
→∀e0:C
.drop (S n0) O c e0
→(or4
drop (S n0) O c3 e0
ex3_4
K
C
T
T
λk0:K.λe1:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λe1:C.λ:T.λw:T.drop (S n0) O c3 (CHead e1 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v0 u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c3 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v0 e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e0 (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c3 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v0 u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v0 e1 e2)
.lt (S n0) (s (Flat f) x2)
→(or4
drop (S n0) O (CHead x1 (Flat f) x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 (Flat f) x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s (Flat f) x2) (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s (Flat f) x2) (s k0 (S n0))) v e1 e2)
by (previous . previous H8 H9)
we proved
or4
drop (S n0) O (CHead x1 k x0) e
ex3_4
K
C
T
T
λk1:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k1 u)
λk1:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 k x0) (CHead e0 k1 w)
λk1:K.λ:C.λu:T.λw:T.subst0 (minus (s k x2) (s k1 (S n0))) v u w
ex3_4
K
C
C
T
λk1:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k1 u)
λk1:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 k x0) (CHead e2 k1 u)
λk1:K.λe1:C.λe2:C.λ:T.csubst0 (minus (s k x2) (s k1 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk1:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k1 u)
λk1:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 k x0) (CHead e2 k1 w)
λk1:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus (s k x2) (s k1 (S n0))) v u w
λk1:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus (s k x2) (s k1 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H4)
we proved
or4
drop (S n0) O (CHead x1 k x0) e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O (CHead x1 k x0) (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O (CHead x1 k x0) (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O (CHead x1 k x0) (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
by (eq_ind_r . . . previous . H5)
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
we proved
or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
∀c2:C
.∀v:T
.∀H1:csubst0 i v (CHead c k t) c2
.∀e:C
.∀H2:drop (S n0) O (CHead c k t) e
.or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk0:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k0 u)
λk0:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k0 w)
λk0:K.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
ex3_4
K
C
C
T
λk0:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k0 u)
λk0:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk0:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k0 u)
λk0:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k0 w)
λk0:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k0 (S n0))) v u w
λk0:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k0 (S n0))) v e1 e2
we proved
∀c2:C
.∀v:T
.csubst0 i v c1 c2
→∀e:C
.drop (S n0) O c1 e
→(or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2)
∀i:nat
.∀H:lt (S n0) i
.∀c1:C
.∀c2:C
.∀v:T
.csubst0 i v c1 c2
→∀e:C
.drop (S n0) O c1 e
→(or4
drop (S n0) O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop (S n0) O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop (S n0) O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop (S n0) O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k (S n0))) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k (S n0))) v e1 e2)
we proved
∀i:nat
.lt n i
→∀c1:C
.∀c2:C
.∀v:T
.csubst0 i v c1 c2
→∀e:C
.drop n O c1 e
→(or4
drop n O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop n O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k n)) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop n O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k n)) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop n O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k n)) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k n)) v e1 e2)
we proved
∀n:nat
.∀i:nat
.lt n i
→∀c1:C
.∀c2:C
.∀v:T
.csubst0 i v c1 c2
→∀e:C
.drop n O c1 e
→(or4
drop n O c2 e
ex3_4
K
C
T
T
λk:K.λe0:C.λu:T.λ:T.eq C e (CHead e0 k u)
λk:K.λe0:C.λ:T.λw:T.drop n O c2 (CHead e0 k w)
λk:K.λ:C.λu:T.λw:T.subst0 (minus i (s k n)) v u w
ex3_4
K
C
C
T
λk:K.λe1:C.λ:C.λu:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λu:T.drop n O c2 (CHead e2 k u)
λk:K.λe1:C.λe2:C.λ:T.csubst0 (minus i (s k n)) v e1 e2
ex4_5
K
C
C
T
T
λk:K.λe1:C.λ:C.λu:T.λ:T.eq C e (CHead e1 k u)
λk:K.λ:C.λe2:C.λ:T.λw:T.drop n O c2 (CHead e2 k w)
λk:K.λ:C.λ:C.λu:T.λw:T.subst0 (minus i (s k n)) v u w
λk:K.λe1:C.λe2:C.λ:T.λ:T.csubst0 (minus i (s k n)) v e1 e2)