From: Ferruccio Guidi Date: Tue, 10 Feb 2015 21:33:26 +0000 (+0000) Subject: components: subst0 X-Git-Tag: make_still_working~746 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=112d29685ee9dceff93cdf64867a1a8037a53842;p=helm.git components: subst0 --- diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/dec.ma b/matita/matita/contribs/lambdadelta/basic_1/subst0/dec.ma index 0234ff06c..a787f6872 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/dec.ma +++ b/matita/matita/contribs/lambdadelta/basic_1/subst0/dec.ma @@ -14,169 +14,419 @@ (* This file was automatically generated: do not edit *********************) -include "Basic-1/subst0/defs.ma". +include "basic_1/subst0/defs.ma". -include "Basic-1/lift/props.ma". +include "basic_1/lift/props.ma". theorem dnf_dec2: \forall (t: T).(\forall (d: nat).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w t (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T t (lift (S O) d v)))))) \def - \lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: nat).(or (\forall (w: -T).(ex T (\lambda (v: T).(subst0 d w t0 (lift (S O) d v))))) (ex T (\lambda -(v: T).(eq T t0 (lift (S O) d v))))))) (\lambda (n: nat).(\lambda (d: -nat).(or_intror (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (TSort n) -(lift (S O) d v))))) (ex T (\lambda (v: T).(eq T (TSort n) (lift (S O) d -v)))) (ex_intro T (\lambda (v: T).(eq T (TSort n) (lift (S O) d v))) (TSort -n) (eq_ind_r T (TSort n) (\lambda (t0: T).(eq T (TSort n) t0)) (refl_equal T -(TSort n)) (lift (S O) d (TSort n)) (lift_sort n (S O) d)))))) (\lambda (n: -nat).(\lambda (d: nat).(lt_eq_gt_e n d (or (\forall (w: T).(ex T (\lambda (v: -T).(subst0 d w (TLRef n) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T -(TLRef n) (lift (S O) d v))))) (\lambda (H: (lt n d)).(or_intror (\forall (w: -T).(ex T (\lambda (v: T).(subst0 d w (TLRef n) (lift (S O) d v))))) (ex T -(\lambda (v: T).(eq T (TLRef n) (lift (S O) d v)))) (ex_intro T (\lambda (v: -T).(eq T (TLRef n) (lift (S O) d v))) (TLRef n) (eq_ind_r T (TLRef n) -(\lambda (t0: T).(eq T (TLRef n) t0)) (refl_equal T (TLRef n)) (lift (S O) d -(TLRef n)) (lift_lref_lt n (S O) d H))))) (\lambda (H: (eq nat n d)).(eq_ind -nat n (\lambda (n0: nat).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 n0 -w (TLRef n) (lift (S O) n0 v))))) (ex T (\lambda (v: T).(eq T (TLRef n) (lift -(S O) n0 v)))))) (or_introl (\forall (w: T).(ex T (\lambda (v: T).(subst0 n w -(TLRef n) (lift (S O) n v))))) (ex T (\lambda (v: T).(eq T (TLRef n) (lift (S -O) n v)))) (\lambda (w: T).(ex_intro T (\lambda (v: T).(subst0 n w (TLRef n) -(lift (S O) n v))) (lift n O w) (eq_ind_r T (lift (plus (S O) n) O w) -(\lambda (t0: T).(subst0 n w (TLRef n) t0)) (subst0_lref w n) (lift (S O) n -(lift n O w)) (lift_free w n (S O) O n (le_n (plus O n)) (le_O_n n)))))) d -H)) (\lambda (H: (lt d n)).(or_intror (\forall (w: T).(ex T (\lambda (v: -T).(subst0 d w (TLRef n) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T -(TLRef n) (lift (S O) d v)))) (ex_intro T (\lambda (v: T).(eq T (TLRef n) -(lift (S O) d v))) (TLRef (pred n)) (eq_ind_r T (TLRef n) (\lambda (t0: -T).(eq T (TLRef n) t0)) (refl_equal T (TLRef n)) (lift (S O) d (TLRef (pred -n))) (lift_lref_gt d n H)))))))) (\lambda (k: K).(\lambda (t0: T).(\lambda -(H: ((\forall (d: nat).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w -t0 (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T t0 (lift (S O) d -v)))))))).(\lambda (t1: T).(\lambda (H0: ((\forall (d: nat).(or (\forall (w: -T).(ex T (\lambda (v: T).(subst0 d w t1 (lift (S O) d v))))) (ex T (\lambda -(v: T).(eq T t1 (lift (S O) d v)))))))).(\lambda (d: nat).(let H_x \def (H d) -in (let H1 \def H_x in (or_ind (\forall (w: T).(ex T (\lambda (v: T).(subst0 -d w t0 (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T t0 (lift (S O) d -v)))) (or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) -(lift (S O) d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) -d v))))) (\lambda (H2: ((\forall (w: T).(ex T (\lambda (v: T).(subst0 d w t0 -(lift (S O) d v))))))).(let H_x0 \def (H0 (s k d)) in (let H3 \def H_x0 in -(or_ind (\forall (w: T).(ex T (\lambda (v: T).(subst0 (s k d) w t1 (lift (S -O) (s k d) v))))) (ex T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) v)))) -(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift -(S O) d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) d -v))))) (\lambda (H4: ((\forall (w: T).(ex T (\lambda (v: T).(subst0 (s k d) w -t1 (lift (S O) (s k d) v))))))).(or_introl (\forall (w: T).(ex T (\lambda (v: -T).(subst0 d w (THead k t0 t1) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq -T (THead k t0 t1) (lift (S O) d v)))) (\lambda (w: T).(let H_x1 \def (H4 w) -in (let H5 \def H_x1 in (ex_ind T (\lambda (v: T).(subst0 (s k d) w t1 (lift -(S O) (s k d) v))) (ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift (S -O) d v)))) (\lambda (x: T).(\lambda (H6: (subst0 (s k d) w t1 (lift (S O) (s -k d) x))).(let H_x2 \def (H2 w) in (let H7 \def H_x2 in (ex_ind T (\lambda -(v: T).(subst0 d w t0 (lift (S O) d v))) (ex T (\lambda (v: T).(subst0 d w -(THead k t0 t1) (lift (S O) d v)))) (\lambda (x0: T).(\lambda (H8: (subst0 d -w t0 (lift (S O) d x0))).(ex_intro T (\lambda (v: T).(subst0 d w (THead k t0 -t1) (lift (S O) d v))) (THead k x0 x) (eq_ind_r T (THead k (lift (S O) d x0) -(lift (S O) (s k d) x)) (\lambda (t2: T).(subst0 d w (THead k t0 t1) t2)) -(subst0_both w t0 (lift (S O) d x0) d H8 k t1 (lift (S O) (s k d) x) H6) -(lift (S O) d (THead k x0 x)) (lift_head k x0 x (S O) d))))) H7))))) H5)))))) -(\lambda (H4: (ex T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) -v))))).(ex_ind T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) v))) (or -(\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift (S O) -d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) d v))))) -(\lambda (x: T).(\lambda (H5: (eq T t1 (lift (S O) (s k d) x))).(eq_ind_r T -(lift (S O) (s k d) x) (\lambda (t2: T).(or (\forall (w: T).(ex T (\lambda -(v: T).(subst0 d w (THead k t0 t2) (lift (S O) d v))))) (ex T (\lambda (v: -T).(eq T (THead k t0 t2) (lift (S O) d v)))))) (or_introl (\forall (w: T).(ex -T (\lambda (v: T).(subst0 d w (THead k t0 (lift (S O) (s k d) x)) (lift (S O) -d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 (lift (S O) (s k d) x)) -(lift (S O) d v)))) (\lambda (w: T).(let H_x1 \def (H2 w) in (let H6 \def -H_x1 in (ex_ind T (\lambda (v: T).(subst0 d w t0 (lift (S O) d v))) (ex T -(\lambda (v: T).(subst0 d w (THead k t0 (lift (S O) (s k d) x)) (lift (S O) d -v)))) (\lambda (x0: T).(\lambda (H7: (subst0 d w t0 (lift (S O) d -x0))).(ex_intro T (\lambda (v: T).(subst0 d w (THead k t0 (lift (S O) (s k d) -x)) (lift (S O) d v))) (THead k x0 x) (eq_ind_r T (THead k (lift (S O) d x0) -(lift (S O) (s k d) x)) (\lambda (t2: T).(subst0 d w (THead k t0 (lift (S O) -(s k d) x)) t2)) (subst0_fst w (lift (S O) d x0) t0 d H7 (lift (S O) (s k d) -x) k) (lift (S O) d (THead k x0 x)) (lift_head k x0 x (S O) d))))) H6))))) t1 -H5))) H4)) H3)))) (\lambda (H2: (ex T (\lambda (v: T).(eq T t0 (lift (S O) d -v))))).(ex_ind T (\lambda (v: T).(eq T t0 (lift (S O) d v))) (or (\forall (w: -T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift (S O) d v))))) (ex -T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) d v))))) (\lambda (x: -T).(\lambda (H3: (eq T t0 (lift (S O) d x))).(let H_x0 \def (H0 (s k d)) in -(let H4 \def H_x0 in (or_ind (\forall (w: T).(ex T (\lambda (v: T).(subst0 (s -k d) w t1 (lift (S O) (s k d) v))))) (ex T (\lambda (v: T).(eq T t1 (lift (S -O) (s k d) v)))) (or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead -k t0 t1) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) -(lift (S O) d v))))) (\lambda (H5: ((\forall (w: T).(ex T (\lambda (v: -T).(subst0 (s k d) w t1 (lift (S O) (s k d) v))))))).(eq_ind_r T (lift (S O) -d x) (\lambda (t2: T).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w -(THead k t2 t1) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T (THead k t2 -t1) (lift (S O) d v)))))) (or_introl (\forall (w: T).(ex T (\lambda (v: -T).(subst0 d w (THead k (lift (S O) d x) t1) (lift (S O) d v))))) (ex T -(\lambda (v: T).(eq T (THead k (lift (S O) d x) t1) (lift (S O) d v)))) -(\lambda (w: T).(let H_x1 \def (H5 w) in (let H6 \def H_x1 in (ex_ind T -(\lambda (v: T).(subst0 (s k d) w t1 (lift (S O) (s k d) v))) (ex T (\lambda -(v: T).(subst0 d w (THead k (lift (S O) d x) t1) (lift (S O) d v)))) (\lambda -(x0: T).(\lambda (H7: (subst0 (s k d) w t1 (lift (S O) (s k d) -x0))).(ex_intro T (\lambda (v: T).(subst0 d w (THead k (lift (S O) d x) t1) -(lift (S O) d v))) (THead k x x0) (eq_ind_r T (THead k (lift (S O) d x) (lift -(S O) (s k d) x0)) (\lambda (t2: T).(subst0 d w (THead k (lift (S O) d x) t1) -t2)) (subst0_snd k w (lift (S O) (s k d) x0) t1 d H7 (lift (S O) d x)) (lift -(S O) d (THead k x x0)) (lift_head k x x0 (S O) d))))) H6))))) t0 H3)) -(\lambda (H5: (ex T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) -v))))).(ex_ind T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) v))) (or -(\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k t0 t1) (lift (S O) -d v))))) (ex T (\lambda (v: T).(eq T (THead k t0 t1) (lift (S O) d v))))) -(\lambda (x0: T).(\lambda (H6: (eq T t1 (lift (S O) (s k d) x0))).(eq_ind_r T -(lift (S O) (s k d) x0) (\lambda (t2: T).(or (\forall (w: T).(ex T (\lambda -(v: T).(subst0 d w (THead k t0 t2) (lift (S O) d v))))) (ex T (\lambda (v: -T).(eq T (THead k t0 t2) (lift (S O) d v)))))) (eq_ind_r T (lift (S O) d x) -(\lambda (t2: T).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead -k t2 (lift (S O) (s k d) x0)) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq -T (THead k t2 (lift (S O) (s k d) x0)) (lift (S O) d v)))))) (or_intror -(\forall (w: T).(ex T (\lambda (v: T).(subst0 d w (THead k (lift (S O) d x) -(lift (S O) (s k d) x0)) (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T -(THead k (lift (S O) d x) (lift (S O) (s k d) x0)) (lift (S O) d v)))) -(ex_intro T (\lambda (v: T).(eq T (THead k (lift (S O) d x) (lift (S O) (s k -d) x0)) (lift (S O) d v))) (THead k x x0) (eq_ind_r T (THead k (lift (S O) d -x) (lift (S O) (s k d) x0)) (\lambda (t2: T).(eq T (THead k (lift (S O) d x) -(lift (S O) (s k d) x0)) t2)) (refl_equal T (THead k (lift (S O) d x) (lift -(S O) (s k d) x0))) (lift (S O) d (THead k x x0)) (lift_head k x x0 (S O) -d)))) t0 H3) t1 H6))) H5)) H4))))) H2)) H1))))))))) t). -(* COMMENTS -Initial nodes: 3549 -END *) + \lambda (t: T).(let TMP_9 \def (\lambda (t0: T).(\forall (d: nat).(let TMP_4 +\def (\forall (w: T).(let TMP_3 \def (\lambda (v: T).(let TMP_1 \def (S O) in +(let TMP_2 \def (lift TMP_1 d v) in (subst0 d w t0 TMP_2)))) in (ex T +TMP_3))) in (let TMP_7 \def (\lambda (v: T).(let TMP_5 \def (S O) in (let +TMP_6 \def (lift TMP_5 d v) in (eq T t0 TMP_6)))) in (let TMP_8 \def (ex T +TMP_7) in (or TMP_4 TMP_8)))))) in (let TMP_37 \def (\lambda (n: +nat).(\lambda (d: nat).(let TMP_14 \def (\forall (w: T).(let TMP_13 \def +(\lambda (v: T).(let TMP_10 \def (TSort n) in (let TMP_11 \def (S O) in (let +TMP_12 \def (lift TMP_11 d v) in (subst0 d w TMP_10 TMP_12))))) in (ex T +TMP_13))) in (let TMP_18 \def (\lambda (v: T).(let TMP_15 \def (TSort n) in +(let TMP_16 \def (S O) in (let TMP_17 \def (lift TMP_16 d v) in (eq T TMP_15 +TMP_17))))) in (let TMP_19 \def (ex T TMP_18) in (let TMP_23 \def (\lambda +(v: T).(let TMP_20 \def (TSort n) in (let TMP_21 \def (S O) in (let TMP_22 +\def (lift TMP_21 d v) in (eq T TMP_20 TMP_22))))) in (let TMP_24 \def (TSort +n) in (let TMP_25 \def (TSort n) in (let TMP_27 \def (\lambda (t0: T).(let +TMP_26 \def (TSort n) in (eq T TMP_26 t0))) in (let TMP_28 \def (TSort n) in +(let TMP_29 \def (refl_equal T TMP_28) in (let TMP_30 \def (S O) in (let +TMP_31 \def (TSort n) in (let TMP_32 \def (lift TMP_30 d TMP_31) in (let +TMP_33 \def (S O) in (let TMP_34 \def (lift_sort n TMP_33 d) in (let TMP_35 +\def (eq_ind_r T TMP_25 TMP_27 TMP_29 TMP_32 TMP_34) in (let TMP_36 \def +(ex_intro T TMP_23 TMP_24 TMP_35) in (or_intror TMP_14 TMP_19 +TMP_36))))))))))))))))))) in (let TMP_149 \def (\lambda (n: nat).(\lambda (d: +nat).(let TMP_42 \def (\forall (w: T).(let TMP_41 \def (\lambda (v: T).(let +TMP_38 \def (TLRef n) in (let TMP_39 \def (S O) in (let TMP_40 \def (lift +TMP_39 d v) in (subst0 d w TMP_38 TMP_40))))) in (ex T TMP_41))) in (let +TMP_46 \def (\lambda (v: T).(let TMP_43 \def (TLRef n) in (let TMP_44 \def (S +O) in (let TMP_45 \def (lift TMP_44 d v) in (eq T TMP_43 TMP_45))))) in (let +TMP_47 \def (ex T TMP_46) in (let TMP_48 \def (or TMP_42 TMP_47) in (let +TMP_76 \def (\lambda (H: (lt n d)).(let TMP_53 \def (\forall (w: T).(let +TMP_52 \def (\lambda (v: T).(let TMP_49 \def (TLRef n) in (let TMP_50 \def (S +O) in (let TMP_51 \def (lift TMP_50 d v) in (subst0 d w TMP_49 TMP_51))))) in +(ex T TMP_52))) in (let TMP_57 \def (\lambda (v: T).(let TMP_54 \def (TLRef +n) in (let TMP_55 \def (S O) in (let TMP_56 \def (lift TMP_55 d v) in (eq T +TMP_54 TMP_56))))) in (let TMP_58 \def (ex T TMP_57) in (let TMP_62 \def +(\lambda (v: T).(let TMP_59 \def (TLRef n) in (let TMP_60 \def (S O) in (let +TMP_61 \def (lift TMP_60 d v) in (eq T TMP_59 TMP_61))))) in (let TMP_63 \def +(TLRef n) in (let TMP_64 \def (TLRef n) in (let TMP_66 \def (\lambda (t0: +T).(let TMP_65 \def (TLRef n) in (eq T TMP_65 t0))) in (let TMP_67 \def +(TLRef n) in (let TMP_68 \def (refl_equal T TMP_67) in (let TMP_69 \def (S O) +in (let TMP_70 \def (TLRef n) in (let TMP_71 \def (lift TMP_69 d TMP_70) in +(let TMP_72 \def (S O) in (let TMP_73 \def (lift_lref_lt n TMP_72 d H) in +(let TMP_74 \def (eq_ind_r T TMP_64 TMP_66 TMP_68 TMP_71 TMP_73) in (let +TMP_75 \def (ex_intro T TMP_62 TMP_63 TMP_74) in (or_intror TMP_53 TMP_58 +TMP_75)))))))))))))))))) in (let TMP_119 \def (\lambda (H: (eq nat n d)).(let +TMP_87 \def (\lambda (n0: nat).(let TMP_81 \def (\forall (w: T).(let TMP_80 +\def (\lambda (v: T).(let TMP_77 \def (TLRef n) in (let TMP_78 \def (S O) in +(let TMP_79 \def (lift TMP_78 n0 v) in (subst0 n0 w TMP_77 TMP_79))))) in (ex +T TMP_80))) in (let TMP_85 \def (\lambda (v: T).(let TMP_82 \def (TLRef n) in +(let TMP_83 \def (S O) in (let TMP_84 \def (lift TMP_83 n0 v) in (eq T TMP_82 +TMP_84))))) in (let TMP_86 \def (ex T TMP_85) in (or TMP_81 TMP_86))))) in +(let TMP_92 \def (\forall (w: T).(let TMP_91 \def (\lambda (v: T).(let TMP_88 +\def (TLRef n) in (let TMP_89 \def (S O) in (let TMP_90 \def (lift TMP_89 n +v) in (subst0 n w TMP_88 TMP_90))))) in (ex T TMP_91))) in (let TMP_96 \def +(\lambda (v: T).(let TMP_93 \def (TLRef n) in (let TMP_94 \def (S O) in (let +TMP_95 \def (lift TMP_94 n v) in (eq T TMP_93 TMP_95))))) in (let TMP_97 \def +(ex T TMP_96) in (let TMP_117 \def (\lambda (w: T).(let TMP_101 \def (\lambda +(v: T).(let TMP_98 \def (TLRef n) in (let TMP_99 \def (S O) in (let TMP_100 +\def (lift TMP_99 n v) in (subst0 n w TMP_98 TMP_100))))) in (let TMP_102 +\def (lift n O w) in (let TMP_103 \def (S O) in (let TMP_104 \def (plus +TMP_103 n) in (let TMP_105 \def (lift TMP_104 O w) in (let TMP_107 \def +(\lambda (t0: T).(let TMP_106 \def (TLRef n) in (subst0 n w TMP_106 t0))) in +(let TMP_108 \def (subst0_lref w n) in (let TMP_109 \def (S O) in (let +TMP_110 \def (lift n O w) in (let TMP_111 \def (lift TMP_109 n TMP_110) in +(let TMP_112 \def (S O) in (let TMP_113 \def (le_plus_r O n) in (let TMP_114 +\def (le_O_n n) in (let TMP_115 \def (lift_free w n TMP_112 O n TMP_113 +TMP_114) in (let TMP_116 \def (eq_ind_r T TMP_105 TMP_107 TMP_108 TMP_111 +TMP_115) in (ex_intro T TMP_101 TMP_102 TMP_116))))))))))))))))) in (let +TMP_118 \def (or_introl TMP_92 TMP_97 TMP_117) in (eq_ind nat n TMP_87 +TMP_118 d H)))))))) in (let TMP_148 \def (\lambda (H: (lt d n)).(let TMP_124 +\def (\forall (w: T).(let TMP_123 \def (\lambda (v: T).(let TMP_120 \def +(TLRef n) in (let TMP_121 \def (S O) in (let TMP_122 \def (lift TMP_121 d v) +in (subst0 d w TMP_120 TMP_122))))) in (ex T TMP_123))) in (let TMP_128 \def +(\lambda (v: T).(let TMP_125 \def (TLRef n) in (let TMP_126 \def (S O) in +(let TMP_127 \def (lift TMP_126 d v) in (eq T TMP_125 TMP_127))))) in (let +TMP_129 \def (ex T TMP_128) in (let TMP_133 \def (\lambda (v: T).(let TMP_130 +\def (TLRef n) in (let TMP_131 \def (S O) in (let TMP_132 \def (lift TMP_131 +d v) in (eq T TMP_130 TMP_132))))) in (let TMP_134 \def (pred n) in (let +TMP_135 \def (TLRef TMP_134) in (let TMP_136 \def (TLRef n) in (let TMP_138 +\def (\lambda (t0: T).(let TMP_137 \def (TLRef n) in (eq T TMP_137 t0))) in +(let TMP_139 \def (TLRef n) in (let TMP_140 \def (refl_equal T TMP_139) in +(let TMP_141 \def (S O) in (let TMP_142 \def (pred n) in (let TMP_143 \def +(TLRef TMP_142) in (let TMP_144 \def (lift TMP_141 d TMP_143) in (let TMP_145 +\def (lift_lref_gt d n H) in (let TMP_146 \def (eq_ind_r T TMP_136 TMP_138 +TMP_140 TMP_144 TMP_145) in (let TMP_147 \def (ex_intro T TMP_133 TMP_135 +TMP_146) in (or_intror TMP_124 TMP_129 TMP_147))))))))))))))))))) in +(lt_eq_gt_e n d TMP_48 TMP_76 TMP_119 TMP_148)))))))))) in (let TMP_562 \def +(\lambda (k: K).(\lambda (t0: T).(\lambda (H: ((\forall (d: nat).(or (\forall +(w: T).(ex T (\lambda (v: T).(subst0 d w t0 (lift (S O) d v))))) (ex T +(\lambda (v: T).(eq T t0 (lift (S O) d v)))))))).(\lambda (t1: T).(\lambda +(H0: ((\forall (d: nat).(or (\forall (w: T).(ex T (\lambda (v: T).(subst0 d w +t1 (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T t1 (lift (S O) d +v)))))))).(\lambda (d: nat).(let H_x \def (H d) in (let H1 \def H_x in (let +TMP_153 \def (\forall (w: T).(let TMP_152 \def (\lambda (v: T).(let TMP_150 +\def (S O) in (let TMP_151 \def (lift TMP_150 d v) in (subst0 d w t0 +TMP_151)))) in (ex T TMP_152))) in (let TMP_156 \def (\lambda (v: T).(let +TMP_154 \def (S O) in (let TMP_155 \def (lift TMP_154 d v) in (eq T t0 +TMP_155)))) in (let TMP_157 \def (ex T TMP_156) in (let TMP_162 \def (\forall +(w: T).(let TMP_161 \def (\lambda (v: T).(let TMP_158 \def (THead k t0 t1) in +(let TMP_159 \def (S O) in (let TMP_160 \def (lift TMP_159 d v) in (subst0 d +w TMP_158 TMP_160))))) in (ex T TMP_161))) in (let TMP_166 \def (\lambda (v: +T).(let TMP_163 \def (THead k t0 t1) in (let TMP_164 \def (S O) in (let +TMP_165 \def (lift TMP_164 d v) in (eq T TMP_163 TMP_165))))) in (let TMP_167 +\def (ex T TMP_166) in (let TMP_168 \def (or TMP_162 TMP_167) in (let TMP_341 +\def (\lambda (H2: ((\forall (w: T).(ex T (\lambda (v: T).(subst0 d w t0 +(lift (S O) d v))))))).(let TMP_169 \def (s k d) in (let H_x0 \def (H0 +TMP_169) in (let H3 \def H_x0 in (let TMP_175 \def (\forall (w: T).(let +TMP_174 \def (\lambda (v: T).(let TMP_170 \def (s k d) in (let TMP_171 \def +(S O) in (let TMP_172 \def (s k d) in (let TMP_173 \def (lift TMP_171 TMP_172 +v) in (subst0 TMP_170 w t1 TMP_173)))))) in (ex T TMP_174))) in (let TMP_179 +\def (\lambda (v: T).(let TMP_176 \def (S O) in (let TMP_177 \def (s k d) in +(let TMP_178 \def (lift TMP_176 TMP_177 v) in (eq T t1 TMP_178))))) in (let +TMP_180 \def (ex T TMP_179) in (let TMP_185 \def (\forall (w: T).(let TMP_184 +\def (\lambda (v: T).(let TMP_181 \def (THead k t0 t1) in (let TMP_182 \def +(S O) in (let TMP_183 \def (lift TMP_182 d v) in (subst0 d w TMP_181 +TMP_183))))) in (ex T TMP_184))) in (let TMP_189 \def (\lambda (v: T).(let +TMP_186 \def (THead k t0 t1) in (let TMP_187 \def (S O) in (let TMP_188 \def +(lift TMP_187 d v) in (eq T TMP_186 TMP_188))))) in (let TMP_190 \def (ex T +TMP_189) in (let TMP_191 \def (or TMP_185 TMP_190) in (let TMP_248 \def +(\lambda (H4: ((\forall (w: T).(ex T (\lambda (v: T).(subst0 (s k d) w t1 +(lift (S O) (s k d) v))))))).(let TMP_196 \def (\forall (w: T).(let TMP_195 +\def (\lambda (v: T).(let TMP_192 \def (THead k t0 t1) in (let TMP_193 \def +(S O) in (let TMP_194 \def (lift TMP_193 d v) in (subst0 d w TMP_192 +TMP_194))))) in (ex T TMP_195))) in (let TMP_200 \def (\lambda (v: T).(let +TMP_197 \def (THead k t0 t1) in (let TMP_198 \def (S O) in (let TMP_199 \def +(lift TMP_198 d v) in (eq T TMP_197 TMP_199))))) in (let TMP_201 \def (ex T +TMP_200) in (let TMP_247 \def (\lambda (w: T).(let H_x1 \def (H4 w) in (let +H5 \def H_x1 in (let TMP_206 \def (\lambda (v: T).(let TMP_202 \def (s k d) +in (let TMP_203 \def (S O) in (let TMP_204 \def (s k d) in (let TMP_205 \def +(lift TMP_203 TMP_204 v) in (subst0 TMP_202 w t1 TMP_205)))))) in (let +TMP_210 \def (\lambda (v: T).(let TMP_207 \def (THead k t0 t1) in (let +TMP_208 \def (S O) in (let TMP_209 \def (lift TMP_208 d v) in (subst0 d w +TMP_207 TMP_209))))) in (let TMP_211 \def (ex T TMP_210) in (let TMP_246 \def +(\lambda (x: T).(\lambda (H6: (subst0 (s k d) w t1 (lift (S O) (s k d) +x))).(let H_x2 \def (H2 w) in (let H7 \def H_x2 in (let TMP_214 \def (\lambda +(v: T).(let TMP_212 \def (S O) in (let TMP_213 \def (lift TMP_212 d v) in +(subst0 d w t0 TMP_213)))) in (let TMP_218 \def (\lambda (v: T).(let TMP_215 +\def (THead k t0 t1) in (let TMP_216 \def (S O) in (let TMP_217 \def (lift +TMP_216 d v) in (subst0 d w TMP_215 TMP_217))))) in (let TMP_219 \def (ex T +TMP_218) in (let TMP_245 \def (\lambda (x0: T).(\lambda (H8: (subst0 d w t0 +(lift (S O) d x0))).(let TMP_223 \def (\lambda (v: T).(let TMP_220 \def +(THead k t0 t1) in (let TMP_221 \def (S O) in (let TMP_222 \def (lift TMP_221 +d v) in (subst0 d w TMP_220 TMP_222))))) in (let TMP_224 \def (THead k x0 x) +in (let TMP_225 \def (S O) in (let TMP_226 \def (lift TMP_225 d x0) in (let +TMP_227 \def (S O) in (let TMP_228 \def (s k d) in (let TMP_229 \def (lift +TMP_227 TMP_228 x) in (let TMP_230 \def (THead k TMP_226 TMP_229) in (let +TMP_232 \def (\lambda (t2: T).(let TMP_231 \def (THead k t0 t1) in (subst0 d +w TMP_231 t2))) in (let TMP_233 \def (S O) in (let TMP_234 \def (lift TMP_233 +d x0) in (let TMP_235 \def (S O) in (let TMP_236 \def (s k d) in (let TMP_237 +\def (lift TMP_235 TMP_236 x) in (let TMP_238 \def (subst0_both w t0 TMP_234 +d H8 k t1 TMP_237 H6) in (let TMP_239 \def (S O) in (let TMP_240 \def (THead +k x0 x) in (let TMP_241 \def (lift TMP_239 d TMP_240) in (let TMP_242 \def (S +O) in (let TMP_243 \def (lift_head k x0 x TMP_242 d) in (let TMP_244 \def +(eq_ind_r T TMP_230 TMP_232 TMP_238 TMP_241 TMP_243) in (ex_intro T TMP_223 +TMP_224 TMP_244)))))))))))))))))))))))) in (ex_ind T TMP_214 TMP_219 TMP_245 +H7))))))))) in (ex_ind T TMP_206 TMP_211 TMP_246 H5)))))))) in (or_introl +TMP_196 TMP_201 TMP_247)))))) in (let TMP_340 \def (\lambda (H4: (ex T +(\lambda (v: T).(eq T t1 (lift (S O) (s k d) v))))).(let TMP_252 \def +(\lambda (v: T).(let TMP_249 \def (S O) in (let TMP_250 \def (s k d) in (let +TMP_251 \def (lift TMP_249 TMP_250 v) in (eq T t1 TMP_251))))) in (let +TMP_257 \def (\forall (w: T).(let TMP_256 \def (\lambda (v: T).(let TMP_253 +\def (THead k t0 t1) in (let TMP_254 \def (S O) in (let TMP_255 \def (lift +TMP_254 d v) in (subst0 d w TMP_253 TMP_255))))) in (ex T TMP_256))) in (let +TMP_261 \def (\lambda (v: T).(let TMP_258 \def (THead k t0 t1) in (let +TMP_259 \def (S O) in (let TMP_260 \def (lift TMP_259 d v) in (eq T TMP_258 +TMP_260))))) in (let TMP_262 \def (ex T TMP_261) in (let TMP_263 \def (or +TMP_257 TMP_262) in (let TMP_339 \def (\lambda (x: T).(\lambda (H5: (eq T t1 +(lift (S O) (s k d) x))).(let TMP_264 \def (S O) in (let TMP_265 \def (s k d) +in (let TMP_266 \def (lift TMP_264 TMP_265 x) in (let TMP_277 \def (\lambda +(t2: T).(let TMP_271 \def (\forall (w: T).(let TMP_270 \def (\lambda (v: +T).(let TMP_267 \def (THead k t0 t2) in (let TMP_268 \def (S O) in (let +TMP_269 \def (lift TMP_268 d v) in (subst0 d w TMP_267 TMP_269))))) in (ex T +TMP_270))) in (let TMP_275 \def (\lambda (v: T).(let TMP_272 \def (THead k t0 +t2) in (let TMP_273 \def (S O) in (let TMP_274 \def (lift TMP_273 d v) in (eq +T TMP_272 TMP_274))))) in (let TMP_276 \def (ex T TMP_275) in (or TMP_271 +TMP_276))))) in (let TMP_285 \def (\forall (w: T).(let TMP_284 \def (\lambda +(v: T).(let TMP_278 \def (S O) in (let TMP_279 \def (s k d) in (let TMP_280 +\def (lift TMP_278 TMP_279 x) in (let TMP_281 \def (THead k t0 TMP_280) in +(let TMP_282 \def (S O) in (let TMP_283 \def (lift TMP_282 d v) in (subst0 d +w TMP_281 TMP_283)))))))) in (ex T TMP_284))) in (let TMP_292 \def (\lambda +(v: T).(let TMP_286 \def (S O) in (let TMP_287 \def (s k d) in (let TMP_288 +\def (lift TMP_286 TMP_287 x) in (let TMP_289 \def (THead k t0 TMP_288) in +(let TMP_290 \def (S O) in (let TMP_291 \def (lift TMP_290 d v) in (eq T +TMP_289 TMP_291)))))))) in (let TMP_293 \def (ex T TMP_292) in (let TMP_337 +\def (\lambda (w: T).(let H_x1 \def (H2 w) in (let H6 \def H_x1 in (let +TMP_296 \def (\lambda (v: T).(let TMP_294 \def (S O) in (let TMP_295 \def +(lift TMP_294 d v) in (subst0 d w t0 TMP_295)))) in (let TMP_303 \def +(\lambda (v: T).(let TMP_297 \def (S O) in (let TMP_298 \def (s k d) in (let +TMP_299 \def (lift TMP_297 TMP_298 x) in (let TMP_300 \def (THead k t0 +TMP_299) in (let TMP_301 \def (S O) in (let TMP_302 \def (lift TMP_301 d v) +in (subst0 d w TMP_300 TMP_302)))))))) in (let TMP_304 \def (ex T TMP_303) in +(let TMP_336 \def (\lambda (x0: T).(\lambda (H7: (subst0 d w t0 (lift (S O) d +x0))).(let TMP_311 \def (\lambda (v: T).(let TMP_305 \def (S O) in (let +TMP_306 \def (s k d) in (let TMP_307 \def (lift TMP_305 TMP_306 x) in (let +TMP_308 \def (THead k t0 TMP_307) in (let TMP_309 \def (S O) in (let TMP_310 +\def (lift TMP_309 d v) in (subst0 d w TMP_308 TMP_310)))))))) in (let +TMP_312 \def (THead k x0 x) in (let TMP_313 \def (S O) in (let TMP_314 \def +(lift TMP_313 d x0) in (let TMP_315 \def (S O) in (let TMP_316 \def (s k d) +in (let TMP_317 \def (lift TMP_315 TMP_316 x) in (let TMP_318 \def (THead k +TMP_314 TMP_317) in (let TMP_323 \def (\lambda (t2: T).(let TMP_319 \def (S +O) in (let TMP_320 \def (s k d) in (let TMP_321 \def (lift TMP_319 TMP_320 x) +in (let TMP_322 \def (THead k t0 TMP_321) in (subst0 d w TMP_322 t2)))))) in +(let TMP_324 \def (S O) in (let TMP_325 \def (lift TMP_324 d x0) in (let +TMP_326 \def (S O) in (let TMP_327 \def (s k d) in (let TMP_328 \def (lift +TMP_326 TMP_327 x) in (let TMP_329 \def (subst0_fst w TMP_325 t0 d H7 TMP_328 +k) in (let TMP_330 \def (S O) in (let TMP_331 \def (THead k x0 x) in (let +TMP_332 \def (lift TMP_330 d TMP_331) in (let TMP_333 \def (S O) in (let +TMP_334 \def (lift_head k x0 x TMP_333 d) in (let TMP_335 \def (eq_ind_r T +TMP_318 TMP_323 TMP_329 TMP_332 TMP_334) in (ex_intro T TMP_311 TMP_312 +TMP_335)))))))))))))))))))))))) in (ex_ind T TMP_296 TMP_304 TMP_336 +H6)))))))) in (let TMP_338 \def (or_introl TMP_285 TMP_293 TMP_337) in +(eq_ind_r T TMP_266 TMP_277 TMP_338 t1 H5)))))))))))) in (ex_ind T TMP_252 +TMP_263 TMP_339 H4)))))))) in (or_ind TMP_175 TMP_180 TMP_191 TMP_248 TMP_340 +H3)))))))))))))) in (let TMP_561 \def (\lambda (H2: (ex T (\lambda (v: T).(eq +T t0 (lift (S O) d v))))).(let TMP_344 \def (\lambda (v: T).(let TMP_342 \def +(S O) in (let TMP_343 \def (lift TMP_342 d v) in (eq T t0 TMP_343)))) in (let +TMP_349 \def (\forall (w: T).(let TMP_348 \def (\lambda (v: T).(let TMP_345 +\def (THead k t0 t1) in (let TMP_346 \def (S O) in (let TMP_347 \def (lift +TMP_346 d v) in (subst0 d w TMP_345 TMP_347))))) in (ex T TMP_348))) in (let +TMP_353 \def (\lambda (v: T).(let TMP_350 \def (THead k t0 t1) in (let +TMP_351 \def (S O) in (let TMP_352 \def (lift TMP_351 d v) in (eq T TMP_350 +TMP_352))))) in (let TMP_354 \def (ex T TMP_353) in (let TMP_355 \def (or +TMP_349 TMP_354) in (let TMP_560 \def (\lambda (x: T).(\lambda (H3: (eq T t0 +(lift (S O) d x))).(let TMP_356 \def (s k d) in (let H_x0 \def (H0 TMP_356) +in (let H4 \def H_x0 in (let TMP_362 \def (\forall (w: T).(let TMP_361 \def +(\lambda (v: T).(let TMP_357 \def (s k d) in (let TMP_358 \def (S O) in (let +TMP_359 \def (s k d) in (let TMP_360 \def (lift TMP_358 TMP_359 v) in (subst0 +TMP_357 w t1 TMP_360)))))) in (ex T TMP_361))) in (let TMP_366 \def (\lambda +(v: T).(let TMP_363 \def (S O) in (let TMP_364 \def (s k d) in (let TMP_365 +\def (lift TMP_363 TMP_364 v) in (eq T t1 TMP_365))))) in (let TMP_367 \def +(ex T TMP_366) in (let TMP_372 \def (\forall (w: T).(let TMP_371 \def +(\lambda (v: T).(let TMP_368 \def (THead k t0 t1) in (let TMP_369 \def (S O) +in (let TMP_370 \def (lift TMP_369 d v) in (subst0 d w TMP_368 TMP_370))))) +in (ex T TMP_371))) in (let TMP_376 \def (\lambda (v: T).(let TMP_373 \def +(THead k t0 t1) in (let TMP_374 \def (S O) in (let TMP_375 \def (lift TMP_374 +d v) in (eq T TMP_373 TMP_375))))) in (let TMP_377 \def (ex T TMP_376) in +(let TMP_378 \def (or TMP_372 TMP_377) in (let TMP_450 \def (\lambda (H5: +((\forall (w: T).(ex T (\lambda (v: T).(subst0 (s k d) w t1 (lift (S O) (s k +d) v))))))).(let TMP_379 \def (S O) in (let TMP_380 \def (lift TMP_379 d x) +in (let TMP_391 \def (\lambda (t2: T).(let TMP_385 \def (\forall (w: T).(let +TMP_384 \def (\lambda (v: T).(let TMP_381 \def (THead k t2 t1) in (let +TMP_382 \def (S O) in (let TMP_383 \def (lift TMP_382 d v) in (subst0 d w +TMP_381 TMP_383))))) in (ex T TMP_384))) in (let TMP_389 \def (\lambda (v: +T).(let TMP_386 \def (THead k t2 t1) in (let TMP_387 \def (S O) in (let +TMP_388 \def (lift TMP_387 d v) in (eq T TMP_386 TMP_388))))) in (let TMP_390 +\def (ex T TMP_389) in (or TMP_385 TMP_390))))) in (let TMP_398 \def (\forall +(w: T).(let TMP_397 \def (\lambda (v: T).(let TMP_392 \def (S O) in (let +TMP_393 \def (lift TMP_392 d x) in (let TMP_394 \def (THead k TMP_393 t1) in +(let TMP_395 \def (S O) in (let TMP_396 \def (lift TMP_395 d v) in (subst0 d +w TMP_394 TMP_396))))))) in (ex T TMP_397))) in (let TMP_404 \def (\lambda +(v: T).(let TMP_399 \def (S O) in (let TMP_400 \def (lift TMP_399 d x) in +(let TMP_401 \def (THead k TMP_400 t1) in (let TMP_402 \def (S O) in (let +TMP_403 \def (lift TMP_402 d v) in (eq T TMP_401 TMP_403))))))) in (let +TMP_405 \def (ex T TMP_404) in (let TMP_448 \def (\lambda (w: T).(let H_x1 +\def (H5 w) in (let H6 \def H_x1 in (let TMP_410 \def (\lambda (v: T).(let +TMP_406 \def (s k d) in (let TMP_407 \def (S O) in (let TMP_408 \def (s k d) +in (let TMP_409 \def (lift TMP_407 TMP_408 v) in (subst0 TMP_406 w t1 +TMP_409)))))) in (let TMP_416 \def (\lambda (v: T).(let TMP_411 \def (S O) in +(let TMP_412 \def (lift TMP_411 d x) in (let TMP_413 \def (THead k TMP_412 +t1) in (let TMP_414 \def (S O) in (let TMP_415 \def (lift TMP_414 d v) in +(subst0 d w TMP_413 TMP_415))))))) in (let TMP_417 \def (ex T TMP_416) in +(let TMP_447 \def (\lambda (x0: T).(\lambda (H7: (subst0 (s k d) w t1 (lift +(S O) (s k d) x0))).(let TMP_423 \def (\lambda (v: T).(let TMP_418 \def (S O) +in (let TMP_419 \def (lift TMP_418 d x) in (let TMP_420 \def (THead k TMP_419 +t1) in (let TMP_421 \def (S O) in (let TMP_422 \def (lift TMP_421 d v) in +(subst0 d w TMP_420 TMP_422))))))) in (let TMP_424 \def (THead k x x0) in +(let TMP_425 \def (S O) in (let TMP_426 \def (lift TMP_425 d x) in (let +TMP_427 \def (S O) in (let TMP_428 \def (s k d) in (let TMP_429 \def (lift +TMP_427 TMP_428 x0) in (let TMP_430 \def (THead k TMP_426 TMP_429) in (let +TMP_434 \def (\lambda (t2: T).(let TMP_431 \def (S O) in (let TMP_432 \def +(lift TMP_431 d x) in (let TMP_433 \def (THead k TMP_432 t1) in (subst0 d w +TMP_433 t2))))) in (let TMP_435 \def (S O) in (let TMP_436 \def (s k d) in +(let TMP_437 \def (lift TMP_435 TMP_436 x0) in (let TMP_438 \def (S O) in +(let TMP_439 \def (lift TMP_438 d x) in (let TMP_440 \def (subst0_snd k w +TMP_437 t1 d H7 TMP_439) in (let TMP_441 \def (S O) in (let TMP_442 \def +(THead k x x0) in (let TMP_443 \def (lift TMP_441 d TMP_442) in (let TMP_444 +\def (S O) in (let TMP_445 \def (lift_head k x x0 TMP_444 d) in (let TMP_446 +\def (eq_ind_r T TMP_430 TMP_434 TMP_440 TMP_443 TMP_445) in (ex_intro T +TMP_423 TMP_424 TMP_446)))))))))))))))))))))))) in (ex_ind T TMP_410 TMP_417 +TMP_447 H6)))))))) in (let TMP_449 \def (or_introl TMP_398 TMP_405 TMP_448) +in (eq_ind_r T TMP_380 TMP_391 TMP_449 t0 H3)))))))))) in (let TMP_559 \def +(\lambda (H5: (ex T (\lambda (v: T).(eq T t1 (lift (S O) (s k d) v))))).(let +TMP_454 \def (\lambda (v: T).(let TMP_451 \def (S O) in (let TMP_452 \def (s +k d) in (let TMP_453 \def (lift TMP_451 TMP_452 v) in (eq T t1 TMP_453))))) +in (let TMP_459 \def (\forall (w: T).(let TMP_458 \def (\lambda (v: T).(let +TMP_455 \def (THead k t0 t1) in (let TMP_456 \def (S O) in (let TMP_457 \def +(lift TMP_456 d v) in (subst0 d w TMP_455 TMP_457))))) in (ex T TMP_458))) in +(let TMP_463 \def (\lambda (v: T).(let TMP_460 \def (THead k t0 t1) in (let +TMP_461 \def (S O) in (let TMP_462 \def (lift TMP_461 d v) in (eq T TMP_460 +TMP_462))))) in (let TMP_464 \def (ex T TMP_463) in (let TMP_465 \def (or +TMP_459 TMP_464) in (let TMP_558 \def (\lambda (x0: T).(\lambda (H6: (eq T t1 +(lift (S O) (s k d) x0))).(let TMP_466 \def (S O) in (let TMP_467 \def (s k +d) in (let TMP_468 \def (lift TMP_466 TMP_467 x0) in (let TMP_479 \def +(\lambda (t2: T).(let TMP_473 \def (\forall (w: T).(let TMP_472 \def (\lambda +(v: T).(let TMP_469 \def (THead k t0 t2) in (let TMP_470 \def (S O) in (let +TMP_471 \def (lift TMP_470 d v) in (subst0 d w TMP_469 TMP_471))))) in (ex T +TMP_472))) in (let TMP_477 \def (\lambda (v: T).(let TMP_474 \def (THead k t0 +t2) in (let TMP_475 \def (S O) in (let TMP_476 \def (lift TMP_475 d v) in (eq +T TMP_474 TMP_476))))) in (let TMP_478 \def (ex T TMP_477) in (or TMP_473 +TMP_478))))) in (let TMP_480 \def (S O) in (let TMP_481 \def (lift TMP_480 d +x) in (let TMP_498 \def (\lambda (t2: T).(let TMP_489 \def (\forall (w: +T).(let TMP_488 \def (\lambda (v: T).(let TMP_482 \def (S O) in (let TMP_483 +\def (s k d) in (let TMP_484 \def (lift TMP_482 TMP_483 x0) in (let TMP_485 +\def (THead k t2 TMP_484) in (let TMP_486 \def (S O) in (let TMP_487 \def +(lift TMP_486 d v) in (subst0 d w TMP_485 TMP_487)))))))) in (ex T TMP_488))) +in (let TMP_496 \def (\lambda (v: T).(let TMP_490 \def (S O) in (let TMP_491 +\def (s k d) in (let TMP_492 \def (lift TMP_490 TMP_491 x0) in (let TMP_493 +\def (THead k t2 TMP_492) in (let TMP_494 \def (S O) in (let TMP_495 \def +(lift TMP_494 d v) in (eq T TMP_493 TMP_495)))))))) in (let TMP_497 \def (ex +T TMP_496) in (or TMP_489 TMP_497))))) in (let TMP_508 \def (\forall (w: +T).(let TMP_507 \def (\lambda (v: T).(let TMP_499 \def (S O) in (let TMP_500 +\def (lift TMP_499 d x) in (let TMP_501 \def (S O) in (let TMP_502 \def (s k +d) in (let TMP_503 \def (lift TMP_501 TMP_502 x0) in (let TMP_504 \def (THead +k TMP_500 TMP_503) in (let TMP_505 \def (S O) in (let TMP_506 \def (lift +TMP_505 d v) in (subst0 d w TMP_504 TMP_506)))))))))) in (ex T TMP_507))) in +(let TMP_517 \def (\lambda (v: T).(let TMP_509 \def (S O) in (let TMP_510 +\def (lift TMP_509 d x) in (let TMP_511 \def (S O) in (let TMP_512 \def (s k +d) in (let TMP_513 \def (lift TMP_511 TMP_512 x0) in (let TMP_514 \def (THead +k TMP_510 TMP_513) in (let TMP_515 \def (S O) in (let TMP_516 \def (lift +TMP_515 d v) in (eq T TMP_514 TMP_516)))))))))) in (let TMP_518 \def (ex T +TMP_517) in (let TMP_527 \def (\lambda (v: T).(let TMP_519 \def (S O) in (let +TMP_520 \def (lift TMP_519 d x) in (let TMP_521 \def (S O) in (let TMP_522 +\def (s k d) in (let TMP_523 \def (lift TMP_521 TMP_522 x0) in (let TMP_524 +\def (THead k TMP_520 TMP_523) in (let TMP_525 \def (S O) in (let TMP_526 +\def (lift TMP_525 d v) in (eq T TMP_524 TMP_526)))))))))) in (let TMP_528 +\def (THead k x x0) in (let TMP_529 \def (S O) in (let TMP_530 \def (lift +TMP_529 d x) in (let TMP_531 \def (S O) in (let TMP_532 \def (s k d) in (let +TMP_533 \def (lift TMP_531 TMP_532 x0) in (let TMP_534 \def (THead k TMP_530 +TMP_533) in (let TMP_541 \def (\lambda (t2: T).(let TMP_535 \def (S O) in +(let TMP_536 \def (lift TMP_535 d x) in (let TMP_537 \def (S O) in (let +TMP_538 \def (s k d) in (let TMP_539 \def (lift TMP_537 TMP_538 x0) in (let +TMP_540 \def (THead k TMP_536 TMP_539) in (eq T TMP_540 t2)))))))) in (let +TMP_542 \def (S O) in (let TMP_543 \def (lift TMP_542 d x) in (let TMP_544 +\def (S O) in (let TMP_545 \def (s k d) in (let TMP_546 \def (lift TMP_544 +TMP_545 x0) in (let TMP_547 \def (THead k TMP_543 TMP_546) in (let TMP_548 +\def (refl_equal T TMP_547) in (let TMP_549 \def (S O) in (let TMP_550 \def +(THead k x x0) in (let TMP_551 \def (lift TMP_549 d TMP_550) in (let TMP_552 +\def (S O) in (let TMP_553 \def (lift_head k x x0 TMP_552 d) in (let TMP_554 +\def (eq_ind_r T TMP_534 TMP_541 TMP_548 TMP_551 TMP_553) in (let TMP_555 +\def (ex_intro T TMP_527 TMP_528 TMP_554) in (let TMP_556 \def (or_intror +TMP_508 TMP_518 TMP_555) in (let TMP_557 \def (eq_ind_r T TMP_481 TMP_498 +TMP_556 t0 H3) in (eq_ind_r T TMP_468 TMP_479 TMP_557 t1 +H6)))))))))))))))))))))))))))))))))))))) in (ex_ind T TMP_454 TMP_465 TMP_558 +H5)))))))) in (or_ind TMP_362 TMP_367 TMP_378 TMP_450 TMP_559 +H4))))))))))))))) in (ex_ind T TMP_344 TMP_355 TMP_560 H2)))))))) in (or_ind +TMP_153 TMP_157 TMP_168 TMP_341 TMP_561 H1)))))))))))))))))) in (T_ind TMP_9 +TMP_37 TMP_149 TMP_562 t))))). theorem dnf_dec: \forall (w: T).(\forall (t: T).(\forall (d: nat).(ex T (\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t (lift (S O) d v))))))) \def \lambda (w: T).(\lambda (t: T).(\lambda (d: nat).(let H_x \def (dnf_dec2 t -d) in (let H \def H_x in (or_ind (\forall (w0: T).(ex T (\lambda (v: -T).(subst0 d w0 t (lift (S O) d v))))) (ex T (\lambda (v: T).(eq T t (lift (S -O) d v)))) (ex T (\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t -(lift (S O) d v))))) (\lambda (H0: ((\forall (w0: T).(ex T (\lambda (v: -T).(subst0 d w0 t (lift (S O) d v))))))).(let H_x0 \def (H0 w) in (let H1 -\def H_x0 in (ex_ind T (\lambda (v: T).(subst0 d w t (lift (S O) d v))) (ex T -(\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t (lift (S O) d -v))))) (\lambda (x: T).(\lambda (H2: (subst0 d w t (lift (S O) d -x))).(ex_intro T (\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t -(lift (S O) d v)))) x (or_introl (subst0 d w t (lift (S O) d x)) (eq T t -(lift (S O) d x)) H2)))) H1)))) (\lambda (H0: (ex T (\lambda (v: T).(eq T t -(lift (S O) d v))))).(ex_ind T (\lambda (v: T).(eq T t (lift (S O) d v))) (ex -T (\lambda (v: T).(or (subst0 d w t (lift (S O) d v)) (eq T t (lift (S O) d -v))))) (\lambda (x: T).(\lambda (H1: (eq T t (lift (S O) d x))).(eq_ind_r T -(lift (S O) d x) (\lambda (t0: T).(ex T (\lambda (v: T).(or (subst0 d w t0 -(lift (S O) d v)) (eq T t0 (lift (S O) d v)))))) (ex_intro T (\lambda (v: -T).(or (subst0 d w (lift (S O) d x) (lift (S O) d v)) (eq T (lift (S O) d x) -(lift (S O) d v)))) x (or_intror (subst0 d w (lift (S O) d x) (lift (S O) d -x)) (eq T (lift (S O) d x) (lift (S O) d x)) (refl_equal T (lift (S O) d -x)))) t H1))) H0)) H))))). -(* COMMENTS -Initial nodes: 603 -END *) +d) in (let H \def H_x in (let TMP_4 \def (\forall (w0: T).(let TMP_3 \def +(\lambda (v: T).(let TMP_1 \def (S O) in (let TMP_2 \def (lift TMP_1 d v) in +(subst0 d w0 t TMP_2)))) in (ex T TMP_3))) in (let TMP_7 \def (\lambda (v: +T).(let TMP_5 \def (S O) in (let TMP_6 \def (lift TMP_5 d v) in (eq T t +TMP_6)))) in (let TMP_8 \def (ex T TMP_7) in (let TMP_15 \def (\lambda (v: +T).(let TMP_9 \def (S O) in (let TMP_10 \def (lift TMP_9 d v) in (let TMP_11 +\def (subst0 d w t TMP_10) in (let TMP_12 \def (S O) in (let TMP_13 \def +(lift TMP_12 d v) in (let TMP_14 \def (eq T t TMP_13) in (or TMP_11 +TMP_14)))))))) in (let TMP_16 \def (ex T TMP_15) in (let TMP_43 \def (\lambda +(H0: ((\forall (w0: T).(ex T (\lambda (v: T).(subst0 d w0 t (lift (S O) d +v))))))).(let H_x0 \def (H0 w) in (let H1 \def H_x0 in (let TMP_19 \def +(\lambda (v: T).(let TMP_17 \def (S O) in (let TMP_18 \def (lift TMP_17 d v) +in (subst0 d w t TMP_18)))) in (let TMP_26 \def (\lambda (v: T).(let TMP_20 +\def (S O) in (let TMP_21 \def (lift TMP_20 d v) in (let TMP_22 \def (subst0 +d w t TMP_21) in (let TMP_23 \def (S O) in (let TMP_24 \def (lift TMP_23 d v) +in (let TMP_25 \def (eq T t TMP_24) in (or TMP_22 TMP_25)))))))) in (let +TMP_27 \def (ex T TMP_26) in (let TMP_42 \def (\lambda (x: T).(\lambda (H2: +(subst0 d w t (lift (S O) d x))).(let TMP_34 \def (\lambda (v: T).(let TMP_28 +\def (S O) in (let TMP_29 \def (lift TMP_28 d v) in (let TMP_30 \def (subst0 +d w t TMP_29) in (let TMP_31 \def (S O) in (let TMP_32 \def (lift TMP_31 d v) +in (let TMP_33 \def (eq T t TMP_32) in (or TMP_30 TMP_33)))))))) in (let +TMP_35 \def (S O) in (let TMP_36 \def (lift TMP_35 d x) in (let TMP_37 \def +(subst0 d w t TMP_36) in (let TMP_38 \def (S O) in (let TMP_39 \def (lift +TMP_38 d x) in (let TMP_40 \def (eq T t TMP_39) in (let TMP_41 \def +(or_introl TMP_37 TMP_40 H2) in (ex_intro T TMP_34 x TMP_41))))))))))) in +(ex_ind T TMP_19 TMP_27 TMP_42 H1)))))))) in (let TMP_92 \def (\lambda (H0: +(ex T (\lambda (v: T).(eq T t (lift (S O) d v))))).(let TMP_46 \def (\lambda +(v: T).(let TMP_44 \def (S O) in (let TMP_45 \def (lift TMP_44 d v) in (eq T +t TMP_45)))) in (let TMP_53 \def (\lambda (v: T).(let TMP_47 \def (S O) in +(let TMP_48 \def (lift TMP_47 d v) in (let TMP_49 \def (subst0 d w t TMP_48) +in (let TMP_50 \def (S O) in (let TMP_51 \def (lift TMP_50 d v) in (let +TMP_52 \def (eq T t TMP_51) in (or TMP_49 TMP_52)))))))) in (let TMP_54 \def +(ex T TMP_53) in (let TMP_91 \def (\lambda (x: T).(\lambda (H1: (eq T t (lift +(S O) d x))).(let TMP_55 \def (S O) in (let TMP_56 \def (lift TMP_55 d x) in +(let TMP_64 \def (\lambda (t0: T).(let TMP_63 \def (\lambda (v: T).(let +TMP_57 \def (S O) in (let TMP_58 \def (lift TMP_57 d v) in (let TMP_59 \def +(subst0 d w t0 TMP_58) in (let TMP_60 \def (S O) in (let TMP_61 \def (lift +TMP_60 d v) in (let TMP_62 \def (eq T t0 TMP_61) in (or TMP_59 TMP_62)))))))) +in (ex T TMP_63))) in (let TMP_75 \def (\lambda (v: T).(let TMP_65 \def (S O) +in (let TMP_66 \def (lift TMP_65 d x) in (let TMP_67 \def (S O) in (let +TMP_68 \def (lift TMP_67 d v) in (let TMP_69 \def (subst0 d w TMP_66 TMP_68) +in (let TMP_70 \def (S O) in (let TMP_71 \def (lift TMP_70 d x) in (let +TMP_72 \def (S O) in (let TMP_73 \def (lift TMP_72 d v) in (let TMP_74 \def +(eq T TMP_71 TMP_73) in (or TMP_69 TMP_74)))))))))))) in (let TMP_76 \def (S +O) in (let TMP_77 \def (lift TMP_76 d x) in (let TMP_78 \def (S O) in (let +TMP_79 \def (lift TMP_78 d x) in (let TMP_80 \def (subst0 d w TMP_77 TMP_79) +in (let TMP_81 \def (S O) in (let TMP_82 \def (lift TMP_81 d x) in (let +TMP_83 \def (S O) in (let TMP_84 \def (lift TMP_83 d x) in (let TMP_85 \def +(eq T TMP_82 TMP_84) in (let TMP_86 \def (S O) in (let TMP_87 \def (lift +TMP_86 d x) in (let TMP_88 \def (refl_equal T TMP_87) in (let TMP_89 \def +(or_intror TMP_80 TMP_85 TMP_88) in (let TMP_90 \def (ex_intro T TMP_75 x +TMP_89) in (eq_ind_r T TMP_56 TMP_64 TMP_90 t H1)))))))))))))))))))))) in +(ex_ind T TMP_46 TMP_54 TMP_91 H0)))))) in (or_ind TMP_4 TMP_8 TMP_16 TMP_43 +TMP_92 H)))))))))))). diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/defs.ma b/matita/matita/contribs/lambdadelta/basic_1/subst0/defs.ma index a493a7ac2..fca79e9d9 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/defs.ma +++ b/matita/matita/contribs/lambdadelta/basic_1/subst0/defs.ma @@ -14,7 +14,7 @@ (* This file was automatically generated: do not edit *********************) -include "Basic-1/lift/defs.ma". +include "basic_1/lift/defs.ma". inductive subst0: nat \to (T \to (T \to (T \to Prop))) \def | subst0_lref: \forall (v: T).(\forall (i: nat).(subst0 i v (TLRef i) (lift diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/fwd.ma b/matita/matita/contribs/lambdadelta/basic_1/subst0/fwd.ma index 165555fe2..12a582906 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/fwd.ma +++ b/matita/matita/contribs/lambdadelta/basic_1/subst0/fwd.ma @@ -14,9 +14,28 @@ (* This file was automatically generated: do not edit *********************) -include "Basic-1/subst0/defs.ma". +include "basic_1/subst0/defs.ma". -include "Basic-1/lift/props.ma". +include "basic_1/lift/fwd.ma". + +let rec subst0_ind (P: (nat \to (T \to (T \to (T \to Prop))))) (f: (\forall +(v: T).(\forall (i: nat).(P i v (TLRef i) (lift (S i) O v))))) (f0: (\forall +(v: T).(\forall (u2: T).(\forall (u1: T).(\forall (i: nat).((subst0 i v u1 +u2) \to ((P i v u1 u2) \to (\forall (t: T).(\forall (k: K).(P i v (THead k u1 +t) (THead k u2 t))))))))))) (f1: (\forall (k: K).(\forall (v: T).(\forall +(t2: T).(\forall (t1: T).(\forall (i: nat).((subst0 (s k i) v t1 t2) \to ((P +(s k i) v t1 t2) \to (\forall (u: T).(P i v (THead k u t1) (THead k u +t2))))))))))) (f2: (\forall (v: T).(\forall (u1: T).(\forall (u2: T).(\forall +(i: nat).((subst0 i v u1 u2) \to ((P i v u1 u2) \to (\forall (k: K).(\forall +(t1: T).(\forall (t2: T).((subst0 (s k i) v t1 t2) \to ((P (s k i) v t1 t2) +\to (P i v (THead k u1 t1) (THead k u2 t2)))))))))))))) (n: nat) (t: T) (t0: +T) (t1: T) (s0: subst0 n t t0 t1) on s0: P n t t0 t1 \def match s0 with +[(subst0_lref v i) \Rightarrow (f v i) | (subst0_fst v u2 u1 i s1 t2 k) +\Rightarrow (f0 v u2 u1 i s1 ((subst0_ind P f f0 f1 f2) i v u1 u2 s1) t2 k) | +(subst0_snd k v t2 t3 i s1 u) \Rightarrow (f1 k v t2 t3 i s1 ((subst0_ind P f +f0 f1 f2) (s k i) v t3 t2 s1) u) | (subst0_both v u1 u2 i s1 k t2 t3 s2) +\Rightarrow (f2 v u1 u2 i s1 ((subst0_ind P f f0 f1 f2) i v u1 u2 s1) k t2 t3 +s2 ((subst0_ind P f f0 f1 f2) (s k i) v t2 t3 s2))]. theorem subst0_gen_sort: \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst0 @@ -28,33 +47,29 @@ i v (TSort n) x) \to (\forall (P: Prop).P))))) (H0: (subst0 i v y x)).(subst0_ind (\lambda (_: nat).(\lambda (_: T).(\lambda (t0: T).(\lambda (_: T).((eq T t0 (TSort n)) \to P))))) (\lambda (_: T).(\lambda (i0: nat).(\lambda (H1: (eq T (TLRef i0) (TSort n))).(let H2 \def -(eq_ind T (TLRef i0) (\lambda (ee: T).(match ee in T return (\lambda (_: -T).Prop) with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | -(THead _ _ _) \Rightarrow False])) I (TSort n) H1) in (False_ind P H2))))) -(\lambda (v0: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: -nat).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (_: (((eq T u1 (TSort n)) -\to P))).(\lambda (t: T).(\lambda (k: K).(\lambda (H3: (eq T (THead k u1 t) -(TSort n))).(let H4 \def (eq_ind T (THead k u1 t) (\lambda (ee: T).(match ee -in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow False | (TLRef -_) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H3) in -(False_ind P H4))))))))))) (\lambda (k: K).(\lambda (v0: T).(\lambda (t2: -T).(\lambda (t1: T).(\lambda (i0: nat).(\lambda (_: (subst0 (s k i0) v0 t1 -t2)).(\lambda (_: (((eq T t1 (TSort n)) \to P))).(\lambda (u: T).(\lambda +(eq_ind T (TLRef i0) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow +False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I +(TSort n) H1) in (False_ind P H2))))) (\lambda (v0: T).(\lambda (u2: +T).(\lambda (u1: T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v0 u1 +u2)).(\lambda (_: (((eq T u1 (TSort n)) \to P))).(\lambda (t: T).(\lambda (k: +K).(\lambda (H3: (eq T (THead k u1 t) (TSort n))).(let H4 \def (eq_ind T +(THead k u1 t) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | +(TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) +H3) in (False_ind P H4))))))))))) (\lambda (k: K).(\lambda (v0: T).(\lambda +(t2: T).(\lambda (t1: T).(\lambda (i0: nat).(\lambda (_: (subst0 (s k i0) v0 +t1 t2)).(\lambda (_: (((eq T t1 (TSort n)) \to P))).(\lambda (u: T).(\lambda (H3: (eq T (THead k u t1) (TSort n))).(let H4 \def (eq_ind T (THead k u t1) -(\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) +(\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) +\Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TSort n) H3) in +(False_ind P H4))))))))))) (\lambda (v0: T).(\lambda (u1: T).(\lambda (u2: +T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (_: (((eq T +u1 (TSort n)) \to P))).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: +T).(\lambda (_: (subst0 (s k i0) v0 t1 t2)).(\lambda (_: (((eq T t1 (TSort +n)) \to P))).(\lambda (H5: (eq T (THead k u1 t1) (TSort n))).(let H6 \def +(eq_ind T (THead k u1 t1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TSort n) H3) in (False_ind P H4))))))))))) (\lambda (v0: -T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i0: nat).(\lambda (_: (subst0 -i0 v0 u1 u2)).(\lambda (_: (((eq T u1 (TSort n)) \to P))).(\lambda (k: -K).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (subst0 (s k i0) v0 t1 -t2)).(\lambda (_: (((eq T t1 (TSort n)) \to P))).(\lambda (H5: (eq T (THead k -u1 t1) (TSort n))).(let H6 \def (eq_ind T (THead k u1 t1) (\lambda (ee: -T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I -(TSort n) H5) in (False_ind P H6)))))))))))))) i v y x H0))) H)))))). -(* COMMENTS -Initial nodes: 445 -END *) +True])) I (TSort n) H5) in (False_ind P H6)))))))))))))) i v y x H0))) +H)))))). theorem subst0_gen_lref: \forall (v: T).(\forall (x: T).(\forall (i: nat).(\forall (n: nat).((subst0 @@ -67,17 +82,16 @@ i v t x)) (\lambda (_: T).(land (eq nat n i) (eq T x (lift (S n) O v)))) nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t1: T).((eq T t0 (TLRef n)) \to (land (eq nat n n0) (eq T t1 (lift (S n) O t)))))))) (\lambda (v0: T).(\lambda (i0: nat).(\lambda (H1: (eq T (TLRef i0) (TLRef n))).(let H2 \def -(f_equal T nat (\lambda (e: T).(match e in T return (\lambda (_: T).nat) with -[(TSort _) \Rightarrow i0 | (TLRef n0) \Rightarrow n0 | (THead _ _ _) -\Rightarrow i0])) (TLRef i0) (TLRef n) H1) in (eq_ind_r nat n (\lambda (n0: -nat).(land (eq nat n n0) (eq T (lift (S n0) O v0) (lift (S n) O v0)))) (conj -(eq nat n n) (eq T (lift (S n) O v0) (lift (S n) O v0)) (refl_equal nat n) -(refl_equal T (lift (S n) O v0))) i0 H2))))) (\lambda (v0: T).(\lambda (u2: -T).(\lambda (u1: T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v0 u1 -u2)).(\lambda (_: (((eq T u1 (TLRef n)) \to (land (eq nat n i0) (eq T u2 -(lift (S n) O v0)))))).(\lambda (t: T).(\lambda (k: K).(\lambda (H3: (eq T -(THead k u1 t) (TLRef n))).(let H4 \def (eq_ind T (THead k u1 t) (\lambda -(ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) +(f_equal T nat (\lambda (e: T).(match e with [(TSort _) \Rightarrow i0 | +(TLRef n0) \Rightarrow n0 | (THead _ _ _) \Rightarrow i0])) (TLRef i0) (TLRef +n) H1) in (eq_ind_r nat n (\lambda (n0: nat).(land (eq nat n n0) (eq T (lift +(S n0) O v0) (lift (S n) O v0)))) (conj (eq nat n n) (eq T (lift (S n) O v0) +(lift (S n) O v0)) (refl_equal nat n) (refl_equal T (lift (S n) O v0))) i0 +H2))))) (\lambda (v0: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: +nat).(\lambda (_: (subst0 i0 v0 u1 u2)).(\lambda (_: (((eq T u1 (TLRef n)) +\to (land (eq nat n i0) (eq T u2 (lift (S n) O v0)))))).(\lambda (t: +T).(\lambda (k: K).(\lambda (H3: (eq T (THead k u1 t) (TLRef n))).(let H4 +\def (eq_ind T (THead k u1 t) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H3) in (False_ind (land (eq nat n i0) (eq T (THead k u2 t) (lift (S n) O v0))) H4))))))))))) (\lambda (k: K).(\lambda (v0: @@ -85,23 +99,19 @@ T).(\lambda (t2: T).(\lambda (t1: T).(\lambda (i0: nat).(\lambda (_: (subst0 (s k i0) v0 t1 t2)).(\lambda (_: (((eq T t1 (TLRef n)) \to (land (eq nat n (s k i0)) (eq T t2 (lift (S n) O v0)))))).(\lambda (u: T).(\lambda (H3: (eq T (THead k u t1) (TLRef n))).(let H4 \def (eq_ind T (THead k u t1) (\lambda -(ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TLRef n) H3) in (False_ind (land (eq nat n i0) (eq T (THead k u -t2) (lift (S n) O v0))) H4))))))))))) (\lambda (v0: T).(\lambda (u1: -T).(\lambda (u2: T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v0 u1 -u2)).(\lambda (_: (((eq T u1 (TLRef n)) \to (land (eq nat n i0) (eq T u2 -(lift (S n) O v0)))))).(\lambda (k: K).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (_: (subst0 (s k i0) v0 t1 t2)).(\lambda (_: (((eq T t1 (TLRef -n)) \to (land (eq nat n (s k i0)) (eq T t2 (lift (S n) O v0)))))).(\lambda -(H5: (eq T (THead k u1 t1) (TLRef n))).(let H6 \def (eq_ind T (THead k u1 t1) -(\lambda (ee: T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) -\Rightarrow False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow -True])) I (TLRef n) H5) in (False_ind (land (eq nat n i0) (eq T (THead k u2 -t2) (lift (S n) O v0))) H6)))))))))))))) i v y x H0))) H))))). -(* COMMENTS -Initial nodes: 779 -END *) +(ee: T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow +False | (THead _ _ _) \Rightarrow True])) I (TLRef n) H3) in (False_ind (land +(eq nat n i0) (eq T (THead k u t2) (lift (S n) O v0))) H4))))))))))) (\lambda +(v0: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i0: nat).(\lambda (_: +(subst0 i0 v0 u1 u2)).(\lambda (_: (((eq T u1 (TLRef n)) \to (land (eq nat n +i0) (eq T u2 (lift (S n) O v0)))))).(\lambda (k: K).(\lambda (t1: T).(\lambda +(t2: T).(\lambda (_: (subst0 (s k i0) v0 t1 t2)).(\lambda (_: (((eq T t1 +(TLRef n)) \to (land (eq nat n (s k i0)) (eq T t2 (lift (S n) O +v0)))))).(\lambda (H5: (eq T (THead k u1 t1) (TLRef n))).(let H6 \def (eq_ind +T (THead k u1 t1) (\lambda (ee: T).(match ee with [(TSort _) \Rightarrow +False | (TLRef _) \Rightarrow False | (THead _ _ _) \Rightarrow True])) I +(TLRef n) H5) in (False_ind (land (eq nat n i0) (eq T (THead k u2 t2) (lift +(S n) O v0))) H6)))))))))))))) i v y x H0))) H))))). theorem subst0_gen_head: \forall (k: K).(\forall (v: T).(\forall (u1: T).(\forall (t1: T).(\forall @@ -129,30 +139,28 @@ T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 n t u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k n) t t1 t3)))))))))) (\lambda (v0: T).(\lambda (i0: nat).(\lambda (H1: (eq T (TLRef i0) (THead k u1 t1))).(let H2 \def (eq_ind T (TLRef i0) (\lambda (ee: -T).(match ee in T return (\lambda (_: T).Prop) with [(TSort _) \Rightarrow -False | (TLRef _) \Rightarrow True | (THead _ _ _) \Rightarrow False])) I -(THead k u1 t1) H1) in (False_ind (or3 (ex2 T (\lambda (u2: T).(eq T (lift (S -i0) O v0) (THead k u2 t1))) (\lambda (u2: T).(subst0 i0 v0 u1 u2))) (ex2 T -(\lambda (t2: T).(eq T (lift (S i0) O v0) (THead k u1 t2))) (\lambda (t2: -T).(subst0 (s k i0) v0 t1 t2))) (ex3_2 T T (\lambda (u2: T).(\lambda (t2: -T).(eq T (lift (S i0) O v0) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: -T).(subst0 i0 v0 u1 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i0) -v0 t1 t2))))) H2))))) (\lambda (v0: T).(\lambda (u2: T).(\lambda (u0: -T).(\lambda (i0: nat).(\lambda (H1: (subst0 i0 v0 u0 u2)).(\lambda (H2: (((eq -T u0 (THead k u1 t1)) \to (or3 (ex2 T (\lambda (u3: T).(eq T u2 (THead k u3 -t1))) (\lambda (u3: T).(subst0 i0 v0 u1 u3))) (ex2 T (\lambda (t2: T).(eq T -u2 (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i0) v0 t1 t2))) (ex3_2 T T -(\lambda (u3: T).(\lambda (t2: T).(eq T u2 (THead k u3 t2)))) (\lambda (u3: -T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: T).(\lambda (t2: -T).(subst0 (s k i0) v0 t1 t2)))))))).(\lambda (t: T).(\lambda (k0: -K).(\lambda (H3: (eq T (THead k0 u0 t) (THead k u1 t1))).(let H4 \def -(f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) with +T).(match ee with [(TSort _) \Rightarrow False | (TLRef _) \Rightarrow True | +(THead _ _ _) \Rightarrow False])) I (THead k u1 t1) H1) in (False_ind (or3 +(ex2 T (\lambda (u2: T).(eq T (lift (S i0) O v0) (THead k u2 t1))) (\lambda +(u2: T).(subst0 i0 v0 u1 u2))) (ex2 T (\lambda (t2: T).(eq T (lift (S i0) O +v0) (THead k u1 t2))) (\lambda (t2: T).(subst0 (s k i0) v0 t1 t2))) (ex3_2 T +T (\lambda (u2: T).(\lambda (t2: T).(eq T (lift (S i0) O v0) (THead k u2 +t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i0 v0 u1 u2))) (\lambda (_: +T).(\lambda (t2: T).(subst0 (s k i0) v0 t1 t2))))) H2))))) (\lambda (v0: +T).(\lambda (u2: T).(\lambda (u0: T).(\lambda (i0: nat).(\lambda (H1: (subst0 +i0 v0 u0 u2)).(\lambda (H2: (((eq T u0 (THead k u1 t1)) \to (or3 (ex2 T +(\lambda (u3: T).(eq T u2 (THead k u3 t1))) (\lambda (u3: T).(subst0 i0 v0 u1 +u3))) (ex2 T (\lambda (t2: T).(eq T u2 (THead k u1 t2))) (\lambda (t2: +T).(subst0 (s k i0) v0 t1 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: +T).(eq T u2 (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 +u1 u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i0) v0 t1 +t2)))))))).(\lambda (t: T).(\lambda (k0: K).(\lambda (H3: (eq T (THead k0 u0 +t) (THead k u1 t1))).(let H4 \def (f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k1 _ _) \Rightarrow k1])) (THead k0 u0 t) (THead k u1 t1) H3) in ((let H5 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t0 _) -\Rightarrow t0])) (THead k0 u0 t) (THead k u1 t1) H3) in ((let H6 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow u0 | (TLRef +_) \Rightarrow u0 | (THead _ t0 _) \Rightarrow t0])) (THead k0 u0 t) (THead k +u1 t1) H3) in ((let H6 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t | (TLRef _) \Rightarrow t | (THead _ _ t0) \Rightarrow t0])) (THead k0 u0 t) (THead k u1 t1) H3) in (\lambda (H7: (eq T u0 u1)).(\lambda (H8: (eq K k0 k)).(eq_ind_r K k (\lambda (k1: K).(or3 (ex2 T @@ -192,44 +200,42 @@ T).(eq T t2 (THead k u2 t1))) (\lambda (u2: T).(subst0 (s k0 i0) v0 u1 u2))) T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s k0 i0) v0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k (s k0 i0)) v0 t1 t3)))))))).(\lambda (u: T).(\lambda (H3: (eq T (THead k0 u t0) (THead k u1 -t1))).(let H4 \def (f_equal T K (\lambda (e: T).(match e in T return (\lambda -(_: T).K) with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead -k1 _ _) \Rightarrow k1])) (THead k0 u t0) (THead k u1 t1) H3) in ((let H5 -\def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) -with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | (THead _ t _) -\Rightarrow t])) (THead k0 u t0) (THead k u1 t1) H3) in ((let H6 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) -\Rightarrow t])) (THead k0 u t0) (THead k u1 t1) H3) in (\lambda (H7: (eq T u -u1)).(\lambda (H8: (eq K k0 k)).(eq_ind_r T u1 (\lambda (t: T).(or3 (ex2 T -(\lambda (u2: T).(eq T (THead k0 t t2) (THead k u2 t1))) (\lambda (u2: -T).(subst0 i0 v0 u1 u2))) (ex2 T (\lambda (t3: T).(eq T (THead k0 t t2) -(THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T (THead k0 t t2) (THead k u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i0 v0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3)))))) (let H9 \def (eq_ind T t0 -(\lambda (t: T).((eq T t (THead k u1 t1)) \to (or3 (ex2 T (\lambda (u2: -T).(eq T t2 (THead k u2 t1))) (\lambda (u2: T).(subst0 (s k0 i0) v0 u1 u2))) -(ex2 T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 -(s k (s k0 i0)) v0 t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq -T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s k0 i0) v0 -u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k (s k0 i0)) v0 t1 -t3))))))) H2 t1 H6) in (let H10 \def (eq_ind T t0 (\lambda (t: T).(subst0 (s -k0 i0) v0 t t2)) H1 t1 H6) in (let H11 \def (eq_ind K k0 (\lambda (k1: -K).((eq T t1 (THead k u1 t1)) \to (or3 (ex2 T (\lambda (u2: T).(eq T t2 -(THead k u2 t1))) (\lambda (u2: T).(subst0 (s k1 i0) v0 u1 u2))) (ex2 T -(\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k (s -k1 i0)) v0 t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T t2 -(THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 (s k1 i0) v0 u1 -u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k (s k1 i0)) v0 t1 -t3))))))) H9 k H8) in (let H12 \def (eq_ind K k0 (\lambda (k1: K).(subst0 (s -k1 i0) v0 t1 t2)) H10 k H8) in (eq_ind_r K k (\lambda (k1: K).(or3 (ex2 T -(\lambda (u2: T).(eq T (THead k1 u1 t2) (THead k u2 t1))) (\lambda (u2: -T).(subst0 i0 v0 u1 u2))) (ex2 T (\lambda (t3: T).(eq T (THead k1 u1 t2) -(THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) (ex3_2 T T -(\lambda (u2: T).(\lambda (t3: T).(eq T (THead k1 u1 t2) (THead k u2 t3)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i0 v0 u1 u2))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3)))))) (or3_intro1 (ex2 T +t1))).(let H4 \def (f_equal T K (\lambda (e: T).(match e with [(TSort _) +\Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k1 _ _) \Rightarrow k1])) +(THead k0 u t0) (THead k u1 t1) H3) in ((let H5 \def (f_equal T T (\lambda +(e: T).(match e with [(TSort _) \Rightarrow u | (TLRef _) \Rightarrow u | +(THead _ t _) \Rightarrow t])) (THead k0 u t0) (THead k u1 t1) H3) in ((let +H6 \def (f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 +| (TLRef _) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 u t0) +(THead k u1 t1) H3) in (\lambda (H7: (eq T u u1)).(\lambda (H8: (eq K k0 +k)).(eq_ind_r T u1 (\lambda (t: T).(or3 (ex2 T (\lambda (u2: T).(eq T (THead +k0 t t2) (THead k u2 t1))) (\lambda (u2: T).(subst0 i0 v0 u1 u2))) (ex2 T +(\lambda (t3: T).(eq T (THead k0 t t2) (THead k u1 t3))) (\lambda (t3: +T).(subst0 (s k i0) v0 t1 t3))) (ex3_2 T T (\lambda (u2: T).(\lambda (t3: +T).(eq T (THead k0 t t2) (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i0 v0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i0) +v0 t1 t3)))))) (let H9 \def (eq_ind T t0 (\lambda (t: T).((eq T t (THead k u1 +t1)) \to (or3 (ex2 T (\lambda (u2: T).(eq T t2 (THead k u2 t1))) (\lambda +(u2: T).(subst0 (s k0 i0) v0 u1 u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead +k u1 t3))) (\lambda (t3: T).(subst0 (s k (s k0 i0)) v0 t1 t3))) (ex3_2 T T +(\lambda (u2: T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: +T).(\lambda (_: T).(subst0 (s k0 i0) v0 u1 u2))) (\lambda (_: T).(\lambda +(t3: T).(subst0 (s k (s k0 i0)) v0 t1 t3))))))) H2 t1 H6) in (let H10 \def +(eq_ind T t0 (\lambda (t: T).(subst0 (s k0 i0) v0 t t2)) H1 t1 H6) in (let +H11 \def (eq_ind K k0 (\lambda (k1: K).((eq T t1 (THead k u1 t1)) \to (or3 +(ex2 T (\lambda (u2: T).(eq T t2 (THead k u2 t1))) (\lambda (u2: T).(subst0 +(s k1 i0) v0 u1 u2))) (ex2 T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) +(\lambda (t3: T).(subst0 (s k (s k1 i0)) v0 t1 t3))) (ex3_2 T T (\lambda (u2: +T).(\lambda (t3: T).(eq T t2 (THead k u2 t3)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 (s k1 i0) v0 u1 u2))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s +k (s k1 i0)) v0 t1 t3))))))) H9 k H8) in (let H12 \def (eq_ind K k0 (\lambda +(k1: K).(subst0 (s k1 i0) v0 t1 t2)) H10 k H8) in (eq_ind_r K k (\lambda (k1: +K).(or3 (ex2 T (\lambda (u2: T).(eq T (THead k1 u1 t2) (THead k u2 t1))) +(\lambda (u2: T).(subst0 i0 v0 u1 u2))) (ex2 T (\lambda (t3: T).(eq T (THead +k1 u1 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) +(ex3_2 T T (\lambda (u2: T).(\lambda (t3: T).(eq T (THead k1 u1 t2) (THead k +u2 t3)))) (\lambda (u2: T).(\lambda (_: T).(subst0 i0 v0 u1 u2))) (\lambda +(_: T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3)))))) (or3_intro1 (ex2 T (\lambda (u2: T).(eq T (THead k u1 t2) (THead k u2 t1))) (\lambda (u2: T).(subst0 i0 v0 u1 u2))) (ex2 T (\lambda (t3: T).(eq T (THead k u1 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) (ex3_2 T T @@ -254,58 +260,54 @@ v0 t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 (s k0 i0) v0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k (s k0 i0)) v0 t1 t3)))))))).(\lambda (H5: (eq T (THead k0 u0 t0) (THead k u1 t1))).(let H6 -\def (f_equal T K (\lambda (e: T).(match e in T return (\lambda (_: T).K) -with [(TSort _) \Rightarrow k0 | (TLRef _) \Rightarrow k0 | (THead k1 _ _) -\Rightarrow k1])) (THead k0 u0 t0) (THead k u1 t1) H5) in ((let H7 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) +\def (f_equal T K (\lambda (e: T).(match e with [(TSort _) \Rightarrow k0 | +(TLRef _) \Rightarrow k0 | (THead k1 _ _) \Rightarrow k1])) (THead k0 u0 t0) +(THead k u1 t1) H5) in ((let H7 \def (f_equal T T (\lambda (e: T).(match e +with [(TSort _) \Rightarrow u0 | (TLRef _) \Rightarrow u0 | (THead _ t _) \Rightarrow t])) (THead k0 u0 t0) (THead k u1 t1) H5) in ((let H8 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with -[(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ _ t) -\Rightarrow t])) (THead k0 u0 t0) (THead k u1 t1) H5) in (\lambda (H9: (eq T -u0 u1)).(\lambda (H10: (eq K k0 k)).(let H11 \def (eq_ind T t0 (\lambda (t: -T).((eq T t (THead k u1 t1)) \to (or3 (ex2 T (\lambda (u3: T).(eq T t2 (THead -k u3 t1))) (\lambda (u3: T).(subst0 (s k0 i0) v0 u1 u3))) (ex2 T (\lambda -(t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k (s k0 i0)) -v0 t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead k u3 -t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 (s k0 i0) v0 u1 u3))) -(\lambda (_: T).(\lambda (t3: T).(subst0 (s k (s k0 i0)) v0 t1 t3))))))) H4 -t1 H8) in (let H12 \def (eq_ind T t0 (\lambda (t: T).(subst0 (s k0 i0) v0 t -t2)) H3 t1 H8) in (let H13 \def (eq_ind K k0 (\lambda (k1: K).((eq T t1 -(THead k u1 t1)) \to (or3 (ex2 T (\lambda (u3: T).(eq T t2 (THead k u3 t1))) -(\lambda (u3: T).(subst0 (s k1 i0) v0 u1 u3))) (ex2 T (\lambda (t3: T).(eq T -t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k (s k1 i0)) v0 t1 t3))) -(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T t2 (THead k u3 t3)))) -(\lambda (u3: T).(\lambda (_: T).(subst0 (s k1 i0) v0 u1 u3))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s k (s k1 i0)) v0 t1 t3))))))) H11 k H10) in -(let H14 \def (eq_ind K k0 (\lambda (k1: K).(subst0 (s k1 i0) v0 t1 t2)) H12 -k H10) in (eq_ind_r K k (\lambda (k1: K).(or3 (ex2 T (\lambda (u3: T).(eq T -(THead k1 u2 t2) (THead k u3 t1))) (\lambda (u3: T).(subst0 i0 v0 u1 u3))) -(ex2 T (\lambda (t3: T).(eq T (THead k1 u2 t2) (THead k u1 t3))) (\lambda -(t3: T).(subst0 (s k i0) v0 t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda -(t3: T).(eq T (THead k1 u2 t2) (THead k u3 t3)))) (\lambda (u3: T).(\lambda -(_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k -i0) v0 t1 t3)))))) (let H15 \def (eq_ind T u0 (\lambda (t: T).((eq T t (THead -k u1 t1)) \to (or3 (ex2 T (\lambda (u3: T).(eq T u2 (THead k u3 t1))) -(\lambda (u3: T).(subst0 i0 v0 u1 u3))) (ex2 T (\lambda (t3: T).(eq T u2 +(f_equal T T (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 | (TLRef +_) \Rightarrow t0 | (THead _ _ t) \Rightarrow t])) (THead k0 u0 t0) (THead k +u1 t1) H5) in (\lambda (H9: (eq T u0 u1)).(\lambda (H10: (eq K k0 k)).(let +H11 \def (eq_ind T t0 (\lambda (t: T).((eq T t (THead k u1 t1)) \to (or3 (ex2 +T (\lambda (u3: T).(eq T t2 (THead k u3 t1))) (\lambda (u3: T).(subst0 (s k0 +i0) v0 u1 u3))) (ex2 T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda +(t3: T).(subst0 (s k (s k0 i0)) v0 t1 t3))) (ex3_2 T T (\lambda (u3: +T).(\lambda (t3: T).(eq T t2 (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: +T).(subst0 (s k0 i0) v0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s +k (s k0 i0)) v0 t1 t3))))))) H4 t1 H8) in (let H12 \def (eq_ind T t0 (\lambda +(t: T).(subst0 (s k0 i0) v0 t t2)) H3 t1 H8) in (let H13 \def (eq_ind K k0 +(\lambda (k1: K).((eq T t1 (THead k u1 t1)) \to (or3 (ex2 T (\lambda (u3: +T).(eq T t2 (THead k u3 t1))) (\lambda (u3: T).(subst0 (s k1 i0) v0 u1 u3))) +(ex2 T (\lambda (t3: T).(eq T t2 (THead k u1 t3))) (\lambda (t3: T).(subst0 +(s k (s k1 i0)) v0 t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq +T t2 (THead k u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 (s k1 i0) v0 +u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k (s k1 i0)) v0 t1 +t3))))))) H11 k H10) in (let H14 \def (eq_ind K k0 (\lambda (k1: K).(subst0 +(s k1 i0) v0 t1 t2)) H12 k H10) in (eq_ind_r K k (\lambda (k1: K).(or3 (ex2 T +(\lambda (u3: T).(eq T (THead k1 u2 t2) (THead k u3 t1))) (\lambda (u3: +T).(subst0 i0 v0 u1 u3))) (ex2 T (\lambda (t3: T).(eq T (THead k1 u2 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) (ex3_2 T T -(\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead k u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s k i0) v0 t1 t3))))))) H2 u1 H9) in (let H16 \def (eq_ind T u0 -(\lambda (t: T).(subst0 i0 v0 t u2)) H1 u1 H9) in (or3_intro2 (ex2 T (\lambda -(u3: T).(eq T (THead k u2 t2) (THead k u3 t1))) (\lambda (u3: T).(subst0 i0 -v0 u1 u3))) (ex2 T (\lambda (t3: T).(eq T (THead k u2 t2) (THead k u1 t3))) -(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) (ex3_2 T T (\lambda (u3: -T).(\lambda (t3: T).(eq T (THead k u2 t2) (THead k u3 t3)))) (\lambda (u3: -T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s k i0) v0 t1 t3)))) (ex3_2_intro T T (\lambda (u3: T).(\lambda -(t3: T).(eq T (THead k u2 t2) (THead k u3 t3)))) (\lambda (u3: T).(\lambda -(_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k -i0) v0 t1 t3))) u2 t2 (refl_equal T (THead k u2 t2)) H16 H14)))) k0 -H10)))))))) H7)) H6)))))))))))))) i v y x H0))) H))))))). -(* COMMENTS -Initial nodes: 4255 -END *) +(\lambda (u3: T).(\lambda (t3: T).(eq T (THead k1 u2 t2) (THead k u3 t3)))) +(\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3)))))) (let H15 \def (eq_ind T +u0 (\lambda (t: T).((eq T t (THead k u1 t1)) \to (or3 (ex2 T (\lambda (u3: +T).(eq T u2 (THead k u3 t1))) (\lambda (u3: T).(subst0 i0 v0 u1 u3))) (ex2 T +(\lambda (t3: T).(eq T u2 (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) +v0 t1 t3))) (ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T u2 (THead k u3 +t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))))))) H2 u1 H9) in (let H16 +\def (eq_ind T u0 (\lambda (t: T).(subst0 i0 v0 t u2)) H1 u1 H9) in +(or3_intro2 (ex2 T (\lambda (u3: T).(eq T (THead k u2 t2) (THead k u3 t1))) +(\lambda (u3: T).(subst0 i0 v0 u1 u3))) (ex2 T (\lambda (t3: T).(eq T (THead +k u2 t2) (THead k u1 t3))) (\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) +(ex3_2 T T (\lambda (u3: T).(\lambda (t3: T).(eq T (THead k u2 t2) (THead k +u3 t3)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda +(_: T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3)))) (ex3_2_intro T T +(\lambda (u3: T).(\lambda (t3: T).(eq T (THead k u2 t2) (THead k u3 t3)))) +(\lambda (u3: T).(\lambda (_: T).(subst0 i0 v0 u1 u3))) (\lambda (_: +T).(\lambda (t3: T).(subst0 (s k i0) v0 t1 t3))) u2 t2 (refl_equal T (THead k +u2 t2)) H16 H14)))) k0 H10)))))))) H7)) H6)))))))))))))) i v y x H0))) +H))))))). theorem subst0_gen_lift_lt: \forall (u: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).(\forall @@ -489,9 +491,6 @@ t x3 i H12 k t0 x2 H10)) (THead k (lift h (S (plus i d)) x3) (lift h (s k (S i h d H5))))) (H0 x1 (s k i) h d H8)))) x H4)))))) H3)) (subst0_gen_head k (lift h d u) (lift h (S (plus i d)) t) (lift h (s k (S (plus i d))) t0) x i H2))))))))))))) t1)). -(* COMMENTS -Initial nodes: 5157 -END *) theorem subst0_gen_lift_false: \forall (t: T).(\forall (u: T).(\forall (x: T).(\forall (h: nat).(\forall @@ -551,21 +550,18 @@ T).(eq T x (THead k (lift h d t0) t2))) (\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t1) t2)) P (\lambda (x0: T).(\lambda (_: (eq T x (THead k (lift h d t0) x0))).(\lambda (H7: (subst0 (s k i) u (lift h (s k d) t1) x0)).(H0 u x0 h (s k d) (s k i) (s_le k d i H1) (eq_ind nat (s k (plus d h)) -(\lambda (n: nat).(lt (s k i) n)) (lt_le_S (s k i) (s k (plus d h)) (s_lt k i -(plus d h) H2)) (plus (s k d) h) (s_plus k d h)) H7 P)))) H5)) (\lambda (H5: -(ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) -(\lambda (u2: T).(\lambda (_: T).(subst0 i u (lift h d t0) u2))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t1) t2))))).(ex3_2_ind -T T (\lambda (u2: T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda -(u2: T).(\lambda (_: T).(subst0 i u (lift h d t0) u2))) (\lambda (_: -T).(\lambda (t2: T).(subst0 (s k i) u (lift h (s k d) t1) t2))) P (\lambda -(x0: T).(\lambda (x1: T).(\lambda (_: (eq T x (THead k x0 x1))).(\lambda (H7: -(subst0 i u (lift h d t0) x0)).(\lambda (_: (subst0 (s k i) u (lift h (s k d) -t1) x1)).(H u x0 h d i H1 H2 H7 P)))))) H5)) (subst0_gen_head k u (lift h d -t0) (lift h (s k d) t1) x i H4))))))))))))))))) t). -(* COMMENTS -Initial nodes: 1621 -END *) +(\lambda (n: nat).(lt (s k i) n)) (s_lt k i (plus d h) H2) (plus (s k d) h) +(s_plus k d h)) H7 P)))) H5)) (\lambda (H5: (ex3_2 T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i u (lift h d t0) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 +(s k i) u (lift h (s k d) t1) t2))))).(ex3_2_ind T T (\lambda (u2: +T).(\lambda (t2: T).(eq T x (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: +T).(subst0 i u (lift h d t0) u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 +(s k i) u (lift h (s k d) t1) t2))) P (\lambda (x0: T).(\lambda (x1: +T).(\lambda (_: (eq T x (THead k x0 x1))).(\lambda (H7: (subst0 i u (lift h d +t0) x0)).(\lambda (_: (subst0 (s k i) u (lift h (s k d) t1) x1)).(H u x0 h d +i H1 H2 H7 P)))))) H5)) (subst0_gen_head k u (lift h d t0) (lift h (s k d) +t1) x i H4))))))))))))))))) t). theorem subst0_gen_lift_ge: \forall (u: T).(\forall (t1: T).(\forall (x: T).(\forall (i: nat).(\forall @@ -614,7 +610,7 @@ u) (lift (plus h (S n)) O u))) (eq_ind_r nat (plus h (S n)) (\lambda (n0: nat).(eq T (lift n0 O u) (lift (plus h (S n)) O u))) (refl_equal T (lift (plus h (S n)) O u)) (S (plus h n)) (plus_n_Sm h n)) (plus n h) (plus_sym n h)) (lift h d (lift (S n) O u)) (lift_free u (S n) h O d (le_trans_plus_r O d -(plus O (S n)) (le_plus_plus O O d (S n) (le_n O) (le_S d n H1))) (le_O_n +(plus O (S n)) (le_plus_plus O O d (S n) (le_O_n O) (le_S d n H1))) (le_O_n d))) (subst0_lref u n)) (minus (plus n h) h) (minus_plus_r n h)) x H4) i H3))) (subst0_gen_lref u x i (plus n h) H2)))))))))))) (\lambda (k: K).(\lambda (t: T).(\lambda (H: ((\forall (x: T).(\forall (i: nat).(\forall @@ -722,7 +718,195 @@ x1 H8) x0 H10)))) (H x0 i h d H6 H2))))) (H0 x1 (s k i) h (s k d) H7 (eq_ind nat (s k (plus d h)) (\lambda (n: nat).(le n (s k i))) (s_le k (plus d h) i H2) (plus (s k d) h) (s_plus k d h)))) x H5)))))) H4)) (subst0_gen_head k u (lift h d t) (lift h (s k d) t0) x i H3)))))))))))))) t1)). -(* COMMENTS -Initial nodes: 4191 -END *) + +theorem subst0_gen_lift_rev_ge: + \forall (t1: T).(\forall (v: T).(\forall (u2: T).(\forall (i: nat).(\forall +(h: nat).(\forall (d: nat).((subst0 i v t1 (lift h d u2)) \to ((le (plus d h) +i) \to (ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: +T).(eq T t1 (lift h d u1))))))))))) +\def + \lambda (t1: T).(T_ind (\lambda (t: T).(\forall (v: T).(\forall (u2: +T).(\forall (i: nat).(\forall (h: nat).(\forall (d: nat).((subst0 i v t (lift +h d u2)) \to ((le (plus d h) i) \to (ex2 T (\lambda (u1: T).(subst0 (minus i +h) v u1 u2)) (\lambda (u1: T).(eq T t (lift h d u1)))))))))))) (\lambda (n: +nat).(\lambda (v: T).(\lambda (u2: T).(\lambda (i: nat).(\lambda (h: +nat).(\lambda (d: nat).(\lambda (H: (subst0 i v (TSort n) (lift h d +u2))).(\lambda (_: (le (plus d h) i)).(subst0_gen_sort v (lift h d u2) i n H +(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: T).(eq T +(TSort n) (lift h d u1))))))))))))) (\lambda (n: nat).(\lambda (v: +T).(\lambda (u2: T).(\lambda (i: nat).(\lambda (h: nat).(\lambda (d: +nat).(\lambda (H: (subst0 i v (TLRef n) (lift h d u2))).(\lambda (H0: (le +(plus d h) i)).(land_ind (eq nat n i) (eq T (lift h d u2) (lift (S n) O v)) +(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: T).(eq T +(TLRef n) (lift h d u1)))) (\lambda (H1: (eq nat n i)).(\lambda (H2: (eq T +(lift h d u2) (lift (S n) O v))).(let H3 \def (eq_ind_r nat i (\lambda (n0: +nat).(le (plus d h) n0)) H0 n H1) in (eq_ind nat n (\lambda (n0: nat).(ex2 T +(\lambda (u1: T).(subst0 (minus n0 h) v u1 u2)) (\lambda (u1: T).(eq T (TLRef +n) (lift h d u1))))) (eq_ind_r nat (plus (minus n h) h) (\lambda (n0: +nat).(ex2 T (\lambda (u1: T).(subst0 (minus n h) v u1 u2)) (\lambda (u1: +T).(eq T (TLRef n0) (lift h d u1))))) (eq_ind T (lift h d (TLRef (minus n +h))) (\lambda (t: T).(ex2 T (\lambda (u1: T).(subst0 (minus n h) v u1 u2)) +(\lambda (u1: T).(eq T t (lift h d u1))))) (let H4 \def (eq_ind nat n +(\lambda (n0: nat).(eq T (lift h d u2) (lift (S n0) O v))) H2 (plus h (minus +n h)) (le_plus_minus h n (le_trans h (plus d h) n (le_plus_r d h) H3))) in +(let H5 \def (eq_ind nat (S (plus h (minus n h))) (\lambda (n0: nat).(eq T +(lift h d u2) (lift n0 O v))) H4 (plus h (S (minus n h))) (plus_n_Sm h (minus +n h))) in (let H6 \def (eq_ind_r T (lift (plus h (S (minus n h))) O v) +(\lambda (t: T).(eq T (lift h d u2) t)) H5 (lift h d (lift (S (minus n h)) O +v)) (lift_free v (S (minus n h)) h O d (le_S d (minus n h) (le_minus d n h +H3)) (le_O_n d))) in (eq_ind_r T (lift (S (minus n h)) O v) (\lambda (t: +T).(ex2 T (\lambda (u1: T).(subst0 (minus n h) v u1 t)) (\lambda (u1: T).(eq +T (lift h d (TLRef (minus n h))) (lift h d u1))))) (ex_intro2 T (\lambda (u1: +T).(subst0 (minus n h) v u1 (lift (S (minus n h)) O v))) (\lambda (u1: T).(eq +T (lift h d (TLRef (minus n h))) (lift h d u1))) (TLRef (minus n h)) +(subst0_lref v (minus n h)) (refl_equal T (lift h d (TLRef (minus n h))))) u2 +(lift_inj u2 (lift (S (minus n h)) O v) h d H6))))) (TLRef (plus (minus n h) +h)) (lift_lref_ge (minus n h) h d (le_minus d n h H3))) n (le_plus_minus_sym +h n (le_trans h (plus d h) n (le_plus_r d h) H3))) i H1)))) (subst0_gen_lref +v (lift h d u2) i n H)))))))))) (\lambda (k: K).(\lambda (t: T).(\lambda (H: +((\forall (v: T).(\forall (u2: T).(\forall (i: nat).(\forall (h: +nat).(\forall (d: nat).((subst0 i v t (lift h d u2)) \to ((le (plus d h) i) +\to (ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: +T).(eq T t (lift h d u1))))))))))))).(\lambda (t0: T).(\lambda (H0: ((\forall +(v: T).(\forall (u2: T).(\forall (i: nat).(\forall (h: nat).(\forall (d: +nat).((subst0 i v t0 (lift h d u2)) \to ((le (plus d h) i) \to (ex2 T +(\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: T).(eq T t0 +(lift h d u1))))))))))))).(\lambda (v: T).(\lambda (u2: T).(\lambda (i: +nat).(\lambda (h: nat).(\lambda (d: nat).(\lambda (H1: (subst0 i v (THead k t +t0) (lift h d u2))).(\lambda (H2: (le (plus d h) i)).(or3_ind (ex2 T (\lambda +(u3: T).(eq T (lift h d u2) (THead k u3 t0))) (\lambda (u3: T).(subst0 i v t +u3))) (ex2 T (\lambda (t2: T).(eq T (lift h d u2) (THead k t t2))) (\lambda +(t2: T).(subst0 (s k i) v t0 t2))) (ex3_2 T T (\lambda (u3: T).(\lambda (t2: +T).(eq T (lift h d u2) (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: +T).(subst0 i v t u3))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t0 +t2)))) (ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: +T).(eq T (THead k t t0) (lift h d u1)))) (\lambda (H3: (ex2 T (\lambda (u3: +T).(eq T (lift h d u2) (THead k u3 t0))) (\lambda (u3: T).(subst0 i v t +u3)))).(ex2_ind T (\lambda (u3: T).(eq T (lift h d u2) (THead k u3 t0))) +(\lambda (u3: T).(subst0 i v t u3)) (ex2 T (\lambda (u1: T).(subst0 (minus i +h) v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift h d u1)))) (\lambda +(x: T).(\lambda (H4: (eq T (lift h d u2) (THead k x t0))).(\lambda (H5: +(subst0 i v t x)).(let H6 \def (sym_eq T (lift h d u2) (THead k x t0) H4) in +(let H_x \def (lift_gen_head k x t0 u2 h d H6) in (let H7 \def H_x in +(ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T u2 (THead k y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T x (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T t0 (lift h (s k d) z)))) (ex2 T (\lambda (u1: +T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift +h d u1)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (eq T u2 (THead k +x0 x1))).(\lambda (H9: (eq T x (lift h d x0))).(\lambda (H10: (eq T t0 (lift +h (s k d) x1))).(let H11 \def (eq_ind T x (\lambda (t2: T).(subst0 i v t t2)) +H5 (lift h d x0) H9) in (eq_ind_r T (THead k x0 x1) (\lambda (t2: T).(ex2 T +(\lambda (u1: T).(subst0 (minus i h) v u1 t2)) (\lambda (u1: T).(eq T (THead +k t t0) (lift h d u1))))) (eq_ind_r T (lift h (s k d) x1) (\lambda (t2: +T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 (THead k x0 x1))) +(\lambda (u1: T).(eq T (THead k t t2) (lift h d u1))))) (let H_x0 \def (H v +x0 i h d H11 H2) in (let H12 \def H_x0 in (ex2_ind T (\lambda (u1: T).(subst0 +(minus i h) v u1 x0)) (\lambda (u1: T).(eq T t (lift h d u1))) (ex2 T +(\lambda (u1: T).(subst0 (minus i h) v u1 (THead k x0 x1))) (\lambda (u1: +T).(eq T (THead k t (lift h (s k d) x1)) (lift h d u1)))) (\lambda (x2: +T).(\lambda (H13: (subst0 (minus i h) v x2 x0)).(\lambda (H14: (eq T t (lift +h d x2))).(eq_ind_r T (lift h d x2) (\lambda (t2: T).(ex2 T (\lambda (u1: +T).(subst0 (minus i h) v u1 (THead k x0 x1))) (\lambda (u1: T).(eq T (THead k +t2 (lift h (s k d) x1)) (lift h d u1))))) (eq_ind T (lift h d (THead k x2 +x1)) (\lambda (t2: T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 (THead +k x0 x1))) (\lambda (u1: T).(eq T t2 (lift h d u1))))) (ex_intro2 T (\lambda +(u1: T).(subst0 (minus i h) v u1 (THead k x0 x1))) (\lambda (u1: T).(eq T +(lift h d (THead k x2 x1)) (lift h d u1))) (THead k x2 x1) (subst0_fst v x0 +x2 (minus i h) H13 x1 k) (refl_equal T (lift h d (THead k x2 x1)))) (THead k +(lift h d x2) (lift h (s k d) x1)) (lift_head k x2 x1 h d)) t H14)))) H12))) +t0 H10) u2 H8))))))) H7))))))) H3)) (\lambda (H3: (ex2 T (\lambda (t2: T).(eq +T (lift h d u2) (THead k t t2))) (\lambda (t2: T).(subst0 (s k i) v t0 +t2)))).(ex2_ind T (\lambda (t2: T).(eq T (lift h d u2) (THead k t t2))) +(\lambda (t2: T).(subst0 (s k i) v t0 t2)) (ex2 T (\lambda (u1: T).(subst0 +(minus i h) v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift h d u1)))) +(\lambda (x: T).(\lambda (H4: (eq T (lift h d u2) (THead k t x))).(\lambda +(H5: (subst0 (s k i) v t0 x)).(let H6 \def (sym_eq T (lift h d u2) (THead k t +x) H4) in (let H_x \def (lift_gen_head k t x u2 h d H6) in (let H7 \def H_x +in (ex3_2_ind T T (\lambda (y: T).(\lambda (z: T).(eq T u2 (THead k y z)))) +(\lambda (y: T).(\lambda (_: T).(eq T t (lift h d y)))) (\lambda (_: +T).(\lambda (z: T).(eq T x (lift h (s k d) z)))) (ex2 T (\lambda (u1: +T).(subst0 (minus i h) v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift +h d u1)))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H8: (eq T u2 (THead k +x0 x1))).(\lambda (H9: (eq T t (lift h d x0))).(\lambda (H10: (eq T x (lift h +(s k d) x1))).(let H11 \def (eq_ind T x (\lambda (t2: T).(subst0 (s k i) v t0 +t2)) H5 (lift h (s k d) x1) H10) in (eq_ind_r T (THead k x0 x1) (\lambda (t2: +T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 t2)) (\lambda (u1: T).(eq +T (THead k t t0) (lift h d u1))))) (eq_ind_r T (lift h d x0) (\lambda (t2: +T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 (THead k x0 x1))) +(\lambda (u1: T).(eq T (THead k t2 t0) (lift h d u1))))) (let H_y \def (H0 v +x1 (s k i) h (s k d) H11) in (let H12 \def (eq_ind_r nat (plus (s k d) h) +(\lambda (n: nat).((le n (s k i)) \to (ex2 T (\lambda (u1: T).(subst0 (minus +(s k i) h) v u1 x1)) (\lambda (u1: T).(eq T t0 (lift h (s k d) u1)))))) H_y +(s k (plus d h)) (s_plus k d h)) in (let H13 \def (eq_ind_r nat (minus (s k +i) h) (\lambda (n: nat).((le (s k (plus d h)) (s k i)) \to (ex2 T (\lambda +(u1: T).(subst0 n v u1 x1)) (\lambda (u1: T).(eq T t0 (lift h (s k d) +u1)))))) H12 (s k (minus i h)) (s_minus k i h (le_trans h (plus d h) i +(le_plus_r d h) H2))) in (let H14 \def (H13 (s_le k (plus d h) i H2)) in +(ex2_ind T (\lambda (u1: T).(subst0 (s k (minus i h)) v u1 x1)) (\lambda (u1: +T).(eq T t0 (lift h (s k d) u1))) (ex2 T (\lambda (u1: T).(subst0 (minus i h) +v u1 (THead k x0 x1))) (\lambda (u1: T).(eq T (THead k (lift h d x0) t0) +(lift h d u1)))) (\lambda (x2: T).(\lambda (H15: (subst0 (s k (minus i h)) v +x2 x1)).(\lambda (H16: (eq T t0 (lift h (s k d) x2))).(eq_ind_r T (lift h (s +k d) x2) (\lambda (t2: T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 +(THead k x0 x1))) (\lambda (u1: T).(eq T (THead k (lift h d x0) t2) (lift h d +u1))))) (eq_ind T (lift h d (THead k x0 x2)) (\lambda (t2: T).(ex2 T (\lambda +(u1: T).(subst0 (minus i h) v u1 (THead k x0 x1))) (\lambda (u1: T).(eq T t2 +(lift h d u1))))) (ex_intro2 T (\lambda (u1: T).(subst0 (minus i h) v u1 +(THead k x0 x1))) (\lambda (u1: T).(eq T (lift h d (THead k x0 x2)) (lift h d +u1))) (THead k x0 x2) (subst0_snd k v x1 x2 (minus i h) H15 x0) (refl_equal T +(lift h d (THead k x0 x2)))) (THead k (lift h d x0) (lift h (s k d) x2)) +(lift_head k x0 x2 h d)) t0 H16)))) H14))))) t H9) u2 H8))))))) H7))))))) +H3)) (\lambda (H3: (ex3_2 T T (\lambda (u3: T).(\lambda (t2: T).(eq T (lift h +d u2) (THead k u3 t2)))) (\lambda (u3: T).(\lambda (_: T).(subst0 i v t u3))) +(\lambda (_: T).(\lambda (t2: T).(subst0 (s k i) v t0 t2))))).(ex3_2_ind T T +(\lambda (u3: T).(\lambda (t2: T).(eq T (lift h d u2) (THead k u3 t2)))) +(\lambda (u3: T).(\lambda (_: T).(subst0 i v t u3))) (\lambda (_: T).(\lambda +(t2: T).(subst0 (s k i) v t0 t2))) (ex2 T (\lambda (u1: T).(subst0 (minus i +h) v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift h d u1)))) (\lambda +(x0: T).(\lambda (x1: T).(\lambda (H4: (eq T (lift h d u2) (THead k x0 +x1))).(\lambda (H5: (subst0 i v t x0)).(\lambda (H6: (subst0 (s k i) v t0 +x1)).(let H7 \def (sym_eq T (lift h d u2) (THead k x0 x1) H4) in (let H_x +\def (lift_gen_head k x0 x1 u2 h d H7) in (let H8 \def H_x in (ex3_2_ind T T +(\lambda (y: T).(\lambda (z: T).(eq T u2 (THead k y z)))) (\lambda (y: +T).(\lambda (_: T).(eq T x0 (lift h d y)))) (\lambda (_: T).(\lambda (z: +T).(eq T x1 (lift h (s k d) z)))) (ex2 T (\lambda (u1: T).(subst0 (minus i h) +v u1 u2)) (\lambda (u1: T).(eq T (THead k t t0) (lift h d u1)))) (\lambda +(x2: T).(\lambda (x3: T).(\lambda (H9: (eq T u2 (THead k x2 x3))).(\lambda +(H10: (eq T x0 (lift h d x2))).(\lambda (H11: (eq T x1 (lift h (s k d) +x3))).(let H12 \def (eq_ind T x1 (\lambda (t2: T).(subst0 (s k i) v t0 t2)) +H6 (lift h (s k d) x3) H11) in (let H13 \def (eq_ind T x0 (\lambda (t2: +T).(subst0 i v t t2)) H5 (lift h d x2) H10) in (eq_ind_r T (THead k x2 x3) +(\lambda (t2: T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 t2)) +(\lambda (u1: T).(eq T (THead k t t0) (lift h d u1))))) (let H_x0 \def (H v +x2 i h d H13 H2) in (let H14 \def H_x0 in (ex2_ind T (\lambda (u1: T).(subst0 +(minus i h) v u1 x2)) (\lambda (u1: T).(eq T t (lift h d u1))) (ex2 T +(\lambda (u1: T).(subst0 (minus i h) v u1 (THead k x2 x3))) (\lambda (u1: +T).(eq T (THead k t t0) (lift h d u1)))) (\lambda (x: T).(\lambda (H15: +(subst0 (minus i h) v x x2)).(\lambda (H16: (eq T t (lift h d x))).(eq_ind_r +T (lift h d x) (\lambda (t2: T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v +u1 (THead k x2 x3))) (\lambda (u1: T).(eq T (THead k t2 t0) (lift h d u1))))) +(let H_y \def (H0 v x3 (s k i) h (s k d) H12) in (let H17 \def (eq_ind_r nat +(plus (s k d) h) (\lambda (n: nat).((le n (s k i)) \to (ex2 T (\lambda (u1: +T).(subst0 (minus (s k i) h) v u1 x3)) (\lambda (u1: T).(eq T t0 (lift h (s k +d) u1)))))) H_y (s k (plus d h)) (s_plus k d h)) in (let H18 \def (eq_ind_r +nat (minus (s k i) h) (\lambda (n: nat).((le (s k (plus d h)) (s k i)) \to +(ex2 T (\lambda (u1: T).(subst0 n v u1 x3)) (\lambda (u1: T).(eq T t0 (lift h +(s k d) u1)))))) H17 (s k (minus i h)) (s_minus k i h (le_trans h (plus d h) +i (le_plus_r d h) H2))) in (let H19 \def (H18 (s_le k (plus d h) i H2)) in +(ex2_ind T (\lambda (u1: T).(subst0 (s k (minus i h)) v u1 x3)) (\lambda (u1: +T).(eq T t0 (lift h (s k d) u1))) (ex2 T (\lambda (u1: T).(subst0 (minus i h) +v u1 (THead k x2 x3))) (\lambda (u1: T).(eq T (THead k (lift h d x) t0) (lift +h d u1)))) (\lambda (x4: T).(\lambda (H20: (subst0 (s k (minus i h)) v x4 +x3)).(\lambda (H21: (eq T t0 (lift h (s k d) x4))).(eq_ind_r T (lift h (s k +d) x4) (\lambda (t2: T).(ex2 T (\lambda (u1: T).(subst0 (minus i h) v u1 +(THead k x2 x3))) (\lambda (u1: T).(eq T (THead k (lift h d x) t2) (lift h d +u1))))) (eq_ind T (lift h d (THead k x x4)) (\lambda (t2: T).(ex2 T (\lambda +(u1: T).(subst0 (minus i h) v u1 (THead k x2 x3))) (\lambda (u1: T).(eq T t2 +(lift h d u1))))) (ex_intro2 T (\lambda (u1: T).(subst0 (minus i h) v u1 +(THead k x2 x3))) (\lambda (u1: T).(eq T (lift h d (THead k x x4)) (lift h d +u1))) (THead k x x4) (subst0_both v x x2 (minus i h) H15 k x4 x3 H20) +(refl_equal T (lift h d (THead k x x4)))) (THead k (lift h d x) (lift h (s k +d) x4)) (lift_head k x x4 h d)) t0 H21)))) H19))))) t H16)))) H14))) u2 +H9)))))))) H8))))))))) H3)) (subst0_gen_head k v t t0 (lift h d u2) i +H1)))))))))))))) t1). diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/props.ma b/matita/matita/contribs/lambdadelta/basic_1/subst0/props.ma index 5da05fa2a..04300ba9b 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/props.ma +++ b/matita/matita/contribs/lambdadelta/basic_1/subst0/props.ma @@ -14,69 +14,93 @@ (* This file was automatically generated: do not edit *********************) -include "Basic-1/subst0/fwd.ma". +include "basic_1/subst0/fwd.ma". theorem subst0_refl: \forall (u: T).(\forall (t: T).(\forall (d: nat).((subst0 d u t t) \to (\forall (P: Prop).P)))) \def - \lambda (u: T).(\lambda (t: T).(T_ind (\lambda (t0: T).(\forall (d: -nat).((subst0 d u t0 t0) \to (\forall (P: Prop).P)))) (\lambda (n: -nat).(\lambda (d: nat).(\lambda (H: (subst0 d u (TSort n) (TSort -n))).(\lambda (P: Prop).(subst0_gen_sort u (TSort n) d n H P))))) (\lambda -(n: nat).(\lambda (d: nat).(\lambda (H: (subst0 d u (TLRef n) (TLRef -n))).(\lambda (P: Prop).(land_ind (eq nat n d) (eq T (TLRef n) (lift (S n) O -u)) P (\lambda (_: (eq nat n d)).(\lambda (H1: (eq T (TLRef n) (lift (S n) O -u))).(lift_gen_lref_false (S n) O n (le_O_n n) (le_n (plus O (S n))) u H1 -P))) (subst0_gen_lref u (TLRef n) d n H)))))) (\lambda (k: K).(\lambda (t0: -T).(\lambda (H: ((\forall (d: nat).((subst0 d u t0 t0) \to (\forall (P: -Prop).P))))).(\lambda (t1: T).(\lambda (H0: ((\forall (d: nat).((subst0 d u -t1 t1) \to (\forall (P: Prop).P))))).(\lambda (d: nat).(\lambda (H1: (subst0 -d u (THead k t0 t1) (THead k t0 t1))).(\lambda (P: Prop).(or3_ind (ex2 T -(\lambda (u2: T).(eq T (THead k t0 t1) (THead k u2 t1))) (\lambda (u2: -T).(subst0 d u t0 u2))) (ex2 T (\lambda (t2: T).(eq T (THead k t0 t1) (THead -k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u t1 t2))) (ex3_2 T T (\lambda -(u2: T).(\lambda (t2: T).(eq T (THead k t0 t1) (THead k u2 t2)))) (\lambda -(u2: T).(\lambda (_: T).(subst0 d u t0 u2))) (\lambda (_: T).(\lambda (t2: -T).(subst0 (s k d) u t1 t2)))) P (\lambda (H2: (ex2 T (\lambda (u2: T).(eq T -(THead k t0 t1) (THead k u2 t1))) (\lambda (u2: T).(subst0 d u t0 -u2)))).(ex2_ind T (\lambda (u2: T).(eq T (THead k t0 t1) (THead k u2 t1))) -(\lambda (u2: T).(subst0 d u t0 u2)) P (\lambda (x: T).(\lambda (H3: (eq T -(THead k t0 t1) (THead k x t1))).(\lambda (H4: (subst0 d u t0 x)).(let H5 -\def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) -with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ t2 _) -\Rightarrow t2])) (THead k t0 t1) (THead k x t1) H3) in (let H6 \def -(eq_ind_r T x (\lambda (t2: T).(subst0 d u t0 t2)) H4 t0 H5) in (H d H6 -P)))))) H2)) (\lambda (H2: (ex2 T (\lambda (t2: T).(eq T (THead k t0 t1) -(THead k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u t1 t2)))).(ex2_ind T -(\lambda (t2: T).(eq T (THead k t0 t1) (THead k t0 t2))) (\lambda (t2: -T).(subst0 (s k d) u t1 t2)) P (\lambda (x: T).(\lambda (H3: (eq T (THead k -t0 t1) (THead k t0 x))).(\lambda (H4: (subst0 (s k d) u t1 x)).(let H5 \def -(f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) with + \lambda (u: T).(\lambda (t: T).(let TMP_1 \def (\lambda (t0: T).(\forall (d: +nat).((subst0 d u t0 t0) \to (\forall (P: Prop).P)))) in (let TMP_3 \def +(\lambda (n: nat).(\lambda (d: nat).(\lambda (H: (subst0 d u (TSort n) (TSort +n))).(\lambda (P: Prop).(let TMP_2 \def (TSort n) in (subst0_gen_sort u TMP_2 +d n H P)))))) in (let TMP_17 \def (\lambda (n: nat).(\lambda (d: +nat).(\lambda (H: (subst0 d u (TLRef n) (TLRef n))).(\lambda (P: Prop).(let +TMP_4 \def (eq nat n d) in (let TMP_5 \def (TLRef n) in (let TMP_6 \def (S n) +in (let TMP_7 \def (lift TMP_6 O u) in (let TMP_8 \def (eq T TMP_5 TMP_7) in +(let TMP_14 \def (\lambda (_: (eq nat n d)).(\lambda (H1: (eq T (TLRef n) +(lift (S n) O u))).(let TMP_9 \def (S n) in (let TMP_10 \def (le_O_n n) in +(let TMP_11 \def (S n) in (let TMP_12 \def (plus O TMP_11) in (let TMP_13 +\def (le_n TMP_12) in (lift_gen_lref_false TMP_9 O n TMP_10 TMP_13 u H1 +P)))))))) in (let TMP_15 \def (TLRef n) in (let TMP_16 \def (subst0_gen_lref +u TMP_15 d n H) in (land_ind TMP_4 TMP_8 P TMP_14 TMP_16))))))))))))) in (let +TMP_79 \def (\lambda (k: K).(\lambda (t0: T).(\lambda (H: ((\forall (d: +nat).((subst0 d u t0 t0) \to (\forall (P: Prop).P))))).(\lambda (t1: +T).(\lambda (H0: ((\forall (d: nat).((subst0 d u t1 t1) \to (\forall (P: +Prop).P))))).(\lambda (d: nat).(\lambda (H1: (subst0 d u (THead k t0 t1) +(THead k t0 t1))).(\lambda (P: Prop).(let TMP_20 \def (\lambda (u2: T).(let +TMP_18 \def (THead k t0 t1) in (let TMP_19 \def (THead k u2 t1) in (eq T +TMP_18 TMP_19)))) in (let TMP_21 \def (\lambda (u2: T).(subst0 d u t0 u2)) in +(let TMP_22 \def (ex2 T TMP_20 TMP_21) in (let TMP_25 \def (\lambda (t2: +T).(let TMP_23 \def (THead k t0 t1) in (let TMP_24 \def (THead k t0 t2) in +(eq T TMP_23 TMP_24)))) in (let TMP_27 \def (\lambda (t2: T).(let TMP_26 \def +(s k d) in (subst0 TMP_26 u t1 t2))) in (let TMP_28 \def (ex2 T TMP_25 +TMP_27) in (let TMP_31 \def (\lambda (u2: T).(\lambda (t2: T).(let TMP_29 +\def (THead k t0 t1) in (let TMP_30 \def (THead k u2 t2) in (eq T TMP_29 +TMP_30))))) in (let TMP_32 \def (\lambda (u2: T).(\lambda (_: T).(subst0 d u +t0 u2))) in (let TMP_34 \def (\lambda (_: T).(\lambda (t2: T).(let TMP_33 +\def (s k d) in (subst0 TMP_33 u t1 t2)))) in (let TMP_35 \def (ex3_2 T T +TMP_31 TMP_32 TMP_34) in (let TMP_45 \def (\lambda (H2: (ex2 T (\lambda (u2: +T).(eq T (THead k t0 t1) (THead k u2 t1))) (\lambda (u2: T).(subst0 d u t0 +u2)))).(let TMP_38 \def (\lambda (u2: T).(let TMP_36 \def (THead k t0 t1) in +(let TMP_37 \def (THead k u2 t1) in (eq T TMP_36 TMP_37)))) in (let TMP_39 +\def (\lambda (u2: T).(subst0 d u t0 u2)) in (let TMP_44 \def (\lambda (x: +T).(\lambda (H3: (eq T (THead k t0 t1) (THead k x t1))).(\lambda (H4: (subst0 +d u t0 x)).(let TMP_40 \def (\lambda (e: T).(match e with [(TSort _) +\Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead _ t2 _) \Rightarrow t2])) +in (let TMP_41 \def (THead k t0 t1) in (let TMP_42 \def (THead k x t1) in +(let H5 \def (f_equal T T TMP_40 TMP_41 TMP_42 H3) in (let TMP_43 \def +(\lambda (t2: T).(subst0 d u t0 t2)) in (let H6 \def (eq_ind_r T x TMP_43 H4 +t0 H5) in (H d H6 P)))))))))) in (ex2_ind T TMP_38 TMP_39 P TMP_44 H2))))) in +(let TMP_58 \def (\lambda (H2: (ex2 T (\lambda (t2: T).(eq T (THead k t0 t1) +(THead k t0 t2))) (\lambda (t2: T).(subst0 (s k d) u t1 t2)))).(let TMP_48 +\def (\lambda (t2: T).(let TMP_46 \def (THead k t0 t1) in (let TMP_47 \def +(THead k t0 t2) in (eq T TMP_46 TMP_47)))) in (let TMP_50 \def (\lambda (t2: +T).(let TMP_49 \def (s k d) in (subst0 TMP_49 u t1 t2))) in (let TMP_57 \def +(\lambda (x: T).(\lambda (H3: (eq T (THead k t0 t1) (THead k t0 x))).(\lambda +(H4: (subst0 (s k d) u t1 x)).(let TMP_51 \def (\lambda (e: T).(match e with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t2) -\Rightarrow t2])) (THead k t0 t1) (THead k t0 x) H3) in (let H6 \def -(eq_ind_r T x (\lambda (t2: T).(subst0 (s k d) u t1 t2)) H4 t1 H5) in (H0 (s -k d) H6 P)))))) H2)) (\lambda (H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: +\Rightarrow t2])) in (let TMP_52 \def (THead k t0 t1) in (let TMP_53 \def +(THead k t0 x) in (let H5 \def (f_equal T T TMP_51 TMP_52 TMP_53 H3) in (let +TMP_55 \def (\lambda (t2: T).(let TMP_54 \def (s k d) in (subst0 TMP_54 u t1 +t2))) in (let H6 \def (eq_ind_r T x TMP_55 H4 t1 H5) in (let TMP_56 \def (s k +d) in (H0 TMP_56 H6 P))))))))))) in (ex2_ind T TMP_48 TMP_50 P TMP_57 H2))))) +in (let TMP_76 \def (\lambda (H2: (ex3_2 T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) (\lambda (_: T).(\lambda (t2: T).(subst0 (s k d) u t1 -t2))))).(ex3_2_ind T T (\lambda (u2: T).(\lambda (t2: T).(eq T (THead k t0 -t1) (THead k u2 t2)))) (\lambda (u2: T).(\lambda (_: T).(subst0 d u t0 u2))) -(\lambda (_: T).(\lambda (t2: T).(subst0 (s k d) u t1 t2))) P (\lambda (x0: +t2))))).(let TMP_61 \def (\lambda (u2: T).(\lambda (t2: T).(let TMP_59 \def +(THead k t0 t1) in (let TMP_60 \def (THead k u2 t2) in (eq T TMP_59 +TMP_60))))) in (let TMP_62 \def (\lambda (u2: T).(\lambda (_: T).(subst0 d u +t0 u2))) in (let TMP_64 \def (\lambda (_: T).(\lambda (t2: T).(let TMP_63 +\def (s k d) in (subst0 TMP_63 u t1 t2)))) in (let TMP_75 \def (\lambda (x0: T).(\lambda (x1: T).(\lambda (H3: (eq T (THead k t0 t1) (THead k x0 x1))).(\lambda (H4: (subst0 d u t0 x0)).(\lambda (H5: (subst0 (s k d) u t1 -x1)).(let H6 \def (f_equal T T (\lambda (e: T).(match e in T return (\lambda -(_: T).T) with [(TSort _) \Rightarrow t0 | (TLRef _) \Rightarrow t0 | (THead -_ t2 _) \Rightarrow t2])) (THead k t0 t1) (THead k x0 x1) H3) in ((let H7 -\def (f_equal T T (\lambda (e: T).(match e in T return (\lambda (_: T).T) -with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | (THead _ _ t2) -\Rightarrow t2])) (THead k t0 t1) (THead k x0 x1) H3) in (\lambda (H8: (eq T -t0 x0)).(let H9 \def (eq_ind_r T x1 (\lambda (t2: T).(subst0 (s k d) u t1 -t2)) H5 t1 H7) in (let H10 \def (eq_ind_r T x0 (\lambda (t2: T).(subst0 d u -t0 t2)) H4 t0 H8) in (H d H10 P))))) H6))))))) H2)) (subst0_gen_head k u t0 -t1 (THead k t0 t1) d H1)))))))))) t)). -(* COMMENTS -Initial nodes: 1119 -END *) +x1)).(let TMP_65 \def (\lambda (e: T).(match e with [(TSort _) \Rightarrow t0 +| (TLRef _) \Rightarrow t0 | (THead _ t2 _) \Rightarrow t2])) in (let TMP_66 +\def (THead k t0 t1) in (let TMP_67 \def (THead k x0 x1) in (let H6 \def +(f_equal T T TMP_65 TMP_66 TMP_67 H3) in (let TMP_68 \def (\lambda (e: +T).(match e with [(TSort _) \Rightarrow t1 | (TLRef _) \Rightarrow t1 | +(THead _ _ t2) \Rightarrow t2])) in (let TMP_69 \def (THead k t0 t1) in (let +TMP_70 \def (THead k x0 x1) in (let H7 \def (f_equal T T TMP_68 TMP_69 TMP_70 +H3) in (let TMP_74 \def (\lambda (H8: (eq T t0 x0)).(let TMP_72 \def (\lambda +(t2: T).(let TMP_71 \def (s k d) in (subst0 TMP_71 u t1 t2))) in (let H9 \def +(eq_ind_r T x1 TMP_72 H5 t1 H7) in (let TMP_73 \def (\lambda (t2: T).(subst0 +d u t0 t2)) in (let H10 \def (eq_ind_r T x0 TMP_73 H4 t0 H8) in (H d H10 +P)))))) in (TMP_74 H6))))))))))))))) in (ex3_2_ind T T TMP_61 TMP_62 TMP_64 P +TMP_75 H2)))))) in (let TMP_77 \def (THead k t0 t1) in (let TMP_78 \def +(subst0_gen_head k u t0 t1 TMP_77 d H1) in (or3_ind TMP_22 TMP_28 TMP_35 P +TMP_45 TMP_58 TMP_76 TMP_78)))))))))))))))))))))))) in (T_ind TMP_1 TMP_3 +TMP_17 TMP_79 t)))))). theorem subst0_lift_lt: \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).((subst0 @@ -84,72 +108,163 @@ i u t1 t2) \to (\forall (d: nat).((lt i d) \to (\forall (h: nat).(subst0 i (lift h (minus d (S i)) u) (lift h d t1) (lift h d t2))))))))) \def \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H: (subst0 i u t1 t2)).(subst0_ind (\lambda (n: nat).(\lambda (t: +(H: (subst0 i u t1 t2)).(let TMP_6 \def (\lambda (n: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t3: T).(\forall (d: nat).((lt n d) \to (\forall -(h: nat).(subst0 n (lift h (minus d (S n)) t) (lift h d t0) (lift h d -t3))))))))) (\lambda (v: T).(\lambda (i0: nat).(\lambda (d: nat).(\lambda -(H0: (lt i0 d)).(\lambda (h: nat).(eq_ind_r T (TLRef i0) (\lambda (t: -T).(subst0 i0 (lift h (minus d (S i0)) v) t (lift h d (lift (S i0) O v)))) -(let w \def (minus d (S i0)) in (eq_ind nat (plus (S i0) (minus d (S i0))) -(\lambda (n: nat).(subst0 i0 (lift h w v) (TLRef i0) (lift h n (lift (S i0) O -v)))) (eq_ind_r T (lift (S i0) O (lift h (minus d (S i0)) v)) (\lambda (t: -T).(subst0 i0 (lift h w v) (TLRef i0) t)) (subst0_lref (lift h (minus d (S -i0)) v) i0) (lift h (plus (S i0) (minus d (S i0))) (lift (S i0) O v)) (lift_d -v h (S i0) (minus d (S i0)) O (le_O_n (minus d (S i0))))) d (le_plus_minus_r -(S i0) d H0))) (lift h d (TLRef i0)) (lift_lref_lt i0 h d H0))))))) (\lambda -(v: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: nat).(\lambda (_: -(subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: nat).((lt i0 d) \to (\forall -(h: nat).(subst0 i0 (lift h (minus d (S i0)) v) (lift h d u1) (lift h d -u2))))))).(\lambda (t: T).(\lambda (k: K).(\lambda (d: nat).(\lambda (H2: (lt -i0 d)).(\lambda (h: nat).(eq_ind_r T (THead k (lift h d u1) (lift h (s k d) -t)) (\lambda (t0: T).(subst0 i0 (lift h (minus d (S i0)) v) t0 (lift h d -(THead k u2 t)))) (eq_ind_r T (THead k (lift h d u2) (lift h (s k d) t)) -(\lambda (t0: T).(subst0 i0 (lift h (minus d (S i0)) v) (THead k (lift h d -u1) (lift h (s k d) t)) t0)) (subst0_fst (lift h (minus d (S i0)) v) (lift h -d u2) (lift h d u1) i0 (H1 d H2 h) (lift h (s k d) t) k) (lift h d (THead k -u2 t)) (lift_head k u2 t h d)) (lift h d (THead k u1 t)) (lift_head k u1 t h -d))))))))))))) (\lambda (k: K).(\lambda (v: T).(\lambda (t0: T).(\lambda (t3: -T).(\lambda (i0: nat).(\lambda (_: (subst0 (s k i0) v t3 t0)).(\lambda (H1: -((\forall (d: nat).((lt (s k i0) d) \to (\forall (h: nat).(subst0 (s k i0) -(lift h (minus d (S (s k i0))) v) (lift h d t3) (lift h d t0))))))).(\lambda -(u0: T).(\lambda (d: nat).(\lambda (H2: (lt i0 d)).(\lambda (h: nat).(let H3 -\def (eq_ind_r nat (S (s k i0)) (\lambda (n: nat).(\forall (d0: nat).((lt (s -k i0) d0) \to (\forall (h0: nat).(subst0 (s k i0) (lift h0 (minus d0 n) v) -(lift h0 d0 t3) (lift h0 d0 t0)))))) H1 (s k (S i0)) (s_S k i0)) in (eq_ind_r -T (THead k (lift h d u0) (lift h (s k d) t3)) (\lambda (t: T).(subst0 i0 -(lift h (minus d (S i0)) v) t (lift h d (THead k u0 t0)))) (eq_ind_r T (THead -k (lift h d u0) (lift h (s k d) t0)) (\lambda (t: T).(subst0 i0 (lift h -(minus d (S i0)) v) (THead k (lift h d u0) (lift h (s k d) t3)) t)) (eq_ind -nat (minus (s k d) (s k (S i0))) (\lambda (n: nat).(subst0 i0 (lift h n v) -(THead k (lift h d u0) (lift h (s k d) t3)) (THead k (lift h d u0) (lift h (s -k d) t0)))) (subst0_snd k (lift h (minus (s k d) (s k (S i0))) v) (lift h (s -k d) t0) (lift h (s k d) t3) i0 (H3 (s k d) (s_lt k i0 d H2) h) (lift h d -u0)) (minus d (S i0)) (minus_s_s k d (S i0))) (lift h d (THead k u0 t0)) -(lift_head k u0 t0 h d)) (lift h d (THead k u0 t3)) (lift_head k u0 t3 h -d)))))))))))))) (\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda +(h: nat).(let TMP_1 \def (S n) in (let TMP_2 \def (minus d TMP_1) in (let +TMP_3 \def (lift h TMP_2 t) in (let TMP_4 \def (lift h d t0) in (let TMP_5 +\def (lift h d t3) in (subst0 n TMP_3 TMP_4 TMP_5))))))))))))) in (let TMP_59 +\def (\lambda (v: T).(\lambda (i0: nat).(\lambda (d: nat).(\lambda (H0: (lt +i0 d)).(\lambda (h: nat).(let TMP_7 \def (TLRef i0) in (let TMP_14 \def +(\lambda (t: T).(let TMP_8 \def (S i0) in (let TMP_9 \def (minus d TMP_8) in +(let TMP_10 \def (lift h TMP_9 v) in (let TMP_11 \def (S i0) in (let TMP_12 +\def (lift TMP_11 O v) in (let TMP_13 \def (lift h d TMP_12) in (subst0 i0 +TMP_10 t TMP_13)))))))) in (let TMP_15 \def (S i0) in (let w \def (minus d +TMP_15) in (let TMP_16 \def (S i0) in (let TMP_17 \def (S i0) in (let TMP_18 +\def (minus d TMP_17) in (let TMP_19 \def (plus TMP_16 TMP_18) in (let TMP_25 +\def (\lambda (n: nat).(let TMP_20 \def (lift h w v) in (let TMP_21 \def +(TLRef i0) in (let TMP_22 \def (S i0) in (let TMP_23 \def (lift TMP_22 O v) +in (let TMP_24 \def (lift h n TMP_23) in (subst0 i0 TMP_20 TMP_21 +TMP_24))))))) in (let TMP_26 \def (S i0) in (let TMP_27 \def (S i0) in (let +TMP_28 \def (minus d TMP_27) in (let TMP_29 \def (lift h TMP_28 v) in (let +TMP_30 \def (lift TMP_26 O TMP_29) in (let TMP_33 \def (\lambda (t: T).(let +TMP_31 \def (lift h w v) in (let TMP_32 \def (TLRef i0) in (subst0 i0 TMP_31 +TMP_32 t)))) in (let TMP_34 \def (S i0) in (let TMP_35 \def (minus d TMP_34) +in (let TMP_36 \def (lift h TMP_35 v) in (let TMP_37 \def (subst0_lref TMP_36 +i0) in (let TMP_38 \def (S i0) in (let TMP_39 \def (S i0) in (let TMP_40 \def +(minus d TMP_39) in (let TMP_41 \def (plus TMP_38 TMP_40) in (let TMP_42 \def +(S i0) in (let TMP_43 \def (lift TMP_42 O v) in (let TMP_44 \def (lift h +TMP_41 TMP_43) in (let TMP_45 \def (S i0) in (let TMP_46 \def (S i0) in (let +TMP_47 \def (minus d TMP_46) in (let TMP_48 \def (S i0) in (let TMP_49 \def +(minus d TMP_48) in (let TMP_50 \def (le_O_n TMP_49) in (let TMP_51 \def +(lift_d v h TMP_45 TMP_47 O TMP_50) in (let TMP_52 \def (eq_ind_r T TMP_30 +TMP_33 TMP_37 TMP_44 TMP_51) in (let TMP_53 \def (S i0) in (let TMP_54 \def +(le_plus_minus_r TMP_53 d H0) in (let TMP_55 \def (eq_ind nat TMP_19 TMP_25 +TMP_52 d TMP_54) in (let TMP_56 \def (TLRef i0) in (let TMP_57 \def (lift h d +TMP_56) in (let TMP_58 \def (lift_lref_lt i0 h d H0) in (eq_ind_r T TMP_7 +TMP_14 TMP_55 TMP_57 TMP_58)))))))))))))))))))))))))))))))))))))))))))))) in +(let TMP_98 \def (\lambda (v: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: nat).((lt i0 d) \to (\forall (h: nat).(subst0 i0 (lift h (minus d (S i0)) v) -(lift h d u1) (lift h d u2))))))).(\lambda (k: K).(\lambda (t0: T).(\lambda -(t3: T).(\lambda (_: (subst0 (s k i0) v t0 t3)).(\lambda (H3: ((\forall (d: +(lift h d u1) (lift h d u2))))))).(\lambda (t: T).(\lambda (k: K).(\lambda +(d: nat).(\lambda (H2: (lt i0 d)).(\lambda (h: nat).(let TMP_60 \def (lift h +d u1) in (let TMP_61 \def (s k d) in (let TMP_62 \def (lift h TMP_61 t) in +(let TMP_63 \def (THead k TMP_60 TMP_62) in (let TMP_69 \def (\lambda (t0: +T).(let TMP_64 \def (S i0) in (let TMP_65 \def (minus d TMP_64) in (let +TMP_66 \def (lift h TMP_65 v) in (let TMP_67 \def (THead k u2 t) in (let +TMP_68 \def (lift h d TMP_67) in (subst0 i0 TMP_66 t0 TMP_68))))))) in (let +TMP_70 \def (lift h d u2) in (let TMP_71 \def (s k d) in (let TMP_72 \def +(lift h TMP_71 t) in (let TMP_73 \def (THead k TMP_70 TMP_72) in (let TMP_81 +\def (\lambda (t0: T).(let TMP_74 \def (S i0) in (let TMP_75 \def (minus d +TMP_74) in (let TMP_76 \def (lift h TMP_75 v) in (let TMP_77 \def (lift h d +u1) in (let TMP_78 \def (s k d) in (let TMP_79 \def (lift h TMP_78 t) in (let +TMP_80 \def (THead k TMP_77 TMP_79) in (subst0 i0 TMP_76 TMP_80 t0))))))))) +in (let TMP_82 \def (S i0) in (let TMP_83 \def (minus d TMP_82) in (let +TMP_84 \def (lift h TMP_83 v) in (let TMP_85 \def (lift h d u2) in (let +TMP_86 \def (lift h d u1) in (let TMP_87 \def (H1 d H2 h) in (let TMP_88 \def +(s k d) in (let TMP_89 \def (lift h TMP_88 t) in (let TMP_90 \def (subst0_fst +TMP_84 TMP_85 TMP_86 i0 TMP_87 TMP_89 k) in (let TMP_91 \def (THead k u2 t) +in (let TMP_92 \def (lift h d TMP_91) in (let TMP_93 \def (lift_head k u2 t h +d) in (let TMP_94 \def (eq_ind_r T TMP_73 TMP_81 TMP_90 TMP_92 TMP_93) in +(let TMP_95 \def (THead k u1 t) in (let TMP_96 \def (lift h d TMP_95) in (let +TMP_97 \def (lift_head k u1 t h d) in (eq_ind_r T TMP_63 TMP_69 TMP_94 TMP_96 +TMP_97)))))))))))))))))))))))))))))))))))))) in (let TMP_172 \def (\lambda +(k: K).(\lambda (v: T).(\lambda (t0: T).(\lambda (t3: T).(\lambda (i0: +nat).(\lambda (_: (subst0 (s k i0) v t3 t0)).(\lambda (H1: ((\forall (d: +nat).((lt (s k i0) d) \to (\forall (h: nat).(subst0 (s k i0) (lift h (minus d +(S (s k i0))) v) (lift h d t3) (lift h d t0))))))).(\lambda (u0: T).(\lambda +(d: nat).(\lambda (H2: (lt i0 d)).(\lambda (h: nat).(let TMP_99 \def (s k i0) +in (let TMP_100 \def (S TMP_99) in (let TMP_106 \def (\lambda (n: +nat).(\forall (d0: nat).((lt (s k i0) d0) \to (\forall (h0: nat).(let TMP_101 +\def (s k i0) in (let TMP_102 \def (minus d0 n) in (let TMP_103 \def (lift h0 +TMP_102 v) in (let TMP_104 \def (lift h0 d0 t3) in (let TMP_105 \def (lift h0 +d0 t0) in (subst0 TMP_101 TMP_103 TMP_104 TMP_105)))))))))) in (let TMP_107 +\def (S i0) in (let TMP_108 \def (s k TMP_107) in (let TMP_109 \def (s_S k +i0) in (let H3 \def (eq_ind_r nat TMP_100 TMP_106 H1 TMP_108 TMP_109) in (let +TMP_110 \def (lift h d u0) in (let TMP_111 \def (s k d) in (let TMP_112 \def +(lift h TMP_111 t3) in (let TMP_113 \def (THead k TMP_110 TMP_112) in (let +TMP_119 \def (\lambda (t: T).(let TMP_114 \def (S i0) in (let TMP_115 \def +(minus d TMP_114) in (let TMP_116 \def (lift h TMP_115 v) in (let TMP_117 +\def (THead k u0 t0) in (let TMP_118 \def (lift h d TMP_117) in (subst0 i0 +TMP_116 t TMP_118))))))) in (let TMP_120 \def (lift h d u0) in (let TMP_121 +\def (s k d) in (let TMP_122 \def (lift h TMP_121 t0) in (let TMP_123 \def +(THead k TMP_120 TMP_122) in (let TMP_131 \def (\lambda (t: T).(let TMP_124 +\def (S i0) in (let TMP_125 \def (minus d TMP_124) in (let TMP_126 \def (lift +h TMP_125 v) in (let TMP_127 \def (lift h d u0) in (let TMP_128 \def (s k d) +in (let TMP_129 \def (lift h TMP_128 t3) in (let TMP_130 \def (THead k +TMP_127 TMP_129) in (subst0 i0 TMP_126 TMP_130 t))))))))) in (let TMP_132 +\def (s k d) in (let TMP_133 \def (S i0) in (let TMP_134 \def (s k TMP_133) +in (let TMP_135 \def (minus TMP_132 TMP_134) in (let TMP_145 \def (\lambda +(n: nat).(let TMP_136 \def (lift h n v) in (let TMP_137 \def (lift h d u0) in +(let TMP_138 \def (s k d) in (let TMP_139 \def (lift h TMP_138 t3) in (let +TMP_140 \def (THead k TMP_137 TMP_139) in (let TMP_141 \def (lift h d u0) in +(let TMP_142 \def (s k d) in (let TMP_143 \def (lift h TMP_142 t0) in (let +TMP_144 \def (THead k TMP_141 TMP_143) in (subst0 i0 TMP_136 TMP_140 +TMP_144))))))))))) in (let TMP_146 \def (s k d) in (let TMP_147 \def (S i0) +in (let TMP_148 \def (s k TMP_147) in (let TMP_149 \def (minus TMP_146 +TMP_148) in (let TMP_150 \def (lift h TMP_149 v) in (let TMP_151 \def (s k d) +in (let TMP_152 \def (lift h TMP_151 t0) in (let TMP_153 \def (s k d) in (let +TMP_154 \def (lift h TMP_153 t3) in (let TMP_155 \def (s k d) in (let TMP_156 +\def (s_lt k i0 d H2) in (let TMP_157 \def (H3 TMP_155 TMP_156 h) in (let +TMP_158 \def (lift h d u0) in (let TMP_159 \def (subst0_snd k TMP_150 TMP_152 +TMP_154 i0 TMP_157 TMP_158) in (let TMP_160 \def (S i0) in (let TMP_161 \def +(minus d TMP_160) in (let TMP_162 \def (S i0) in (let TMP_163 \def (minus_s_s +k d TMP_162) in (let TMP_164 \def (eq_ind nat TMP_135 TMP_145 TMP_159 TMP_161 +TMP_163) in (let TMP_165 \def (THead k u0 t0) in (let TMP_166 \def (lift h d +TMP_165) in (let TMP_167 \def (lift_head k u0 t0 h d) in (let TMP_168 \def +(eq_ind_r T TMP_123 TMP_131 TMP_164 TMP_166 TMP_167) in (let TMP_169 \def +(THead k u0 t3) in (let TMP_170 \def (lift h d TMP_169) in (let TMP_171 \def +(lift_head k u0 t3 h d) in (eq_ind_r T TMP_113 TMP_119 TMP_168 TMP_170 +TMP_171)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) in (let +TMP_243 \def (\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i0: +nat).(\lambda (_: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: nat).((lt +i0 d) \to (\forall (h: nat).(subst0 i0 (lift h (minus d (S i0)) v) (lift h d +u1) (lift h d u2))))))).(\lambda (k: K).(\lambda (t0: T).(\lambda (t3: +T).(\lambda (_: (subst0 (s k i0) v t0 t3)).(\lambda (H3: ((\forall (d: nat).((lt (s k i0) d) \to (\forall (h: nat).(subst0 (s k i0) (lift h (minus d (S (s k i0))) v) (lift h d t0) (lift h d t3))))))).(\lambda (d: nat).(\lambda -(H4: (lt i0 d)).(\lambda (h: nat).(let H5 \def (eq_ind_r nat (S (s k i0)) -(\lambda (n: nat).(\forall (d0: nat).((lt (s k i0) d0) \to (\forall (h0: -nat).(subst0 (s k i0) (lift h0 (minus d0 n) v) (lift h0 d0 t0) (lift h0 d0 -t3)))))) H3 (s k (S i0)) (s_S k i0)) in (eq_ind_r T (THead k (lift h d u1) -(lift h (s k d) t0)) (\lambda (t: T).(subst0 i0 (lift h (minus d (S i0)) v) t -(lift h d (THead k u2 t3)))) (eq_ind_r T (THead k (lift h d u2) (lift h (s k -d) t3)) (\lambda (t: T).(subst0 i0 (lift h (minus d (S i0)) v) (THead k (lift -h d u1) (lift h (s k d) t0)) t)) (subst0_both (lift h (minus d (S i0)) v) -(lift h d u1) (lift h d u2) i0 (H1 d H4 h) k (lift h (s k d) t0) (lift h (s k -d) t3) (eq_ind nat (minus (s k d) (s k (S i0))) (\lambda (n: nat).(subst0 (s -k i0) (lift h n v) (lift h (s k d) t0) (lift h (s k d) t3))) (H5 (s k d) -(s_lt k i0 d H4) h) (minus d (S i0)) (minus_s_s k d (S i0)))) (lift h d -(THead k u2 t3)) (lift_head k u2 t3 h d)) (lift h d (THead k u1 t0)) -(lift_head k u1 t0 h d))))))))))))))))) i u t1 t2 H))))). -(* COMMENTS -Initial nodes: 1805 -END *) +(H4: (lt i0 d)).(\lambda (h: nat).(let TMP_173 \def (s k i0) in (let TMP_174 +\def (S TMP_173) in (let TMP_180 \def (\lambda (n: nat).(\forall (d0: +nat).((lt (s k i0) d0) \to (\forall (h0: nat).(let TMP_175 \def (s k i0) in +(let TMP_176 \def (minus d0 n) in (let TMP_177 \def (lift h0 TMP_176 v) in +(let TMP_178 \def (lift h0 d0 t0) in (let TMP_179 \def (lift h0 d0 t3) in +(subst0 TMP_175 TMP_177 TMP_178 TMP_179)))))))))) in (let TMP_181 \def (S i0) +in (let TMP_182 \def (s k TMP_181) in (let TMP_183 \def (s_S k i0) in (let H5 +\def (eq_ind_r nat TMP_174 TMP_180 H3 TMP_182 TMP_183) in (let TMP_184 \def +(lift h d u1) in (let TMP_185 \def (s k d) in (let TMP_186 \def (lift h +TMP_185 t0) in (let TMP_187 \def (THead k TMP_184 TMP_186) in (let TMP_193 +\def (\lambda (t: T).(let TMP_188 \def (S i0) in (let TMP_189 \def (minus d +TMP_188) in (let TMP_190 \def (lift h TMP_189 v) in (let TMP_191 \def (THead +k u2 t3) in (let TMP_192 \def (lift h d TMP_191) in (subst0 i0 TMP_190 t +TMP_192))))))) in (let TMP_194 \def (lift h d u2) in (let TMP_195 \def (s k +d) in (let TMP_196 \def (lift h TMP_195 t3) in (let TMP_197 \def (THead k +TMP_194 TMP_196) in (let TMP_205 \def (\lambda (t: T).(let TMP_198 \def (S +i0) in (let TMP_199 \def (minus d TMP_198) in (let TMP_200 \def (lift h +TMP_199 v) in (let TMP_201 \def (lift h d u1) in (let TMP_202 \def (s k d) in +(let TMP_203 \def (lift h TMP_202 t0) in (let TMP_204 \def (THead k TMP_201 +TMP_203) in (subst0 i0 TMP_200 TMP_204 t))))))))) in (let TMP_206 \def (S i0) +in (let TMP_207 \def (minus d TMP_206) in (let TMP_208 \def (lift h TMP_207 +v) in (let TMP_209 \def (lift h d u1) in (let TMP_210 \def (lift h d u2) in +(let TMP_211 \def (H1 d H4 h) in (let TMP_212 \def (s k d) in (let TMP_213 +\def (lift h TMP_212 t0) in (let TMP_214 \def (s k d) in (let TMP_215 \def +(lift h TMP_214 t3) in (let TMP_216 \def (s k d) in (let TMP_217 \def (S i0) +in (let TMP_218 \def (s k TMP_217) in (let TMP_219 \def (minus TMP_216 +TMP_218) in (let TMP_226 \def (\lambda (n: nat).(let TMP_220 \def (s k i0) in +(let TMP_221 \def (lift h n v) in (let TMP_222 \def (s k d) in (let TMP_223 +\def (lift h TMP_222 t0) in (let TMP_224 \def (s k d) in (let TMP_225 \def +(lift h TMP_224 t3) in (subst0 TMP_220 TMP_221 TMP_223 TMP_225)))))))) in +(let TMP_227 \def (s k d) in (let TMP_228 \def (s_lt k i0 d H4) in (let +TMP_229 \def (H5 TMP_227 TMP_228 h) in (let TMP_230 \def (S i0) in (let +TMP_231 \def (minus d TMP_230) in (let TMP_232 \def (S i0) in (let TMP_233 +\def (minus_s_s k d TMP_232) in (let TMP_234 \def (eq_ind nat TMP_219 TMP_226 +TMP_229 TMP_231 TMP_233) in (let TMP_235 \def (subst0_both TMP_208 TMP_209 +TMP_210 i0 TMP_211 k TMP_213 TMP_215 TMP_234) in (let TMP_236 \def (THead k +u2 t3) in (let TMP_237 \def (lift h d TMP_236) in (let TMP_238 \def +(lift_head k u2 t3 h d) in (let TMP_239 \def (eq_ind_r T TMP_197 TMP_205 +TMP_235 TMP_237 TMP_238) in (let TMP_240 \def (THead k u1 t0) in (let TMP_241 +\def (lift h d TMP_240) in (let TMP_242 \def (lift_head k u1 t0 h d) in +(eq_ind_r T TMP_187 TMP_193 TMP_239 TMP_241 +TMP_242))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) in +(subst0_ind TMP_6 TMP_59 TMP_98 TMP_172 TMP_243 i u t1 t2 H)))))))))). theorem subst0_lift_ge: \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).(\forall @@ -157,60 +272,124 @@ theorem subst0_lift_ge: (plus i h) u (lift h d t1) (lift h d t2))))))))) \def \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda -(h: nat).(\lambda (H: (subst0 i u t1 t2)).(subst0_ind (\lambda (n: +(h: nat).(\lambda (H: (subst0 i u t1 t2)).(let TMP_4 \def (\lambda (n: nat).(\lambda (t: T).(\lambda (t0: T).(\lambda (t3: T).(\forall (d: nat).((le -d n) \to (subst0 (plus n h) t (lift h d t0) (lift h d t3)))))))) (\lambda (v: -T).(\lambda (i0: nat).(\lambda (d: nat).(\lambda (H0: (le d i0)).(eq_ind_r T -(TLRef (plus i0 h)) (\lambda (t: T).(subst0 (plus i0 h) v t (lift h d (lift -(S i0) O v)))) (eq_ind_r T (lift (plus h (S i0)) O v) (\lambda (t: T).(subst0 -(plus i0 h) v (TLRef (plus i0 h)) t)) (eq_ind nat (S (plus h i0)) (\lambda -(n: nat).(subst0 (plus i0 h) v (TLRef (plus i0 h)) (lift n O v))) (eq_ind_r -nat (plus h i0) (\lambda (n: nat).(subst0 n v (TLRef n) (lift (S (plus h i0)) -O v))) (subst0_lref v (plus h i0)) (plus i0 h) (plus_sym i0 h)) (plus h (S -i0)) (plus_n_Sm h i0)) (lift h d (lift (S i0) O v)) (lift_free v (S i0) h O d -(le_S d i0 H0) (le_O_n d))) (lift h d (TLRef i0)) (lift_lref_ge i0 h d -H0)))))) (\lambda (v: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: -nat).(\lambda (_: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: nat).((le -d i0) \to (subst0 (plus i0 h) v (lift h d u1) (lift h d u2)))))).(\lambda (t: -T).(\lambda (k: K).(\lambda (d: nat).(\lambda (H2: (le d i0)).(eq_ind_r T -(THead k (lift h d u1) (lift h (s k d) t)) (\lambda (t0: T).(subst0 (plus i0 -h) v t0 (lift h d (THead k u2 t)))) (eq_ind_r T (THead k (lift h d u2) (lift -h (s k d) t)) (\lambda (t0: T).(subst0 (plus i0 h) v (THead k (lift h d u1) -(lift h (s k d) t)) t0)) (subst0_fst v (lift h d u2) (lift h d u1) (plus i0 -h) (H1 d H2) (lift h (s k d) t) k) (lift h d (THead k u2 t)) (lift_head k u2 -t h d)) (lift h d (THead k u1 t)) (lift_head k u1 t h d)))))))))))) (\lambda -(k: K).(\lambda (v: T).(\lambda (t0: T).(\lambda (t3: T).(\lambda (i0: -nat).(\lambda (_: (subst0 (s k i0) v t3 t0)).(\lambda (H1: ((\forall (d: -nat).((le d (s k i0)) \to (subst0 (plus (s k i0) h) v (lift h d t3) (lift h d -t0)))))).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H2: (le d i0)).(let H3 -\def (eq_ind_r nat (plus (s k i0) h) (\lambda (n: nat).(\forall (d0: -nat).((le d0 (s k i0)) \to (subst0 n v (lift h d0 t3) (lift h d0 t0))))) H1 -(s k (plus i0 h)) (s_plus k i0 h)) in (eq_ind_r T (THead k (lift h d u0) -(lift h (s k d) t3)) (\lambda (t: T).(subst0 (plus i0 h) v t (lift h d (THead -k u0 t0)))) (eq_ind_r T (THead k (lift h d u0) (lift h (s k d) t0)) (\lambda -(t: T).(subst0 (plus i0 h) v (THead k (lift h d u0) (lift h (s k d) t3)) t)) -(subst0_snd k v (lift h (s k d) t0) (lift h (s k d) t3) (plus i0 h) (H3 (s k -d) (s_le k d i0 H2)) (lift h d u0)) (lift h d (THead k u0 t0)) (lift_head k -u0 t0 h d)) (lift h d (THead k u0 t3)) (lift_head k u0 t3 h d))))))))))))) -(\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i0: nat).(\lambda +d n) \to (let TMP_1 \def (plus n h) in (let TMP_2 \def (lift h d t0) in (let +TMP_3 \def (lift h d t3) in (subst0 TMP_1 t TMP_2 TMP_3)))))))))) in (let +TMP_52 \def (\lambda (v: T).(\lambda (i0: nat).(\lambda (d: nat).(\lambda +(H0: (le d i0)).(let TMP_5 \def (plus i0 h) in (let TMP_6 \def (TLRef TMP_5) +in (let TMP_11 \def (\lambda (t: T).(let TMP_7 \def (plus i0 h) in (let TMP_8 +\def (S i0) in (let TMP_9 \def (lift TMP_8 O v) in (let TMP_10 \def (lift h d +TMP_9) in (subst0 TMP_7 v t TMP_10)))))) in (let TMP_12 \def (S i0) in (let +TMP_13 \def (plus h TMP_12) in (let TMP_14 \def (lift TMP_13 O v) in (let +TMP_18 \def (\lambda (t: T).(let TMP_15 \def (plus i0 h) in (let TMP_16 \def +(plus i0 h) in (let TMP_17 \def (TLRef TMP_16) in (subst0 TMP_15 v TMP_17 +t))))) in (let TMP_19 \def (plus h i0) in (let TMP_20 \def (S TMP_19) in (let +TMP_25 \def (\lambda (n: nat).(let TMP_21 \def (plus i0 h) in (let TMP_22 +\def (plus i0 h) in (let TMP_23 \def (TLRef TMP_22) in (let TMP_24 \def (lift +n O v) in (subst0 TMP_21 v TMP_23 TMP_24)))))) in (let TMP_26 \def (plus h +i0) in (let TMP_31 \def (\lambda (n: nat).(let TMP_27 \def (TLRef n) in (let +TMP_28 \def (plus h i0) in (let TMP_29 \def (S TMP_28) in (let TMP_30 \def +(lift TMP_29 O v) in (subst0 n v TMP_27 TMP_30)))))) in (let TMP_32 \def +(plus h i0) in (let TMP_33 \def (subst0_lref v TMP_32) in (let TMP_34 \def +(plus i0 h) in (let TMP_35 \def (plus_sym i0 h) in (let TMP_36 \def (eq_ind_r +nat TMP_26 TMP_31 TMP_33 TMP_34 TMP_35) in (let TMP_37 \def (S i0) in (let +TMP_38 \def (plus h TMP_37) in (let TMP_39 \def (plus_n_Sm h i0) in (let +TMP_40 \def (eq_ind nat TMP_20 TMP_25 TMP_36 TMP_38 TMP_39) in (let TMP_41 +\def (S i0) in (let TMP_42 \def (lift TMP_41 O v) in (let TMP_43 \def (lift h +d TMP_42) in (let TMP_44 \def (S i0) in (let TMP_45 \def (le_S d i0 H0) in +(let TMP_46 \def (le_O_n d) in (let TMP_47 \def (lift_free v TMP_44 h O d +TMP_45 TMP_46) in (let TMP_48 \def (eq_ind_r T TMP_14 TMP_18 TMP_40 TMP_43 +TMP_47) in (let TMP_49 \def (TLRef i0) in (let TMP_50 \def (lift h d TMP_49) +in (let TMP_51 \def (lift_lref_ge i0 h d H0) in (eq_ind_r T TMP_6 TMP_11 +TMP_48 TMP_50 TMP_51))))))))))))))))))))))))))))))))))))) in (let TMP_85 \def +(\lambda (v: T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i0: nat).(\lambda (_: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: nat).((le d i0) \to -(subst0 (plus i0 h) v (lift h d u1) (lift h d u2)))))).(\lambda (k: +(subst0 (plus i0 h) v (lift h d u1) (lift h d u2)))))).(\lambda (t: +T).(\lambda (k: K).(\lambda (d: nat).(\lambda (H2: (le d i0)).(let TMP_53 +\def (lift h d u1) in (let TMP_54 \def (s k d) in (let TMP_55 \def (lift h +TMP_54 t) in (let TMP_56 \def (THead k TMP_53 TMP_55) in (let TMP_60 \def +(\lambda (t0: T).(let TMP_57 \def (plus i0 h) in (let TMP_58 \def (THead k u2 +t) in (let TMP_59 \def (lift h d TMP_58) in (subst0 TMP_57 v t0 TMP_59))))) +in (let TMP_61 \def (lift h d u2) in (let TMP_62 \def (s k d) in (let TMP_63 +\def (lift h TMP_62 t) in (let TMP_64 \def (THead k TMP_61 TMP_63) in (let +TMP_70 \def (\lambda (t0: T).(let TMP_65 \def (plus i0 h) in (let TMP_66 \def +(lift h d u1) in (let TMP_67 \def (s k d) in (let TMP_68 \def (lift h TMP_67 +t) in (let TMP_69 \def (THead k TMP_66 TMP_68) in (subst0 TMP_65 v TMP_69 +t0))))))) in (let TMP_71 \def (lift h d u2) in (let TMP_72 \def (lift h d u1) +in (let TMP_73 \def (plus i0 h) in (let TMP_74 \def (H1 d H2) in (let TMP_75 +\def (s k d) in (let TMP_76 \def (lift h TMP_75 t) in (let TMP_77 \def +(subst0_fst v TMP_71 TMP_72 TMP_73 TMP_74 TMP_76 k) in (let TMP_78 \def +(THead k u2 t) in (let TMP_79 \def (lift h d TMP_78) in (let TMP_80 \def +(lift_head k u2 t h d) in (let TMP_81 \def (eq_ind_r T TMP_64 TMP_70 TMP_77 +TMP_79 TMP_80) in (let TMP_82 \def (THead k u1 t) in (let TMP_83 \def (lift h +d TMP_82) in (let TMP_84 \def (lift_head k u1 t h d) in (eq_ind_r T TMP_56 +TMP_60 TMP_81 TMP_83 TMP_84))))))))))))))))))))))))))))))))))) in (let +TMP_129 \def (\lambda (k: K).(\lambda (v: T).(\lambda (t0: T).(\lambda (t3: +T).(\lambda (i0: nat).(\lambda (_: (subst0 (s k i0) v t3 t0)).(\lambda (H1: +((\forall (d: nat).((le d (s k i0)) \to (subst0 (plus (s k i0) h) v (lift h d +t3) (lift h d t0)))))).(\lambda (u0: T).(\lambda (d: nat).(\lambda (H2: (le d +i0)).(let TMP_86 \def (s k i0) in (let TMP_87 \def (plus TMP_86 h) in (let +TMP_90 \def (\lambda (n: nat).(\forall (d0: nat).((le d0 (s k i0)) \to (let +TMP_88 \def (lift h d0 t3) in (let TMP_89 \def (lift h d0 t0) in (subst0 n v +TMP_88 TMP_89)))))) in (let TMP_91 \def (plus i0 h) in (let TMP_92 \def (s k +TMP_91) in (let TMP_93 \def (s_plus k i0 h) in (let H3 \def (eq_ind_r nat +TMP_87 TMP_90 H1 TMP_92 TMP_93) in (let TMP_94 \def (lift h d u0) in (let +TMP_95 \def (s k d) in (let TMP_96 \def (lift h TMP_95 t3) in (let TMP_97 +\def (THead k TMP_94 TMP_96) in (let TMP_101 \def (\lambda (t: T).(let TMP_98 +\def (plus i0 h) in (let TMP_99 \def (THead k u0 t0) in (let TMP_100 \def +(lift h d TMP_99) in (subst0 TMP_98 v t TMP_100))))) in (let TMP_102 \def +(lift h d u0) in (let TMP_103 \def (s k d) in (let TMP_104 \def (lift h +TMP_103 t0) in (let TMP_105 \def (THead k TMP_102 TMP_104) in (let TMP_111 +\def (\lambda (t: T).(let TMP_106 \def (plus i0 h) in (let TMP_107 \def (lift +h d u0) in (let TMP_108 \def (s k d) in (let TMP_109 \def (lift h TMP_108 t3) +in (let TMP_110 \def (THead k TMP_107 TMP_109) in (subst0 TMP_106 v TMP_110 +t))))))) in (let TMP_112 \def (s k d) in (let TMP_113 \def (lift h TMP_112 +t0) in (let TMP_114 \def (s k d) in (let TMP_115 \def (lift h TMP_114 t3) in +(let TMP_116 \def (plus i0 h) in (let TMP_117 \def (s k d) in (let TMP_118 +\def (s_le k d i0 H2) in (let TMP_119 \def (H3 TMP_117 TMP_118) in (let +TMP_120 \def (lift h d u0) in (let TMP_121 \def (subst0_snd k v TMP_113 +TMP_115 TMP_116 TMP_119 TMP_120) in (let TMP_122 \def (THead k u0 t0) in (let +TMP_123 \def (lift h d TMP_122) in (let TMP_124 \def (lift_head k u0 t0 h d) +in (let TMP_125 \def (eq_ind_r T TMP_105 TMP_111 TMP_121 TMP_123 TMP_124) in +(let TMP_126 \def (THead k u0 t3) in (let TMP_127 \def (lift h d TMP_126) in +(let TMP_128 \def (lift_head k u0 t3 h d) in (eq_ind_r T TMP_97 TMP_101 +TMP_125 TMP_127 TMP_128))))))))))))))))))))))))))))))))))))))))))))) in (let +TMP_175 \def (\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i0: +nat).(\lambda (_: (subst0 i0 v u1 u2)).(\lambda (H1: ((\forall (d: nat).((le +d i0) \to (subst0 (plus i0 h) v (lift h d u1) (lift h d u2)))))).(\lambda (k: K).(\lambda (t0: T).(\lambda (t3: T).(\lambda (_: (subst0 (s k i0) v t0 t3)).(\lambda (H3: ((\forall (d: nat).((le d (s k i0)) \to (subst0 (plus (s k i0) h) v (lift h d t0) (lift h d t3)))))).(\lambda (d: nat).(\lambda (H4: (le -d i0)).(let H5 \def (eq_ind_r nat (plus (s k i0) h) (\lambda (n: -nat).(\forall (d0: nat).((le d0 (s k i0)) \to (subst0 n v (lift h d0 t0) -(lift h d0 t3))))) H3 (s k (plus i0 h)) (s_plus k i0 h)) in (eq_ind_r T -(THead k (lift h d u1) (lift h (s k d) t0)) (\lambda (t: T).(subst0 (plus i0 -h) v t (lift h d (THead k u2 t3)))) (eq_ind_r T (THead k (lift h d u2) (lift -h (s k d) t3)) (\lambda (t: T).(subst0 (plus i0 h) v (THead k (lift h d u1) -(lift h (s k d) t0)) t)) (subst0_both v (lift h d u1) (lift h d u2) (plus i0 -h) (H1 d H4) k (lift h (s k d) t0) (lift h (s k d) t3) (H5 (s k d) (s_le k d -i0 H4))) (lift h d (THead k u2 t3)) (lift_head k u2 t3 h d)) (lift h d (THead -k u1 t0)) (lift_head k u1 t0 h d)))))))))))))))) i u t1 t2 H)))))). -(* COMMENTS -Initial nodes: 1449 -END *) +d i0)).(let TMP_130 \def (s k i0) in (let TMP_131 \def (plus TMP_130 h) in +(let TMP_134 \def (\lambda (n: nat).(\forall (d0: nat).((le d0 (s k i0)) \to +(let TMP_132 \def (lift h d0 t0) in (let TMP_133 \def (lift h d0 t3) in +(subst0 n v TMP_132 TMP_133)))))) in (let TMP_135 \def (plus i0 h) in (let +TMP_136 \def (s k TMP_135) in (let TMP_137 \def (s_plus k i0 h) in (let H5 +\def (eq_ind_r nat TMP_131 TMP_134 H3 TMP_136 TMP_137) in (let TMP_138 \def +(lift h d u1) in (let TMP_139 \def (s k d) in (let TMP_140 \def (lift h +TMP_139 t0) in (let TMP_141 \def (THead k TMP_138 TMP_140) in (let TMP_145 +\def (\lambda (t: T).(let TMP_142 \def (plus i0 h) in (let TMP_143 \def +(THead k u2 t3) in (let TMP_144 \def (lift h d TMP_143) in (subst0 TMP_142 v +t TMP_144))))) in (let TMP_146 \def (lift h d u2) in (let TMP_147 \def (s k +d) in (let TMP_148 \def (lift h TMP_147 t3) in (let TMP_149 \def (THead k +TMP_146 TMP_148) in (let TMP_155 \def (\lambda (t: T).(let TMP_150 \def (plus +i0 h) in (let TMP_151 \def (lift h d u1) in (let TMP_152 \def (s k d) in (let +TMP_153 \def (lift h TMP_152 t0) in (let TMP_154 \def (THead k TMP_151 +TMP_153) in (subst0 TMP_150 v TMP_154 t))))))) in (let TMP_156 \def (lift h d +u1) in (let TMP_157 \def (lift h d u2) in (let TMP_158 \def (plus i0 h) in +(let TMP_159 \def (H1 d H4) in (let TMP_160 \def (s k d) in (let TMP_161 \def +(lift h TMP_160 t0) in (let TMP_162 \def (s k d) in (let TMP_163 \def (lift h +TMP_162 t3) in (let TMP_164 \def (s k d) in (let TMP_165 \def (s_le k d i0 +H4) in (let TMP_166 \def (H5 TMP_164 TMP_165) in (let TMP_167 \def +(subst0_both v TMP_156 TMP_157 TMP_158 TMP_159 k TMP_161 TMP_163 TMP_166) in +(let TMP_168 \def (THead k u2 t3) in (let TMP_169 \def (lift h d TMP_168) in +(let TMP_170 \def (lift_head k u2 t3 h d) in (let TMP_171 \def (eq_ind_r T +TMP_149 TMP_155 TMP_167 TMP_169 TMP_170) in (let TMP_172 \def (THead k u1 t0) +in (let TMP_173 \def (lift h d TMP_172) in (let TMP_174 \def (lift_head k u1 +t0 h d) in (eq_ind_r T TMP_141 TMP_145 TMP_171 TMP_173 +TMP_174)))))))))))))))))))))))))))))))))))))))))))))))))) in (subst0_ind +TMP_4 TMP_52 TMP_85 TMP_129 TMP_175 i u t1 t2 H))))))))))). theorem subst0_lift_ge_S: \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).((subst0 @@ -218,14 +397,22 @@ i u t1 t2) \to (\forall (d: nat).((le d i) \to (subst0 (S i) u (lift (S O) d t1) (lift (S O) d t2)))))))) \def \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda -(H: (subst0 i u t1 t2)).(\lambda (d: nat).(\lambda (H0: (le d i)).(eq_ind nat -(plus i (S O)) (\lambda (n: nat).(subst0 n u (lift (S O) d t1) (lift (S O) d -t2))) (subst0_lift_ge t1 t2 u i (S O) H d H0) (S i) (eq_ind_r nat (plus (S O) -i) (\lambda (n: nat).(eq nat n (S i))) (refl_equal nat (S i)) (plus i (S O)) -(plus_sym i (S O)))))))))). -(* COMMENTS -Initial nodes: 137 -END *) +(H: (subst0 i u t1 t2)).(\lambda (d: nat).(\lambda (H0: (le d i)).(let TMP_1 +\def (S O) in (let TMP_2 \def (plus i TMP_1) in (let TMP_7 \def (\lambda (n: +nat).(let TMP_3 \def (S O) in (let TMP_4 \def (lift TMP_3 d t1) in (let TMP_5 +\def (S O) in (let TMP_6 \def (lift TMP_5 d t2) in (subst0 n u TMP_4 +TMP_6)))))) in (let TMP_8 \def (S O) in (let TMP_9 \def (subst0_lift_ge t1 t2 +u i TMP_8 H d H0) in (let TMP_10 \def (S i) in (let TMP_11 \def (S O) in (let +TMP_12 \def (plus TMP_11 i) in (let TMP_14 \def (\lambda (n: nat).(let TMP_13 +\def (S i) in (eq nat n TMP_13))) in (let TMP_15 \def (S O) in (let TMP_16 +\def (plus TMP_15 i) in (let TMP_17 \def (S i) in (let TMP_18 \def (S i) in +(let TMP_19 \def (le_n TMP_18) in (let TMP_20 \def (S O) in (let TMP_21 \def +(plus TMP_20 i) in (let TMP_22 \def (le_n TMP_21) in (let TMP_23 \def +(le_antisym TMP_16 TMP_17 TMP_19 TMP_22) in (let TMP_24 \def (S O) in (let +TMP_25 \def (plus i TMP_24) in (let TMP_26 \def (S O) in (let TMP_27 \def +(plus_sym i TMP_26) in (let TMP_28 \def (eq_ind_r nat TMP_12 TMP_14 TMP_23 +TMP_25 TMP_27) in (eq_ind nat TMP_2 TMP_7 TMP_9 TMP_10 +TMP_28)))))))))))))))))))))))))))))). theorem subst0_lift_ge_s: \forall (t1: T).(\forall (t2: T).(\forall (u: T).(\forall (i: nat).((subst0 @@ -235,7 +422,4 @@ i u t1 t2) \to (\forall (d: nat).((le d i) \to (\forall (b: B).(subst0 (s \lambda (t1: T).(\lambda (t2: T).(\lambda (u: T).(\lambda (i: nat).(\lambda (H: (subst0 i u t1 t2)).(\lambda (d: nat).(\lambda (H0: (le d i)).(\lambda (_: B).(subst0_lift_ge_S t1 t2 u i H d H0)))))))). -(* COMMENTS -Initial nodes: 43 -END *) diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/subst0.ma b/matita/matita/contribs/lambdadelta/basic_1/subst0/subst0.ma index 66c167d2b..99caee518 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/subst0.ma +++ b/matita/matita/contribs/lambdadelta/basic_1/subst0/subst0.ma @@ -14,7 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "Basic-1/subst0/props.ma". +include "basic_1/subst0/props.ma". + +include "basic_1/s/fwd.ma". theorem subst0_subst0: \forall (t1: T).(\forall (t2: T).(\forall (u2: T).(\forall (j: nat).((subst0 @@ -91,9 +93,6 @@ T).(subst0 i u3 (THead k u1 t0) t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u t (THead k u0 t3))) (THead k x0 x) (subst0_both u3 u1 x0 i H7 k t0 x H5) (subst0_both u x0 u0 (S (plus i0 i)) H8 k x t3 H10))))))) (H1 u3 u i0 H4))))) (H3 u3 u i0 H4))))))))))))))))) j u2 t1 t2 H))))). -(* COMMENTS -Initial nodes: 1613 -END *) theorem subst0_subst0_back: \forall (t1: T).(\forall (t2: T).(\forall (u2: T).(\forall (j: nat).((subst0 @@ -170,9 +169,6 @@ t)) (\lambda (t: T).(subst0 (S (plus i0 i)) u (THead k u0 t3) t)) (THead k x0 x) (subst0_both u3 u1 x0 i H7 k t0 x H5) (subst0_both u u0 x0 (S (plus i0 i)) H8 k t3 x H10))))))) (H1 u3 u i0 H4))))) (H3 u3 u i0 H4))))))))))))))))) j u2 t1 t2 H))))). -(* COMMENTS -Initial nodes: 1613 -END *) theorem subst0_trans: \forall (t2: T).(\forall (t1: T).(\forall (v: T).(\forall (i: nat).((subst0 @@ -285,9 +281,6 @@ i0 v0 u2 u3))) (\lambda (_: T).(\lambda (t5: T).(subst0 (s k i0) v0 t3 t5))) T).(subst0 i0 v0 (THead k u1 t0) t)) (subst0_both v0 u1 x0 i0 (H1 x0 H7) k t0 x1 (H3 x1 H8)) t4 H6)))))) H5)) (subst0_gen_head k v0 u2 t3 t4 i0 H4))))))))))))))) i v t1 t2 H))))). -(* COMMENTS -Initial nodes: 2555 -END *) theorem subst0_confluence_neq: \forall (t0: T).(\forall (t1: T).(\forall (u1: T).(\forall (i1: @@ -309,70 +302,68 @@ t)) (\lambda (t: T).(subst0 i v t2 t))) (\lambda (H2: (eq nat i i2)).(\lambda nat).(not (eq nat n i2))) H1 i2 H2) in (eq_ind_r T (lift (S i) O u2) (\lambda (t: T).(ex2 T (\lambda (t3: T).(subst0 i2 u2 (lift (S i) O v) t3)) (\lambda (t3: T).(subst0 i v t t3)))) (let H5 \def (match (H4 (refl_equal nat i2)) in -False return (\lambda (_: False).(ex2 T (\lambda (t: T).(subst0 i2 u2 (lift -(S i) O v) t)) (\lambda (t: T).(subst0 i v (lift (S i) O u2) t)))) with []) -in H5) t2 H3)))) (subst0_gen_lref u2 t2 i2 i H0))))))))) (\lambda (v: -T).(\lambda (u2: T).(\lambda (u0: T).(\lambda (i: nat).(\lambda (H0: (subst0 -i v u0 u2)).(\lambda (H1: ((\forall (t2: T).(\forall (u3: T).(\forall (i2: -nat).((subst0 i2 u3 u0 t2) \to ((not (eq nat i i2)) \to (ex2 T (\lambda (t: -T).(subst0 i2 u3 u2 t)) (\lambda (t: T).(subst0 i v t2 t)))))))))).(\lambda -(t: T).(\lambda (k: K).(\lambda (t2: T).(\lambda (u3: T).(\lambda (i2: -nat).(\lambda (H2: (subst0 i2 u3 (THead k u0 t) t2)).(\lambda (H3: (not (eq -nat i i2))).(or3_ind (ex2 T (\lambda (u4: T).(eq T t2 (THead k u4 t))) -(\lambda (u4: T).(subst0 i2 u3 u0 u4))) (ex2 T (\lambda (t3: T).(eq T t2 -(THead k u0 t3))) (\lambda (t3: T).(subst0 (s k i2) u3 t t3))) (ex3_2 T T -(\lambda (u4: T).(\lambda (t3: T).(eq T t2 (THead k u4 t3)))) (\lambda (u4: -T).(\lambda (_: T).(subst0 i2 u3 u0 u4))) (\lambda (_: T).(\lambda (t3: -T).(subst0 (s k i2) u3 t t3)))) (ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead -k u2 t) t3)) (\lambda (t3: T).(subst0 i v t2 t3))) (\lambda (H4: (ex2 T -(\lambda (u4: T).(eq T t2 (THead k u4 t))) (\lambda (u4: T).(subst0 i2 u3 u0 -u4)))).(ex2_ind T (\lambda (u4: T).(eq T t2 (THead k u4 t))) (\lambda (u4: -T).(subst0 i2 u3 u0 u4)) (ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) -t3)) (\lambda (t3: T).(subst0 i v t2 t3))) (\lambda (x: T).(\lambda (H5: (eq -T t2 (THead k x t))).(\lambda (H6: (subst0 i2 u3 u0 x)).(eq_ind_r T (THead k -x t) (\lambda (t3: T).(ex2 T (\lambda (t4: T).(subst0 i2 u3 (THead k u2 t) -t4)) (\lambda (t4: T).(subst0 i v t3 t4)))) (ex2_ind T (\lambda (t3: -T).(subst0 i2 u3 u2 t3)) (\lambda (t3: T).(subst0 i v x t3)) (ex2 T (\lambda -(t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v (THead -k x t) t3))) (\lambda (x0: T).(\lambda (H7: (subst0 i2 u3 u2 x0)).(\lambda -(H8: (subst0 i v x x0)).(ex_intro2 T (\lambda (t3: T).(subst0 i2 u3 (THead k -u2 t) t3)) (\lambda (t3: T).(subst0 i v (THead k x t) t3)) (THead k x0 t) -(subst0_fst u3 x0 u2 i2 H7 t k) (subst0_fst v x0 x i H8 t k))))) (H1 x u3 i2 -H6 H3)) t2 H5)))) H4)) (\lambda (H4: (ex2 T (\lambda (t3: T).(eq T t2 (THead -k u0 t3))) (\lambda (t3: T).(subst0 (s k i2) u3 t t3)))).(ex2_ind T (\lambda +False with []) in H5) t2 H3)))) (subst0_gen_lref u2 t2 i2 i H0))))))))) +(\lambda (v: T).(\lambda (u2: T).(\lambda (u0: T).(\lambda (i: nat).(\lambda +(H0: (subst0 i v u0 u2)).(\lambda (H1: ((\forall (t2: T).(\forall (u3: +T).(\forall (i2: nat).((subst0 i2 u3 u0 t2) \to ((not (eq nat i i2)) \to (ex2 +T (\lambda (t: T).(subst0 i2 u3 u2 t)) (\lambda (t: T).(subst0 i v t2 +t)))))))))).(\lambda (t: T).(\lambda (k: K).(\lambda (t2: T).(\lambda (u3: +T).(\lambda (i2: nat).(\lambda (H2: (subst0 i2 u3 (THead k u0 t) +t2)).(\lambda (H3: (not (eq nat i i2))).(or3_ind (ex2 T (\lambda (u4: T).(eq +T t2 (THead k u4 t))) (\lambda (u4: T).(subst0 i2 u3 u0 u4))) (ex2 T (\lambda (t3: T).(eq T t2 (THead k u0 t3))) (\lambda (t3: T).(subst0 (s k i2) u3 t -t3)) (ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: -T).(subst0 i v t2 t3))) (\lambda (x: T).(\lambda (H5: (eq T t2 (THead k u0 -x))).(\lambda (H6: (subst0 (s k i2) u3 t x)).(eq_ind_r T (THead k u0 x) -(\lambda (t3: T).(ex2 T (\lambda (t4: T).(subst0 i2 u3 (THead k u2 t) t4)) -(\lambda (t4: T).(subst0 i v t3 t4)))) (ex_intro2 T (\lambda (t3: T).(subst0 -i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v (THead k u0 x) t3)) -(THead k u2 x) (subst0_snd k u3 x t i2 H6 u2) (subst0_fst v u2 u0 i H0 x k)) -t2 H5)))) H4)) (\lambda (H4: (ex3_2 T T (\lambda (u4: T).(\lambda (t3: T).(eq -T t2 (THead k u4 t3)))) (\lambda (u4: T).(\lambda (_: T).(subst0 i2 u3 u0 -u4))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i2) u3 t -t3))))).(ex3_2_ind T T (\lambda (u4: T).(\lambda (t3: T).(eq T t2 (THead k u4 +t3))) (ex3_2 T T (\lambda (u4: T).(\lambda (t3: T).(eq T t2 (THead k u4 t3)))) (\lambda (u4: T).(\lambda (_: T).(subst0 i2 u3 u0 u4))) (\lambda (_: -T).(\lambda (t3: T).(subst0 (s k i2) u3 t t3))) (ex2 T (\lambda (t3: +T).(\lambda (t3: T).(subst0 (s k i2) u3 t t3)))) (ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v t2 t3))) -(\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T t2 (THead k x0 -x1))).(\lambda (H6: (subst0 i2 u3 u0 x0)).(\lambda (H7: (subst0 (s k i2) u3 t -x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t3: T).(ex2 T (\lambda (t4: +(\lambda (H4: (ex2 T (\lambda (u4: T).(eq T t2 (THead k u4 t))) (\lambda (u4: +T).(subst0 i2 u3 u0 u4)))).(ex2_ind T (\lambda (u4: T).(eq T t2 (THead k u4 +t))) (\lambda (u4: T).(subst0 i2 u3 u0 u4)) (ex2 T (\lambda (t3: T).(subst0 +i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v t2 t3))) (\lambda (x: +T).(\lambda (H5: (eq T t2 (THead k x t))).(\lambda (H6: (subst0 i2 u3 u0 +x)).(eq_ind_r T (THead k x t) (\lambda (t3: T).(ex2 T (\lambda (t4: T).(subst0 i2 u3 (THead k u2 t) t4)) (\lambda (t4: T).(subst0 i v t3 t4)))) (ex2_ind T (\lambda (t3: T).(subst0 i2 u3 u2 t3)) (\lambda (t3: T).(subst0 i -v x0 t3)) (ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda -(t3: T).(subst0 i v (THead k x0 x1) t3))) (\lambda (x: T).(\lambda (H8: -(subst0 i2 u3 u2 x)).(\lambda (H9: (subst0 i v x0 x)).(ex_intro2 T (\lambda +v x t3)) (ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda +(t3: T).(subst0 i v (THead k x t) t3))) (\lambda (x0: T).(\lambda (H7: +(subst0 i2 u3 u2 x0)).(\lambda (H8: (subst0 i v x x0)).(ex_intro2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v (THead -k x0 x1) t3)) (THead k x x1) (subst0_both u3 u2 x i2 H8 k t x1 H7) -(subst0_fst v x x0 i H9 x1 k))))) (H1 x0 u3 i2 H6 H3)) t2 H5)))))) H4)) -(subst0_gen_head k u3 u0 t t2 i2 H2))))))))))))))) (\lambda (k: K).(\lambda -(v: T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (i: nat).(\lambda (H0: -(subst0 (s k i) v t3 t2)).(\lambda (H1: ((\forall (t4: T).(\forall (u2: -T).(\forall (i2: nat).((subst0 i2 u2 t3 t4) \to ((not (eq nat (s k i) i2)) -\to (ex2 T (\lambda (t: T).(subst0 i2 u2 t2 t)) (\lambda (t: T).(subst0 (s k -i) v t4 t)))))))))).(\lambda (u: T).(\lambda (t4: T).(\lambda (u2: -T).(\lambda (i2: nat).(\lambda (H2: (subst0 i2 u2 (THead k u t3) +k x t) t3)) (THead k x0 t) (subst0_fst u3 x0 u2 i2 H7 t k) (subst0_fst v x0 x +i H8 t k))))) (H1 x u3 i2 H6 H3)) t2 H5)))) H4)) (\lambda (H4: (ex2 T +(\lambda (t3: T).(eq T t2 (THead k u0 t3))) (\lambda (t3: T).(subst0 (s k i2) +u3 t t3)))).(ex2_ind T (\lambda (t3: T).(eq T t2 (THead k u0 t3))) (\lambda +(t3: T).(subst0 (s k i2) u3 t t3)) (ex2 T (\lambda (t3: T).(subst0 i2 u3 +(THead k u2 t) t3)) (\lambda (t3: T).(subst0 i v t2 t3))) (\lambda (x: +T).(\lambda (H5: (eq T t2 (THead k u0 x))).(\lambda (H6: (subst0 (s k i2) u3 +t x)).(eq_ind_r T (THead k u0 x) (\lambda (t3: T).(ex2 T (\lambda (t4: +T).(subst0 i2 u3 (THead k u2 t) t4)) (\lambda (t4: T).(subst0 i v t3 t4)))) +(ex_intro2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: +T).(subst0 i v (THead k u0 x) t3)) (THead k u2 x) (subst0_snd k u3 x t i2 H6 +u2) (subst0_fst v u2 u0 i H0 x k)) t2 H5)))) H4)) (\lambda (H4: (ex3_2 T T +(\lambda (u4: T).(\lambda (t3: T).(eq T t2 (THead k u4 t3)))) (\lambda (u4: +T).(\lambda (_: T).(subst0 i2 u3 u0 u4))) (\lambda (_: T).(\lambda (t3: +T).(subst0 (s k i2) u3 t t3))))).(ex3_2_ind T T (\lambda (u4: T).(\lambda +(t3: T).(eq T t2 (THead k u4 t3)))) (\lambda (u4: T).(\lambda (_: T).(subst0 +i2 u3 u0 u4))) (\lambda (_: T).(\lambda (t3: T).(subst0 (s k i2) u3 t t3))) +(ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda (t3: +T).(subst0 i v t2 t3))) (\lambda (x0: T).(\lambda (x1: T).(\lambda (H5: (eq T +t2 (THead k x0 x1))).(\lambda (H6: (subst0 i2 u3 u0 x0)).(\lambda (H7: +(subst0 (s k i2) u3 t x1)).(eq_ind_r T (THead k x0 x1) (\lambda (t3: T).(ex2 +T (\lambda (t4: T).(subst0 i2 u3 (THead k u2 t) t4)) (\lambda (t4: T).(subst0 +i v t3 t4)))) (ex2_ind T (\lambda (t3: T).(subst0 i2 u3 u2 t3)) (\lambda (t3: +T).(subst0 i v x0 t3)) (ex2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) +t3)) (\lambda (t3: T).(subst0 i v (THead k x0 x1) t3))) (\lambda (x: +T).(\lambda (H8: (subst0 i2 u3 u2 x)).(\lambda (H9: (subst0 i v x0 +x)).(ex_intro2 T (\lambda (t3: T).(subst0 i2 u3 (THead k u2 t) t3)) (\lambda +(t3: T).(subst0 i v (THead k x0 x1) t3)) (THead k x x1) (subst0_both u3 u2 x +i2 H8 k t x1 H7) (subst0_fst v x x0 i H9 x1 k))))) (H1 x0 u3 i2 H6 H3)) t2 +H5)))))) H4)) (subst0_gen_head k u3 u0 t t2 i2 H2))))))))))))))) (\lambda (k: +K).(\lambda (v: T).(\lambda (t2: T).(\lambda (t3: T).(\lambda (i: +nat).(\lambda (H0: (subst0 (s k i) v t3 t2)).(\lambda (H1: ((\forall (t4: +T).(\forall (u2: T).(\forall (i2: nat).((subst0 i2 u2 t3 t4) \to ((not (eq +nat (s k i) i2)) \to (ex2 T (\lambda (t: T).(subst0 i2 u2 t2 t)) (\lambda (t: +T).(subst0 (s k i) v t4 t)))))))))).(\lambda (u: T).(\lambda (t4: T).(\lambda +(u2: T).(\lambda (i2: nat).(\lambda (H2: (subst0 i2 u2 (THead k u t3) t4)).(\lambda (H3: (not (eq nat i i2))).(or3_ind (ex2 T (\lambda (u3: T).(eq T t4 (THead k u3 t3))) (\lambda (u3: T).(subst0 i2 u2 u u3))) (ex2 T (\lambda (t5: T).(eq T t4 (THead k u t5))) (\lambda (t5: T).(subst0 (s k i2) u2 t3 @@ -511,9 +502,6 @@ i2) u3 t3 x2)).(\lambda (_: (subst0 (s k i) v x1 x2)).(\lambda (H14: (eq nat (H12: (eq nat (s k i) (s k i2))).(H5 (s_inj k i i2 H12)))))))))) (H1 x0 u3 i2 H8 H5)) t4 H7)))))) H6)) (subst0_gen_head k u3 u0 t2 t4 i2 H4)))))))))))))))))) i1 u1 t0 t1 H))))). -(* COMMENTS -Initial nodes: 5375 -END *) theorem subst0_confluence_eq: \forall (t0: T).(\forall (t1: T).(\forall (u: T).(\forall (i: nat).((subst0 @@ -1368,9 +1356,6 @@ k x0 x1)) (ex2 T (\lambda (t: T).(subst0 i0 v (THead k u2 t3) t)) (\lambda k x0 x1)) (subst0 i0 v (THead k x0 x1) (THead k u2 t3)) (subst0_both v x0 u2 i0 H10 k x1 t3 H9))) (H1 x0 H7))) (H3 x1 H8)) t4 H6)))))) H5)) (subst0_gen_head k v u1 t2 t4 i0 H4))))))))))))))) i u t0 t1 H))))). -(* COMMENTS -Initial nodes: 25595 -END *) theorem subst0_confluence_lift: \forall (t0: T).(\forall (t1: T).(\forall (u: T).(\forall (i: nat).((subst0 @@ -1401,7 +1386,4 @@ t2))).(subst0_gen_lift_false t1 u (lift (S O) i t2) (S O) i i (le_n i) (eq_ind_r nat (plus (S O) i) (\lambda (n: nat).(lt i n)) (le_n (plus (S O) i)) (plus i (S O)) (plus_sym i (S O))) H1 (eq T t1 t2))) (subst0_confluence_eq t0 (lift (S O) i t2) u i H0 (lift (S O) i t1) H)))))))). -(* COMMENTS -Initial nodes: 703 -END *) diff --git a/matita/matita/contribs/lambdadelta/basic_1/subst0/tlt.ma b/matita/matita/contribs/lambdadelta/basic_1/subst0/tlt.ma index c8e8420bb..7fe9f6ef2 100644 --- a/matita/matita/contribs/lambdadelta/basic_1/subst0/tlt.ma +++ b/matita/matita/contribs/lambdadelta/basic_1/subst0/tlt.ma @@ -14,11 +14,9 @@ (* This file was automatically generated: do not edit *********************) -include "Basic-1/subst0/defs.ma". +include "basic_1/subst0/fwd.ma". -include "Basic-1/lift/props.ma". - -include "Basic-1/lift/tlt.ma". +include "basic_1/lift/tlt.ma". theorem subst0_weight_le: \forall (u: T).(\forall (t: T).(\forall (z: T).(\forall (d: nat).((subst0 d @@ -27,200 +25,381 @@ nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S d) O u)) (g d)) \to (le (weight_map f z) (weight_map g t)))))))))) \def \lambda (u: T).(\lambda (t: T).(\lambda (z: T).(\lambda (d: nat).(\lambda -(H: (subst0 d u t z)).(subst0_ind (\lambda (n: nat).(\lambda (t0: T).(\lambda -(t1: T).(\lambda (t2: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -n) O t0)) (g n)) \to (le (weight_map f t2) (weight_map g t1)))))))))) -(\lambda (v: T).(\lambda (i: nat).(\lambda (f: ((nat \to nat))).(\lambda (g: -((nat \to nat))).(\lambda (_: ((\forall (m: nat).(le (f m) (g m))))).(\lambda -(H1: (lt (weight_map f (lift (S i) O v)) (g i))).(le_S_n (weight_map f (lift -(S i) O v)) (weight_map g (TLRef i)) (le_S (S (weight_map f (lift (S i) O -v))) (weight_map g (TLRef i)) H1)))))))) (\lambda (v: T).(\lambda (u2: -T).(\lambda (u1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v u1 -u2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +(H: (subst0 d u t z)).(let TMP_3 \def (\lambda (n: nat).(\lambda (t0: +T).(\lambda (t1: T).(\lambda (t2: T).(\forall (f: ((nat \to nat))).(\forall +(g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt +(weight_map f (lift (S n) O t0)) (g n)) \to (let TMP_1 \def (weight_map f t2) +in (let TMP_2 \def (weight_map g t1) in (le TMP_1 TMP_2))))))))))) in (let +TMP_33 \def (\lambda (v: T).(\lambda (i: nat).(\lambda (f: ((nat \to +nat))).(\lambda (g: ((nat \to nat))).(\lambda (_: ((\forall (m: nat).(le (f +m) (g m))))).(\lambda (H1: (lt (weight_map f (lift (S i) O v)) (g i))).(let +TMP_4 \def (S i) in (let TMP_5 \def (lift TMP_4 O v) in (let TMP_6 \def +(weight_map f TMP_5) in (let TMP_7 \def (TLRef i) in (let TMP_8 \def +(weight_map g TMP_7) in (let TMP_9 \def (S i) in (let TMP_10 \def (lift TMP_9 +O v) in (let TMP_11 \def (weight_map f TMP_10) in (let TMP_12 \def (S TMP_11) +in (let TMP_13 \def (TLRef i) in (let TMP_14 \def (weight_map g TMP_13) in +(let TMP_15 \def (S TMP_14) in (let TMP_16 \def (S i) in (let TMP_17 \def +(lift TMP_16 O v) in (let TMP_18 \def (weight_map f TMP_17) in (let TMP_19 +\def (S TMP_18) in (let TMP_20 \def (S TMP_19) in (let TMP_21 \def (TLRef i) +in (let TMP_22 \def (weight_map g TMP_21) in (let TMP_23 \def (S TMP_22) in +(let TMP_24 \def (S i) in (let TMP_25 \def (lift TMP_24 O v) in (let TMP_26 +\def (weight_map f TMP_25) in (let TMP_27 \def (S TMP_26) in (let TMP_28 \def +(TLRef i) in (let TMP_29 \def (weight_map g TMP_28) in (let TMP_30 \def +(le_n_S TMP_27 TMP_29 H1) in (let TMP_31 \def (le_S TMP_20 TMP_23 TMP_30) in +(let TMP_32 \def (le_S_n TMP_12 TMP_15 TMP_31) in (le_S_n TMP_6 TMP_8 +TMP_32)))))))))))))))))))))))))))))))))))) in (let TMP_146 \def (\lambda (v: +T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i: nat).(\lambda (_: (subst0 i +v u1 u2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (le (weight_map f u2) (weight_map g u1)))))))).(\lambda -(t0: T).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (le (weight_map f (THead -k0 u2 t0)) (weight_map g (THead k0 u1 t0)))))))) (\lambda (b: B).(B_ind +(t0: T).(\lambda (k: K).(let TMP_38 \def (\lambda (k0: K).(\forall (f: ((nat +\to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g +m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (let TMP_34 \def +(THead k0 u2 t0) in (let TMP_35 \def (weight_map f TMP_34) in (let TMP_36 +\def (THead k0 u1 t0) in (let TMP_37 \def (weight_map g TMP_36) in (le TMP_35 +TMP_37)))))))))) in (let TMP_131 \def (\lambda (b: B).(let TMP_45 \def (\lambda (b0: B).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -i) O v)) (g i)) \to (le (weight_map f (THead (Bind b0) u2 t0)) (weight_map g -(THead (Bind b0) u1 t0)))))))) (\lambda (f: ((nat \to nat))).(\lambda (g: -((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g -m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g i))).(le_n_S -(plus (weight_map f u2) (weight_map (wadd f (S (weight_map f u2))) t0)) (plus -(weight_map g u1) (weight_map (wadd g (S (weight_map g u1))) t0)) -(le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f (S -(weight_map f u2))) t0) (weight_map (wadd g (S (weight_map g u1))) t0) (H1 f -g H2 H3) (weight_le t0 (wadd f (S (weight_map f u2))) (wadd g (S (weight_map -g u1))) (\lambda (n: nat).(wadd_le f g H2 (S (weight_map f u2)) (S -(weight_map g u1)) (le_n_S (weight_map f u2) (weight_map g u1) (H1 f g H2 -H3)) n))))))))) (\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to -nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H3: (lt -(weight_map f (lift (S i) O v)) (g i))).(le_n_S (plus (weight_map f u2) -(weight_map (wadd f O) t0)) (plus (weight_map g u1) (weight_map (wadd g O) -t0)) (le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f O) -t0) (weight_map (wadd g O) t0) (H1 f g H2 H3) (weight_le t0 (wadd f O) (wadd -g O) (\lambda (n: nat).(wadd_le f g H2 O O (le_n O) n))))))))) (\lambda (f: +i) O v)) (g i)) \to (let TMP_39 \def (Bind b0) in (let TMP_40 \def (THead +TMP_39 u2 t0) in (let TMP_41 \def (weight_map f TMP_40) in (let TMP_42 \def +(Bind b0) in (let TMP_43 \def (THead TMP_42 u1 t0) in (let TMP_44 \def +(weight_map g TMP_43) in (le TMP_41 TMP_44)))))))))))) in (let TMP_86 \def +(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: +((\forall (m: nat).(le (f m) (g m))))).(\lambda (H3: (lt (weight_map f (lift +(S i) O v)) (g i))).(let TMP_46 \def (weight_map f u2) in (let TMP_47 \def +(weight_map f u2) in (let TMP_48 \def (S TMP_47) in (let TMP_49 \def (wadd f +TMP_48) in (let TMP_50 \def (weight_map TMP_49 t0) in (let TMP_51 \def (plus +TMP_46 TMP_50) in (let TMP_52 \def (weight_map g u1) in (let TMP_53 \def +(weight_map g u1) in (let TMP_54 \def (S TMP_53) in (let TMP_55 \def (wadd g +TMP_54) in (let TMP_56 \def (weight_map TMP_55 t0) in (let TMP_57 \def (plus +TMP_52 TMP_56) in (let TMP_58 \def (weight_map f u2) in (let TMP_59 \def +(weight_map g u1) in (let TMP_60 \def (weight_map f u2) in (let TMP_61 \def +(S TMP_60) in (let TMP_62 \def (wadd f TMP_61) in (let TMP_63 \def +(weight_map TMP_62 t0) in (let TMP_64 \def (weight_map g u1) in (let TMP_65 +\def (S TMP_64) in (let TMP_66 \def (wadd g TMP_65) in (let TMP_67 \def +(weight_map TMP_66 t0) in (let TMP_68 \def (H1 f g H2 H3) in (let TMP_69 \def +(weight_map f u2) in (let TMP_70 \def (S TMP_69) in (let TMP_71 \def (wadd f +TMP_70) in (let TMP_72 \def (weight_map g u1) in (let TMP_73 \def (S TMP_72) +in (let TMP_74 \def (wadd g TMP_73) in (let TMP_83 \def (\lambda (n: +nat).(let TMP_75 \def (weight_map f u2) in (let TMP_76 \def (S TMP_75) in +(let TMP_77 \def (weight_map g u1) in (let TMP_78 \def (S TMP_77) in (let +TMP_79 \def (weight_map f u2) in (let TMP_80 \def (weight_map g u1) in (let +TMP_81 \def (H1 f g H2 H3) in (let TMP_82 \def (le_n_S TMP_79 TMP_80 TMP_81) +in (wadd_le f g H2 TMP_76 TMP_78 TMP_82 n)))))))))) in (let TMP_84 \def +(weight_le t0 TMP_71 TMP_74 TMP_83) in (let TMP_85 \def (le_plus_plus TMP_58 +TMP_59 TMP_63 TMP_67 TMP_68 TMP_84) in (le_n_S TMP_51 TMP_57 +TMP_85))))))))))))))))))))))))))))))))))))) in (let TMP_108 \def (\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g -i))).(le_n_S (plus (weight_map f u2) (weight_map (wadd f O) t0)) (plus -(weight_map g u1) (weight_map (wadd g O) t0)) (le_plus_plus (weight_map f u2) -(weight_map g u1) (weight_map (wadd f O) t0) (weight_map (wadd g O) t0) (H1 f -g H2 H3) (weight_le t0 (wadd f O) (wadd g O) (\lambda (n: nat).(wadd_le f g -H2 O O (le_n O) n))))))))) b)) (\lambda (_: F).(\lambda (f0: ((nat \to -nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f0 -m) (g m))))).(\lambda (H3: (lt (weight_map f0 (lift (S i) O v)) (g -i))).(le_n_S (plus (weight_map f0 u2) (weight_map f0 t0)) (plus (weight_map g -u1) (weight_map g t0)) (le_plus_plus (weight_map f0 u2) (weight_map g u1) -(weight_map f0 t0) (weight_map g t0) (H1 f0 g H2 H3) (weight_le t0 f0 g -H2)))))))) k))))))))) (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (v: -T).(\forall (t2: T).(\forall (t1: T).(\forall (i: nat).((subst0 (s k0 i) v t1 -t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +i))).(let TMP_87 \def (weight_map f u2) in (let TMP_88 \def (wadd f O) in +(let TMP_89 \def (weight_map TMP_88 t0) in (let TMP_90 \def (plus TMP_87 +TMP_89) in (let TMP_91 \def (weight_map g u1) in (let TMP_92 \def (wadd g O) +in (let TMP_93 \def (weight_map TMP_92 t0) in (let TMP_94 \def (plus TMP_91 +TMP_93) in (let TMP_95 \def (weight_map f u2) in (let TMP_96 \def (weight_map +g u1) in (let TMP_97 \def (wadd f O) in (let TMP_98 \def (weight_map TMP_97 +t0) in (let TMP_99 \def (wadd g O) in (let TMP_100 \def (weight_map TMP_99 +t0) in (let TMP_101 \def (H1 f g H2 H3) in (let TMP_102 \def (wadd f O) in +(let TMP_103 \def (wadd g O) in (let TMP_105 \def (\lambda (n: nat).(let +TMP_104 \def (le_O_n O) in (wadd_le f g H2 O O TMP_104 n))) in (let TMP_106 +\def (weight_le t0 TMP_102 TMP_103 TMP_105) in (let TMP_107 \def +(le_plus_plus TMP_95 TMP_96 TMP_98 TMP_100 TMP_101 TMP_106) in (le_n_S TMP_90 +TMP_94 TMP_107))))))))))))))))))))))))) in (let TMP_130 \def (\lambda (f: +((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: +nat).(le (f m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g +i))).(let TMP_109 \def (weight_map f u2) in (let TMP_110 \def (wadd f O) in +(let TMP_111 \def (weight_map TMP_110 t0) in (let TMP_112 \def (plus TMP_109 +TMP_111) in (let TMP_113 \def (weight_map g u1) in (let TMP_114 \def (wadd g +O) in (let TMP_115 \def (weight_map TMP_114 t0) in (let TMP_116 \def (plus +TMP_113 TMP_115) in (let TMP_117 \def (weight_map f u2) in (let TMP_118 \def +(weight_map g u1) in (let TMP_119 \def (wadd f O) in (let TMP_120 \def +(weight_map TMP_119 t0) in (let TMP_121 \def (wadd g O) in (let TMP_122 \def +(weight_map TMP_121 t0) in (let TMP_123 \def (H1 f g H2 H3) in (let TMP_124 +\def (wadd f O) in (let TMP_125 \def (wadd g O) in (let TMP_127 \def (\lambda +(n: nat).(let TMP_126 \def (le_O_n O) in (wadd_le f g H2 O O TMP_126 n))) in +(let TMP_128 \def (weight_le t0 TMP_124 TMP_125 TMP_127) in (let TMP_129 \def +(le_plus_plus TMP_117 TMP_118 TMP_120 TMP_122 TMP_123 TMP_128) in (le_n_S +TMP_112 TMP_116 TMP_129))))))))))))))))))))))))) in (B_ind TMP_45 TMP_86 +TMP_108 TMP_130 b)))))) in (let TMP_145 \def (\lambda (_: F).(\lambda (f0: +((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: +nat).(le (f0 m) (g m))))).(\lambda (H3: (lt (weight_map f0 (lift (S i) O v)) +(g i))).(let TMP_132 \def (weight_map f0 u2) in (let TMP_133 \def (weight_map +f0 t0) in (let TMP_134 \def (plus TMP_132 TMP_133) in (let TMP_135 \def +(weight_map g u1) in (let TMP_136 \def (weight_map g t0) in (let TMP_137 \def +(plus TMP_135 TMP_136) in (let TMP_138 \def (weight_map f0 u2) in (let +TMP_139 \def (weight_map g u1) in (let TMP_140 \def (weight_map f0 t0) in +(let TMP_141 \def (weight_map g t0) in (let TMP_142 \def (H1 f0 g H2 H3) in +(let TMP_143 \def (weight_le t0 f0 g H2) in (let TMP_144 \def (le_plus_plus +TMP_138 TMP_139 TMP_140 TMP_141 TMP_142 TMP_143) in (le_n_S TMP_134 TMP_137 +TMP_144))))))))))))))))))) in (K_ind TMP_38 TMP_131 TMP_145 k)))))))))))) in +(let TMP_302 \def (\lambda (k: K).(let TMP_151 \def (\lambda (k0: K).(\forall +(v: T).(\forall (t2: T).(\forall (t1: T).(\forall (i: nat).((subst0 (s k0 i) +v t1 t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S (s k0 i)) O v)) (g (s k0 i))) \to (le (weight_map f t2) (weight_map g t1))))))) \to (\forall (u0: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map -f (lift (S i) O v)) (g i)) \to (le (weight_map f (THead k0 u0 t2)) -(weight_map g (THead k0 u0 t1))))))))))))))) (\lambda (b: B).(B_ind (\lambda -(b0: B).(\forall (v: T).(\forall (t2: T).(\forall (t1: T).(\forall (i: -nat).((subst0 (s (Bind b0) i) v t1 t2) \to (((\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S (s (Bind b0) i)) O v)) (g (s (Bind b0) i))) -\to (le (weight_map f t2) (weight_map g t1))))))) \to (\forall (u0: +f (lift (S i) O v)) (g i)) \to (let TMP_147 \def (THead k0 u0 t2) in (let +TMP_148 \def (weight_map f TMP_147) in (let TMP_149 \def (THead k0 u0 t1) in +(let TMP_150 \def (weight_map g TMP_149) in (le TMP_148 +TMP_150))))))))))))))))) in (let TMP_287 \def (\lambda (b: B).(let TMP_158 +\def (\lambda (b0: B).(\forall (v: T).(\forall (t2: T).(\forall (t1: +T).(\forall (i: nat).((subst0 (s (Bind b0) i) v t1 t2) \to (((\forall (f: +((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) +(g m)))) \to ((lt (weight_map f (lift (S (s (Bind b0) i)) O v)) (g (s (Bind +b0) i))) \to (le (weight_map f t2) (weight_map g t1))))))) \to (\forall (u0: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) \to -(le (weight_map f (THead (Bind b0) u0 t2)) (weight_map g (THead (Bind b0) u0 -t1))))))))))))))) (\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda -(i: nat).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H1: ((\forall (f: -((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) -(g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (le +(let TMP_152 \def (Bind b0) in (let TMP_153 \def (THead TMP_152 u0 t2) in +(let TMP_154 \def (weight_map f TMP_153) in (let TMP_155 \def (Bind b0) in +(let TMP_156 \def (THead TMP_155 u0 t1) in (let TMP_157 \def (weight_map g +TMP_156) in (le TMP_154 TMP_157))))))))))))))))))) in (let TMP_216 \def +(\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda +(_: (subst0 (S i) v t1 t2)).(\lambda (H1: ((\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) +\to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (le (weight_map f +t2) (weight_map g t1)))))))).(\lambda (u0: T).(\lambda (f: ((nat \to +nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f +m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g i))).(let +TMP_159 \def (weight_map f u0) in (let TMP_160 \def (weight_map f u0) in (let +TMP_161 \def (S TMP_160) in (let TMP_162 \def (wadd f TMP_161) in (let +TMP_163 \def (weight_map TMP_162 t2) in (let TMP_164 \def (plus TMP_159 +TMP_163) in (let TMP_165 \def (weight_map g u0) in (let TMP_166 \def +(weight_map g u0) in (let TMP_167 \def (S TMP_166) in (let TMP_168 \def (wadd +g TMP_167) in (let TMP_169 \def (weight_map TMP_168 t1) in (let TMP_170 \def +(plus TMP_165 TMP_169) in (let TMP_171 \def (weight_map f u0) in (let TMP_172 +\def (weight_map g u0) in (let TMP_173 \def (weight_map f u0) in (let TMP_174 +\def (S TMP_173) in (let TMP_175 \def (wadd f TMP_174) in (let TMP_176 \def +(weight_map TMP_175 t2) in (let TMP_177 \def (weight_map g u0) in (let +TMP_178 \def (S TMP_177) in (let TMP_179 \def (wadd g TMP_178) in (let +TMP_180 \def (weight_map TMP_179 t1) in (let TMP_181 \def (weight_le u0 f g +H2) in (let TMP_182 \def (weight_map f u0) in (let TMP_183 \def (S TMP_182) +in (let TMP_184 \def (wadd f TMP_183) in (let TMP_185 \def (weight_map g u0) +in (let TMP_186 \def (S TMP_185) in (let TMP_187 \def (wadd g TMP_186) in +(let TMP_196 \def (\lambda (m: nat).(let TMP_188 \def (weight_map f u0) in +(let TMP_189 \def (S TMP_188) in (let TMP_190 \def (weight_map g u0) in (let +TMP_191 \def (S TMP_190) in (let TMP_192 \def (weight_map f u0) in (let +TMP_193 \def (weight_map g u0) in (let TMP_194 \def (weight_le u0 f g H2) in +(let TMP_195 \def (le_n_S TMP_192 TMP_193 TMP_194) in (wadd_le f g H2 TMP_189 +TMP_191 TMP_195 m)))))))))) in (let TMP_197 \def (S i) in (let TMP_198 \def +(lift TMP_197 O v) in (let TMP_199 \def (weight_map f TMP_198) in (let +TMP_201 \def (\lambda (n: nat).(let TMP_200 \def (g i) in (lt n TMP_200))) in +(let TMP_202 \def (weight_map f u0) in (let TMP_203 \def (S TMP_202) in (let +TMP_204 \def (wadd f TMP_203) in (let TMP_205 \def (S i) in (let TMP_206 \def +(S TMP_205) in (let TMP_207 \def (lift TMP_206 O v) in (let TMP_208 \def +(weight_map TMP_204 TMP_207) in (let TMP_209 \def (weight_map f u0) in (let +TMP_210 \def (S TMP_209) in (let TMP_211 \def (S i) in (let TMP_212 \def +(lift_weight_add_O TMP_210 v TMP_211 f) in (let TMP_213 \def (eq_ind nat +TMP_199 TMP_201 H3 TMP_208 TMP_212) in (let TMP_214 \def (H1 TMP_184 TMP_187 +TMP_196 TMP_213) in (let TMP_215 \def (le_plus_plus TMP_171 TMP_172 TMP_176 +TMP_180 TMP_181 TMP_214) in (le_n_S TMP_164 TMP_170 +TMP_215)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) in (let +TMP_251 \def (\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda (i: +nat).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H1: ((\forall (f: ((nat +\to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g +m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (le (weight_map f t2) (weight_map g t1)))))))).(\lambda (u0: T).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g -i))).(le_n_S (plus (weight_map f u0) (weight_map (wadd f (S (weight_map f -u0))) t2)) (plus (weight_map g u0) (weight_map (wadd g (S (weight_map g u0))) -t1)) (le_plus_plus (weight_map f u0) (weight_map g u0) (weight_map (wadd f (S -(weight_map f u0))) t2) (weight_map (wadd g (S (weight_map g u0))) t1) -(weight_le u0 f g H2) (H1 (wadd f (S (weight_map f u0))) (wadd g (S -(weight_map g u0))) (\lambda (m: nat).(wadd_le f g H2 (S (weight_map f u0)) -(S (weight_map g u0)) (le_n_S (weight_map f u0) (weight_map g u0) (weight_le -u0 f g H2)) m)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda (n: -nat).(lt n (g i))) H3 (weight_map (wadd f (S (weight_map f u0))) (lift (S (S -i)) O v)) (lift_weight_add_O (S (weight_map f u0)) v (S i) f)))))))))))))))) +i))).(let TMP_217 \def (weight_map f u0) in (let TMP_218 \def (wadd f O) in +(let TMP_219 \def (weight_map TMP_218 t2) in (let TMP_220 \def (plus TMP_217 +TMP_219) in (let TMP_221 \def (weight_map g u0) in (let TMP_222 \def (wadd g +O) in (let TMP_223 \def (weight_map TMP_222 t1) in (let TMP_224 \def (plus +TMP_221 TMP_223) in (let TMP_225 \def (weight_map f u0) in (let TMP_226 \def +(weight_map g u0) in (let TMP_227 \def (wadd f O) in (let TMP_228 \def +(weight_map TMP_227 t2) in (let TMP_229 \def (wadd g O) in (let TMP_230 \def +(weight_map TMP_229 t1) in (let TMP_231 \def (weight_le u0 f g H2) in (let +TMP_232 \def (wadd f O) in (let TMP_233 \def (wadd g O) in (let TMP_235 \def +(\lambda (m: nat).(let TMP_234 \def (le_O_n O) in (wadd_le f g H2 O O TMP_234 +m))) in (let TMP_236 \def (S i) in (let TMP_237 \def (lift TMP_236 O v) in +(let TMP_238 \def (weight_map f TMP_237) in (let TMP_240 \def (\lambda (n: +nat).(let TMP_239 \def (g i) in (lt n TMP_239))) in (let TMP_241 \def (wadd f +O) in (let TMP_242 \def (S i) in (let TMP_243 \def (S TMP_242) in (let +TMP_244 \def (lift TMP_243 O v) in (let TMP_245 \def (weight_map TMP_241 +TMP_244) in (let TMP_246 \def (S i) in (let TMP_247 \def (lift_weight_add_O O +v TMP_246 f) in (let TMP_248 \def (eq_ind nat TMP_238 TMP_240 H3 TMP_245 +TMP_247) in (let TMP_249 \def (H1 TMP_232 TMP_233 TMP_235 TMP_248) in (let +TMP_250 \def (le_plus_plus TMP_225 TMP_226 TMP_228 TMP_230 TMP_231 TMP_249) +in (le_n_S TMP_220 TMP_224 +TMP_250)))))))))))))))))))))))))))))))))))))))))))) in (let TMP_286 \def (\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (le (weight_map f t2) (weight_map g t1)))))))).(\lambda (u0: T).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f -m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g -i))).(le_n_S (plus (weight_map f u0) (weight_map (wadd f O) t2)) (plus -(weight_map g u0) (weight_map (wadd g O) t1)) (le_plus_plus (weight_map f u0) -(weight_map g u0) (weight_map (wadd f O) t2) (weight_map (wadd g O) t1) -(weight_le u0 f g H2) (H1 (wadd f O) (wadd g O) (\lambda (m: nat).(wadd_le f -g H2 O O (le_n O) m)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda -(n: nat).(lt n (g i))) H3 (weight_map (wadd f O) (lift (S (S i)) O v)) -(lift_weight_add_O O v (S i) f)))))))))))))))) (\lambda (v: T).(\lambda (t2: -T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (_: (subst0 (S i) v t1 -t2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g i))).(let +TMP_252 \def (weight_map f u0) in (let TMP_253 \def (wadd f O) in (let +TMP_254 \def (weight_map TMP_253 t2) in (let TMP_255 \def (plus TMP_252 +TMP_254) in (let TMP_256 \def (weight_map g u0) in (let TMP_257 \def (wadd g +O) in (let TMP_258 \def (weight_map TMP_257 t1) in (let TMP_259 \def (plus +TMP_256 TMP_258) in (let TMP_260 \def (weight_map f u0) in (let TMP_261 \def +(weight_map g u0) in (let TMP_262 \def (wadd f O) in (let TMP_263 \def +(weight_map TMP_262 t2) in (let TMP_264 \def (wadd g O) in (let TMP_265 \def +(weight_map TMP_264 t1) in (let TMP_266 \def (weight_le u0 f g H2) in (let +TMP_267 \def (wadd f O) in (let TMP_268 \def (wadd g O) in (let TMP_270 \def +(\lambda (m: nat).(let TMP_269 \def (le_O_n O) in (wadd_le f g H2 O O TMP_269 +m))) in (let TMP_271 \def (S i) in (let TMP_272 \def (lift TMP_271 O v) in +(let TMP_273 \def (weight_map f TMP_272) in (let TMP_275 \def (\lambda (n: +nat).(let TMP_274 \def (g i) in (lt n TMP_274))) in (let TMP_276 \def (wadd f +O) in (let TMP_277 \def (S i) in (let TMP_278 \def (S TMP_277) in (let +TMP_279 \def (lift TMP_278 O v) in (let TMP_280 \def (weight_map TMP_276 +TMP_279) in (let TMP_281 \def (S i) in (let TMP_282 \def (lift_weight_add_O O +v TMP_281 f) in (let TMP_283 \def (eq_ind nat TMP_273 TMP_275 H3 TMP_280 +TMP_282) in (let TMP_284 \def (H1 TMP_267 TMP_268 TMP_270 TMP_283) in (let +TMP_285 \def (le_plus_plus TMP_260 TMP_261 TMP_263 TMP_265 TMP_266 TMP_284) +in (le_n_S TMP_255 TMP_259 +TMP_285)))))))))))))))))))))))))))))))))))))))))))) in (B_ind TMP_158 TMP_216 +TMP_251 TMP_286 b)))))) in (let TMP_301 \def (\lambda (_: F).(\lambda (v: +T).(\lambda (t2: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (_: (subst0 i +v t1 t2)).(\lambda (H1: ((\forall (f0: ((nat \to nat))).(\forall (g: ((nat +\to nat))).(((\forall (m: nat).(le (f0 m) (g m)))) \to ((lt (weight_map f0 +(lift (S i) O v)) (g i)) \to (le (weight_map f0 t2) (weight_map g +t1)))))))).(\lambda (u0: T).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat +\to nat))).(\lambda (H2: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda +(H3: (lt (weight_map f0 (lift (S i) O v)) (g i))).(let TMP_288 \def +(weight_map f0 u0) in (let TMP_289 \def (weight_map f0 t2) in (let TMP_290 +\def (plus TMP_288 TMP_289) in (let TMP_291 \def (weight_map g u0) in (let +TMP_292 \def (weight_map g t1) in (let TMP_293 \def (plus TMP_291 TMP_292) in +(let TMP_294 \def (weight_map f0 u0) in (let TMP_295 \def (weight_map g u0) +in (let TMP_296 \def (weight_map f0 t2) in (let TMP_297 \def (weight_map g +t1) in (let TMP_298 \def (weight_le u0 f0 g H2) in (let TMP_299 \def (H1 f0 g +H2 H3) in (let TMP_300 \def (le_plus_plus TMP_294 TMP_295 TMP_296 TMP_297 +TMP_298 TMP_299) in (le_n_S TMP_290 TMP_293 TMP_300)))))))))))))))))))))))))) +in (K_ind TMP_151 TMP_287 TMP_301 k))))) in (let TMP_458 \def (\lambda (v: +T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i: nat).(\lambda (_: (subst0 i +v u1 u2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -(S i)) O v)) (g (S i))) \to (le (weight_map f t2) (weight_map g -t1)))))))).(\lambda (u0: T).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat -\to nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H3: -(lt (weight_map f (lift (S i) O v)) (g i))).(le_n_S (plus (weight_map f u0) -(weight_map (wadd f O) t2)) (plus (weight_map g u0) (weight_map (wadd g O) -t1)) (le_plus_plus (weight_map f u0) (weight_map g u0) (weight_map (wadd f O) -t2) (weight_map (wadd g O) t1) (weight_le u0 f g H2) (H1 (wadd f O) (wadd g -O) (\lambda (m: nat).(wadd_le f g H2 O O (le_n O) m)) (eq_ind nat (weight_map -f (lift (S i) O v)) (\lambda (n: nat).(lt n (g i))) H3 (weight_map (wadd f O) -(lift (S (S i)) O v)) (lift_weight_add_O O v (S i) f)))))))))))))))) b)) -(\lambda (_: F).(\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda -(i: nat).(\lambda (_: (subst0 i v t1 t2)).(\lambda (H1: ((\forall (f0: ((nat -\to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f0 m) (g -m)))) \to ((lt (weight_map f0 (lift (S i) O v)) (g i)) \to (le (weight_map f0 -t2) (weight_map g t1)))))))).(\lambda (u0: T).(\lambda (f0: ((nat \to -nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f0 -m) (g m))))).(\lambda (H3: (lt (weight_map f0 (lift (S i) O v)) (g -i))).(le_n_S (plus (weight_map f0 u0) (weight_map f0 t2)) (plus (weight_map g -u0) (weight_map g t1)) (le_plus_plus (weight_map f0 u0) (weight_map g u0) -(weight_map f0 t2) (weight_map g t1) (weight_le u0 f0 g H2) (H1 f0 g H2 -H3))))))))))))))) k)) (\lambda (v: T).(\lambda (u1: T).(\lambda (u2: -T).(\lambda (i: nat).(\lambda (_: (subst0 i v u1 u2)).(\lambda (H1: ((\forall -(f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f -m) (g m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (le -(weight_map f u2) (weight_map g u1)))))))).(\lambda (k: K).(K_ind (\lambda -(k0: K).(\forall (t1: T).(\forall (t2: T).((subst0 (s k0 i) v t1 t2) \to -(((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: -nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S (s k0 i)) O v)) (g (s -k0 i))) \to (le (weight_map f t2) (weight_map g t1))))))) \to (\forall (f: -((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) -(g m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (le (weight_map -f (THead k0 u2 t2)) (weight_map g (THead k0 u1 t1)))))))))))) (\lambda (b: -B).(B_ind (\lambda (b0: B).(\forall (t1: T).(\forall (t2: T).((subst0 (s -(Bind b0) i) v t1 t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat -\to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f -(lift (S (s (Bind b0) i)) O v)) (g (s (Bind b0) i))) \to (le (weight_map f +i) O v)) (g i)) \to (le (weight_map f u2) (weight_map g u1)))))))).(\lambda +(k: K).(let TMP_307 \def (\lambda (k0: K).(\forall (t1: T).(\forall (t2: +T).((subst0 (s k0 i) v t1 t2) \to (((\forall (f: ((nat \to nat))).(\forall +(g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt +(weight_map f (lift (S (s k0 i)) O v)) (g (s k0 i))) \to (le (weight_map f t2) (weight_map g t1))))))) \to (\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map -f (lift (S i) O v)) (g i)) \to (le (weight_map f (THead (Bind b0) u2 t2)) -(weight_map g (THead (Bind b0) u1 t1)))))))))))) (\lambda (t1: T).(\lambda -(t2: T).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H3: ((\forall (f: -((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) -(g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (le -(weight_map f t2) (weight_map g t1)))))))).(\lambda (f: ((nat \to -nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le (f -m) (g m))))).(\lambda (H5: (lt (weight_map f (lift (S i) O v)) (g -i))).(le_n_S (plus (weight_map f u2) (weight_map (wadd f (S (weight_map f -u2))) t2)) (plus (weight_map g u1) (weight_map (wadd g (S (weight_map g u1))) -t1)) (le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f (S -(weight_map f u2))) t2) (weight_map (wadd g (S (weight_map g u1))) t1) (H1 f -g H4 H5) (H3 (wadd f (S (weight_map f u2))) (wadd g (S (weight_map g u1))) -(\lambda (m: nat).(wadd_le f g H4 (S (weight_map f u2)) (S (weight_map g u1)) -(le_n_S (weight_map f u2) (weight_map g u1) (H1 f g H4 H5)) m)) (eq_ind nat -(weight_map f (lift (S i) O v)) (\lambda (n: nat).(lt n (g i))) H5 -(weight_map (wadd f (S (weight_map f u2))) (lift (S (S i)) O v)) -(lift_weight_add_O (S (weight_map f u2)) v (S i) f))))))))))))) (\lambda (t1: -T).(\lambda (t2: T).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H3: +f (lift (S i) O v)) (g i)) \to (let TMP_303 \def (THead k0 u2 t2) in (let +TMP_304 \def (weight_map f TMP_303) in (let TMP_305 \def (THead k0 u1 t1) in +(let TMP_306 \def (weight_map g TMP_305) in (le TMP_304 TMP_306)))))))))))))) +in (let TMP_443 \def (\lambda (b: B).(let TMP_314 \def (\lambda (b0: +B).(\forall (t1: T).(\forall (t2: T).((subst0 (s (Bind b0) i) v t1 t2) \to +(((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: +nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S (s (Bind b0) i)) O +v)) (g (s (Bind b0) i))) \to (le (weight_map f t2) (weight_map g t1))))))) +\to (\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall +(m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) +\to (let TMP_308 \def (Bind b0) in (let TMP_309 \def (THead TMP_308 u2 t2) in +(let TMP_310 \def (weight_map f TMP_309) in (let TMP_311 \def (Bind b0) in +(let TMP_312 \def (THead TMP_311 u1 t1) in (let TMP_313 \def (weight_map g +TMP_312) in (le TMP_310 TMP_313)))))))))))))))) in (let TMP_372 \def (\lambda +(t1: T).(\lambda (t2: T).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H3: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (le (weight_map f t2) (weight_map g t1)))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H5: (lt (weight_map f (lift (S i) O v)) (g -i))).(le_n_S (plus (weight_map f u2) (weight_map (wadd f O) t2)) (plus -(weight_map g u1) (weight_map (wadd g O) t1)) (le_plus_plus (weight_map f u2) -(weight_map g u1) (weight_map (wadd f O) t2) (weight_map (wadd g O) t1) (H1 f -g H4 H5) (H3 (wadd f O) (wadd g O) (\lambda (m: nat).(wadd_le f g H4 O O -(le_n O) m)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda (n: -nat).(lt n (g i))) H5 (weight_map (wadd f O) (lift (S (S i)) O v)) -(lift_weight_add_O O v (S i) f))))))))))))) (\lambda (t1: T).(\lambda (t2: -T).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H3: ((\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (le (weight_map f -t2) (weight_map g t1)))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat -\to nat))).(\lambda (H4: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H5: -(lt (weight_map f (lift (S i) O v)) (g i))).(le_n_S (plus (weight_map f u2) -(weight_map (wadd f O) t2)) (plus (weight_map g u1) (weight_map (wadd g O) -t1)) (le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f O) -t2) (weight_map (wadd g O) t1) (H1 f g H4 H5) (H3 (wadd f O) (wadd g O) -(\lambda (m: nat).(wadd_le f g H4 O O (le_n O) m)) (eq_ind nat (weight_map f -(lift (S i) O v)) (\lambda (n: nat).(lt n (g i))) H5 (weight_map (wadd f O) -(lift (S (S i)) O v)) (lift_weight_add_O O v (S i) f))))))))))))) b)) -(\lambda (_: F).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (subst0 i v t1 -t2)).(\lambda (H3: ((\forall (f0: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f0 m) (g m)))) \to ((lt (weight_map f0 (lift -(S i) O v)) (g i)) \to (le (weight_map f0 t2) (weight_map g -t1)))))))).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat \to -nat))).(\lambda (H4: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda (H5: -(lt (weight_map f0 (lift (S i) O v)) (g i))).(le_n_S (plus (weight_map f0 u2) -(weight_map f0 t2)) (plus (weight_map g u1) (weight_map g t1)) (le_plus_plus -(weight_map f0 u2) (weight_map g u1) (weight_map f0 t2) (weight_map g t1) (H1 -f0 g H4 H5) (H3 f0 g H4 H5)))))))))))) k)))))))) d u t z H))))). -(* COMMENTS -Initial nodes: 4101 -END *) +i))).(let TMP_315 \def (weight_map f u2) in (let TMP_316 \def (weight_map f +u2) in (let TMP_317 \def (S TMP_316) in (let TMP_318 \def (wadd f TMP_317) in +(let TMP_319 \def (weight_map TMP_318 t2) in (let TMP_320 \def (plus TMP_315 +TMP_319) in (let TMP_321 \def (weight_map g u1) in (let TMP_322 \def +(weight_map g u1) in (let TMP_323 \def (S TMP_322) in (let TMP_324 \def (wadd +g TMP_323) in (let TMP_325 \def (weight_map TMP_324 t1) in (let TMP_326 \def +(plus TMP_321 TMP_325) in (let TMP_327 \def (weight_map f u2) in (let TMP_328 +\def (weight_map g u1) in (let TMP_329 \def (weight_map f u2) in (let TMP_330 +\def (S TMP_329) in (let TMP_331 \def (wadd f TMP_330) in (let TMP_332 \def +(weight_map TMP_331 t2) in (let TMP_333 \def (weight_map g u1) in (let +TMP_334 \def (S TMP_333) in (let TMP_335 \def (wadd g TMP_334) in (let +TMP_336 \def (weight_map TMP_335 t1) in (let TMP_337 \def (H1 f g H4 H5) in +(let TMP_338 \def (weight_map f u2) in (let TMP_339 \def (S TMP_338) in (let +TMP_340 \def (wadd f TMP_339) in (let TMP_341 \def (weight_map g u1) in (let +TMP_342 \def (S TMP_341) in (let TMP_343 \def (wadd g TMP_342) in (let +TMP_352 \def (\lambda (m: nat).(let TMP_344 \def (weight_map f u2) in (let +TMP_345 \def (S TMP_344) in (let TMP_346 \def (weight_map g u1) in (let +TMP_347 \def (S TMP_346) in (let TMP_348 \def (weight_map f u2) in (let +TMP_349 \def (weight_map g u1) in (let TMP_350 \def (H1 f g H4 H5) in (let +TMP_351 \def (le_n_S TMP_348 TMP_349 TMP_350) in (wadd_le f g H4 TMP_345 +TMP_347 TMP_351 m)))))))))) in (let TMP_353 \def (S i) in (let TMP_354 \def +(lift TMP_353 O v) in (let TMP_355 \def (weight_map f TMP_354) in (let +TMP_357 \def (\lambda (n: nat).(let TMP_356 \def (g i) in (lt n TMP_356))) in +(let TMP_358 \def (weight_map f u2) in (let TMP_359 \def (S TMP_358) in (let +TMP_360 \def (wadd f TMP_359) in (let TMP_361 \def (S i) in (let TMP_362 \def +(S TMP_361) in (let TMP_363 \def (lift TMP_362 O v) in (let TMP_364 \def +(weight_map TMP_360 TMP_363) in (let TMP_365 \def (weight_map f u2) in (let +TMP_366 \def (S TMP_365) in (let TMP_367 \def (S i) in (let TMP_368 \def +(lift_weight_add_O TMP_366 v TMP_367 f) in (let TMP_369 \def (eq_ind nat +TMP_355 TMP_357 H5 TMP_364 TMP_368) in (let TMP_370 \def (H3 TMP_340 TMP_343 +TMP_352 TMP_369) in (let TMP_371 \def (le_plus_plus TMP_327 TMP_328 TMP_332 +TMP_336 TMP_337 TMP_370) in (le_n_S TMP_320 TMP_326 +TMP_371))))))))))))))))))))))))))))))))))))))))))))))))))))))))) in (let +TMP_407 \def (\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (subst0 (S i) v +t1 t2)).(\lambda (H3: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +(S i)) O v)) (g (S i))) \to (le (weight_map f t2) (weight_map g +t1)))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to +nat))).(\lambda (H4: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H5: (lt +(weight_map f (lift (S i) O v)) (g i))).(let TMP_373 \def (weight_map f u2) +in (let TMP_374 \def (wadd f O) in (let TMP_375 \def (weight_map TMP_374 t2) +in (let TMP_376 \def (plus TMP_373 TMP_375) in (let TMP_377 \def (weight_map +g u1) in (let TMP_378 \def (wadd g O) in (let TMP_379 \def (weight_map +TMP_378 t1) in (let TMP_380 \def (plus TMP_377 TMP_379) in (let TMP_381 \def +(weight_map f u2) in (let TMP_382 \def (weight_map g u1) in (let TMP_383 \def +(wadd f O) in (let TMP_384 \def (weight_map TMP_383 t2) in (let TMP_385 \def +(wadd g O) in (let TMP_386 \def (weight_map TMP_385 t1) in (let TMP_387 \def +(H1 f g H4 H5) in (let TMP_388 \def (wadd f O) in (let TMP_389 \def (wadd g +O) in (let TMP_391 \def (\lambda (m: nat).(let TMP_390 \def (le_O_n O) in +(wadd_le f g H4 O O TMP_390 m))) in (let TMP_392 \def (S i) in (let TMP_393 +\def (lift TMP_392 O v) in (let TMP_394 \def (weight_map f TMP_393) in (let +TMP_396 \def (\lambda (n: nat).(let TMP_395 \def (g i) in (lt n TMP_395))) in +(let TMP_397 \def (wadd f O) in (let TMP_398 \def (S i) in (let TMP_399 \def +(S TMP_398) in (let TMP_400 \def (lift TMP_399 O v) in (let TMP_401 \def +(weight_map TMP_397 TMP_400) in (let TMP_402 \def (S i) in (let TMP_403 \def +(lift_weight_add_O O v TMP_402 f) in (let TMP_404 \def (eq_ind nat TMP_394 +TMP_396 H5 TMP_401 TMP_403) in (let TMP_405 \def (H3 TMP_388 TMP_389 TMP_391 +TMP_404) in (let TMP_406 \def (le_plus_plus TMP_381 TMP_382 TMP_384 TMP_386 +TMP_387 TMP_405) in (le_n_S TMP_376 TMP_380 +TMP_406))))))))))))))))))))))))))))))))))))))))) in (let TMP_442 \def +(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (subst0 (S i) v t1 +t2)).(\lambda (H3: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +(S i)) O v)) (g (S i))) \to (le (weight_map f t2) (weight_map g +t1)))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to +nat))).(\lambda (H4: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H5: (lt +(weight_map f (lift (S i) O v)) (g i))).(let TMP_408 \def (weight_map f u2) +in (let TMP_409 \def (wadd f O) in (let TMP_410 \def (weight_map TMP_409 t2) +in (let TMP_411 \def (plus TMP_408 TMP_410) in (let TMP_412 \def (weight_map +g u1) in (let TMP_413 \def (wadd g O) in (let TMP_414 \def (weight_map +TMP_413 t1) in (let TMP_415 \def (plus TMP_412 TMP_414) in (let TMP_416 \def +(weight_map f u2) in (let TMP_417 \def (weight_map g u1) in (let TMP_418 \def +(wadd f O) in (let TMP_419 \def (weight_map TMP_418 t2) in (let TMP_420 \def +(wadd g O) in (let TMP_421 \def (weight_map TMP_420 t1) in (let TMP_422 \def +(H1 f g H4 H5) in (let TMP_423 \def (wadd f O) in (let TMP_424 \def (wadd g +O) in (let TMP_426 \def (\lambda (m: nat).(let TMP_425 \def (le_O_n O) in +(wadd_le f g H4 O O TMP_425 m))) in (let TMP_427 \def (S i) in (let TMP_428 +\def (lift TMP_427 O v) in (let TMP_429 \def (weight_map f TMP_428) in (let +TMP_431 \def (\lambda (n: nat).(let TMP_430 \def (g i) in (lt n TMP_430))) in +(let TMP_432 \def (wadd f O) in (let TMP_433 \def (S i) in (let TMP_434 \def +(S TMP_433) in (let TMP_435 \def (lift TMP_434 O v) in (let TMP_436 \def +(weight_map TMP_432 TMP_435) in (let TMP_437 \def (S i) in (let TMP_438 \def +(lift_weight_add_O O v TMP_437 f) in (let TMP_439 \def (eq_ind nat TMP_429 +TMP_431 H5 TMP_436 TMP_438) in (let TMP_440 \def (H3 TMP_423 TMP_424 TMP_426 +TMP_439) in (let TMP_441 \def (le_plus_plus TMP_416 TMP_417 TMP_419 TMP_421 +TMP_422 TMP_440) in (le_n_S TMP_411 TMP_415 +TMP_441))))))))))))))))))))))))))))))))))))))))) in (B_ind TMP_314 TMP_372 +TMP_407 TMP_442 b)))))) in (let TMP_457 \def (\lambda (_: F).(\lambda (t1: +T).(\lambda (t2: T).(\lambda (_: (subst0 i v t1 t2)).(\lambda (H3: ((\forall +(f0: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le +(f0 m) (g m)))) \to ((lt (weight_map f0 (lift (S i) O v)) (g i)) \to (le +(weight_map f0 t2) (weight_map g t1)))))))).(\lambda (f0: ((nat \to +nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le (f0 +m) (g m))))).(\lambda (H5: (lt (weight_map f0 (lift (S i) O v)) (g i))).(let +TMP_444 \def (weight_map f0 u2) in (let TMP_445 \def (weight_map f0 t2) in +(let TMP_446 \def (plus TMP_444 TMP_445) in (let TMP_447 \def (weight_map g +u1) in (let TMP_448 \def (weight_map g t1) in (let TMP_449 \def (plus TMP_447 +TMP_448) in (let TMP_450 \def (weight_map f0 u2) in (let TMP_451 \def +(weight_map g u1) in (let TMP_452 \def (weight_map f0 t2) in (let TMP_453 +\def (weight_map g t1) in (let TMP_454 \def (H1 f0 g H4 H5) in (let TMP_455 +\def (H3 f0 g H4 H5) in (let TMP_456 \def (le_plus_plus TMP_450 TMP_451 +TMP_452 TMP_453 TMP_454 TMP_455) in (le_n_S TMP_446 TMP_449 +TMP_456))))))))))))))))))))))) in (K_ind TMP_307 TMP_443 TMP_457 k))))))))))) +in (subst0_ind TMP_3 TMP_33 TMP_146 TMP_302 TMP_458 d u t z H)))))))))). theorem subst0_weight_lt: \forall (u: T).(\forall (t: T).(\forall (z: T).(\forall (d: nat).((subst0 d @@ -229,240 +408,447 @@ nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S d) O u)) (g d)) \to (lt (weight_map f z) (weight_map g t)))))))))) \def \lambda (u: T).(\lambda (t: T).(\lambda (z: T).(\lambda (d: nat).(\lambda -(H: (subst0 d u t z)).(subst0_ind (\lambda (n: nat).(\lambda (t0: T).(\lambda -(t1: T).(\lambda (t2: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -n) O t0)) (g n)) \to (lt (weight_map f t2) (weight_map g t1)))))))))) -(\lambda (v: T).(\lambda (i: nat).(\lambda (f: ((nat \to nat))).(\lambda (g: -((nat \to nat))).(\lambda (_: ((\forall (m: nat).(le (f m) (g m))))).(\lambda -(H1: (lt (weight_map f (lift (S i) O v)) (g i))).H1)))))) (\lambda (v: -T).(\lambda (u2: T).(\lambda (u1: T).(\lambda (i: nat).(\lambda (_: (subst0 i -v u1 u2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -i) O v)) (g i)) \to (lt (weight_map f u2) (weight_map g u1)))))))).(\lambda -(t0: T).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (lt (weight_map f (THead -k0 u2 t0)) (weight_map g (THead k0 u1 t0)))))))) (\lambda (b: B).(B_ind -(\lambda (b0: B).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -i) O v)) (g i)) \to (lt (weight_map f (THead (Bind b0) u2 t0)) (weight_map g -(THead (Bind b0) u1 t0)))))))) (\lambda (f: ((nat \to nat))).(\lambda (g: -((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g -m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g i))).(lt_n_S -(plus (weight_map f u2) (weight_map (wadd f (S (weight_map f u2))) t0)) (plus -(weight_map g u1) (weight_map (wadd g (S (weight_map g u1))) t0)) -(lt_le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f (S -(weight_map f u2))) t0) (weight_map (wadd g (S (weight_map g u1))) t0) (H1 f -g H2 H3) (weight_le t0 (wadd f (S (weight_map f u2))) (wadd g (S (weight_map -g u1))) (\lambda (n: nat).(wadd_lt f g H2 (S (weight_map f u2)) (S -(weight_map g u1)) (lt_n_S (weight_map f u2) (weight_map g u1) (H1 f g H2 -H3)) n))))))))) (\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to -nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H3: (lt -(weight_map f (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map f u2) -(weight_map (wadd f O) t0)) (plus (weight_map g u1) (weight_map (wadd g O) -t0)) (lt_le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f -O) t0) (weight_map (wadd g O) t0) (H1 f g H2 H3) (weight_le t0 (wadd f O) -(wadd g O) (\lambda (n: nat).(le_S_n (wadd f O n) (wadd g O n) (le_n_S (wadd -f O n) (wadd g O n) (wadd_le f g H2 O O (le_n O) n))))))))))) (\lambda (f: +(H: (subst0 d u t z)).(let TMP_3 \def (\lambda (n: nat).(\lambda (t0: +T).(\lambda (t1: T).(\lambda (t2: T).(\forall (f: ((nat \to nat))).(\forall +(g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt +(weight_map f (lift (S n) O t0)) (g n)) \to (let TMP_1 \def (weight_map f t2) +in (let TMP_2 \def (weight_map g t1) in (lt TMP_1 TMP_2))))))))))) in (let +TMP_4 \def (\lambda (v: T).(\lambda (i: nat).(\lambda (f: ((nat \to +nat))).(\lambda (g: ((nat \to nat))).(\lambda (_: ((\forall (m: nat).(le (f +m) (g m))))).(\lambda (H1: (lt (weight_map f (lift (S i) O v)) (g +i))).H1)))))) in (let TMP_129 \def (\lambda (v: T).(\lambda (u2: T).(\lambda +(u1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v u1 u2)).(\lambda (H1: +((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: +nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) \to +(lt (weight_map f u2) (weight_map g u1)))))))).(\lambda (t0: T).(\lambda (k: +K).(let TMP_9 \def (\lambda (k0: K).(\forall (f: ((nat \to nat))).(\forall +(g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt +(weight_map f (lift (S i) O v)) (g i)) \to (let TMP_5 \def (THead k0 u2 t0) +in (let TMP_6 \def (weight_map f TMP_5) in (let TMP_7 \def (THead k0 u1 t0) +in (let TMP_8 \def (weight_map g TMP_7) in (lt TMP_6 TMP_8)))))))))) in (let +TMP_114 \def (\lambda (b: B).(let TMP_16 \def (\lambda (b0: B).(\forall (f: +((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) +(g m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (let TMP_10 \def +(Bind b0) in (let TMP_11 \def (THead TMP_10 u2 t0) in (let TMP_12 \def +(weight_map f TMP_11) in (let TMP_13 \def (Bind b0) in (let TMP_14 \def +(THead TMP_13 u1 t0) in (let TMP_15 \def (weight_map g TMP_14) in (lt TMP_12 +TMP_15)))))))))))) in (let TMP_57 \def (\lambda (f: ((nat \to nat))).(\lambda +(g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g +m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g i))).(let TMP_17 +\def (weight_map f u2) in (let TMP_18 \def (weight_map f u2) in (let TMP_19 +\def (S TMP_18) in (let TMP_20 \def (wadd f TMP_19) in (let TMP_21 \def +(weight_map TMP_20 t0) in (let TMP_22 \def (plus TMP_17 TMP_21) in (let +TMP_23 \def (weight_map g u1) in (let TMP_24 \def (weight_map g u1) in (let +TMP_25 \def (S TMP_24) in (let TMP_26 \def (wadd g TMP_25) in (let TMP_27 +\def (weight_map TMP_26 t0) in (let TMP_28 \def (plus TMP_23 TMP_27) in (let +TMP_29 \def (weight_map f u2) in (let TMP_30 \def (weight_map g u1) in (let +TMP_31 \def (weight_map f u2) in (let TMP_32 \def (S TMP_31) in (let TMP_33 +\def (wadd f TMP_32) in (let TMP_34 \def (weight_map TMP_33 t0) in (let +TMP_35 \def (weight_map g u1) in (let TMP_36 \def (S TMP_35) in (let TMP_37 +\def (wadd g TMP_36) in (let TMP_38 \def (weight_map TMP_37 t0) in (let +TMP_39 \def (H1 f g H2 H3) in (let TMP_40 \def (weight_map f u2) in (let +TMP_41 \def (S TMP_40) in (let TMP_42 \def (wadd f TMP_41) in (let TMP_43 +\def (weight_map g u1) in (let TMP_44 \def (S TMP_43) in (let TMP_45 \def +(wadd g TMP_44) in (let TMP_54 \def (\lambda (n: nat).(let TMP_46 \def +(weight_map f u2) in (let TMP_47 \def (S TMP_46) in (let TMP_48 \def +(weight_map g u1) in (let TMP_49 \def (S TMP_48) in (let TMP_50 \def +(weight_map f u2) in (let TMP_51 \def (weight_map g u1) in (let TMP_52 \def +(H1 f g H2 H3) in (let TMP_53 \def (lt_n_S TMP_50 TMP_51 TMP_52) in (wadd_lt +f g H2 TMP_47 TMP_49 TMP_53 n)))))))))) in (let TMP_55 \def (weight_le t0 +TMP_42 TMP_45 TMP_54) in (let TMP_56 \def (lt_le_plus_plus TMP_29 TMP_30 +TMP_34 TMP_38 TMP_39 TMP_55) in (lt_n_S TMP_22 TMP_28 +TMP_56))))))))))))))))))))))))))))))))))))) in (let TMP_85 \def (\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g -i))).(lt_n_S (plus (weight_map f u2) (weight_map (wadd f O) t0)) (plus -(weight_map g u1) (weight_map (wadd g O) t0)) (lt_le_plus_plus (weight_map f -u2) (weight_map g u1) (weight_map (wadd f O) t0) (weight_map (wadd g O) t0) -(H1 f g H2 H3) (weight_le t0 (wadd f O) (wadd g O) (\lambda (n: nat).(le_S_n -(wadd f O n) (wadd g O n) (le_n_S (wadd f O n) (wadd g O n) (wadd_le f g H2 O -O (le_n O) n))))))))))) b)) (\lambda (_: F).(\lambda (f0: ((nat \to +i))).(let TMP_58 \def (weight_map f u2) in (let TMP_59 \def (wadd f O) in +(let TMP_60 \def (weight_map TMP_59 t0) in (let TMP_61 \def (plus TMP_58 +TMP_60) in (let TMP_62 \def (weight_map g u1) in (let TMP_63 \def (wadd g O) +in (let TMP_64 \def (weight_map TMP_63 t0) in (let TMP_65 \def (plus TMP_62 +TMP_64) in (let TMP_66 \def (weight_map f u2) in (let TMP_67 \def (weight_map +g u1) in (let TMP_68 \def (wadd f O) in (let TMP_69 \def (weight_map TMP_68 +t0) in (let TMP_70 \def (wadd g O) in (let TMP_71 \def (weight_map TMP_70 t0) +in (let TMP_72 \def (H1 f g H2 H3) in (let TMP_73 \def (wadd f O) in (let +TMP_74 \def (wadd g O) in (let TMP_82 \def (\lambda (n: nat).(let TMP_75 \def +(wadd f O n) in (let TMP_76 \def (wadd g O n) in (let TMP_77 \def (wadd f O +n) in (let TMP_78 \def (wadd g O n) in (let TMP_79 \def (le_O_n O) in (let +TMP_80 \def (wadd_le f g H2 O O TMP_79 n) in (let TMP_81 \def (le_n_S TMP_77 +TMP_78 TMP_80) in (le_S_n TMP_75 TMP_76 TMP_81))))))))) in (let TMP_83 \def +(weight_le t0 TMP_73 TMP_74 TMP_82) in (let TMP_84 \def (lt_le_plus_plus +TMP_66 TMP_67 TMP_69 TMP_71 TMP_72 TMP_83) in (lt_n_S TMP_61 TMP_65 +TMP_84))))))))))))))))))))))))) in (let TMP_113 \def (\lambda (f: ((nat \to +nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f +m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g i))).(let +TMP_86 \def (weight_map f u2) in (let TMP_87 \def (wadd f O) in (let TMP_88 +\def (weight_map TMP_87 t0) in (let TMP_89 \def (plus TMP_86 TMP_88) in (let +TMP_90 \def (weight_map g u1) in (let TMP_91 \def (wadd g O) in (let TMP_92 +\def (weight_map TMP_91 t0) in (let TMP_93 \def (plus TMP_90 TMP_92) in (let +TMP_94 \def (weight_map f u2) in (let TMP_95 \def (weight_map g u1) in (let +TMP_96 \def (wadd f O) in (let TMP_97 \def (weight_map TMP_96 t0) in (let +TMP_98 \def (wadd g O) in (let TMP_99 \def (weight_map TMP_98 t0) in (let +TMP_100 \def (H1 f g H2 H3) in (let TMP_101 \def (wadd f O) in (let TMP_102 +\def (wadd g O) in (let TMP_110 \def (\lambda (n: nat).(let TMP_103 \def +(wadd f O n) in (let TMP_104 \def (wadd g O n) in (let TMP_105 \def (wadd f O +n) in (let TMP_106 \def (wadd g O n) in (let TMP_107 \def (le_O_n O) in (let +TMP_108 \def (wadd_le f g H2 O O TMP_107 n) in (let TMP_109 \def (le_n_S +TMP_105 TMP_106 TMP_108) in (le_S_n TMP_103 TMP_104 TMP_109))))))))) in (let +TMP_111 \def (weight_le t0 TMP_101 TMP_102 TMP_110) in (let TMP_112 \def +(lt_le_plus_plus TMP_94 TMP_95 TMP_97 TMP_99 TMP_100 TMP_111) in (lt_n_S +TMP_89 TMP_93 TMP_112))))))))))))))))))))))))) in (B_ind TMP_16 TMP_57 TMP_85 +TMP_113 b)))))) in (let TMP_128 \def (\lambda (_: F).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f0 -m) (g m))))).(\lambda (H3: (lt (weight_map f0 (lift (S i) O v)) (g -i))).(lt_n_S (plus (weight_map f0 u2) (weight_map f0 t0)) (plus (weight_map g -u1) (weight_map g t0)) (lt_le_plus_plus (weight_map f0 u2) (weight_map g u1) -(weight_map f0 t0) (weight_map g t0) (H1 f0 g H2 H3) (weight_le t0 f0 g -H2)))))))) k))))))))) (\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (v: -T).(\forall (t2: T).(\forall (t1: T).(\forall (i: nat).((subst0 (s k0 i) v t1 -t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +m) (g m))))).(\lambda (H3: (lt (weight_map f0 (lift (S i) O v)) (g i))).(let +TMP_115 \def (weight_map f0 u2) in (let TMP_116 \def (weight_map f0 t0) in +(let TMP_117 \def (plus TMP_115 TMP_116) in (let TMP_118 \def (weight_map g +u1) in (let TMP_119 \def (weight_map g t0) in (let TMP_120 \def (plus TMP_118 +TMP_119) in (let TMP_121 \def (weight_map f0 u2) in (let TMP_122 \def +(weight_map g u1) in (let TMP_123 \def (weight_map f0 t0) in (let TMP_124 +\def (weight_map g t0) in (let TMP_125 \def (H1 f0 g H2 H3) in (let TMP_126 +\def (weight_le t0 f0 g H2) in (let TMP_127 \def (lt_le_plus_plus TMP_121 +TMP_122 TMP_123 TMP_124 TMP_125 TMP_126) in (lt_n_S TMP_117 TMP_120 +TMP_127))))))))))))))))))) in (K_ind TMP_9 TMP_114 TMP_128 k)))))))))))) in +(let TMP_285 \def (\lambda (k: K).(let TMP_134 \def (\lambda (k0: K).(\forall +(v: T).(\forall (t2: T).(\forall (t1: T).(\forall (i: nat).((subst0 (s k0 i) +v t1 t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S (s k0 i)) O v)) (g (s k0 i))) \to (lt (weight_map f t2) (weight_map g t1))))))) \to (\forall (u0: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map -f (lift (S i) O v)) (g i)) \to (lt (weight_map f (THead k0 u0 t2)) -(weight_map g (THead k0 u0 t1))))))))))))))) (\lambda (b: B).(B_ind (\lambda -(b0: B).(\forall (v: T).(\forall (t2: T).(\forall (t1: T).(\forall (i: -nat).((subst0 (s (Bind b0) i) v t1 t2) \to (((\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S (s (Bind b0) i)) O v)) (g (s (Bind b0) i))) -\to (lt (weight_map f t2) (weight_map g t1))))))) \to (\forall (u0: +f (lift (S i) O v)) (g i)) \to (let TMP_130 \def (THead k0 u0 t2) in (let +TMP_131 \def (weight_map f TMP_130) in (let TMP_132 \def (THead k0 u0 t1) in +(let TMP_133 \def (weight_map g TMP_132) in (lt TMP_131 +TMP_133))))))))))))))))) in (let TMP_270 \def (\lambda (b: B).(let TMP_141 +\def (\lambda (b0: B).(\forall (v: T).(\forall (t2: T).(\forall (t1: +T).(\forall (i: nat).((subst0 (s (Bind b0) i) v t1 t2) \to (((\forall (f: +((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) +(g m)))) \to ((lt (weight_map f (lift (S (s (Bind b0) i)) O v)) (g (s (Bind +b0) i))) \to (lt (weight_map f t2) (weight_map g t1))))))) \to (\forall (u0: T).(\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) \to -(lt (weight_map f (THead (Bind b0) u0 t2)) (weight_map g (THead (Bind b0) u0 -t1))))))))))))))) (\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda -(i: nat).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H1: ((\forall (f: -((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) -(g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (lt +(let TMP_135 \def (Bind b0) in (let TMP_136 \def (THead TMP_135 u0 t2) in +(let TMP_137 \def (weight_map f TMP_136) in (let TMP_138 \def (Bind b0) in +(let TMP_139 \def (THead TMP_138 u0 t1) in (let TMP_140 \def (weight_map g +TMP_139) in (lt TMP_137 TMP_140))))))))))))))))))) in (let TMP_199 \def +(\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda +(_: (subst0 (S i) v t1 t2)).(\lambda (H1: ((\forall (f: ((nat \to +nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) +\to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (lt (weight_map f +t2) (weight_map g t1)))))))).(\lambda (u0: T).(\lambda (f: ((nat \to +nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f +m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g i))).(let +TMP_142 \def (weight_map f u0) in (let TMP_143 \def (weight_map f u0) in (let +TMP_144 \def (S TMP_143) in (let TMP_145 \def (wadd f TMP_144) in (let +TMP_146 \def (weight_map TMP_145 t2) in (let TMP_147 \def (plus TMP_142 +TMP_146) in (let TMP_148 \def (weight_map g u0) in (let TMP_149 \def +(weight_map g u0) in (let TMP_150 \def (S TMP_149) in (let TMP_151 \def (wadd +g TMP_150) in (let TMP_152 \def (weight_map TMP_151 t1) in (let TMP_153 \def +(plus TMP_148 TMP_152) in (let TMP_154 \def (weight_map f u0) in (let TMP_155 +\def (weight_map g u0) in (let TMP_156 \def (weight_map f u0) in (let TMP_157 +\def (S TMP_156) in (let TMP_158 \def (wadd f TMP_157) in (let TMP_159 \def +(weight_map TMP_158 t2) in (let TMP_160 \def (weight_map g u0) in (let +TMP_161 \def (S TMP_160) in (let TMP_162 \def (wadd g TMP_161) in (let +TMP_163 \def (weight_map TMP_162 t1) in (let TMP_164 \def (weight_le u0 f g +H2) in (let TMP_165 \def (weight_map f u0) in (let TMP_166 \def (S TMP_165) +in (let TMP_167 \def (wadd f TMP_166) in (let TMP_168 \def (weight_map g u0) +in (let TMP_169 \def (S TMP_168) in (let TMP_170 \def (wadd g TMP_169) in +(let TMP_179 \def (\lambda (m: nat).(let TMP_171 \def (weight_map f u0) in +(let TMP_172 \def (S TMP_171) in (let TMP_173 \def (weight_map g u0) in (let +TMP_174 \def (S TMP_173) in (let TMP_175 \def (weight_map f u0) in (let +TMP_176 \def (weight_map g u0) in (let TMP_177 \def (weight_le u0 f g H2) in +(let TMP_178 \def (le_n_S TMP_175 TMP_176 TMP_177) in (wadd_le f g H2 TMP_172 +TMP_174 TMP_178 m)))))))))) in (let TMP_180 \def (S i) in (let TMP_181 \def +(lift TMP_180 O v) in (let TMP_182 \def (weight_map f TMP_181) in (let +TMP_184 \def (\lambda (n: nat).(let TMP_183 \def (g i) in (lt n TMP_183))) in +(let TMP_185 \def (weight_map f u0) in (let TMP_186 \def (S TMP_185) in (let +TMP_187 \def (wadd f TMP_186) in (let TMP_188 \def (S i) in (let TMP_189 \def +(S TMP_188) in (let TMP_190 \def (lift TMP_189 O v) in (let TMP_191 \def +(weight_map TMP_187 TMP_190) in (let TMP_192 \def (weight_map f u0) in (let +TMP_193 \def (S TMP_192) in (let TMP_194 \def (S i) in (let TMP_195 \def +(lift_weight_add_O TMP_193 v TMP_194 f) in (let TMP_196 \def (eq_ind nat +TMP_182 TMP_184 H3 TMP_191 TMP_195) in (let TMP_197 \def (H1 TMP_167 TMP_170 +TMP_179 TMP_196) in (let TMP_198 \def (le_lt_plus_plus TMP_154 TMP_155 +TMP_159 TMP_163 TMP_164 TMP_197) in (lt_n_S TMP_147 TMP_153 +TMP_198)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) in (let +TMP_234 \def (\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda (i: +nat).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H1: ((\forall (f: ((nat +\to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g +m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (lt (weight_map f t2) (weight_map g t1)))))))).(\lambda (u0: T).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g -i))).(lt_n_S (plus (weight_map f u0) (weight_map (wadd f (S (weight_map f -u0))) t2)) (plus (weight_map g u0) (weight_map (wadd g (S (weight_map g u0))) -t1)) (le_lt_plus_plus (weight_map f u0) (weight_map g u0) (weight_map (wadd f -(S (weight_map f u0))) t2) (weight_map (wadd g (S (weight_map g u0))) t1) -(weight_le u0 f g H2) (H1 (wadd f (S (weight_map f u0))) (wadd g (S -(weight_map g u0))) (\lambda (m: nat).(wadd_le f g H2 (S (weight_map f u0)) -(S (weight_map g u0)) (le_n_S (weight_map f u0) (weight_map g u0) (weight_le -u0 f g H2)) m)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda (n: -nat).(lt n (g i))) H3 (weight_map (wadd f (S (weight_map f u0))) (lift (S (S -i)) O v)) (lift_weight_add_O (S (weight_map f u0)) v (S i) f)))))))))))))))) +i))).(let TMP_200 \def (weight_map f u0) in (let TMP_201 \def (wadd f O) in +(let TMP_202 \def (weight_map TMP_201 t2) in (let TMP_203 \def (plus TMP_200 +TMP_202) in (let TMP_204 \def (weight_map g u0) in (let TMP_205 \def (wadd g +O) in (let TMP_206 \def (weight_map TMP_205 t1) in (let TMP_207 \def (plus +TMP_204 TMP_206) in (let TMP_208 \def (weight_map f u0) in (let TMP_209 \def +(weight_map g u0) in (let TMP_210 \def (wadd f O) in (let TMP_211 \def +(weight_map TMP_210 t2) in (let TMP_212 \def (wadd g O) in (let TMP_213 \def +(weight_map TMP_212 t1) in (let TMP_214 \def (weight_le u0 f g H2) in (let +TMP_215 \def (wadd f O) in (let TMP_216 \def (wadd g O) in (let TMP_218 \def +(\lambda (m: nat).(let TMP_217 \def (le_O_n O) in (wadd_le f g H2 O O TMP_217 +m))) in (let TMP_219 \def (S i) in (let TMP_220 \def (lift TMP_219 O v) in +(let TMP_221 \def (weight_map f TMP_220) in (let TMP_223 \def (\lambda (n: +nat).(let TMP_222 \def (g i) in (lt n TMP_222))) in (let TMP_224 \def (wadd f +O) in (let TMP_225 \def (S i) in (let TMP_226 \def (S TMP_225) in (let +TMP_227 \def (lift TMP_226 O v) in (let TMP_228 \def (weight_map TMP_224 +TMP_227) in (let TMP_229 \def (S i) in (let TMP_230 \def (lift_weight_add_O O +v TMP_229 f) in (let TMP_231 \def (eq_ind nat TMP_221 TMP_223 H3 TMP_228 +TMP_230) in (let TMP_232 \def (H1 TMP_215 TMP_216 TMP_218 TMP_231) in (let +TMP_233 \def (le_lt_plus_plus TMP_208 TMP_209 TMP_211 TMP_213 TMP_214 +TMP_232) in (lt_n_S TMP_203 TMP_207 +TMP_233)))))))))))))))))))))))))))))))))))))))))))) in (let TMP_269 \def (\lambda (v: T).(\lambda (t2: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (lt (weight_map f t2) (weight_map g t1)))))))).(\lambda (u0: T).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f -m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g -i))).(lt_n_S (plus (weight_map f u0) (weight_map (wadd f O) t2)) (plus -(weight_map g u0) (weight_map (wadd g O) t1)) (le_lt_plus_plus (weight_map f -u0) (weight_map g u0) (weight_map (wadd f O) t2) (weight_map (wadd g O) t1) -(weight_le u0 f g H2) (H1 (wadd f O) (wadd g O) (\lambda (m: nat).(wadd_le f -g H2 O O (le_n O) m)) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda -(n: nat).(lt n (g i))) H3 (weight_map (wadd f O) (lift (S (S i)) O v)) -(lift_weight_add_O O v (S i) f)))))))))))))))) (\lambda (v: T).(\lambda (t2: -T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (_: (subst0 (S i) v t1 -t2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -(S i)) O v)) (g (S i))) \to (lt (weight_map f t2) (weight_map g -t1)))))))).(\lambda (u0: T).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat -\to nat))).(\lambda (H2: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H3: -(lt (weight_map f (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map f u0) -(weight_map (wadd f O) t2)) (plus (weight_map g u0) (weight_map (wadd g O) -t1)) (le_lt_plus_plus (weight_map f u0) (weight_map g u0) (weight_map (wadd f -O) t2) (weight_map (wadd g O) t1) (weight_le u0 f g H2) (H1 (wadd f O) (wadd -g O) (\lambda (m: nat).(wadd_le f g H2 O O (le_n O) m)) (eq_ind nat -(weight_map f (lift (S i) O v)) (\lambda (n: nat).(lt n (g i))) H3 -(weight_map (wadd f O) (lift (S (S i)) O v)) (lift_weight_add_O O v (S i) -f)))))))))))))))) b)) (\lambda (_: F).(\lambda (v: T).(\lambda (t2: -T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (_: (subst0 i v t1 -t2)).(\lambda (H1: ((\forall (f0: ((nat \to nat))).(\forall (g: ((nat \to -nat))).(((\forall (m: nat).(le (f0 m) (g m)))) \to ((lt (weight_map f0 (lift -(S i) O v)) (g i)) \to (lt (weight_map f0 t2) (weight_map g +m) (g m))))).(\lambda (H3: (lt (weight_map f (lift (S i) O v)) (g i))).(let +TMP_235 \def (weight_map f u0) in (let TMP_236 \def (wadd f O) in (let +TMP_237 \def (weight_map TMP_236 t2) in (let TMP_238 \def (plus TMP_235 +TMP_237) in (let TMP_239 \def (weight_map g u0) in (let TMP_240 \def (wadd g +O) in (let TMP_241 \def (weight_map TMP_240 t1) in (let TMP_242 \def (plus +TMP_239 TMP_241) in (let TMP_243 \def (weight_map f u0) in (let TMP_244 \def +(weight_map g u0) in (let TMP_245 \def (wadd f O) in (let TMP_246 \def +(weight_map TMP_245 t2) in (let TMP_247 \def (wadd g O) in (let TMP_248 \def +(weight_map TMP_247 t1) in (let TMP_249 \def (weight_le u0 f g H2) in (let +TMP_250 \def (wadd f O) in (let TMP_251 \def (wadd g O) in (let TMP_253 \def +(\lambda (m: nat).(let TMP_252 \def (le_O_n O) in (wadd_le f g H2 O O TMP_252 +m))) in (let TMP_254 \def (S i) in (let TMP_255 \def (lift TMP_254 O v) in +(let TMP_256 \def (weight_map f TMP_255) in (let TMP_258 \def (\lambda (n: +nat).(let TMP_257 \def (g i) in (lt n TMP_257))) in (let TMP_259 \def (wadd f +O) in (let TMP_260 \def (S i) in (let TMP_261 \def (S TMP_260) in (let +TMP_262 \def (lift TMP_261 O v) in (let TMP_263 \def (weight_map TMP_259 +TMP_262) in (let TMP_264 \def (S i) in (let TMP_265 \def (lift_weight_add_O O +v TMP_264 f) in (let TMP_266 \def (eq_ind nat TMP_256 TMP_258 H3 TMP_263 +TMP_265) in (let TMP_267 \def (H1 TMP_250 TMP_251 TMP_253 TMP_266) in (let +TMP_268 \def (le_lt_plus_plus TMP_243 TMP_244 TMP_246 TMP_248 TMP_249 +TMP_267) in (lt_n_S TMP_238 TMP_242 +TMP_268)))))))))))))))))))))))))))))))))))))))))))) in (B_ind TMP_141 TMP_199 +TMP_234 TMP_269 b)))))) in (let TMP_284 \def (\lambda (_: F).(\lambda (v: +T).(\lambda (t2: T).(\lambda (t1: T).(\lambda (i: nat).(\lambda (_: (subst0 i +v t1 t2)).(\lambda (H1: ((\forall (f0: ((nat \to nat))).(\forall (g: ((nat +\to nat))).(((\forall (m: nat).(le (f0 m) (g m)))) \to ((lt (weight_map f0 +(lift (S i) O v)) (g i)) \to (lt (weight_map f0 t2) (weight_map g t1)))))))).(\lambda (u0: T).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H2: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda -(H3: (lt (weight_map f0 (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map -f0 u0) (weight_map f0 t2)) (plus (weight_map g u0) (weight_map g t1)) -(le_lt_plus_plus (weight_map f0 u0) (weight_map g u0) (weight_map f0 t2) -(weight_map g t1) (weight_le u0 f0 g H2) (H1 f0 g H2 H3))))))))))))))) k)) -(\lambda (v: T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i: nat).(\lambda -(_: (subst0 i v u1 u2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall +(H3: (lt (weight_map f0 (lift (S i) O v)) (g i))).(let TMP_271 \def +(weight_map f0 u0) in (let TMP_272 \def (weight_map f0 t2) in (let TMP_273 +\def (plus TMP_271 TMP_272) in (let TMP_274 \def (weight_map g u0) in (let +TMP_275 \def (weight_map g t1) in (let TMP_276 \def (plus TMP_274 TMP_275) in +(let TMP_277 \def (weight_map f0 u0) in (let TMP_278 \def (weight_map g u0) +in (let TMP_279 \def (weight_map f0 t2) in (let TMP_280 \def (weight_map g +t1) in (let TMP_281 \def (weight_le u0 f0 g H2) in (let TMP_282 \def (H1 f0 g +H2 H3) in (let TMP_283 \def (le_lt_plus_plus TMP_277 TMP_278 TMP_279 TMP_280 +TMP_281 TMP_282) in (lt_n_S TMP_273 TMP_276 TMP_283)))))))))))))))))))))))))) +in (K_ind TMP_134 TMP_270 TMP_284 k))))) in (let TMP_454 \def (\lambda (v: +T).(\lambda (u1: T).(\lambda (u2: T).(\lambda (i: nat).(\lambda (_: (subst0 i +v u1 u2)).(\lambda (H1: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S +i) O v)) (g i)) \to (lt (weight_map f u2) (weight_map g u1)))))))).(\lambda +(k: K).(let TMP_290 \def (\lambda (k0: K).(\forall (t1: T).(\forall (t2: +T).((subst0 (s k0 i) v t1 t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt -(weight_map f (lift (S i) O v)) (g i)) \to (lt (weight_map f u2) (weight_map -g u1)))))))).(\lambda (k: K).(K_ind (\lambda (k0: K).(\forall (t1: -T).(\forall (t2: T).((subst0 (s k0 i) v t1 t2) \to (((\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S (s k0 i)) O v)) (g (s k0 i))) \to (lt -(weight_map f t2) (weight_map g t1))))))) \to (\forall (f: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) -\to ((lt (weight_map f (lift (S i) O v)) (g i)) \to (lt (weight_map f (THead -k0 u2 t2)) (weight_map g (THead k0 u1 t1)))))))))))) (\lambda (b: B).(B_ind -(\lambda (b0: B).(\forall (t1: T).(\forall (t2: T).((subst0 (s (Bind b0) i) v -t1 t2) \to (((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to +(weight_map f (lift (S (s k0 i)) O v)) (g (s k0 i))) \to (lt (weight_map f +t2) (weight_map g t1))))))) \to (\forall (f: ((nat \to nat))).(\forall (g: +((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map +f (lift (S i) O v)) (g i)) \to (let TMP_286 \def (THead k0 u2 t2) in (let +TMP_287 \def (weight_map f TMP_286) in (let TMP_288 \def (THead k0 u1 t1) in +(let TMP_289 \def (weight_map g TMP_288) in (lt TMP_287 TMP_289)))))))))))))) +in (let TMP_439 \def (\lambda (b: B).(let TMP_297 \def (\lambda (b0: +B).(\forall (t1: T).(\forall (t2: T).((subst0 (s (Bind b0) i) v t1 t2) \to +(((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: +nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S (s (Bind b0) i)) O +v)) (g (s (Bind b0) i))) \to (lt (weight_map f t2) (weight_map g t1))))))) +\to (\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall +(m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S i) O v)) (g i)) +\to (let TMP_291 \def (Bind b0) in (let TMP_292 \def (THead TMP_291 u2 t2) in +(let TMP_293 \def (weight_map f TMP_292) in (let TMP_294 \def (Bind b0) in +(let TMP_295 \def (THead TMP_294 u1 t1) in (let TMP_296 \def (weight_map g +TMP_295) in (lt TMP_293 TMP_296)))))))))))))))) in (let TMP_356 \def (\lambda +(t1: T).(\lambda (t2: T).(\lambda (H2: (subst0 (S i) v t1 t2)).(\lambda (_: +((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: +nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S +i))) \to (lt (weight_map f t2) (weight_map g t1)))))))).(\lambda (f: ((nat +\to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le +(f m) (g m))))).(\lambda (H5: (lt (weight_map f (lift (S i) O v)) (g +i))).(let TMP_298 \def (weight_map f u2) in (let TMP_299 \def (weight_map f +u2) in (let TMP_300 \def (S TMP_299) in (let TMP_301 \def (wadd f TMP_300) in +(let TMP_302 \def (weight_map TMP_301 t2) in (let TMP_303 \def (plus TMP_298 +TMP_302) in (let TMP_304 \def (weight_map g u1) in (let TMP_305 \def +(weight_map g u1) in (let TMP_306 \def (S TMP_305) in (let TMP_307 \def (wadd +g TMP_306) in (let TMP_308 \def (weight_map TMP_307 t1) in (let TMP_309 \def +(plus TMP_304 TMP_308) in (let TMP_310 \def (weight_map f u2) in (let TMP_311 +\def (weight_map g u1) in (let TMP_312 \def (weight_map f u2) in (let TMP_313 +\def (S TMP_312) in (let TMP_314 \def (wadd f TMP_313) in (let TMP_315 \def +(weight_map TMP_314 t2) in (let TMP_316 \def (weight_map g u1) in (let +TMP_317 \def (S TMP_316) in (let TMP_318 \def (wadd g TMP_317) in (let +TMP_319 \def (weight_map TMP_318 t1) in (let TMP_320 \def (H1 f g H4 H5) in +(let TMP_321 \def (S i) in (let TMP_322 \def (weight_map f u2) in (let +TMP_323 \def (S TMP_322) in (let TMP_324 \def (wadd f TMP_323) in (let +TMP_325 \def (weight_map g u1) in (let TMP_326 \def (S TMP_325) in (let +TMP_327 \def (wadd g TMP_326) in (let TMP_336 \def (\lambda (m: nat).(let +TMP_328 \def (weight_map f u2) in (let TMP_329 \def (S TMP_328) in (let +TMP_330 \def (weight_map g u1) in (let TMP_331 \def (S TMP_330) in (let +TMP_332 \def (weight_map f u2) in (let TMP_333 \def (weight_map g u1) in (let +TMP_334 \def (H1 f g H4 H5) in (let TMP_335 \def (lt_n_S TMP_332 TMP_333 +TMP_334) in (wadd_lt f g H4 TMP_329 TMP_331 TMP_335 m)))))))))) in (let +TMP_337 \def (S i) in (let TMP_338 \def (lift TMP_337 O v) in (let TMP_339 +\def (weight_map f TMP_338) in (let TMP_341 \def (\lambda (n: nat).(let +TMP_340 \def (g i) in (lt n TMP_340))) in (let TMP_342 \def (weight_map f u2) +in (let TMP_343 \def (S TMP_342) in (let TMP_344 \def (wadd f TMP_343) in +(let TMP_345 \def (S i) in (let TMP_346 \def (S TMP_345) in (let TMP_347 \def +(lift TMP_346 O v) in (let TMP_348 \def (weight_map TMP_344 TMP_347) in (let +TMP_349 \def (weight_map f u2) in (let TMP_350 \def (S TMP_349) in (let +TMP_351 \def (S i) in (let TMP_352 \def (lift_weight_add_O TMP_350 v TMP_351 +f) in (let TMP_353 \def (eq_ind nat TMP_339 TMP_341 H5 TMP_348 TMP_352) in +(let TMP_354 \def (subst0_weight_le v t1 t2 TMP_321 H2 TMP_324 TMP_327 +TMP_336 TMP_353) in (let TMP_355 \def (lt_le_plus_plus TMP_310 TMP_311 +TMP_315 TMP_319 TMP_320 TMP_354) in (lt_n_S TMP_303 TMP_309 +TMP_355)))))))))))))))))))))))))))))))))))))))))))))))))))))))))) in (let +TMP_397 \def (\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (subst0 (S i) v +t1 t2)).(\lambda (H3: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S -(s (Bind b0) i)) O v)) (g (s (Bind b0) i))) \to (lt (weight_map f t2) -(weight_map g t1))))))) \to (\forall (f: ((nat \to nat))).(\forall (g: ((nat -\to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f -(lift (S i) O v)) (g i)) \to (lt (weight_map f (THead (Bind b0) u2 t2)) -(weight_map g (THead (Bind b0) u1 t1)))))))))))) (\lambda (t1: T).(\lambda -(t2: T).(\lambda (H2: (subst0 (S i) v t1 t2)).(\lambda (_: ((\forall (f: -((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) -(g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (lt -(weight_map f t2) (weight_map g t1)))))))).(\lambda (f: ((nat \to -nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le (f -m) (g m))))).(\lambda (H5: (lt (weight_map f (lift (S i) O v)) (g -i))).(lt_n_S (plus (weight_map f u2) (weight_map (wadd f (S (weight_map f -u2))) t2)) (plus (weight_map g u1) (weight_map (wadd g (S (weight_map g u1))) -t1)) (lt_le_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f -(S (weight_map f u2))) t2) (weight_map (wadd g (S (weight_map g u1))) t1) (H1 -f g H4 H5) (subst0_weight_le v t1 t2 (S i) H2 (wadd f (S (weight_map f u2))) -(wadd g (S (weight_map g u1))) (\lambda (m: nat).(wadd_lt f g H4 (S -(weight_map f u2)) (S (weight_map g u1)) (lt_n_S (weight_map f u2) -(weight_map g u1) (H1 f g H4 H5)) m)) (eq_ind nat (weight_map f (lift (S i) O -v)) (\lambda (n: nat).(lt n (g i))) H5 (weight_map (wadd f (S (weight_map f -u2))) (lift (S (S i)) O v)) (lift_weight_add_O (S (weight_map f u2)) v (S i) -f))))))))))))) (\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (subst0 (S i) v +(S i)) O v)) (g (S i))) \to (lt (weight_map f t2) (weight_map g +t1)))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to +nat))).(\lambda (H4: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H5: (lt +(weight_map f (lift (S i) O v)) (g i))).(let TMP_357 \def (weight_map f u2) +in (let TMP_358 \def (wadd f O) in (let TMP_359 \def (weight_map TMP_358 t2) +in (let TMP_360 \def (plus TMP_357 TMP_359) in (let TMP_361 \def (weight_map +g u1) in (let TMP_362 \def (wadd g O) in (let TMP_363 \def (weight_map +TMP_362 t1) in (let TMP_364 \def (plus TMP_361 TMP_363) in (let TMP_365 \def +(weight_map f u2) in (let TMP_366 \def (weight_map g u1) in (let TMP_367 \def +(wadd f O) in (let TMP_368 \def (weight_map TMP_367 t2) in (let TMP_369 \def +(wadd g O) in (let TMP_370 \def (weight_map TMP_369 t1) in (let TMP_371 \def +(H1 f g H4 H5) in (let TMP_372 \def (wadd f O) in (let TMP_373 \def (wadd g +O) in (let TMP_381 \def (\lambda (m: nat).(let TMP_374 \def (wadd f O m) in +(let TMP_375 \def (wadd g O m) in (let TMP_376 \def (wadd f O m) in (let +TMP_377 \def (wadd g O m) in (let TMP_378 \def (le_O_n O) in (let TMP_379 +\def (wadd_le f g H4 O O TMP_378 m) in (let TMP_380 \def (le_n_S TMP_376 +TMP_377 TMP_379) in (le_S_n TMP_374 TMP_375 TMP_380))))))))) in (let TMP_382 +\def (S i) in (let TMP_383 \def (lift TMP_382 O v) in (let TMP_384 \def +(weight_map f TMP_383) in (let TMP_386 \def (\lambda (n: nat).(let TMP_385 +\def (g i) in (lt n TMP_385))) in (let TMP_387 \def (wadd f O) in (let +TMP_388 \def (S i) in (let TMP_389 \def (S TMP_388) in (let TMP_390 \def +(lift TMP_389 O v) in (let TMP_391 \def (weight_map TMP_387 TMP_390) in (let +TMP_392 \def (S i) in (let TMP_393 \def (lift_weight_add_O O v TMP_392 f) in +(let TMP_394 \def (eq_ind nat TMP_384 TMP_386 H5 TMP_391 TMP_393) in (let +TMP_395 \def (H3 TMP_372 TMP_373 TMP_381 TMP_394) in (let TMP_396 \def +(lt_plus_plus TMP_365 TMP_366 TMP_368 TMP_370 TMP_371 TMP_395) in (lt_n_S +TMP_360 TMP_364 TMP_396))))))))))))))))))))))))))))))))))))))))) in (let +TMP_438 \def (\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H3: ((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S i))) \to (lt (weight_map f t2) (weight_map g t1)))))))).(\lambda (f: ((nat \to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le (f m) (g m))))).(\lambda (H5: (lt -(weight_map f (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map f u2) -(weight_map (wadd f O) t2)) (plus (weight_map g u1) (weight_map (wadd g O) -t1)) (lt_plus_plus (weight_map f u2) (weight_map g u1) (weight_map (wadd f O) -t2) (weight_map (wadd g O) t1) (H1 f g H4 H5) (H3 (wadd f O) (wadd g O) -(\lambda (m: nat).(le_S_n (wadd f O m) (wadd g O m) (le_n_S (wadd f O m) -(wadd g O m) (wadd_le f g H4 O O (le_n O) m)))) (eq_ind nat (weight_map f -(lift (S i) O v)) (\lambda (n: nat).(lt n (g i))) H5 (weight_map (wadd f O) -(lift (S (S i)) O v)) (lift_weight_add_O O v (S i) f))))))))))))) (\lambda -(t1: T).(\lambda (t2: T).(\lambda (_: (subst0 (S i) v t1 t2)).(\lambda (H3: -((\forall (f: ((nat \to nat))).(\forall (g: ((nat \to nat))).(((\forall (m: -nat).(le (f m) (g m)))) \to ((lt (weight_map f (lift (S (S i)) O v)) (g (S -i))) \to (lt (weight_map f t2) (weight_map g t1)))))))).(\lambda (f: ((nat -\to nat))).(\lambda (g: ((nat \to nat))).(\lambda (H4: ((\forall (m: nat).(le -(f m) (g m))))).(\lambda (H5: (lt (weight_map f (lift (S i) O v)) (g -i))).(lt_n_S (plus (weight_map f u2) (weight_map (wadd f O) t2)) (plus -(weight_map g u1) (weight_map (wadd g O) t1)) (lt_plus_plus (weight_map f u2) -(weight_map g u1) (weight_map (wadd f O) t2) (weight_map (wadd g O) t1) (H1 f -g H4 H5) (H3 (wadd f O) (wadd g O) (\lambda (m: nat).(le_S_n (wadd f O m) -(wadd g O m) (le_n_S (wadd f O m) (wadd g O m) (wadd_le f g H4 O O (le_n O) -m)))) (eq_ind nat (weight_map f (lift (S i) O v)) (\lambda (n: nat).(lt n (g -i))) H5 (weight_map (wadd f O) (lift (S (S i)) O v)) (lift_weight_add_O O v -(S i) f))))))))))))) b)) (\lambda (_: F).(\lambda (t1: T).(\lambda (t2: -T).(\lambda (_: (subst0 i v t1 t2)).(\lambda (H3: ((\forall (f0: ((nat \to -nat))).(\forall (g: ((nat \to nat))).(((\forall (m: nat).(le (f0 m) (g m)))) -\to ((lt (weight_map f0 (lift (S i) O v)) (g i)) \to (lt (weight_map f0 t2) -(weight_map g t1)))))))).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat -\to nat))).(\lambda (H4: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda -(H5: (lt (weight_map f0 (lift (S i) O v)) (g i))).(lt_n_S (plus (weight_map -f0 u2) (weight_map f0 t2)) (plus (weight_map g u1) (weight_map g t1)) -(lt_plus_plus (weight_map f0 u2) (weight_map g u1) (weight_map f0 t2) -(weight_map g t1) (H1 f0 g H4 H5) (H3 f0 g H4 H5)))))))))))) k)))))))) d u t -z H))))). -(* COMMENTS -Initial nodes: 4207 -END *) +(weight_map f (lift (S i) O v)) (g i))).(let TMP_398 \def (weight_map f u2) +in (let TMP_399 \def (wadd f O) in (let TMP_400 \def (weight_map TMP_399 t2) +in (let TMP_401 \def (plus TMP_398 TMP_400) in (let TMP_402 \def (weight_map +g u1) in (let TMP_403 \def (wadd g O) in (let TMP_404 \def (weight_map +TMP_403 t1) in (let TMP_405 \def (plus TMP_402 TMP_404) in (let TMP_406 \def +(weight_map f u2) in (let TMP_407 \def (weight_map g u1) in (let TMP_408 \def +(wadd f O) in (let TMP_409 \def (weight_map TMP_408 t2) in (let TMP_410 \def +(wadd g O) in (let TMP_411 \def (weight_map TMP_410 t1) in (let TMP_412 \def +(H1 f g H4 H5) in (let TMP_413 \def (wadd f O) in (let TMP_414 \def (wadd g +O) in (let TMP_422 \def (\lambda (m: nat).(let TMP_415 \def (wadd f O m) in +(let TMP_416 \def (wadd g O m) in (let TMP_417 \def (wadd f O m) in (let +TMP_418 \def (wadd g O m) in (let TMP_419 \def (le_O_n O) in (let TMP_420 +\def (wadd_le f g H4 O O TMP_419 m) in (let TMP_421 \def (le_n_S TMP_417 +TMP_418 TMP_420) in (le_S_n TMP_415 TMP_416 TMP_421))))))))) in (let TMP_423 +\def (S i) in (let TMP_424 \def (lift TMP_423 O v) in (let TMP_425 \def +(weight_map f TMP_424) in (let TMP_427 \def (\lambda (n: nat).(let TMP_426 +\def (g i) in (lt n TMP_426))) in (let TMP_428 \def (wadd f O) in (let +TMP_429 \def (S i) in (let TMP_430 \def (S TMP_429) in (let TMP_431 \def +(lift TMP_430 O v) in (let TMP_432 \def (weight_map TMP_428 TMP_431) in (let +TMP_433 \def (S i) in (let TMP_434 \def (lift_weight_add_O O v TMP_433 f) in +(let TMP_435 \def (eq_ind nat TMP_425 TMP_427 H5 TMP_432 TMP_434) in (let +TMP_436 \def (H3 TMP_413 TMP_414 TMP_422 TMP_435) in (let TMP_437 \def +(lt_plus_plus TMP_406 TMP_407 TMP_409 TMP_411 TMP_412 TMP_436) in (lt_n_S +TMP_401 TMP_405 TMP_437))))))))))))))))))))))))))))))))))))))))) in (B_ind +TMP_297 TMP_356 TMP_397 TMP_438 b)))))) in (let TMP_453 \def (\lambda (_: +F).(\lambda (t1: T).(\lambda (t2: T).(\lambda (_: (subst0 i v t1 +t2)).(\lambda (H3: ((\forall (f0: ((nat \to nat))).(\forall (g: ((nat \to +nat))).(((\forall (m: nat).(le (f0 m) (g m)))) \to ((lt (weight_map f0 (lift +(S i) O v)) (g i)) \to (lt (weight_map f0 t2) (weight_map g +t1)))))))).(\lambda (f0: ((nat \to nat))).(\lambda (g: ((nat \to +nat))).(\lambda (H4: ((\forall (m: nat).(le (f0 m) (g m))))).(\lambda (H5: +(lt (weight_map f0 (lift (S i) O v)) (g i))).(let TMP_440 \def (weight_map f0 +u2) in (let TMP_441 \def (weight_map f0 t2) in (let TMP_442 \def (plus +TMP_440 TMP_441) in (let TMP_443 \def (weight_map g u1) in (let TMP_444 \def +(weight_map g t1) in (let TMP_445 \def (plus TMP_443 TMP_444) in (let TMP_446 +\def (weight_map f0 u2) in (let TMP_447 \def (weight_map g u1) in (let +TMP_448 \def (weight_map f0 t2) in (let TMP_449 \def (weight_map g t1) in +(let TMP_450 \def (H1 f0 g H4 H5) in (let TMP_451 \def (H3 f0 g H4 H5) in +(let TMP_452 \def (lt_plus_plus TMP_446 TMP_447 TMP_448 TMP_449 TMP_450 +TMP_451) in (lt_n_S TMP_442 TMP_445 TMP_452))))))))))))))))))))))) in (K_ind +TMP_290 TMP_439 TMP_453 k))))))))))) in (subst0_ind TMP_3 TMP_4 TMP_129 +TMP_285 TMP_454 d u t z H)))))))))). theorem subst0_tlt_head: \forall (u: T).(\forall (t: T).(\forall (z: T).((subst0 O u t z) \to (tlt (THead (Bind Abbr) u z) (THead (Bind Abbr) u t))))) \def \lambda (u: T).(\lambda (t: T).(\lambda (z: T).(\lambda (H: (subst0 O u t -z)).(lt_n_S (plus (weight_map (\lambda (_: nat).O) u) (weight_map (wadd -(\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) z)) (plus -(weight_map (\lambda (_: nat).O) u) (weight_map (wadd (\lambda (_: nat).O) (S -(weight_map (\lambda (_: nat).O) u))) t)) (le_lt_plus_plus (weight_map -(\lambda (_: nat).O) u) (weight_map (\lambda (_: nat).O) u) (weight_map (wadd -(\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) z) (weight_map -(wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) t) (le_n -(weight_map (\lambda (_: nat).O) u)) (subst0_weight_lt u t z O H (wadd -(\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) (wadd (\lambda -(_: nat).O) (S (weight_map (\lambda (_: nat).O) u))) (\lambda (m: nat).(le_n -(wadd (\lambda (_: nat).O) (S (weight_map (\lambda (_: nat).O) u)) m))) -(eq_ind nat (weight_map (\lambda (_: nat).O) (lift O O u)) (\lambda (n: -nat).(lt n (S (weight_map (\lambda (_: nat).O) u)))) (eq_ind_r T u (\lambda -(t0: T).(lt (weight_map (\lambda (_: nat).O) t0) (S (weight_map (\lambda (_: -nat).O) u)))) (le_n (S (weight_map (\lambda (_: nat).O) u))) (lift O O u) -(lift_r u O)) (weight_map (wadd (\lambda (_: nat).O) (S (weight_map (\lambda -(_: nat).O) u))) (lift (S O) O u)) (lift_weight_add_O (S (weight_map (\lambda -(_: nat).O) u)) u O (\lambda (_: nat).O))))))))). -(* COMMENTS -Initial nodes: 347 -END *) +z)).(let TMP_1 \def (\lambda (_: nat).O) in (let TMP_2 \def (weight_map TMP_1 +u) in (let TMP_3 \def (\lambda (_: nat).O) in (let TMP_4 \def (\lambda (_: +nat).O) in (let TMP_5 \def (weight_map TMP_4 u) in (let TMP_6 \def (S TMP_5) +in (let TMP_7 \def (wadd TMP_3 TMP_6) in (let TMP_8 \def (weight_map TMP_7 z) +in (let TMP_9 \def (plus TMP_2 TMP_8) in (let TMP_10 \def (\lambda (_: +nat).O) in (let TMP_11 \def (weight_map TMP_10 u) in (let TMP_12 \def +(\lambda (_: nat).O) in (let TMP_13 \def (\lambda (_: nat).O) in (let TMP_14 +\def (weight_map TMP_13 u) in (let TMP_15 \def (S TMP_14) in (let TMP_16 \def +(wadd TMP_12 TMP_15) in (let TMP_17 \def (weight_map TMP_16 t) in (let TMP_18 +\def (plus TMP_11 TMP_17) in (let TMP_19 \def (\lambda (_: nat).O) in (let +TMP_20 \def (weight_map TMP_19 u) in (let TMP_21 \def (\lambda (_: nat).O) in +(let TMP_22 \def (weight_map TMP_21 u) in (let TMP_23 \def (\lambda (_: +nat).O) in (let TMP_24 \def (\lambda (_: nat).O) in (let TMP_25 \def +(weight_map TMP_24 u) in (let TMP_26 \def (S TMP_25) in (let TMP_27 \def +(wadd TMP_23 TMP_26) in (let TMP_28 \def (weight_map TMP_27 z) in (let TMP_29 +\def (\lambda (_: nat).O) in (let TMP_30 \def (\lambda (_: nat).O) in (let +TMP_31 \def (weight_map TMP_30 u) in (let TMP_32 \def (S TMP_31) in (let +TMP_33 \def (wadd TMP_29 TMP_32) in (let TMP_34 \def (weight_map TMP_33 t) in +(let TMP_35 \def (\lambda (_: nat).O) in (let TMP_36 \def (weight_map TMP_35 +u) in (let TMP_37 \def (le_n TMP_36) in (let TMP_38 \def (\lambda (_: nat).O) +in (let TMP_39 \def (\lambda (_: nat).O) in (let TMP_40 \def (weight_map +TMP_39 u) in (let TMP_41 \def (S TMP_40) in (let TMP_42 \def (wadd TMP_38 +TMP_41) in (let TMP_43 \def (\lambda (_: nat).O) in (let TMP_44 \def (\lambda +(_: nat).O) in (let TMP_45 \def (weight_map TMP_44 u) in (let TMP_46 \def (S +TMP_45) in (let TMP_47 \def (wadd TMP_43 TMP_46) in (let TMP_53 \def (\lambda +(m: nat).(let TMP_48 \def (\lambda (_: nat).O) in (let TMP_49 \def (\lambda +(_: nat).O) in (let TMP_50 \def (weight_map TMP_49 u) in (let TMP_51 \def (S +TMP_50) in (let TMP_52 \def (wadd TMP_48 TMP_51 m) in (le_n TMP_52))))))) in +(let TMP_54 \def (\lambda (_: nat).O) in (let TMP_55 \def (lift O O u) in +(let TMP_56 \def (weight_map TMP_54 TMP_55) in (let TMP_60 \def (\lambda (n: +nat).(let TMP_57 \def (\lambda (_: nat).O) in (let TMP_58 \def (weight_map +TMP_57 u) in (let TMP_59 \def (S TMP_58) in (lt n TMP_59))))) in (let TMP_66 +\def (\lambda (t0: T).(let TMP_61 \def (\lambda (_: nat).O) in (let TMP_62 +\def (weight_map TMP_61 t0) in (let TMP_63 \def (\lambda (_: nat).O) in (let +TMP_64 \def (weight_map TMP_63 u) in (let TMP_65 \def (S TMP_64) in (lt +TMP_62 TMP_65))))))) in (let TMP_67 \def (\lambda (_: nat).O) in (let TMP_68 +\def (weight_map TMP_67 u) in (let TMP_69 \def (S TMP_68) in (let TMP_70 \def +(le_n TMP_69) in (let TMP_71 \def (lift O O u) in (let TMP_72 \def (lift_r u +O) in (let TMP_73 \def (eq_ind_r T u TMP_66 TMP_70 TMP_71 TMP_72) in (let +TMP_74 \def (\lambda (_: nat).O) in (let TMP_75 \def (\lambda (_: nat).O) in +(let TMP_76 \def (weight_map TMP_75 u) in (let TMP_77 \def (S TMP_76) in (let +TMP_78 \def (wadd TMP_74 TMP_77) in (let TMP_79 \def (S O) in (let TMP_80 +\def (lift TMP_79 O u) in (let TMP_81 \def (weight_map TMP_78 TMP_80) in (let +TMP_82 \def (\lambda (_: nat).O) in (let TMP_83 \def (weight_map TMP_82 u) in +(let TMP_84 \def (S TMP_83) in (let TMP_85 \def (\lambda (_: nat).O) in (let +TMP_86 \def (lift_weight_add_O TMP_84 u O TMP_85) in (let TMP_87 \def (eq_ind +nat TMP_56 TMP_60 TMP_73 TMP_81 TMP_86) in (let TMP_88 \def (subst0_weight_lt +u t z O H TMP_42 TMP_47 TMP_53 TMP_87) in (let TMP_89 \def (le_lt_plus_plus +TMP_20 TMP_22 TMP_28 TMP_34 TMP_37 TMP_88) in (lt_n_S TMP_9 TMP_18 +TMP_89)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) +)))))))). theorem subst0_tlt: \forall (u: T).(\forall (t: T).(\forall (z: T).((subst0 O u t z) \to (tlt z (THead (Bind Abbr) u t))))) \def \lambda (u: T).(\lambda (t: T).(\lambda (z: T).(\lambda (H: (subst0 O u t -z)).(tlt_trans (THead (Bind Abbr) u z) z (THead (Bind Abbr) u t) (tlt_head_dx -(Bind Abbr) u z) (subst0_tlt_head u t z H))))). -(* COMMENTS -Initial nodes: 59 -END *) +z)).(let TMP_1 \def (Bind Abbr) in (let TMP_2 \def (THead TMP_1 u z) in (let +TMP_3 \def (Bind Abbr) in (let TMP_4 \def (THead TMP_3 u t) in (let TMP_5 +\def (Bind Abbr) in (let TMP_6 \def (tlt_head_dx TMP_5 u z) in (let TMP_7 +\def (subst0_tlt_head u t z H) in (tlt_trans TMP_2 z TMP_4 TMP_6 +TMP_7))))))))))).