include "LambdaDelta-1/theory.ma".
-definition cbk:
- C \to nat
-\def
- let rec cbk (c: C) on c: nat \def (match c with [(CSort m) \Rightarrow m |
-(CHead c0 _ _) \Rightarrow (cbk c0)]) in cbk.
-
-definition app1:
- C \to (T \to T)
-\def
- let rec app1 (c: C) on c: (T \to T) \def (\lambda (t: T).(match c with
-[(CSort _) \Rightarrow t | (CHead c0 k u) \Rightarrow (app1 c0 (THead k u
-t))])) in app1.
-
theorem lifts_inj:
\forall (xs: TList).(\forall (ts: TList).(\forall (h: nat).(\forall (d:
nat).((eq TList (lifts h d xs) (lifts h d ts)) \to (eq TList xs ts)))))
\def
\lambda (c: C).(\lambda (t: T).(\lambda (ts: TList).(TList_ind (\lambda (t0:
TList).((nfs2 c (TApp t0 t)) \to (land (nfs2 c t0) (nf2 c t)))) (\lambda (H:
-(land (nf2 c t) True)).(let H0 \def H in (and_ind (nf2 c t) True (land True
+(land (nf2 c t) True)).(let H0 \def H in (land_ind (nf2 c t) True (land True
(nf2 c t)) (\lambda (H1: (nf2 c t)).(\lambda (_: True).(conj True (nf2 c t) I
H1))) H0))) (\lambda (t0: T).(\lambda (t1: TList).(\lambda (H: (((nfs2 c
(TApp t1 t)) \to (land (nfs2 c t1) (nf2 c t))))).(\lambda (H0: (land (nf2 c
-t0) (nfs2 c (TApp t1 t)))).(let H1 \def H0 in (and_ind (nf2 c t0) (nfs2 c
+t0) (nfs2 c (TApp t1 t)))).(let H1 \def H0 in (land_ind (nf2 c t0) (nfs2 c
(TApp t1 t)) (land (land (nf2 c t0) (nfs2 c t1)) (nf2 c t)) (\lambda (H2:
(nf2 c t0)).(\lambda (H3: (nfs2 c (TApp t1 t))).(let H_x \def (H H3) in (let
-H4 \def H_x in (and_ind (nfs2 c t1) (nf2 c t) (land (land (nf2 c t0) (nfs2 c
+H4 \def H_x in (land_ind (nfs2 c t1) (nf2 c t) (land (land (nf2 c t0) (nfs2 c
t1)) (nf2 c t)) (\lambda (H5: (nfs2 c t1)).(\lambda (H6: (nf2 c t)).(conj
(land (nf2 c t0) (nfs2 c t1)) (nf2 c t) (conj (nf2 c t0) (nfs2 c t1) H2 H5)
H6))) H4))))) H1)))))) ts))).
T t0 (\lambda (t1: T).(ty3 g c t1 u0)) H1 t H7) in (conj (ty3 g c t u0) (tys3
g c ts u0) H10 H9)))))) H5))))))))) y u H0))) H)))))).
-theorem ty3_getl_subst0:
- \forall (g: G).(\forall (c: C).(\forall (t: T).(\forall (u: T).((ty3 g c t
-u) \to (\forall (v0: T).(\forall (t0: T).(\forall (i: nat).((subst0 i v0 t
-t0) \to (\forall (b: B).(\forall (d: C).(\forall (v: T).((getl i c (CHead d
-(Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v w)))))))))))))))
-\def
- \lambda (g: G).(\lambda (c: C).(\lambda (t: T).(\lambda (u: T).(\lambda (H:
-(ty3 g c t u)).(ty3_ind g (\lambda (c0: C).(\lambda (t0: T).(\lambda (_:
-T).(\forall (v0: T).(\forall (t2: T).(\forall (i: nat).((subst0 i v0 t0 t2)
-\to (\forall (b: B).(\forall (d: C).(\forall (v: T).((getl i c0 (CHead d
-(Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v w)))))))))))))) (\lambda
-(c0: C).(\lambda (t2: T).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2
-t0)).(\lambda (_: ((\forall (v0: T).(\forall (t1: T).(\forall (i:
-nat).((subst0 i v0 t2 t1) \to (\forall (b: B).(\forall (d: C).(\forall (v:
-T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v
-w))))))))))))).(\lambda (u0: T).(\lambda (t1: T).(\lambda (_: (ty3 g c0 u0
-t1)).(\lambda (H3: ((\forall (v0: T).(\forall (t3: T).(\forall (i:
-nat).((subst0 i v0 u0 t3) \to (\forall (b: B).(\forall (d: C).(\forall (v:
-T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v
-w))))))))))))).(\lambda (_: (pc3 c0 t1 t2)).(\lambda (v0: T).(\lambda (t3:
-T).(\lambda (i: nat).(\lambda (H5: (subst0 i v0 u0 t3)).(\lambda (b:
-B).(\lambda (d: C).(\lambda (v: T).(\lambda (H6: (getl i c0 (CHead d (Bind b)
-v))).(H3 v0 t3 i H5 b d v H6))))))))))))))))))) (\lambda (c0: C).(\lambda (m:
-nat).(\lambda (v0: T).(\lambda (t0: T).(\lambda (i: nat).(\lambda (H0:
-(subst0 i v0 (TSort m) t0)).(\lambda (b: B).(\lambda (d: C).(\lambda (v:
-T).(\lambda (_: (getl i c0 (CHead d (Bind b) v))).(subst0_gen_sort v0 t0 i m
-H0 (ex T (\lambda (w: T).(ty3 g d v w)))))))))))))) (\lambda (n:
-nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda (H0: (getl n
-c0 (CHead d (Bind Abbr) u0))).(\lambda (t0: T).(\lambda (H1: (ty3 g d u0
-t0)).(\lambda (_: ((\forall (v0: T).(\forall (t1: T).(\forall (i:
-nat).((subst0 i v0 u0 t1) \to (\forall (b: B).(\forall (d0: C).(\forall (v:
-T).((getl i d (CHead d0 (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d0 v
-w))))))))))))).(\lambda (v0: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda
-(H3: (subst0 i v0 (TLRef n) t1)).(\lambda (b: B).(\lambda (d0: C).(\lambda
-(v: T).(\lambda (H4: (getl i c0 (CHead d0 (Bind b) v))).(and_ind (eq nat n i)
-(eq T t1 (lift (S n) O v0)) (ex T (\lambda (w: T).(ty3 g d0 v w))) (\lambda
-(H5: (eq nat n i)).(\lambda (_: (eq T t1 (lift (S n) O v0))).(let H7 \def
-(eq_ind_r nat i (\lambda (n0: nat).(getl n0 c0 (CHead d0 (Bind b) v))) H4 n
-H5) in (let H8 \def (eq_ind C (CHead d (Bind Abbr) u0) (\lambda (c1: C).(getl
-n c0 c1)) H0 (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind Abbr) u0) n
-H0 (CHead d0 (Bind b) v) H7)) in (let H9 \def (f_equal C C (\lambda (e:
-C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow d |
-(CHead c1 _ _) \Rightarrow c1])) (CHead d (Bind Abbr) u0) (CHead d0 (Bind b)
-v) (getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind b) v) H7)) in
-((let H10 \def (f_equal C B (\lambda (e: C).(match e in C return (\lambda (_:
-C).B) with [(CSort _) \Rightarrow Abbr | (CHead _ k _) \Rightarrow (match k
-in K return (\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _)
-\Rightarrow Abbr])])) (CHead d (Bind Abbr) u0) (CHead d0 (Bind b) v)
-(getl_mono c0 (CHead d (Bind Abbr) u0) n H0 (CHead d0 (Bind b) v) H7)) in
-((let H11 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_:
-C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t2) \Rightarrow t2]))
-(CHead d (Bind Abbr) u0) (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind
-Abbr) u0) n H0 (CHead d0 (Bind b) v) H7)) in (\lambda (H12: (eq B Abbr
-b)).(\lambda (H13: (eq C d d0)).(let H14 \def (eq_ind_r T v (\lambda (t2:
-T).(getl n c0 (CHead d0 (Bind b) t2))) H8 u0 H11) in (eq_ind T u0 (\lambda
-(t2: T).(ex T (\lambda (w: T).(ty3 g d0 t2 w)))) (let H15 \def (eq_ind_r C d0
-(\lambda (c1: C).(getl n c0 (CHead c1 (Bind b) u0))) H14 d H13) in (eq_ind C
-d (\lambda (c1: C).(ex T (\lambda (w: T).(ty3 g c1 u0 w)))) (let H16 \def
-(eq_ind_r B b (\lambda (b0: B).(getl n c0 (CHead d (Bind b0) u0))) H15 Abbr
-H12) in (ex_intro T (\lambda (w: T).(ty3 g d u0 w)) t0 H1)) d0 H13)) v
-H11))))) H10)) H9)))))) (subst0_gen_lref v0 t1 i n H3))))))))))))))))))
-(\lambda (n: nat).(\lambda (c0: C).(\lambda (d: C).(\lambda (u0: T).(\lambda
-(H0: (getl n c0 (CHead d (Bind Abst) u0))).(\lambda (t0: T).(\lambda (H1:
-(ty3 g d u0 t0)).(\lambda (_: ((\forall (v0: T).(\forall (t1: T).(\forall (i:
-nat).((subst0 i v0 u0 t1) \to (\forall (b: B).(\forall (d0: C).(\forall (v:
-T).((getl i d (CHead d0 (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d0 v
-w))))))))))))).(\lambda (v0: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda
-(H3: (subst0 i v0 (TLRef n) t1)).(\lambda (b: B).(\lambda (d0: C).(\lambda
-(v: T).(\lambda (H4: (getl i c0 (CHead d0 (Bind b) v))).(and_ind (eq nat n i)
-(eq T t1 (lift (S n) O v0)) (ex T (\lambda (w: T).(ty3 g d0 v w))) (\lambda
-(H5: (eq nat n i)).(\lambda (_: (eq T t1 (lift (S n) O v0))).(let H7 \def
-(eq_ind_r nat i (\lambda (n0: nat).(getl n0 c0 (CHead d0 (Bind b) v))) H4 n
-H5) in (let H8 \def (eq_ind C (CHead d (Bind Abst) u0) (\lambda (c1: C).(getl
-n c0 c1)) H0 (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind Abst) u0) n
-H0 (CHead d0 (Bind b) v) H7)) in (let H9 \def (f_equal C C (\lambda (e:
-C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow d |
-(CHead c1 _ _) \Rightarrow c1])) (CHead d (Bind Abst) u0) (CHead d0 (Bind b)
-v) (getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind b) v) H7)) in
-((let H10 \def (f_equal C B (\lambda (e: C).(match e in C return (\lambda (_:
-C).B) with [(CSort _) \Rightarrow Abst | (CHead _ k _) \Rightarrow (match k
-in K return (\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _)
-\Rightarrow Abst])])) (CHead d (Bind Abst) u0) (CHead d0 (Bind b) v)
-(getl_mono c0 (CHead d (Bind Abst) u0) n H0 (CHead d0 (Bind b) v) H7)) in
-((let H11 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda (_:
-C).T) with [(CSort _) \Rightarrow u0 | (CHead _ _ t2) \Rightarrow t2]))
-(CHead d (Bind Abst) u0) (CHead d0 (Bind b) v) (getl_mono c0 (CHead d (Bind
-Abst) u0) n H0 (CHead d0 (Bind b) v) H7)) in (\lambda (H12: (eq B Abst
-b)).(\lambda (H13: (eq C d d0)).(let H14 \def (eq_ind_r T v (\lambda (t2:
-T).(getl n c0 (CHead d0 (Bind b) t2))) H8 u0 H11) in (eq_ind T u0 (\lambda
-(t2: T).(ex T (\lambda (w: T).(ty3 g d0 t2 w)))) (let H15 \def (eq_ind_r C d0
-(\lambda (c1: C).(getl n c0 (CHead c1 (Bind b) u0))) H14 d H13) in (eq_ind C
-d (\lambda (c1: C).(ex T (\lambda (w: T).(ty3 g c1 u0 w)))) (let H16 \def
-(eq_ind_r B b (\lambda (b0: B).(getl n c0 (CHead d (Bind b0) u0))) H15 Abst
-H12) in (ex_intro T (\lambda (w: T).(ty3 g d u0 w)) t0 H1)) d0 H13)) v
-H11))))) H10)) H9)))))) (subst0_gen_lref v0 t1 i n H3))))))))))))))))))
-(\lambda (c0: C).(\lambda (u0: T).(\lambda (t0: T).(\lambda (_: (ty3 g c0 u0
-t0)).(\lambda (H1: ((\forall (v0: T).(\forall (t1: T).(\forall (i:
-nat).((subst0 i v0 u0 t1) \to (\forall (b: B).(\forall (d: C).(\forall (v:
-T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v
-w))))))))))))).(\lambda (b: B).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_:
-(ty3 g (CHead c0 (Bind b) u0) t1 t2)).(\lambda (H3: ((\forall (v0:
-T).(\forall (t3: T).(\forall (i: nat).((subst0 i v0 t1 t3) \to (\forall (b0:
-B).(\forall (d: C).(\forall (v: T).((getl i (CHead c0 (Bind b) u0) (CHead d
-(Bind b0) v)) \to (ex T (\lambda (w: T).(ty3 g d v w))))))))))))).(\lambda
-(v0: T).(\lambda (t3: T).(\lambda (i: nat).(\lambda (H4: (subst0 i v0 (THead
-(Bind b) u0 t1) t3)).(\lambda (b0: B).(\lambda (d: C).(\lambda (v:
-T).(\lambda (H5: (getl i c0 (CHead d (Bind b0) v))).(or3_ind (ex2 T (\lambda
-(u2: T).(eq T t3 (THead (Bind b) u2 t1))) (\lambda (u2: T).(subst0 i v0 u0
-u2))) (ex2 T (\lambda (t4: T).(eq T t3 (THead (Bind b) u0 t4))) (\lambda (t4:
-T).(subst0 (s (Bind b) i) v0 t1 t4))) (ex3_2 T T (\lambda (u2: T).(\lambda
-(t4: T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda (u2: T).(\lambda (_:
-T).(subst0 i v0 u0 u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Bind b)
-i) v0 t1 t4)))) (ex T (\lambda (w: T).(ty3 g d v w))) (\lambda (H6: (ex2 T
-(\lambda (u2: T).(eq T t3 (THead (Bind b) u2 t1))) (\lambda (u2: T).(subst0 i
-v0 u0 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 (THead (Bind b) u2 t1)))
-(\lambda (u2: T).(subst0 i v0 u0 u2)) (ex T (\lambda (w: T).(ty3 g d v w)))
-(\lambda (x: T).(\lambda (_: (eq T t3 (THead (Bind b) x t1))).(\lambda (H8:
-(subst0 i v0 u0 x)).(H1 v0 x i H8 b0 d v H5)))) H6)) (\lambda (H6: (ex2 T
-(\lambda (t4: T).(eq T t3 (THead (Bind b) u0 t4))) (\lambda (t4: T).(subst0
-(s (Bind b) i) v0 t1 t4)))).(ex2_ind T (\lambda (t4: T).(eq T t3 (THead (Bind
-b) u0 t4))) (\lambda (t4: T).(subst0 (s (Bind b) i) v0 t1 t4)) (ex T (\lambda
-(w: T).(ty3 g d v w))) (\lambda (x: T).(\lambda (_: (eq T t3 (THead (Bind b)
-u0 x))).(\lambda (H8: (subst0 (s (Bind b) i) v0 t1 x)).(H3 v0 x (S i) H8 b0 d
-v (getl_head (Bind b) i c0 (CHead d (Bind b0) v) H5 u0))))) H6)) (\lambda
-(H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind b) u2
-t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 u0 u2))) (\lambda (_:
-T).(\lambda (t4: T).(subst0 (s (Bind b) i) v0 t1 t4))))).(ex3_2_ind T T
-(\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead (Bind b) u2 t4)))) (\lambda
-(u2: T).(\lambda (_: T).(subst0 i v0 u0 u2))) (\lambda (_: T).(\lambda (t4:
-T).(subst0 (s (Bind b) i) v0 t1 t4))) (ex T (\lambda (w: T).(ty3 g d v w)))
-(\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (eq T t3 (THead (Bind b) x0
-x1))).(\lambda (H8: (subst0 i v0 u0 x0)).(\lambda (_: (subst0 (s (Bind b) i)
-v0 t1 x1)).(H1 v0 x0 i H8 b0 d v H5)))))) H6)) (subst0_gen_head (Bind b) v0
-u0 t1 t3 i H4)))))))))))))))))))) (\lambda (c0: C).(\lambda (w: T).(\lambda
-(u0: T).(\lambda (_: (ty3 g c0 w u0)).(\lambda (H1: ((\forall (v0:
-T).(\forall (t0: T).(\forall (i: nat).((subst0 i v0 w t0) \to (\forall (b:
-B).(\forall (d: C).(\forall (v: T).((getl i c0 (CHead d (Bind b) v)) \to (ex
-T (\lambda (w0: T).(ty3 g d v w0))))))))))))).(\lambda (v: T).(\lambda (t0:
-T).(\lambda (_: (ty3 g c0 v (THead (Bind Abst) u0 t0))).(\lambda (H3:
-((\forall (v0: T).(\forall (t1: T).(\forall (i: nat).((subst0 i v0 v t1) \to
-(\forall (b: B).(\forall (d: C).(\forall (v1: T).((getl i c0 (CHead d (Bind
-b) v1)) \to (ex T (\lambda (w0: T).(ty3 g d v1 w0))))))))))))).(\lambda (v0:
-T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (H4: (subst0 i v0 (THead (Flat
-Appl) w v) t1)).(\lambda (b: B).(\lambda (d: C).(\lambda (v1: T).(\lambda
-(H5: (getl i c0 (CHead d (Bind b) v1))).(or3_ind (ex2 T (\lambda (u2: T).(eq
-T t1 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i v0 w u2))) (ex2 T
-(\lambda (t2: T).(eq T t1 (THead (Flat Appl) w t2))) (\lambda (t2: T).(subst0
-(s (Flat Appl) i) v0 v t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq
-T t1 (THead (Flat Appl) u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i
-v0 w u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v
-t2)))) (ex T (\lambda (w0: T).(ty3 g d v1 w0))) (\lambda (H6: (ex2 T (\lambda
-(u2: T).(eq T t1 (THead (Flat Appl) u2 v))) (\lambda (u2: T).(subst0 i v0 w
-u2)))).(ex2_ind T (\lambda (u2: T).(eq T t1 (THead (Flat Appl) u2 v)))
-(\lambda (u2: T).(subst0 i v0 w u2)) (ex T (\lambda (w0: T).(ty3 g d v1 w0)))
-(\lambda (x: T).(\lambda (_: (eq T t1 (THead (Flat Appl) x v))).(\lambda (H8:
-(subst0 i v0 w x)).(H1 v0 x i H8 b d v1 H5)))) H6)) (\lambda (H6: (ex2 T
-(\lambda (t2: T).(eq T t1 (THead (Flat Appl) w t2))) (\lambda (t2: T).(subst0
-(s (Flat Appl) i) v0 v t2)))).(ex2_ind T (\lambda (t2: T).(eq T t1 (THead
-(Flat Appl) w t2))) (\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v t2)) (ex
-T (\lambda (w0: T).(ty3 g d v1 w0))) (\lambda (x: T).(\lambda (_: (eq T t1
-(THead (Flat Appl) w x))).(\lambda (H8: (subst0 (s (Flat Appl) i) v0 v
-x)).(H3 v0 x (s (Flat Appl) i) H8 b d v1 H5)))) H6)) (\lambda (H6: (ex3_2 T T
-(\lambda (u2: T).(\lambda (t2: T).(eq T t1 (THead (Flat Appl) u2 t2))))
-(\lambda (u2: T).(\lambda (_: T).(subst0 i v0 w u2))) (\lambda (_:
-T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v t2))))).(ex3_2_ind T T
-(\lambda (u2: T).(\lambda (t2: T).(eq T t1 (THead (Flat Appl) u2 t2))))
-(\lambda (u2: T).(\lambda (_: T).(subst0 i v0 w u2))) (\lambda (_:
-T).(\lambda (t2: T).(subst0 (s (Flat Appl) i) v0 v t2))) (ex T (\lambda (w0:
-T).(ty3 g d v1 w0))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (_: (eq T t1
-(THead (Flat Appl) x0 x1))).(\lambda (_: (subst0 i v0 w x0)).(\lambda (H9:
-(subst0 (s (Flat Appl) i) v0 v x1)).(H3 v0 x1 (s (Flat Appl) i) H9 b d v1
-H5)))))) H6)) (subst0_gen_head (Flat Appl) v0 w v t1 i H4)))))))))))))))))))
-(\lambda (c0: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g c0 t1
-t2)).(\lambda (H1: ((\forall (v0: T).(\forall (t0: T).(\forall (i:
-nat).((subst0 i v0 t1 t0) \to (\forall (b: B).(\forall (d: C).(\forall (v:
-T).((getl i c0 (CHead d (Bind b) v)) \to (ex T (\lambda (w: T).(ty3 g d v
-w))))))))))))).(\lambda (t0: T).(\lambda (_: (ty3 g c0 t2 t0)).(\lambda (H3:
-((\forall (v0: T).(\forall (t3: T).(\forall (i: nat).((subst0 i v0 t2 t3) \to
-(\forall (b: B).(\forall (d: C).(\forall (v: T).((getl i c0 (CHead d (Bind b)
-v)) \to (ex T (\lambda (w: T).(ty3 g d v w))))))))))))).(\lambda (v0:
-T).(\lambda (t3: T).(\lambda (i: nat).(\lambda (H4: (subst0 i v0 (THead (Flat
-Cast) t2 t1) t3)).(\lambda (b: B).(\lambda (d: C).(\lambda (v: T).(\lambda
-(H5: (getl i c0 (CHead d (Bind b) v))).(or3_ind (ex2 T (\lambda (u2: T).(eq T
-t3 (THead (Flat Cast) u2 t1))) (\lambda (u2: T).(subst0 i v0 t2 u2))) (ex2 T
-(\lambda (t4: T).(eq T t3 (THead (Flat Cast) t2 t4))) (\lambda (t4:
-T).(subst0 (s (Flat Cast) i) v0 t1 t4))) (ex3_2 T T (\lambda (u2: T).(\lambda
-(t4: T).(eq T t3 (THead (Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_:
-T).(subst0 i v0 t2 u2))) (\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat
-Cast) i) v0 t1 t4)))) (ex T (\lambda (w: T).(ty3 g d v w))) (\lambda (H6:
-(ex2 T (\lambda (u2: T).(eq T t3 (THead (Flat Cast) u2 t1))) (\lambda (u2:
-T).(subst0 i v0 t2 u2)))).(ex2_ind T (\lambda (u2: T).(eq T t3 (THead (Flat
-Cast) u2 t1))) (\lambda (u2: T).(subst0 i v0 t2 u2)) (ex T (\lambda (w:
-T).(ty3 g d v w))) (\lambda (x: T).(\lambda (_: (eq T t3 (THead (Flat Cast) x
-t1))).(\lambda (H8: (subst0 i v0 t2 x)).(H3 v0 x i H8 b d v H5)))) H6))
-(\lambda (H6: (ex2 T (\lambda (t4: T).(eq T t3 (THead (Flat Cast) t2 t4)))
-(\lambda (t4: T).(subst0 (s (Flat Cast) i) v0 t1 t4)))).(ex2_ind T (\lambda
-(t4: T).(eq T t3 (THead (Flat Cast) t2 t4))) (\lambda (t4: T).(subst0 (s
-(Flat Cast) i) v0 t1 t4)) (ex T (\lambda (w: T).(ty3 g d v w))) (\lambda (x:
-T).(\lambda (_: (eq T t3 (THead (Flat Cast) t2 x))).(\lambda (H8: (subst0 (s
-(Flat Cast) i) v0 t1 x)).(H1 v0 x (s (Flat Cast) i) H8 b d v H5)))) H6))
-(\lambda (H6: (ex3_2 T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead
-(Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 t2 u2)))
-(\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Cast) i) v0 t1
-t4))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t4: T).(eq T t3 (THead
-(Flat Cast) u2 t4)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i v0 t2 u2)))
-(\lambda (_: T).(\lambda (t4: T).(subst0 (s (Flat Cast) i) v0 t1 t4))) (ex T
-(\lambda (w: T).(ty3 g d v w))) (\lambda (x0: T).(\lambda (x1: T).(\lambda
-(_: (eq T t3 (THead (Flat Cast) x0 x1))).(\lambda (H8: (subst0 i v0 t2
-x0)).(\lambda (_: (subst0 (s (Flat Cast) i) v0 t1 x1)).(H3 v0 x0 i H8 b d v
-H5)))))) H6)) (subst0_gen_head (Flat Cast) v0 t2 t1 t3 i H4))))))))))))))))))
-c t u H))))).
-
theorem ty3_gen_appl_nf2:
\forall (g: G).(\forall (c: C).(\forall (w: T).(\forall (v: T).(\forall (x:
T).((ty3 g c (THead (Flat Appl) w v) x) \to (ex4_2 T T (\lambda (u:
Appl) t (THead (Bind Abst) x0 x1)) u1)).(\lambda (H5: (ty3 g c (THeads (Flat
Appl) t0 (TLRef i)) (THead (Bind Abst) x0 x1))).(\lambda (_: (ty3 g c t
x0)).(\lambda (H7: (nf2 c (THead (Bind Abst) x0 x1))).(let H8 \def
-(nf2_gen_abst c x0 x1 H7) in (and_ind (nf2 c x0) (nf2 (CHead c (Bind Abst)
+(nf2_gen_abst c x0 x1 H7) in (land_ind (nf2 c x0) (nf2 (CHead c (Bind Abst)
x0) x1) (ex2 T (\lambda (u: T).(nf2 c (lift (S i) O u))) (\lambda (u: T).(pc3
c (THead (Flat Appl) t (THeads (Flat Appl) t0 (lift (S i) O u))) u1)))
(\lambda (H9: (nf2 c x0)).(\lambda (H10: (nf2 (CHead c (Bind Abst) x0)
H1) in (let H2 \def H_x in (ex_ind T (\lambda (u0: T).(eq T (TLRef j) (lift
(S i) O u0))) (lt i j) (\lambda (x: T).(\lambda (H3: (eq T (TLRef j) (lift (S
i) O x))).(let H_x0 \def (lift_gen_lref x O (S i) j H3) in (let H4 \def H_x0
-in (or_ind (land (lt j O) (eq T x (TLRef j))) (land (le (plus O (S i)) j) (eq
-T x (TLRef (minus j (S i))))) (lt i j) (\lambda (H5: (land (lt j O) (eq T x
-(TLRef j)))).(and_ind (lt j O) (eq T x (TLRef j)) (lt i j) (\lambda (H6: (lt
+in (or_ind (land (lt j O) (eq T x (TLRef j))) (land (le (S i) j) (eq T x
+(TLRef (minus j (S i))))) (lt i j) (\lambda (H5: (land (lt j O) (eq T x
+(TLRef j)))).(land_ind (lt j O) (eq T x (TLRef j)) (lt i j) (\lambda (H6: (lt
j O)).(\lambda (_: (eq T x (TLRef j))).(lt_x_O j H6 (lt i j)))) H5)) (\lambda
-(H5: (land (le (plus O (S i)) j) (eq T x (TLRef (minus j (S i)))))).(and_ind
-(le (plus O (S i)) j) (eq T x (TLRef (minus j (S i)))) (lt i j) (\lambda (H6:
-(le (plus O (S i)) j)).(\lambda (_: (eq T x (TLRef (minus j (S i))))).H6))
-H5)) H4))))) H2))))))))).
-
-inductive wf3 (g: G): C \to (C \to Prop) \def
-| wf3_sort: \forall (m: nat).(wf3 g (CSort m) (CSort m))
-| wf3_bind: \forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (u:
-T).(\forall (t: T).((ty3 g c1 u t) \to (\forall (b: B).(wf3 g (CHead c1 (Bind
-b) u) (CHead c2 (Bind b) u))))))))
-| wf3_void: \forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (u:
-T).(((\forall (t: T).((ty3 g c1 u t) \to False))) \to (\forall (b: B).(wf3 g
-(CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O))))))))
-| wf3_flat: \forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (u:
-T).(\forall (f: F).(wf3 g (CHead c1 (Flat f) u) c2))))).
-
-theorem wf3_gen_sort1:
- \forall (g: G).(\forall (x: C).(\forall (m: nat).((wf3 g (CSort m) x) \to
-(eq C x (CSort m)))))
-\def
- \lambda (g: G).(\lambda (x: C).(\lambda (m: nat).(\lambda (H: (wf3 g (CSort
-m) x)).(insert_eq C (CSort m) (\lambda (c: C).(wf3 g c x)) (\lambda (c:
-C).(eq C x c)) (\lambda (y: C).(\lambda (H0: (wf3 g y x)).(wf3_ind g (\lambda
-(c: C).(\lambda (c0: C).((eq C c (CSort m)) \to (eq C c0 c)))) (\lambda (m0:
-nat).(\lambda (H1: (eq C (CSort m0) (CSort m))).(let H2 \def (f_equal C nat
-(\lambda (e: C).(match e in C return (\lambda (_: C).nat) with [(CSort n)
-\Rightarrow n | (CHead _ _ _) \Rightarrow m0])) (CSort m0) (CSort m) H1) in
-(eq_ind_r nat m (\lambda (n: nat).(eq C (CSort n) (CSort n))) (refl_equal C
-(CSort m)) m0 H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (wf3 g c1
-c2)).(\lambda (_: (((eq C c1 (CSort m)) \to (eq C c2 c1)))).(\lambda (u:
-T).(\lambda (t: T).(\lambda (_: (ty3 g c1 u t)).(\lambda (b: B).(\lambda (H4:
-(eq C (CHead c1 (Bind b) u) (CSort m))).(let H5 \def (eq_ind C (CHead c1
-(Bind b) u) (\lambda (ee: C).(match ee in C return (\lambda (_: C).Prop) with
-[(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow True])) I (CSort m)
-H4) in (False_ind (eq C (CHead c2 (Bind b) u) (CHead c1 (Bind b) u))
-H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (_: (wf3 g c1
-c2)).(\lambda (_: (((eq C c1 (CSort m)) \to (eq C c2 c1)))).(\lambda (u:
-T).(\lambda (_: ((\forall (t: T).((ty3 g c1 u t) \to False)))).(\lambda (b:
-B).(\lambda (H4: (eq C (CHead c1 (Bind b) u) (CSort m))).(let H5 \def (eq_ind
-C (CHead c1 (Bind b) u) (\lambda (ee: C).(match ee in C return (\lambda (_:
-C).Prop) with [(CSort _) \Rightarrow False | (CHead _ _ _) \Rightarrow
-True])) I (CSort m) H4) in (False_ind (eq C (CHead c2 (Bind Void) (TSort O))
-(CHead c1 (Bind b) u)) H5)))))))))) (\lambda (c1: C).(\lambda (c2:
-C).(\lambda (_: (wf3 g c1 c2)).(\lambda (_: (((eq C c1 (CSort m)) \to (eq C
-c2 c1)))).(\lambda (u: T).(\lambda (f: F).(\lambda (H3: (eq C (CHead c1 (Flat
-f) u) (CSort m))).(let H4 \def (eq_ind C (CHead c1 (Flat f) u) (\lambda (ee:
-C).(match ee in C return (\lambda (_: C).Prop) with [(CSort _) \Rightarrow
-False | (CHead _ _ _) \Rightarrow True])) I (CSort m) H3) in (False_ind (eq C
-c2 (CHead c1 (Flat f) u)) H4))))))))) y x H0))) H)))).
-
-theorem wf3_gen_bind1:
- \forall (g: G).(\forall (c1: C).(\forall (x: C).(\forall (v: T).(\forall (b:
-B).((wf3 g (CHead c1 (Bind b) v) x) \to (or (ex3_2 C T (\lambda (c2:
-C).(\lambda (_: T).(eq C x (CHead c2 (Bind b) v)))) (\lambda (c2: C).(\lambda
-(_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3
-C (\lambda (c2: C).(eq C x (CHead c2 (Bind Void) (TSort O)))) (\lambda (c2:
-C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to
-False))))))))))
-\def
- \lambda (g: G).(\lambda (c1: C).(\lambda (x: C).(\lambda (v: T).(\lambda (b:
-B).(\lambda (H: (wf3 g (CHead c1 (Bind b) v) x)).(insert_eq C (CHead c1 (Bind
-b) v) (\lambda (c: C).(wf3 g c x)) (\lambda (_: C).(or (ex3_2 C T (\lambda
-(c2: C).(\lambda (_: T).(eq C x (CHead c2 (Bind b) v)))) (\lambda (c2:
-C).(\lambda (_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1
-v w)))) (ex3 C (\lambda (c2: C).(eq C x (CHead c2 (Bind Void) (TSort O))))
-(\lambda (c2: C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v
-w) \to False)))))) (\lambda (y: C).(\lambda (H0: (wf3 g y x)).(wf3_ind g
-(\lambda (c: C).(\lambda (c0: C).((eq C c (CHead c1 (Bind b) v)) \to (or
-(ex3_2 C T (\lambda (c2: C).(\lambda (_: T).(eq C c0 (CHead c2 (Bind b) v))))
-(\lambda (c2: C).(\lambda (_: T).(wf3 g c1 c2))) (\lambda (_: C).(\lambda (w:
-T).(ty3 g c1 v w)))) (ex3 C (\lambda (c2: C).(eq C c0 (CHead c2 (Bind Void)
-(TSort O)))) (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (_: C).(\forall (w:
-T).((ty3 g c1 v w) \to False)))))))) (\lambda (m: nat).(\lambda (H1: (eq C
-(CSort m) (CHead c1 (Bind b) v))).(let H2 \def (eq_ind C (CSort m) (\lambda
-(ee: C).(match ee in C return (\lambda (_: C).Prop) with [(CSort _)
-\Rightarrow True | (CHead _ _ _) \Rightarrow False])) I (CHead c1 (Bind b) v)
-H1) in (False_ind (or (ex3_2 C T (\lambda (c2: C).(\lambda (_: T).(eq C
-(CSort m) (CHead c2 (Bind b) v)))) (\lambda (c2: C).(\lambda (_: T).(wf3 g c1
-c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c2:
-C).(eq C (CSort m) (CHead c2 (Bind Void) (TSort O)))) (\lambda (c2: C).(wf3 g
-c1 c2)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to False))))) H2))))
-(\lambda (c0: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c0 c2)).(\lambda (H2:
-(((eq C c0 (CHead c1 (Bind b) v)) \to (or (ex3_2 C T (\lambda (c3:
-C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda (c3:
-C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1
-v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort O))))
-(\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v
-w) \to False)))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H3: (ty3 g c0
-u t)).(\lambda (b0: B).(\lambda (H4: (eq C (CHead c0 (Bind b0) u) (CHead c1
-(Bind b) v))).(let H5 \def (f_equal C C (\lambda (e: C).(match e in C return
-(\lambda (_: C).C) with [(CSort _) \Rightarrow c0 | (CHead c _ _) \Rightarrow
-c])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) in ((let H6 \def
-(f_equal C B (\lambda (e: C).(match e in C return (\lambda (_: C).B) with
-[(CSort _) \Rightarrow b0 | (CHead _ k _) \Rightarrow (match k in K return
-(\lambda (_: K).B) with [(Bind b1) \Rightarrow b1 | (Flat _) \Rightarrow
-b0])])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) in ((let H7 \def
-(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with
-[(CSort _) \Rightarrow u | (CHead _ _ t0) \Rightarrow t0])) (CHead c0 (Bind
-b0) u) (CHead c1 (Bind b) v) H4) in (\lambda (H8: (eq B b0 b)).(\lambda (H9:
-(eq C c0 c1)).(eq_ind_r B b (\lambda (b1: B).(or (ex3_2 C T (\lambda (c3:
-C).(\lambda (_: T).(eq C (CHead c2 (Bind b1) u) (CHead c3 (Bind b) v))))
-(\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w:
-T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C (CHead c2 (Bind b1) u)
-(CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda
-(_: C).(\forall (w: T).((ty3 g c1 v w) \to False)))))) (let H10 \def (eq_ind
-T u (\lambda (t0: T).(ty3 g c0 t0 t)) H3 v H7) in (eq_ind_r T v (\lambda (t0:
-T).(or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C (CHead c2 (Bind b)
-t0) (CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3)))
-(\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq
-C (CHead c2 (Bind b) t0) (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3:
-C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to
-False)))))) (let H11 \def (eq_ind C c0 (\lambda (c: C).(ty3 g c v t)) H10 c1
-H9) in (let H12 \def (eq_ind C c0 (\lambda (c: C).((eq C c (CHead c1 (Bind b)
-v)) \to (or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3
-(Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_:
-C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead
-c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_:
-C).(\forall (w: T).((ty3 g c1 v w) \to False))))))) H2 c1 H9) in (let H13
-\def (eq_ind C c0 (\lambda (c: C).(wf3 g c c2)) H1 c1 H9) in (or_introl
-(ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C (CHead c2 (Bind b) v)
-(CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3)))
-(\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq
-C (CHead c2 (Bind b) v) (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3:
-C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to
-False)))) (ex3_2_intro C T (\lambda (c3: C).(\lambda (_: T).(eq C (CHead c2
-(Bind b) v) (CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g
-c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w))) c2 t (refl_equal C
-(CHead c2 (Bind b) v)) H13 H11))))) u H7)) b0 H8)))) H6)) H5)))))))))))
-(\lambda (c0: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c0 c2)).(\lambda (H2:
-(((eq C c0 (CHead c1 (Bind b) v)) \to (or (ex3_2 C T (\lambda (c3:
-C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda (c3:
-C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1
-v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort O))))
-(\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v
-w) \to False)))))))).(\lambda (u: T).(\lambda (H3: ((\forall (t: T).((ty3 g
-c0 u t) \to False)))).(\lambda (b0: B).(\lambda (H4: (eq C (CHead c0 (Bind
-b0) u) (CHead c1 (Bind b) v))).(let H5 \def (f_equal C C (\lambda (e:
-C).(match e in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c0 |
-(CHead c _ _) \Rightarrow c])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v)
-H4) in ((let H6 \def (f_equal C B (\lambda (e: C).(match e in C return
-(\lambda (_: C).B) with [(CSort _) \Rightarrow b0 | (CHead _ k _) \Rightarrow
-(match k in K return (\lambda (_: K).B) with [(Bind b1) \Rightarrow b1 |
-(Flat _) \Rightarrow b0])])) (CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4)
-in ((let H7 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda
-(_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t]))
-(CHead c0 (Bind b0) u) (CHead c1 (Bind b) v) H4) in (\lambda (_: (eq B b0
-b)).(\lambda (H9: (eq C c0 c1)).(let H10 \def (eq_ind T u (\lambda (t:
-T).(\forall (t0: T).((ty3 g c0 t t0) \to False))) H3 v H7) in (let H11 \def
-(eq_ind C c0 (\lambda (c: C).(\forall (t: T).((ty3 g c v t) \to False))) H10
-c1 H9) in (let H12 \def (eq_ind C c0 (\lambda (c: C).((eq C c (CHead c1 (Bind
-b) v)) \to (or (ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3
-(Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_:
-C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead
-c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_:
-C).(\forall (w: T).((ty3 g c1 v w) \to False))))))) H2 c1 H9) in (let H13
-\def (eq_ind C c0 (\lambda (c: C).(wf3 g c c2)) H1 c1 H9) in (or_intror
-(ex3_2 C T (\lambda (c3: C).(\lambda (_: T).(eq C (CHead c2 (Bind Void)
-(TSort O)) (CHead c3 (Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g
-c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3 g c1 v w)))) (ex3 C (\lambda
-(c3: C).(eq C (CHead c2 (Bind Void) (TSort O)) (CHead c3 (Bind Void) (TSort
-O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g
-c1 v w) \to False)))) (ex3_intro C (\lambda (c3: C).(eq C (CHead c2 (Bind
-Void) (TSort O)) (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g
-c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g c1 v w) \to False))) c2
-(refl_equal C (CHead c2 (Bind Void) (TSort O))) H13 H11))))))))) H6))
-H5)))))))))) (\lambda (c0: C).(\lambda (c2: C).(\lambda (_: (wf3 g c0
-c2)).(\lambda (_: (((eq C c0 (CHead c1 (Bind b) v)) \to (or (ex3_2 C T
-(\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda
-(c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3
-g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort
-O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g
-c1 v w) \to False)))))))).(\lambda (u: T).(\lambda (f: F).(\lambda (H3: (eq C
-(CHead c0 (Flat f) u) (CHead c1 (Bind b) v))).(let H4 \def (eq_ind C (CHead
-c0 (Flat f) u) (\lambda (ee: C).(match ee in C return (\lambda (_: C).Prop)
-with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match k in K
-return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow False | (Flat _)
-\Rightarrow True])])) I (CHead c1 (Bind b) v) H3) in (False_ind (or (ex3_2 C
-T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda
-(c3: C).(\lambda (_: T).(wf3 g c1 c3))) (\lambda (_: C).(\lambda (w: T).(ty3
-g c1 v w)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort
-O)))) (\lambda (c3: C).(wf3 g c1 c3)) (\lambda (_: C).(\forall (w: T).((ty3 g
-c1 v w) \to False))))) H4))))))))) y x H0))) H)))))).
-
-theorem wf3_gen_flat1:
- \forall (g: G).(\forall (c1: C).(\forall (x: C).(\forall (v: T).(\forall (f:
-F).((wf3 g (CHead c1 (Flat f) v) x) \to (wf3 g c1 x))))))
-\def
- \lambda (g: G).(\lambda (c1: C).(\lambda (x: C).(\lambda (v: T).(\lambda (f:
-F).(\lambda (H: (wf3 g (CHead c1 (Flat f) v) x)).(insert_eq C (CHead c1 (Flat
-f) v) (\lambda (c: C).(wf3 g c x)) (\lambda (_: C).(wf3 g c1 x)) (\lambda (y:
-C).(\lambda (H0: (wf3 g y x)).(wf3_ind g (\lambda (c: C).(\lambda (c0:
-C).((eq C c (CHead c1 (Flat f) v)) \to (wf3 g c1 c0)))) (\lambda (m:
-nat).(\lambda (H1: (eq C (CSort m) (CHead c1 (Flat f) v))).(let H2 \def
-(eq_ind C (CSort m) (\lambda (ee: C).(match ee in C return (\lambda (_:
-C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _) \Rightarrow
-False])) I (CHead c1 (Flat f) v) H1) in (False_ind (wf3 g c1 (CSort m))
-H2)))) (\lambda (c0: C).(\lambda (c2: C).(\lambda (_: (wf3 g c0 c2)).(\lambda
-(_: (((eq C c0 (CHead c1 (Flat f) v)) \to (wf3 g c1 c2)))).(\lambda (u:
-T).(\lambda (t: T).(\lambda (_: (ty3 g c0 u t)).(\lambda (b: B).(\lambda (H4:
-(eq C (CHead c0 (Bind b) u) (CHead c1 (Flat f) v))).(let H5 \def (eq_ind C
-(CHead c0 (Bind b) u) (\lambda (ee: C).(match ee in C return (\lambda (_:
-C).Prop) with [(CSort _) \Rightarrow False | (CHead _ k _) \Rightarrow (match
-k in K return (\lambda (_: K).Prop) with [(Bind _) \Rightarrow True | (Flat
-_) \Rightarrow False])])) I (CHead c1 (Flat f) v) H4) in (False_ind (wf3 g c1
-(CHead c2 (Bind b) u)) H5))))))))))) (\lambda (c0: C).(\lambda (c2:
-C).(\lambda (_: (wf3 g c0 c2)).(\lambda (_: (((eq C c0 (CHead c1 (Flat f) v))
-\to (wf3 g c1 c2)))).(\lambda (u: T).(\lambda (_: ((\forall (t: T).((ty3 g c0
-u t) \to False)))).(\lambda (b: B).(\lambda (H4: (eq C (CHead c0 (Bind b) u)
-(CHead c1 (Flat f) v))).(let H5 \def (eq_ind C (CHead c0 (Bind b) u) (\lambda
-(ee: C).(match ee in C return (\lambda (_: C).Prop) with [(CSort _)
-\Rightarrow False | (CHead _ k _) \Rightarrow (match k in K return (\lambda
-(_: K).Prop) with [(Bind _) \Rightarrow True | (Flat _) \Rightarrow
-False])])) I (CHead c1 (Flat f) v) H4) in (False_ind (wf3 g c1 (CHead c2
-(Bind Void) (TSort O))) H5)))))))))) (\lambda (c0: C).(\lambda (c2:
-C).(\lambda (H1: (wf3 g c0 c2)).(\lambda (H2: (((eq C c0 (CHead c1 (Flat f)
-v)) \to (wf3 g c1 c2)))).(\lambda (u: T).(\lambda (f0: F).(\lambda (H3: (eq C
-(CHead c0 (Flat f0) u) (CHead c1 (Flat f) v))).(let H4 \def (f_equal C C
-(\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _)
-\Rightarrow c0 | (CHead c _ _) \Rightarrow c])) (CHead c0 (Flat f0) u) (CHead
-c1 (Flat f) v) H3) in ((let H5 \def (f_equal C F (\lambda (e: C).(match e in
-C return (\lambda (_: C).F) with [(CSort _) \Rightarrow f0 | (CHead _ k _)
-\Rightarrow (match k in K return (\lambda (_: K).F) with [(Bind _)
-\Rightarrow f0 | (Flat f1) \Rightarrow f1])])) (CHead c0 (Flat f0) u) (CHead
-c1 (Flat f) v) H3) in ((let H6 \def (f_equal C T (\lambda (e: C).(match e in
-C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t)
-\Rightarrow t])) (CHead c0 (Flat f0) u) (CHead c1 (Flat f) v) H3) in (\lambda
-(_: (eq F f0 f)).(\lambda (H8: (eq C c0 c1)).(let H9 \def (eq_ind C c0
-(\lambda (c: C).((eq C c (CHead c1 (Flat f) v)) \to (wf3 g c1 c2))) H2 c1 H8)
-in (let H10 \def (eq_ind C c0 (\lambda (c: C).(wf3 g c c2)) H1 c1 H8) in
-H10))))) H5)) H4))))))))) y x H0))) H)))))).
-
-theorem wf3_gen_head2:
- \forall (g: G).(\forall (x: C).(\forall (c: C).(\forall (v: T).(\forall (k:
-K).((wf3 g x (CHead c k v)) \to (ex B (\lambda (b: B).(eq K k (Bind b)))))))))
-\def
- \lambda (g: G).(\lambda (x: C).(\lambda (c: C).(\lambda (v: T).(\lambda (k:
-K).(\lambda (H: (wf3 g x (CHead c k v))).(insert_eq C (CHead c k v) (\lambda
-(c0: C).(wf3 g x c0)) (\lambda (_: C).(ex B (\lambda (b: B).(eq K k (Bind
-b))))) (\lambda (y: C).(\lambda (H0: (wf3 g x y)).(wf3_ind g (\lambda (_:
-C).(\lambda (c1: C).((eq C c1 (CHead c k v)) \to (ex B (\lambda (b: B).(eq K
-k (Bind b))))))) (\lambda (m: nat).(\lambda (H1: (eq C (CSort m) (CHead c k
-v))).(let H2 \def (eq_ind C (CSort m) (\lambda (ee: C).(match ee in C return
-(\lambda (_: C).Prop) with [(CSort _) \Rightarrow True | (CHead _ _ _)
-\Rightarrow False])) I (CHead c k v) H1) in (False_ind (ex B (\lambda (b:
-B).(eq K k (Bind b)))) H2)))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1:
-(wf3 g c1 c2)).(\lambda (H2: (((eq C c2 (CHead c k v)) \to (ex B (\lambda (b:
-B).(eq K k (Bind b))))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H3: (ty3
-g c1 u t)).(\lambda (b: B).(\lambda (H4: (eq C (CHead c2 (Bind b) u) (CHead c
-k v))).(let H5 \def (f_equal C C (\lambda (e: C).(match e in C return
-(\lambda (_: C).C) with [(CSort _) \Rightarrow c2 | (CHead c0 _ _)
-\Rightarrow c0])) (CHead c2 (Bind b) u) (CHead c k v) H4) in ((let H6 \def
-(f_equal C K (\lambda (e: C).(match e in C return (\lambda (_: C).K) with
-[(CSort _) \Rightarrow (Bind b) | (CHead _ k0 _) \Rightarrow k0])) (CHead c2
-(Bind b) u) (CHead c k v) H4) in ((let H7 \def (f_equal C T (\lambda (e:
-C).(match e in C return (\lambda (_: C).T) with [(CSort _) \Rightarrow u |
-(CHead _ _ t0) \Rightarrow t0])) (CHead c2 (Bind b) u) (CHead c k v) H4) in
-(\lambda (H8: (eq K (Bind b) k)).(\lambda (H9: (eq C c2 c)).(let H10 \def
-(eq_ind T u (\lambda (t0: T).(ty3 g c1 t0 t)) H3 v H7) in (let H11 \def
-(eq_ind C c2 (\lambda (c0: C).((eq C c0 (CHead c k v)) \to (ex B (\lambda
-(b0: B).(eq K k (Bind b0)))))) H2 c H9) in (let H12 \def (eq_ind C c2
-(\lambda (c0: C).(wf3 g c1 c0)) H1 c H9) in (let H13 \def (eq_ind_r K k
-(\lambda (k0: K).((eq C c (CHead c k0 v)) \to (ex B (\lambda (b0: B).(eq K k0
-(Bind b0)))))) H11 (Bind b) H8) in (eq_ind K (Bind b) (\lambda (k0: K).(ex B
-(\lambda (b0: B).(eq K k0 (Bind b0))))) (ex_intro B (\lambda (b0: B).(eq K
-(Bind b) (Bind b0))) b (refl_equal K (Bind b))) k H8)))))))) H6))
-H5))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1
-c2)).(\lambda (H2: (((eq C c2 (CHead c k v)) \to (ex B (\lambda (b: B).(eq K
-k (Bind b))))))).(\lambda (u: T).(\lambda (_: ((\forall (t: T).((ty3 g c1 u
-t) \to False)))).(\lambda (_: B).(\lambda (H4: (eq C (CHead c2 (Bind Void)
-(TSort O)) (CHead c k v))).(let H5 \def (f_equal C C (\lambda (e: C).(match e
-in C return (\lambda (_: C).C) with [(CSort _) \Rightarrow c2 | (CHead c0 _
-_) \Rightarrow c0])) (CHead c2 (Bind Void) (TSort O)) (CHead c k v) H4) in
-((let H6 \def (f_equal C K (\lambda (e: C).(match e in C return (\lambda (_:
-C).K) with [(CSort _) \Rightarrow (Bind Void) | (CHead _ k0 _) \Rightarrow
-k0])) (CHead c2 (Bind Void) (TSort O)) (CHead c k v) H4) in ((let H7 \def
-(f_equal C T (\lambda (e: C).(match e in C return (\lambda (_: C).T) with
-[(CSort _) \Rightarrow (TSort O) | (CHead _ _ t) \Rightarrow t])) (CHead c2
-(Bind Void) (TSort O)) (CHead c k v) H4) in (\lambda (H8: (eq K (Bind Void)
-k)).(\lambda (H9: (eq C c2 c)).(let H10 \def (eq_ind C c2 (\lambda (c0:
-C).((eq C c0 (CHead c k v)) \to (ex B (\lambda (b0: B).(eq K k (Bind b0))))))
-H2 c H9) in (let H11 \def (eq_ind C c2 (\lambda (c0: C).(wf3 g c1 c0)) H1 c
-H9) in (let H12 \def (eq_ind_r K k (\lambda (k0: K).((eq C c (CHead c k0 v))
-\to (ex B (\lambda (b0: B).(eq K k0 (Bind b0)))))) H10 (Bind Void) H8) in
-(eq_ind K (Bind Void) (\lambda (k0: K).(ex B (\lambda (b0: B).(eq K k0 (Bind
-b0))))) (let H13 \def (eq_ind_r T v (\lambda (t: T).((eq C c (CHead c (Bind
-Void) t)) \to (ex B (\lambda (b0: B).(eq K (Bind Void) (Bind b0)))))) H12
-(TSort O) H7) in (ex_intro B (\lambda (b0: B).(eq K (Bind Void) (Bind b0)))
-Void (refl_equal K (Bind Void)))) k H8))))))) H6)) H5)))))))))) (\lambda (c1:
-C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: (((eq C c2
-(CHead c k v)) \to (ex B (\lambda (b: B).(eq K k (Bind b))))))).(\lambda (_:
-T).(\lambda (_: F).(\lambda (H3: (eq C c2 (CHead c k v))).(let H4 \def
-(f_equal C C (\lambda (e: C).e) c2 (CHead c k v) H3) in (let H5 \def (eq_ind
-C c2 (\lambda (c0: C).((eq C c0 (CHead c k v)) \to (ex B (\lambda (b: B).(eq
-K k (Bind b)))))) H2 (CHead c k v) H4) in (let H6 \def (eq_ind C c2 (\lambda
-(c0: C).(wf3 g c1 c0)) H1 (CHead c k v) H4) in (H5 (refl_equal C (CHead c k
-v))))))))))))) x y H0))) H)))))).
-
-theorem wf3_mono:
- \forall (g: G).(\forall (c: C).(\forall (c1: C).((wf3 g c c1) \to (\forall
-(c2: C).((wf3 g c c2) \to (eq C c1 c2))))))
-\def
- \lambda (g: G).(\lambda (c: C).(\lambda (c1: C).(\lambda (H: (wf3 g c
-c1)).(wf3_ind g (\lambda (c0: C).(\lambda (c2: C).(\forall (c3: C).((wf3 g c0
-c3) \to (eq C c2 c3))))) (\lambda (m: nat).(\lambda (c2: C).(\lambda (H0:
-(wf3 g (CSort m) c2)).(let H_y \def (wf3_gen_sort1 g c2 m H0) in (eq_ind_r C
-(CSort m) (\lambda (c0: C).(eq C (CSort m) c0)) (refl_equal C (CSort m)) c2
-H_y))))) (\lambda (c2: C).(\lambda (c3: C).(\lambda (_: (wf3 g c2
-c3)).(\lambda (H1: ((\forall (c4: C).((wf3 g c2 c4) \to (eq C c3
-c4))))).(\lambda (u: T).(\lambda (t: T).(\lambda (H2: (ty3 g c2 u
-t)).(\lambda (b: B).(\lambda (c0: C).(\lambda (H3: (wf3 g (CHead c2 (Bind b)
-u) c0)).(let H_x \def (wf3_gen_bind1 g c2 c0 u b H3) in (let H4 \def H_x in
-(or_ind (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead c4 (Bind
-b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_:
-C).(\lambda (w: T).(ty3 g c2 u w)))) (ex3 C (\lambda (c4: C).(eq C c0 (CHead
-c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_:
-C).(\forall (w: T).((ty3 g c2 u w) \to False)))) (eq C (CHead c3 (Bind b) u)
-c0) (\lambda (H5: (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead
-c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda
-(_: C).(\lambda (w: T).(ty3 g c2 u w))))).(ex3_2_ind C T (\lambda (c4:
-C).(\lambda (_: T).(eq C c0 (CHead c4 (Bind b) u)))) (\lambda (c4:
-C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_: C).(\lambda (w: T).(ty3 g c2
-u w))) (eq C (CHead c3 (Bind b) u) c0) (\lambda (x0: C).(\lambda (x1:
-T).(\lambda (H6: (eq C c0 (CHead x0 (Bind b) u))).(\lambda (H7: (wf3 g c2
-x0)).(\lambda (_: (ty3 g c2 u x1)).(eq_ind_r C (CHead x0 (Bind b) u) (\lambda
-(c4: C).(eq C (CHead c3 (Bind b) u) c4)) (f_equal3 C K T C CHead c3 x0 (Bind
-b) (Bind b) u u (H1 x0 H7) (refl_equal K (Bind b)) (refl_equal T u)) c0
-H6)))))) H5)) (\lambda (H5: (ex3 C (\lambda (c4: C).(eq C c0 (CHead c4 (Bind
-Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: C).(\forall
-(w: T).((ty3 g c2 u w) \to False))))).(ex3_ind C (\lambda (c4: C).(eq C c0
-(CHead c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda
-(_: C).(\forall (w: T).((ty3 g c2 u w) \to False))) (eq C (CHead c3 (Bind b)
-u) c0) (\lambda (x0: C).(\lambda (H6: (eq C c0 (CHead x0 (Bind Void) (TSort
-O)))).(\lambda (_: (wf3 g c2 x0)).(\lambda (H8: ((\forall (w: T).((ty3 g c2 u
-w) \to False)))).(eq_ind_r C (CHead x0 (Bind Void) (TSort O)) (\lambda (c4:
-C).(eq C (CHead c3 (Bind b) u) c4)) (let H_x0 \def (H8 t H2) in (let H9 \def
-H_x0 in (False_ind (eq C (CHead c3 (Bind b) u) (CHead x0 (Bind Void) (TSort
-O))) H9))) c0 H6))))) H5)) H4))))))))))))) (\lambda (c2: C).(\lambda (c3:
-C).(\lambda (_: (wf3 g c2 c3)).(\lambda (H1: ((\forall (c4: C).((wf3 g c2 c4)
-\to (eq C c3 c4))))).(\lambda (u: T).(\lambda (H2: ((\forall (t: T).((ty3 g
-c2 u t) \to False)))).(\lambda (b: B).(\lambda (c0: C).(\lambda (H3: (wf3 g
-(CHead c2 (Bind b) u) c0)).(let H_x \def (wf3_gen_bind1 g c2 c0 u b H3) in
-(let H4 \def H_x in (or_ind (ex3_2 C T (\lambda (c4: C).(\lambda (_: T).(eq C
-c0 (CHead c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4)))
-(\lambda (_: C).(\lambda (w: T).(ty3 g c2 u w)))) (ex3 C (\lambda (c4: C).(eq
-C c0 (CHead c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4))
-(\lambda (_: C).(\forall (w: T).((ty3 g c2 u w) \to False)))) (eq C (CHead c3
-(Bind Void) (TSort O)) c0) (\lambda (H5: (ex3_2 C T (\lambda (c4: C).(\lambda
-(_: T).(eq C c0 (CHead c4 (Bind b) u)))) (\lambda (c4: C).(\lambda (_:
-T).(wf3 g c2 c4))) (\lambda (_: C).(\lambda (w: T).(ty3 g c2 u
-w))))).(ex3_2_ind C T (\lambda (c4: C).(\lambda (_: T).(eq C c0 (CHead c4
-(Bind b) u)))) (\lambda (c4: C).(\lambda (_: T).(wf3 g c2 c4))) (\lambda (_:
-C).(\lambda (w: T).(ty3 g c2 u w))) (eq C (CHead c3 (Bind Void) (TSort O))
-c0) (\lambda (x0: C).(\lambda (x1: T).(\lambda (H6: (eq C c0 (CHead x0 (Bind
-b) u))).(\lambda (_: (wf3 g c2 x0)).(\lambda (H8: (ty3 g c2 u x1)).(eq_ind_r
-C (CHead x0 (Bind b) u) (\lambda (c4: C).(eq C (CHead c3 (Bind Void) (TSort
-O)) c4)) (let H_x0 \def (H2 x1 H8) in (let H9 \def H_x0 in (False_ind (eq C
-(CHead c3 (Bind Void) (TSort O)) (CHead x0 (Bind b) u)) H9))) c0 H6))))))
-H5)) (\lambda (H5: (ex3 C (\lambda (c4: C).(eq C c0 (CHead c4 (Bind Void)
-(TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_: C).(\forall (w:
-T).((ty3 g c2 u w) \to False))))).(ex3_ind C (\lambda (c4: C).(eq C c0 (CHead
-c4 (Bind Void) (TSort O)))) (\lambda (c4: C).(wf3 g c2 c4)) (\lambda (_:
-C).(\forall (w: T).((ty3 g c2 u w) \to False))) (eq C (CHead c3 (Bind Void)
-(TSort O)) c0) (\lambda (x0: C).(\lambda (H6: (eq C c0 (CHead x0 (Bind Void)
-(TSort O)))).(\lambda (H7: (wf3 g c2 x0)).(\lambda (_: ((\forall (w: T).((ty3
-g c2 u w) \to False)))).(eq_ind_r C (CHead x0 (Bind Void) (TSort O)) (\lambda
-(c4: C).(eq C (CHead c3 (Bind Void) (TSort O)) c4)) (f_equal3 C K T C CHead
-c3 x0 (Bind Void) (Bind Void) (TSort O) (TSort O) (H1 x0 H7) (refl_equal K
-(Bind Void)) (refl_equal T (TSort O))) c0 H6))))) H5)) H4))))))))))))
-(\lambda (c2: C).(\lambda (c3: C).(\lambda (_: (wf3 g c2 c3)).(\lambda (H1:
-((\forall (c4: C).((wf3 g c2 c4) \to (eq C c3 c4))))).(\lambda (u:
-T).(\lambda (f: F).(\lambda (c0: C).(\lambda (H2: (wf3 g (CHead c2 (Flat f)
-u) c0)).(let H_y \def (wf3_gen_flat1 g c2 c0 u f H2) in (H1 c0 H_y))))))))))
-c c1 H)))).
-
-theorem wf3_clear_conf:
- \forall (c1: C).(\forall (c: C).((clear c1 c) \to (\forall (g: G).(\forall
-(c2: C).((wf3 g c1 c2) \to (wf3 g c c2))))))
-\def
- \lambda (c1: C).(\lambda (c: C).(\lambda (H: (clear c1 c)).(clear_ind
-(\lambda (c0: C).(\lambda (c2: C).(\forall (g: G).(\forall (c3: C).((wf3 g c0
-c3) \to (wf3 g c2 c3)))))) (\lambda (b: B).(\lambda (e: C).(\lambda (u:
-T).(\lambda (g: G).(\lambda (c2: C).(\lambda (H0: (wf3 g (CHead e (Bind b) u)
-c2)).H0)))))) (\lambda (e: C).(\lambda (c0: C).(\lambda (_: (clear e
-c0)).(\lambda (H1: ((\forall (g: G).(\forall (c2: C).((wf3 g e c2) \to (wf3 g
-c0 c2)))))).(\lambda (f: F).(\lambda (u: T).(\lambda (g: G).(\lambda (c2:
-C).(\lambda (H2: (wf3 g (CHead e (Flat f) u) c2)).(let H_y \def
-(wf3_gen_flat1 g e c2 u f H2) in (H1 g c2 H_y))))))))))) c1 c H))).
-
-theorem clear_wf3_trans:
- \forall (c1: C).(\forall (d1: C).((clear c1 d1) \to (\forall (g: G).(\forall
-(d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda
-(c2: C).(clear c2 d2))))))))
-\def
- \lambda (c1: C).(\lambda (d1: C).(\lambda (H: (clear c1 d1)).(clear_ind
-(\lambda (c: C).(\lambda (c0: C).(\forall (g: G).(\forall (d2: C).((wf3 g c0
-d2) \to (ex2 C (\lambda (c2: C).(wf3 g c c2)) (\lambda (c2: C).(clear c2
-d2)))))))) (\lambda (b: B).(\lambda (e: C).(\lambda (u: T).(\lambda (g:
-G).(\lambda (d2: C).(\lambda (H0: (wf3 g (CHead e (Bind b) u) d2)).(let H_x
-\def (wf3_gen_bind1 g e d2 u b H0) in (let H1 \def H_x in (or_ind (ex3_2 C T
-(\lambda (c2: C).(\lambda (_: T).(eq C d2 (CHead c2 (Bind b) u)))) (\lambda
-(c2: C).(\lambda (_: T).(wf3 g e c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g
-e u w)))) (ex3 C (\lambda (c2: C).(eq C d2 (CHead c2 (Bind Void) (TSort O))))
-(\lambda (c2: C).(wf3 g e c2)) (\lambda (_: C).(\forall (w: T).((ty3 g e u w)
-\to False)))) (ex2 C (\lambda (c2: C).(wf3 g (CHead e (Bind b) u) c2))
-(\lambda (c2: C).(clear c2 d2))) (\lambda (H2: (ex3_2 C T (\lambda (c2:
-C).(\lambda (_: T).(eq C d2 (CHead c2 (Bind b) u)))) (\lambda (c2:
-C).(\lambda (_: T).(wf3 g e c2))) (\lambda (_: C).(\lambda (w: T).(ty3 g e u
-w))))).(ex3_2_ind C T (\lambda (c2: C).(\lambda (_: T).(eq C d2 (CHead c2
-(Bind b) u)))) (\lambda (c2: C).(\lambda (_: T).(wf3 g e c2))) (\lambda (_:
-C).(\lambda (w: T).(ty3 g e u w))) (ex2 C (\lambda (c2: C).(wf3 g (CHead e
-(Bind b) u) c2)) (\lambda (c2: C).(clear c2 d2))) (\lambda (x0: C).(\lambda
-(x1: T).(\lambda (H3: (eq C d2 (CHead x0 (Bind b) u))).(\lambda (H4: (wf3 g e
-x0)).(\lambda (H5: (ty3 g e u x1)).(eq_ind_r C (CHead x0 (Bind b) u) (\lambda
-(c: C).(ex2 C (\lambda (c2: C).(wf3 g (CHead e (Bind b) u) c2)) (\lambda (c2:
-C).(clear c2 c)))) (ex_intro2 C (\lambda (c2: C).(wf3 g (CHead e (Bind b) u)
-c2)) (\lambda (c2: C).(clear c2 (CHead x0 (Bind b) u))) (CHead x0 (Bind b) u)
-(wf3_bind g e x0 H4 u x1 H5 b) (clear_bind b x0 u)) d2 H3)))))) H2)) (\lambda
-(H2: (ex3 C (\lambda (c2: C).(eq C d2 (CHead c2 (Bind Void) (TSort O))))
-(\lambda (c2: C).(wf3 g e c2)) (\lambda (_: C).(\forall (w: T).((ty3 g e u w)
-\to False))))).(ex3_ind C (\lambda (c2: C).(eq C d2 (CHead c2 (Bind Void)
-(TSort O)))) (\lambda (c2: C).(wf3 g e c2)) (\lambda (_: C).(\forall (w:
-T).((ty3 g e u w) \to False))) (ex2 C (\lambda (c2: C).(wf3 g (CHead e (Bind
-b) u) c2)) (\lambda (c2: C).(clear c2 d2))) (\lambda (x0: C).(\lambda (H3:
-(eq C d2 (CHead x0 (Bind Void) (TSort O)))).(\lambda (H4: (wf3 g e
-x0)).(\lambda (H5: ((\forall (w: T).((ty3 g e u w) \to False)))).(eq_ind_r C
-(CHead x0 (Bind Void) (TSort O)) (\lambda (c: C).(ex2 C (\lambda (c2: C).(wf3
-g (CHead e (Bind b) u) c2)) (\lambda (c2: C).(clear c2 c)))) (ex_intro2 C
-(\lambda (c2: C).(wf3 g (CHead e (Bind b) u) c2)) (\lambda (c2: C).(clear c2
-(CHead x0 (Bind Void) (TSort O)))) (CHead x0 (Bind Void) (TSort O)) (wf3_void
-g e x0 H4 u H5 b) (clear_bind Void x0 (TSort O))) d2 H3))))) H2)) H1)))))))))
-(\lambda (e: C).(\lambda (c: C).(\lambda (_: (clear e c)).(\lambda (H1:
-((\forall (g: G).(\forall (d2: C).((wf3 g c d2) \to (ex2 C (\lambda (c2:
-C).(wf3 g e c2)) (\lambda (c2: C).(clear c2 d2)))))))).(\lambda (f:
-F).(\lambda (u: T).(\lambda (g: G).(\lambda (d2: C).(\lambda (H2: (wf3 g c
-d2)).(let H_x \def (H1 g d2 H2) in (let H3 \def H_x in (ex2_ind C (\lambda
-(c2: C).(wf3 g e c2)) (\lambda (c2: C).(clear c2 d2)) (ex2 C (\lambda (c2:
-C).(wf3 g (CHead e (Flat f) u) c2)) (\lambda (c2: C).(clear c2 d2))) (\lambda
-(x: C).(\lambda (H4: (wf3 g e x)).(\lambda (H5: (clear x d2)).(ex_intro2 C
-(\lambda (c2: C).(wf3 g (CHead e (Flat f) u) c2)) (\lambda (c2: C).(clear c2
-d2)) x (wf3_flat g e x H4 u f) H5)))) H3)))))))))))) c1 d1 H))).
-
-theorem wf3_getl_conf:
- \forall (b: B).(\forall (i: nat).(\forall (c1: C).(\forall (d1: C).(\forall
-(v: T).((getl i c1 (CHead d1 (Bind b) v)) \to (\forall (g: G).(\forall (c2:
-C).((wf3 g c1 c2) \to (\forall (w: T).((ty3 g d1 v w) \to (ex2 C (\lambda
-(d2: C).(getl i c2 (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1
-d2)))))))))))))
-\def
- \lambda (b: B).(\lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1:
-C).(\forall (d1: C).(\forall (v: T).((getl n c1 (CHead d1 (Bind b) v)) \to
-(\forall (g: G).(\forall (c2: C).((wf3 g c1 c2) \to (\forall (w: T).((ty3 g
-d1 v w) \to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind b) v)))
-(\lambda (d2: C).(wf3 g d1 d2))))))))))))) (\lambda (c1: C).(\lambda (d1:
-C).(\lambda (v: T).(\lambda (H: (getl O c1 (CHead d1 (Bind b) v))).(\lambda
-(g: G).(\lambda (c2: C).(\lambda (H0: (wf3 g c1 c2)).(\lambda (w: T).(\lambda
-(H1: (ty3 g d1 v w)).(let H_y \def (wf3_clear_conf c1 (CHead d1 (Bind b) v)
-(getl_gen_O c1 (CHead d1 (Bind b) v) H) g c2 H0) in (let H_x \def
-(wf3_gen_bind1 g d1 c2 v b H_y) in (let H2 \def H_x in (or_ind (ex3_2 C T
-(\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda
-(c3: C).(\lambda (_: T).(wf3 g d1 c3))) (\lambda (_: C).(\lambda (w0: T).(ty3
-g d1 v w0)))) (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort
-O)))) (\lambda (c3: C).(wf3 g d1 c3)) (\lambda (_: C).(\forall (w0: T).((ty3
-g d1 v w0) \to False)))) (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind
-b) v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (H3: (ex3_2 C T (\lambda
-(c3: C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b) v)))) (\lambda (c3:
-C).(\lambda (_: T).(wf3 g d1 c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 g d1
-v w0))))).(ex3_2_ind C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3
-(Bind b) v)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g d1 c3))) (\lambda (_:
-C).(\lambda (w0: T).(ty3 g d1 v w0))) (ex2 C (\lambda (d2: C).(getl O c2
-(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (x0:
-C).(\lambda (x1: T).(\lambda (H4: (eq C c2 (CHead x0 (Bind b) v))).(\lambda
-(H5: (wf3 g d1 x0)).(\lambda (_: (ty3 g d1 v x1)).(eq_ind_r C (CHead x0 (Bind
-b) v) (\lambda (c: C).(ex2 C (\lambda (d2: C).(getl O c (CHead d2 (Bind b)
-v))) (\lambda (d2: C).(wf3 g d1 d2)))) (ex_intro2 C (\lambda (d2: C).(getl O
-(CHead x0 (Bind b) v) (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))
-x0 (getl_refl b x0 v) H5) c2 H4)))))) H3)) (\lambda (H3: (ex3 C (\lambda (c3:
-C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g d1
-c3)) (\lambda (_: C).(\forall (w0: T).((ty3 g d1 v w0) \to
-False))))).(ex3_ind C (\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort
-O)))) (\lambda (c3: C).(wf3 g d1 c3)) (\lambda (_: C).(\forall (w0: T).((ty3
-g d1 v w0) \to False))) (ex2 C (\lambda (d2: C).(getl O c2 (CHead d2 (Bind b)
-v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (x0: C).(\lambda (H4: (eq C c2
-(CHead x0 (Bind Void) (TSort O)))).(\lambda (_: (wf3 g d1 x0)).(\lambda (H6:
-((\forall (w0: T).((ty3 g d1 v w0) \to False)))).(eq_ind_r C (CHead x0 (Bind
-Void) (TSort O)) (\lambda (c: C).(ex2 C (\lambda (d2: C).(getl O c (CHead d2
-(Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))) (let H_x0 \def (H6 w H1) in
-(let H7 \def H_x0 in (False_ind (ex2 C (\lambda (d2: C).(getl O (CHead x0
-(Bind Void) (TSort O)) (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1
-d2))) H7))) c2 H4))))) H3)) H2))))))))))))) (\lambda (n: nat).(\lambda (H:
-((\forall (c1: C).(\forall (d1: C).(\forall (v: T).((getl n c1 (CHead d1
-(Bind b) v)) \to (\forall (g: G).(\forall (c2: C).((wf3 g c1 c2) \to (\forall
-(w: T).((ty3 g d1 v w) \to (ex2 C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind
-b) v))) (\lambda (d2: C).(wf3 g d1 d2)))))))))))))).(\lambda (c1: C).(C_ind
-(\lambda (c: C).(\forall (d1: C).(\forall (v: T).((getl (S n) c (CHead d1
-(Bind b) v)) \to (\forall (g: G).(\forall (c2: C).((wf3 g c c2) \to (\forall
-(w: T).((ty3 g d1 v w) \to (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2
-(Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))))))))))) (\lambda (n0:
-nat).(\lambda (d1: C).(\lambda (v: T).(\lambda (H0: (getl (S n) (CSort n0)
-(CHead d1 (Bind b) v))).(\lambda (g: G).(\lambda (c2: C).(\lambda (_: (wf3 g
-(CSort n0) c2)).(\lambda (w: T).(\lambda (_: (ty3 g d1 v w)).(getl_gen_sort
-n0 (S n) (CHead d1 (Bind b) v) H0 (ex2 C (\lambda (d2: C).(getl (S n) c2
-(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))))))))))))) (\lambda
-(c: C).(\lambda (H0: ((\forall (d1: C).(\forall (v: T).((getl (S n) c (CHead
-d1 (Bind b) v)) \to (\forall (g: G).(\forall (c2: C).((wf3 g c c2) \to
-(\forall (w: T).((ty3 g d1 v w) \to (ex2 C (\lambda (d2: C).(getl (S n) c2
-(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))))))))))))).(\lambda
-(k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda (v: T).(\lambda (H1: (getl
-(S n) (CHead c k t) (CHead d1 (Bind b) v))).(\lambda (g: G).(\lambda (c2:
-C).(\lambda (H2: (wf3 g (CHead c k t) c2)).(\lambda (w: T).(\lambda (H3: (ty3
-g d1 v w)).(K_ind (\lambda (k0: K).((wf3 g (CHead c k0 t) c2) \to ((getl (r
-k0 n) c (CHead d1 (Bind b) v)) \to (ex2 C (\lambda (d2: C).(getl (S n) c2
-(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))))) (\lambda (b0:
-B).(\lambda (H4: (wf3 g (CHead c (Bind b0) t) c2)).(\lambda (H5: (getl (r
-(Bind b0) n) c (CHead d1 (Bind b) v))).(let H_x \def (wf3_gen_bind1 g c c2 t
-b0 H4) in (let H6 \def H_x in (or_ind (ex3_2 C T (\lambda (c3: C).(\lambda
-(_: T).(eq C c2 (CHead c3 (Bind b0) t)))) (\lambda (c3: C).(\lambda (_:
-T).(wf3 g c c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 g c t w0)))) (ex3 C
-(\lambda (c3: C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3:
-C).(wf3 g c c3)) (\lambda (_: C).(\forall (w0: T).((ty3 g c t w0) \to
-False)))) (ex2 C (\lambda (d2: C).(getl (S n) c2 (CHead d2 (Bind b) v)))
-(\lambda (d2: C).(wf3 g d1 d2))) (\lambda (H7: (ex3_2 C T (\lambda (c3:
-C).(\lambda (_: T).(eq C c2 (CHead c3 (Bind b0) t)))) (\lambda (c3:
-C).(\lambda (_: T).(wf3 g c c3))) (\lambda (_: C).(\lambda (w0: T).(ty3 g c t
-w0))))).(ex3_2_ind C T (\lambda (c3: C).(\lambda (_: T).(eq C c2 (CHead c3
-(Bind b0) t)))) (\lambda (c3: C).(\lambda (_: T).(wf3 g c c3))) (\lambda (_:
-C).(\lambda (w0: T).(ty3 g c t w0))) (ex2 C (\lambda (d2: C).(getl (S n) c2
-(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2))) (\lambda (x0:
-C).(\lambda (x1: T).(\lambda (H8: (eq C c2 (CHead x0 (Bind b0) t))).(\lambda
-(H9: (wf3 g c x0)).(\lambda (_: (ty3 g c t x1)).(eq_ind_r C (CHead x0 (Bind
-b0) t) (\lambda (c0: C).(ex2 C (\lambda (d2: C).(getl (S n) c0 (CHead d2
-(Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)))) (let H_x0 \def (H c d1 v H5 g
-x0 H9 w H3) in (let H11 \def H_x0 in (ex2_ind C (\lambda (d2: C).(getl n x0
-(CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1 d2)) (ex2 C (\lambda (d2:
-C).(getl (S n) (CHead x0 (Bind b0) t) (CHead d2 (Bind b) v))) (\lambda (d2:
-C).(wf3 g d1 d2))) (\lambda (x: C).(\lambda (H12: (getl n x0 (CHead x (Bind
-b) v))).(\lambda (H13: (wf3 g d1 x)).(ex_intro2 C (\lambda (d2: C).(getl (S
-n) (CHead x0 (Bind b0) t) (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1
-d2)) x (getl_head (Bind b0) n x0 (CHead x (Bind b) v) H12 t) H13)))) H11)))
-c2 H8)))))) H7)) (\lambda (H7: (ex3 C (\lambda (c3: C).(eq C c2 (CHead c3
-(Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c c3)) (\lambda (_:
-C).(\forall (w0: T).((ty3 g c t w0) \to False))))).(ex3_ind C (\lambda (c3:
-C).(eq C c2 (CHead c3 (Bind Void) (TSort O)))) (\lambda (c3: C).(wf3 g c c3))
-(\lambda (_: C).(\forall (w0: T).((ty3 g c t w0) \to False))) (ex2 C (\lambda
-(d2: C).(getl (S n) c2 (CHead d2 (Bind b) v))) (\lambda (d2: C).(wf3 g d1
-d2))) (\lambda (x0: C).(\lambda (H8: (eq C c2 (CHead x0 (Bind Void) (TSort
-O)))).(\lambda (H9: (wf3 g c x0)).(\lambda (_: ((\forall (w0: T).((ty3 g c t
-w0) \to False)))).(eq_ind_r C (CHead x0 (Bind Void) (TSort O)) (\lambda (c0:
-C).(ex2 C (\lambda (d2: C).(getl (S n) c0 (CHead d2 (Bind b) v))) (\lambda
-(d2: C).(wf3 g d1 d2)))) (let H_x0 \def (H c d1 v H5 g x0 H9 w H3) in (let
-H11 \def H_x0 in (ex2_ind C (\lambda (d2: C).(getl n x0 (CHead d2 (Bind b)
-v))) (\lambda (d2: C).(wf3 g d1 d2)) (ex2 C (\lambda (d2: C).(getl (S n)
-(CHead x0 (Bind Void) (TSort O)) (CHead d2 (Bind b) v))) (\lambda (d2:
-C).(wf3 g d1 d2))) (\lambda (x: C).(\lambda (H12: (getl n x0 (CHead x (Bind
-b) v))).(\lambda (H13: (wf3 g d1 x)).(ex_intro2 C (\lambda (d2: C).(getl (S
-n) (CHead x0 (Bind Void) (TSort O)) (CHead d2 (Bind b) v))) (\lambda (d2:
-C).(wf3 g d1 d2)) x (getl_head (Bind Void) n x0 (CHead x (Bind b) v) H12
-(TSort O)) H13)))) H11))) c2 H8))))) H7)) H6)))))) (\lambda (f: F).(\lambda
-(H4: (wf3 g (CHead c (Flat f) t) c2)).(\lambda (H5: (getl (r (Flat f) n) c
-(CHead d1 (Bind b) v))).(let H_y \def (wf3_gen_flat1 g c c2 t f H4) in (H0 d1
-v H5 g c2 H_y w H3))))) k H2 (getl_gen_S k c (CHead d1 (Bind b) v) t n
-H1)))))))))))))) c1)))) i)).
-
-theorem wf3_total:
- \forall (g: G).(\forall (c1: C).(ex C (\lambda (c2: C).(wf3 g c1 c2))))
-\def
- \lambda (g: G).(\lambda (c1: C).(C_ind (\lambda (c: C).(ex C (\lambda (c2:
-C).(wf3 g c c2)))) (\lambda (n: nat).(ex_intro C (\lambda (c2: C).(wf3 g
-(CSort n) c2)) (CSort n) (wf3_sort g n))) (\lambda (c: C).(\lambda (H: (ex C
-(\lambda (c2: C).(wf3 g c c2)))).(\lambda (k: K).(\lambda (t: T).(let H0 \def
-H in (ex_ind C (\lambda (c2: C).(wf3 g c c2)) (ex C (\lambda (c2: C).(wf3 g
-(CHead c k t) c2))) (\lambda (x: C).(\lambda (H1: (wf3 g c x)).(K_ind
-(\lambda (k0: K).(ex C (\lambda (c2: C).(wf3 g (CHead c k0 t) c2)))) (\lambda
-(b: B).(let H_x \def (ty3_inference g c t) in (let H2 \def H_x in (or_ind (ex
-T (\lambda (t2: T).(ty3 g c t t2))) (\forall (t2: T).((ty3 g c t t2) \to
-False)) (ex C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2))) (\lambda
-(H3: (ex T (\lambda (t2: T).(ty3 g c t t2)))).(ex_ind T (\lambda (t2: T).(ty3
-g c t t2)) (ex C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2))) (\lambda
-(x0: T).(\lambda (H4: (ty3 g c t x0)).(ex_intro C (\lambda (c2: C).(wf3 g
-(CHead c (Bind b) t) c2)) (CHead x (Bind b) t) (wf3_bind g c x H1 t x0 H4
-b)))) H3)) (\lambda (H3: ((\forall (t2: T).((ty3 g c t t2) \to
-False)))).(ex_intro C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2))
-(CHead x (Bind Void) (TSort O)) (wf3_void g c x H1 t H3 b))) H2)))) (\lambda
-(f: F).(ex_intro C (\lambda (c2: C).(wf3 g (CHead c (Flat f) t) c2)) x
-(wf3_flat g c x H1 t f))) k))) H0)))))) c1)).
-
-theorem getl_wf3_trans:
- \forall (i: nat).(\forall (c1: C).(\forall (d1: C).((getl i c1 d1) \to
-(\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2:
-C).(wf3 g c1 c2)) (\lambda (c2: C).(getl i c2 d2)))))))))
-\def
- \lambda (i: nat).(nat_ind (\lambda (n: nat).(\forall (c1: C).(\forall (d1:
-C).((getl n c1 d1) \to (\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to
-(ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(getl n c2
-d2)))))))))) (\lambda (c1: C).(\lambda (d1: C).(\lambda (H: (getl O c1
-d1)).(\lambda (g: G).(\lambda (d2: C).(\lambda (H0: (wf3 g d1 d2)).(let H_x
-\def (clear_wf3_trans c1 d1 (getl_gen_O c1 d1 H) g d2 H0) in (let H1 \def H_x
-in (ex2_ind C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(clear c2 d2))
-(ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(getl O c2 d2)))
-(\lambda (x: C).(\lambda (H2: (wf3 g c1 x)).(\lambda (H3: (clear x
-d2)).(ex_intro2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(getl O c2
-d2)) x H2 (getl_intro O x d2 x (drop_refl x) H3))))) H1))))))))) (\lambda (n:
-nat).(\lambda (H: ((\forall (c1: C).(\forall (d1: C).((getl n c1 d1) \to
-(\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2:
-C).(wf3 g c1 c2)) (\lambda (c2: C).(getl n c2 d2))))))))))).(\lambda (c1:
-C).(C_ind (\lambda (c: C).(\forall (d1: C).((getl (S n) c d1) \to (\forall
-(g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda (c2: C).(wf3 g c
-c2)) (\lambda (c2: C).(getl (S n) c2 d2))))))))) (\lambda (n0: nat).(\lambda
-(d1: C).(\lambda (H0: (getl (S n) (CSort n0) d1)).(\lambda (g: G).(\lambda
-(d2: C).(\lambda (_: (wf3 g d1 d2)).(getl_gen_sort n0 (S n) d1 H0 (ex2 C
-(\lambda (c2: C).(wf3 g (CSort n0) c2)) (\lambda (c2: C).(getl (S n) c2
-d2)))))))))) (\lambda (c: C).(\lambda (H0: ((\forall (d1: C).((getl (S n) c
-d1) \to (\forall (g: G).(\forall (d2: C).((wf3 g d1 d2) \to (ex2 C (\lambda
-(c2: C).(wf3 g c c2)) (\lambda (c2: C).(getl (S n) c2 d2)))))))))).(\lambda
-(k: K).(\lambda (t: T).(\lambda (d1: C).(\lambda (H1: (getl (S n) (CHead c k
-t) d1)).(\lambda (g: G).(\lambda (d2: C).(\lambda (H2: (wf3 g d1 d2)).(K_ind
-(\lambda (k0: K).((getl (r k0 n) c d1) \to (ex2 C (\lambda (c2: C).(wf3 g
-(CHead c k0 t) c2)) (\lambda (c2: C).(getl (S n) c2 d2))))) (\lambda (b:
-B).(\lambda (H3: (getl (r (Bind b) n) c d1)).(let H_x \def (H c d1 H3 g d2
-H2) in (let H4 \def H_x in (ex2_ind C (\lambda (c2: C).(wf3 g c c2)) (\lambda
-(c2: C).(getl n c2 d2)) (ex2 C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t)
-c2)) (\lambda (c2: C).(getl (S n) c2 d2))) (\lambda (x: C).(\lambda (H5: (wf3
-g c x)).(\lambda (H6: (getl n x d2)).(let H_x0 \def (ty3_inference g c t) in
-(let H7 \def H_x0 in (or_ind (ex T (\lambda (t2: T).(ty3 g c t t2))) (\forall
-(t2: T).((ty3 g c t t2) \to False)) (ex2 C (\lambda (c2: C).(wf3 g (CHead c
-(Bind b) t) c2)) (\lambda (c2: C).(getl (S n) c2 d2))) (\lambda (H8: (ex T
-(\lambda (t2: T).(ty3 g c t t2)))).(ex_ind T (\lambda (t2: T).(ty3 g c t t2))
-(ex2 C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2)) (\lambda (c2:
-C).(getl (S n) c2 d2))) (\lambda (x0: T).(\lambda (H9: (ty3 g c t
-x0)).(ex_intro2 C (\lambda (c2: C).(wf3 g (CHead c (Bind b) t) c2)) (\lambda
-(c2: C).(getl (S n) c2 d2)) (CHead x (Bind b) t) (wf3_bind g c x H5 t x0 H9
-b) (getl_head (Bind b) n x d2 H6 t)))) H8)) (\lambda (H8: ((\forall (t2:
-T).((ty3 g c t t2) \to False)))).(ex_intro2 C (\lambda (c2: C).(wf3 g (CHead
-c (Bind b) t) c2)) (\lambda (c2: C).(getl (S n) c2 d2)) (CHead x (Bind Void)
-(TSort O)) (wf3_void g c x H5 t H8 b) (getl_head (Bind Void) n x d2 H6 (TSort
-O)))) H7)))))) H4))))) (\lambda (f: F).(\lambda (H3: (getl (r (Flat f) n) c
-d1)).(let H_x \def (H0 d1 H3 g d2 H2) in (let H4 \def H_x in (ex2_ind C
-(\lambda (c2: C).(wf3 g c c2)) (\lambda (c2: C).(getl (S n) c2 d2)) (ex2 C
-(\lambda (c2: C).(wf3 g (CHead c (Flat f) t) c2)) (\lambda (c2: C).(getl (S
-n) c2 d2))) (\lambda (x: C).(\lambda (H5: (wf3 g c x)).(\lambda (H6: (getl (S
-n) x d2)).(ex_intro2 C (\lambda (c2: C).(wf3 g (CHead c (Flat f) t) c2))
-(\lambda (c2: C).(getl (S n) c2 d2)) x (wf3_flat g c x H5 t f) H6)))) H4)))))
-k (getl_gen_S k c d1 t n H1))))))))))) c1)))) i).
-
-theorem ty3_shift1:
- \forall (g: G).(\forall (c: C).((wf3 g c c) \to (\forall (t1: T).(\forall
-(t2: T).((ty3 g c t1 t2) \to (ty3 g (CSort (cbk c)) (app1 c t1) (app1 c
-t2)))))))
-\def
- \lambda (g: G).(\lambda (c: C).(\lambda (H: (wf3 g c c)).(insert_eq C c
-(\lambda (c0: C).(wf3 g c0 c)) (\lambda (c0: C).(\forall (t1: T).(\forall
-(t2: T).((ty3 g c0 t1 t2) \to (ty3 g (CSort (cbk c0)) (app1 c0 t1) (app1 c0
-t2)))))) (\lambda (y: C).(\lambda (H0: (wf3 g y c)).(wf3_ind g (\lambda (c0:
-C).(\lambda (c1: C).((eq C c0 c1) \to (\forall (t1: T).(\forall (t2: T).((ty3
-g c0 t1 t2) \to (ty3 g (CSort (cbk c0)) (app1 c0 t1) (app1 c0 t2))))))))
-(\lambda (m: nat).(\lambda (_: (eq C (CSort m) (CSort m))).(\lambda (t1:
-T).(\lambda (t2: T).(\lambda (H2: (ty3 g (CSort m) t1 t2)).H2))))) (\lambda
-(c1: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2: (((eq C
-c1 c2) \to (\forall (t1: T).(\forall (t2: T).((ty3 g c1 t1 t2) \to (ty3 g
-(CSort (cbk c1)) (app1 c1 t1) (app1 c1 t2)))))))).(\lambda (u: T).(\lambda
-(t: T).(\lambda (H3: (ty3 g c1 u t)).(\lambda (b: B).(\lambda (H4: (eq C
-(CHead c1 (Bind b) u) (CHead c2 (Bind b) u))).(\lambda (t1: T).(\lambda (t2:
-T).(\lambda (H5: (ty3 g (CHead c1 (Bind b) u) t1 t2)).(let H6 \def (f_equal C
-C (\lambda (e: C).(match e in C return (\lambda (_: C).C) with [(CSort _)
-\Rightarrow c1 | (CHead c0 _ _) \Rightarrow c0])) (CHead c1 (Bind b) u)
-(CHead c2 (Bind b) u) H4) in (let H7 \def (eq_ind_r C c2 (\lambda (c0:
-C).((eq C c1 c0) \to (\forall (t3: T).(\forall (t4: T).((ty3 g c1 t3 t4) \to
-(ty3 g (CSort (cbk c1)) (app1 c1 t3) (app1 c1 t4))))))) H2 c1 H6) in (let H8
-\def (eq_ind_r C c2 (\lambda (c0: C).(wf3 g c1 c0)) H1 c1 H6) in (ex_ind T
-(\lambda (t0: T).(ty3 g (CHead c1 (Bind b) u) t2 t0)) (ty3 g (CSort (cbk c1))
-(app1 c1 (THead (Bind b) u t1)) (app1 c1 (THead (Bind b) u t2))) (\lambda (x:
-T).(\lambda (_: (ty3 g (CHead c1 (Bind b) u) t2 x)).(H7 (refl_equal C c1)
-(THead (Bind b) u t1) (THead (Bind b) u t2) (ty3_bind g c1 u t H3 b t1 t2
-H5)))) (ty3_correct g (CHead c1 (Bind b) u) t1 t2 H5)))))))))))))))))
-(\lambda (c1: C).(\lambda (c2: C).(\lambda (H1: (wf3 g c1 c2)).(\lambda (H2:
-(((eq C c1 c2) \to (\forall (t1: T).(\forall (t2: T).((ty3 g c1 t1 t2) \to
-(ty3 g (CSort (cbk c1)) (app1 c1 t1) (app1 c1 t2)))))))).(\lambda (u:
-T).(\lambda (H3: ((\forall (t: T).((ty3 g c1 u t) \to False)))).(\lambda (b:
-B).(\lambda (H4: (eq C (CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort
-O)))).(\lambda (t1: T).(\lambda (t2: T).(\lambda (H5: (ty3 g (CHead c1 (Bind
-b) u) t1 t2)).(let H6 \def (f_equal C C (\lambda (e: C).(match e in C return
-(\lambda (_: C).C) with [(CSort _) \Rightarrow c1 | (CHead c0 _ _)
-\Rightarrow c0])) (CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O)) H4)
-in ((let H7 \def (f_equal C B (\lambda (e: C).(match e in C return (\lambda
-(_: C).B) with [(CSort _) \Rightarrow b | (CHead _ k _) \Rightarrow (match k
-in K return (\lambda (_: K).B) with [(Bind b0) \Rightarrow b0 | (Flat _)
-\Rightarrow b])])) (CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O)) H4)
-in ((let H8 \def (f_equal C T (\lambda (e: C).(match e in C return (\lambda
-(_: C).T) with [(CSort _) \Rightarrow u | (CHead _ _ t) \Rightarrow t]))
-(CHead c1 (Bind b) u) (CHead c2 (Bind Void) (TSort O)) H4) in (\lambda (H9:
-(eq B b Void)).(\lambda (H10: (eq C c1 c2)).(let H11 \def (eq_ind B b
-(\lambda (b0: B).(ty3 g (CHead c1 (Bind b0) u) t1 t2)) H5 Void H9) in
-(eq_ind_r B Void (\lambda (b0: B).(ty3 g (CSort (cbk (CHead c1 (Bind b0) u)))
-(app1 (CHead c1 (Bind b0) u) t1) (app1 (CHead c1 (Bind b0) u) t2))) (let H12
-\def (eq_ind T u (\lambda (t: T).(ty3 g (CHead c1 (Bind Void) t) t1 t2)) H11
-(TSort O) H8) in (let H13 \def (eq_ind T u (\lambda (t: T).(\forall (t0:
-T).((ty3 g c1 t t0) \to False))) H3 (TSort O) H8) in (eq_ind_r T (TSort O)
-(\lambda (t: T).(ty3 g (CSort (cbk (CHead c1 (Bind Void) t))) (app1 (CHead c1
-(Bind Void) t) t1) (app1 (CHead c1 (Bind Void) t) t2))) (let H14 \def
-(eq_ind_r C c2 (\lambda (c0: C).((eq C c1 c0) \to (\forall (t3: T).(\forall
-(t4: T).((ty3 g c1 t3 t4) \to (ty3 g (CSort (cbk c1)) (app1 c1 t3) (app1 c1
-t4))))))) H2 c1 H10) in (let H15 \def (eq_ind_r C c2 (\lambda (c0: C).(wf3 g
-c1 c0)) H1 c1 H10) in (ex_ind T (\lambda (t: T).(ty3 g (CHead c1 (Bind Void)
-(TSort O)) t2 t)) (ty3 g (CSort (cbk c1)) (app1 c1 (THead (Bind Void) (TSort
-O) t1)) (app1 c1 (THead (Bind Void) (TSort O) t2))) (\lambda (x: T).(\lambda
-(_: (ty3 g (CHead c1 (Bind Void) (TSort O)) t2 x)).(H14 (refl_equal C c1)
-(THead (Bind Void) (TSort O) t1) (THead (Bind Void) (TSort O) t2) (ty3_bind g
-c1 (TSort O) (TSort (next g O)) (ty3_sort g c1 O) Void t1 t2 H12))))
-(ty3_correct g (CHead c1 (Bind Void) (TSort O)) t1 t2 H12)))) u H8))) b
-H9))))) H7)) H6))))))))))))) (\lambda (c1: C).(\lambda (c2: C).(\lambda (H1:
-(wf3 g c1 c2)).(\lambda (H2: (((eq C c1 c2) \to (\forall (t1: T).(\forall
-(t2: T).((ty3 g c1 t1 t2) \to (ty3 g (CSort (cbk c1)) (app1 c1 t1) (app1 c1
-t2)))))))).(\lambda (u: T).(\lambda (f: F).(\lambda (H3: (eq C (CHead c1
-(Flat f) u) c2)).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (ty3 g (CHead
-c1 (Flat f) u) t1 t2)).(let H5 \def (f_equal C C (\lambda (e: C).e) (CHead c1
-(Flat f) u) c2 H3) in (let H6 \def (eq_ind_r C c2 (\lambda (c0: C).((eq C c1
-c0) \to (\forall (t3: T).(\forall (t4: T).((ty3 g c1 t3 t4) \to (ty3 g (CSort
-(cbk c1)) (app1 c1 t3) (app1 c1 t4))))))) H2 (CHead c1 (Flat f) u) H5) in
-(let H7 \def (eq_ind_r C c2 (\lambda (c0: C).(wf3 g c1 c0)) H1 (CHead c1
-(Flat f) u) H5) in (let H_x \def (wf3_gen_head2 g c1 c1 u (Flat f) H7) in
-(let H8 \def H_x in (ex_ind B (\lambda (b: B).(eq K (Flat f) (Bind b))) (ty3
-g (CSort (cbk c1)) (app1 c1 (THead (Flat f) u t1)) (app1 c1 (THead (Flat f) u
-t2))) (\lambda (x: B).(\lambda (H9: (eq K (Flat f) (Bind x))).(let H10 \def
-(eq_ind K (Flat f) (\lambda (ee: K).(match ee in K return (\lambda (_:
-K).Prop) with [(Bind _) \Rightarrow False | (Flat _) \Rightarrow True])) I
-(Bind x) H9) in (False_ind (ty3 g (CSort (cbk c1)) (app1 c1 (THead (Flat f) u
-t1)) (app1 c1 (THead (Flat f) u t2))) H10)))) H8)))))))))))))))) y c H0)))
-H))).
-
-theorem wf3_pr2_conf:
- \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pr2 c1
-t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: T).((ty3 g c1 t1
-u) \to (pr2 c2 t1 t2)))))))))
-\def
- \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda
-(H: (pr2 c1 t1 t2)).(pr2_ind (\lambda (c: C).(\lambda (t: T).(\lambda (t0:
-T).(\forall (c2: C).((wf3 g c c2) \to (\forall (u: T).((ty3 g c t u) \to (pr2
-c2 t t0)))))))) (\lambda (c: C).(\lambda (t3: T).(\lambda (t4: T).(\lambda
-(H0: (pr0 t3 t4)).(\lambda (c2: C).(\lambda (_: (wf3 g c c2)).(\lambda (u:
-T).(\lambda (_: (ty3 g c t3 u)).(pr2_free c2 t3 t4 H0))))))))) (\lambda (c:
-C).(\lambda (d: C).(\lambda (u: T).(\lambda (i: nat).(\lambda (H0: (getl i c
-(CHead d (Bind Abbr) u))).(\lambda (t3: T).(\lambda (t4: T).(\lambda (H1:
-(pr0 t3 t4)).(\lambda (t: T).(\lambda (H2: (subst0 i u t4 t)).(\lambda (c2:
-C).(\lambda (H3: (wf3 g c c2)).(\lambda (u0: T).(\lambda (H4: (ty3 g c t3
-u0)).(let H_y \def (ty3_sred_pr0 t3 t4 H1 g c u0 H4) in (let H_x \def
-(ty3_getl_subst0 g c t4 u0 H_y u t i H2 Abbr d u H0) in (let H5 \def H_x in
-(ex_ind T (\lambda (w: T).(ty3 g d u w)) (pr2 c2 t3 t) (\lambda (x:
-T).(\lambda (H6: (ty3 g d u x)).(let H_x0 \def (wf3_getl_conf Abbr i c d u H0
-g c2 H3 x H6) in (let H7 \def H_x0 in (ex2_ind C (\lambda (d2: C).(getl i c2
-(CHead d2 (Bind Abbr) u))) (\lambda (d2: C).(wf3 g d d2)) (pr2 c2 t3 t)
-(\lambda (x0: C).(\lambda (H8: (getl i c2 (CHead x0 (Bind Abbr) u))).(\lambda
-(_: (wf3 g d x0)).(pr2_delta c2 x0 u i H8 t3 t4 H1 t H2)))) H7)))))
-H5)))))))))))))))))) c1 t1 t2 H))))).
-
-theorem wf3_pr3_conf:
- \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pr3 c1
-t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (\forall (u: T).((ty3 g c1 t1
-u) \to (pr3 c2 t1 t2)))))))))
-\def
- \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda
-(H: (pr3 c1 t1 t2)).(pr3_ind c1 (\lambda (t: T).(\lambda (t0: T).(\forall
-(c2: C).((wf3 g c1 c2) \to (\forall (u: T).((ty3 g c1 t u) \to (pr3 c2 t
-t0))))))) (\lambda (t: T).(\lambda (c2: C).(\lambda (_: (wf3 g c1
-c2)).(\lambda (u: T).(\lambda (_: (ty3 g c1 t u)).(pr3_refl c2 t))))))
-(\lambda (t3: T).(\lambda (t4: T).(\lambda (H0: (pr2 c1 t4 t3)).(\lambda (t5:
-T).(\lambda (_: (pr3 c1 t3 t5)).(\lambda (H2: ((\forall (c2: C).((wf3 g c1
-c2) \to (\forall (u: T).((ty3 g c1 t3 u) \to (pr3 c2 t3 t5))))))).(\lambda
-(c2: C).(\lambda (H3: (wf3 g c1 c2)).(\lambda (u: T).(\lambda (H4: (ty3 g c1
-t4 u)).(pr3_sing c2 t3 t4 (wf3_pr2_conf g c1 t4 t3 H0 c2 H3 u H4) t5 (H2 c2
-H3 u (ty3_sred_pr2 c1 t4 t3 H0 g u H4))))))))))))) t1 t2 H))))).
-
-theorem wf3_pc3_conf:
- \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((pc3 c1
-t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (\forall (u1: T).((ty3 g c1 t1
-u1) \to (\forall (u2: T).((ty3 g c1 t2 u2) \to (pc3 c2 t1 t2)))))))))))
-\def
- \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda
-(H: (pc3 c1 t1 t2)).(\lambda (c2: C).(\lambda (H0: (wf3 g c1 c2)).(\lambda
-(u1: T).(\lambda (H1: (ty3 g c1 t1 u1)).(\lambda (u2: T).(\lambda (H2: (ty3 g
-c1 t2 u2)).(let H3 \def H in (ex2_ind T (\lambda (t: T).(pr3 c1 t1 t))
-(\lambda (t: T).(pr3 c1 t2 t)) (pc3 c2 t1 t2) (\lambda (x: T).(\lambda (H4:
-(pr3 c1 t1 x)).(\lambda (H5: (pr3 c1 t2 x)).(pc3_pr3_t c2 t1 x (wf3_pr3_conf
-g c1 t1 x H4 c2 H0 u1 H1) t2 (wf3_pr3_conf g c1 t2 x H5 c2 H0 u2 H2)))))
-H3)))))))))))).
-
-theorem wf3_ty3_conf:
- \forall (g: G).(\forall (c1: C).(\forall (t1: T).(\forall (t2: T).((ty3 g c1
-t1 t2) \to (\forall (c2: C).((wf3 g c1 c2) \to (ty3 g c2 t1 t2)))))))
-\def
- \lambda (g: G).(\lambda (c1: C).(\lambda (t1: T).(\lambda (t2: T).(\lambda
-(H: (ty3 g c1 t1 t2)).(ty3_ind g (\lambda (c: C).(\lambda (t: T).(\lambda
-(t0: T).(\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 t t0)))))) (\lambda (c:
-C).(\lambda (t3: T).(\lambda (t: T).(\lambda (H0: (ty3 g c t3 t)).(\lambda
-(H1: ((\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 t3 t))))).(\lambda (u:
-T).(\lambda (t4: T).(\lambda (H2: (ty3 g c u t4)).(\lambda (H3: ((\forall
-(c2: C).((wf3 g c c2) \to (ty3 g c2 u t4))))).(\lambda (H4: (pc3 c t4
-t3)).(\lambda (c2: C).(\lambda (H5: (wf3 g c c2)).(ex_ind T (\lambda (t0:
-T).(ty3 g c t4 t0)) (ty3 g c2 u t3) (\lambda (x: T).(\lambda (H6: (ty3 g c t4
-x)).(ty3_conv g c2 t3 t (H1 c2 H5) u t4 (H3 c2 H5) (wf3_pc3_conf g c t4 t3 H4
-c2 H5 x H6 t H0)))) (ty3_correct g c u t4 H2)))))))))))))) (\lambda (c:
-C).(\lambda (m: nat).(\lambda (c2: C).(\lambda (_: (wf3 g c c2)).(ty3_sort g
-c2 m))))) (\lambda (n: nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u:
-T).(\lambda (H0: (getl n c (CHead d (Bind Abbr) u))).(\lambda (t: T).(\lambda
-(H1: (ty3 g d u t)).(\lambda (H2: ((\forall (c2: C).((wf3 g d c2) \to (ty3 g
-c2 u t))))).(\lambda (c2: C).(\lambda (H3: (wf3 g c c2)).(let H_x \def
-(wf3_getl_conf Abbr n c d u H0 g c2 H3 t H1) in (let H4 \def H_x in (ex2_ind
-C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abbr) u))) (\lambda (d2:
-C).(wf3 g d d2)) (ty3 g c2 (TLRef n) (lift (S n) O t)) (\lambda (x:
-C).(\lambda (H5: (getl n c2 (CHead x (Bind Abbr) u))).(\lambda (H6: (wf3 g d
-x)).(ty3_abbr g n c2 x u H5 t (H2 x H6))))) H4))))))))))))) (\lambda (n:
-nat).(\lambda (c: C).(\lambda (d: C).(\lambda (u: T).(\lambda (H0: (getl n c
-(CHead d (Bind Abst) u))).(\lambda (t: T).(\lambda (H1: (ty3 g d u
-t)).(\lambda (H2: ((\forall (c2: C).((wf3 g d c2) \to (ty3 g c2 u
-t))))).(\lambda (c2: C).(\lambda (H3: (wf3 g c c2)).(let H_x \def
-(wf3_getl_conf Abst n c d u H0 g c2 H3 t H1) in (let H4 \def H_x in (ex2_ind
-C (\lambda (d2: C).(getl n c2 (CHead d2 (Bind Abst) u))) (\lambda (d2:
-C).(wf3 g d d2)) (ty3 g c2 (TLRef n) (lift (S n) O u)) (\lambda (x:
-C).(\lambda (H5: (getl n c2 (CHead x (Bind Abst) u))).(\lambda (H6: (wf3 g d
-x)).(ty3_abst g n c2 x u H5 t (H2 x H6))))) H4))))))))))))) (\lambda (c:
-C).(\lambda (u: T).(\lambda (t: T).(\lambda (H0: (ty3 g c u t)).(\lambda (H1:
-((\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 u t))))).(\lambda (b:
-B).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g (CHead c (Bind b) u)
-t3 t4)).(\lambda (H3: ((\forall (c2: C).((wf3 g (CHead c (Bind b) u) c2) \to
-(ty3 g c2 t3 t4))))).(\lambda (c2: C).(\lambda (H4: (wf3 g c c2)).(ty3_bind g
-c2 u t (H1 c2 H4) b t3 t4 (H3 (CHead c2 (Bind b) u) (wf3_bind g c c2 H4 u t
-H0 b))))))))))))))) (\lambda (c: C).(\lambda (w: T).(\lambda (u: T).(\lambda
-(_: (ty3 g c w u)).(\lambda (H1: ((\forall (c2: C).((wf3 g c c2) \to (ty3 g
-c2 w u))))).(\lambda (v: T).(\lambda (t: T).(\lambda (_: (ty3 g c v (THead
-(Bind Abst) u t))).(\lambda (H3: ((\forall (c2: C).((wf3 g c c2) \to (ty3 g
-c2 v (THead (Bind Abst) u t)))))).(\lambda (c2: C).(\lambda (H4: (wf3 g c
-c2)).(ty3_appl g c2 w u (H1 c2 H4) v t (H3 c2 H4))))))))))))) (\lambda (c:
-C).(\lambda (t3: T).(\lambda (t4: T).(\lambda (_: (ty3 g c t3 t4)).(\lambda
-(H1: ((\forall (c2: C).((wf3 g c c2) \to (ty3 g c2 t3 t4))))).(\lambda (t0:
-T).(\lambda (_: (ty3 g c t4 t0)).(\lambda (H3: ((\forall (c2: C).((wf3 g c
-c2) \to (ty3 g c2 t4 t0))))).(\lambda (c2: C).(\lambda (H4: (wf3 g c
-c2)).(ty3_cast g c2 t3 t4 (H1 c2 H4) t0 (H3 c2 H4)))))))))))) c1 t1 t2 H))))).
-
-theorem wf3_idem:
- \forall (g: G).(\forall (c1: C).(\forall (c2: C).((wf3 g c1 c2) \to (wf3 g
-c2 c2))))
-\def
- \lambda (g: G).(\lambda (c1: C).(\lambda (c2: C).(\lambda (H: (wf3 g c1
-c2)).(wf3_ind g (\lambda (_: C).(\lambda (c0: C).(wf3 g c0 c0))) (\lambda (m:
-nat).(wf3_sort g m)) (\lambda (c3: C).(\lambda (c4: C).(\lambda (H0: (wf3 g
-c3 c4)).(\lambda (H1: (wf3 g c4 c4)).(\lambda (u: T).(\lambda (t: T).(\lambda
-(H2: (ty3 g c3 u t)).(\lambda (b: B).(wf3_bind g c4 c4 H1 u t (wf3_ty3_conf g
-c3 u t H2 c4 H0) b))))))))) (\lambda (c3: C).(\lambda (c4: C).(\lambda (_:
-(wf3 g c3 c4)).(\lambda (H1: (wf3 g c4 c4)).(\lambda (u: T).(\lambda (_:
-((\forall (t: T).((ty3 g c3 u t) \to False)))).(\lambda (_: B).(wf3_bind g c4
-c4 H1 (TSort O) (TSort (next g O)) (ty3_sort g c4 O) Void)))))))) (\lambda
-(c3: C).(\lambda (c4: C).(\lambda (_: (wf3 g c3 c4)).(\lambda (H1: (wf3 g c4
-c4)).(\lambda (_: T).(\lambda (_: F).H1)))))) c1 c2 H)))).
-
-theorem wf3_ty3:
- \forall (g: G).(\forall (c1: C).(\forall (t: T).(\forall (u: T).((ty3 g c1 t
-u) \to (ex2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(ty3 g c2 t
-u)))))))
-\def
- \lambda (g: G).(\lambda (c1: C).(\lambda (t: T).(\lambda (u: T).(\lambda (H:
-(ty3 g c1 t u)).(let H_x \def (wf3_total g c1) in (let H0 \def H_x in (ex_ind
-C (\lambda (c2: C).(wf3 g c1 c2)) (ex2 C (\lambda (c2: C).(wf3 g c1 c2))
-(\lambda (c2: C).(ty3 g c2 t u))) (\lambda (x: C).(\lambda (H1: (wf3 g c1
-x)).(ex_intro2 C (\lambda (c2: C).(wf3 g c1 c2)) (\lambda (c2: C).(ty3 g c2 t
-u)) x H1 (wf3_ty3_conf g c1 t u H x H1)))) H0))))))).
+(H5: (land (le (S i) j) (eq T x (TLRef (minus j (S i)))))).(land_ind (le (S
+i) j) (eq T x (TLRef (minus j (S i)))) (lt i j) (\lambda (H6: (le (S i)
+j)).(\lambda (_: (eq T x (TLRef (minus j (S i))))).H6)) H5)) H4)))))
+H2))))))))).