DEFINITION lifts_inj()
TYPE =
       xs:TList
         .ts:TList
           .h:nat
             .d:nat
               .(eq TList (lifts h d xs) (lifts h d ts))(eq TList xs ts)
BODY =
       assume xsTList
          we proceed by induction on xs to prove 
             ts:TList
               .h:nat
                 .d:nat
                   .(eq TList (lifts h d xs) (lifts h d ts))(eq TList xs ts)
             case TNil : 
                the thesis becomes 
                ts:TList
                  .h:nat
                    .d:nat
                      .eq TList (lifts h d TNil) (lifts h d ts)
                        eq TList TNil ts
                   assume tsTList
                      we proceed by induction on ts to prove 
                         h:nat
                           .d:nat
                             .eq TList (lifts h d TNil) (lifts h d ts)
                               eq TList TNil ts
                         case TNil : 
                            the thesis becomes 
                            nat
                              (nat
                                   (eq TList (lifts __2 __1 TNil) (lifts __2 __1 TNil)
                                        eq TList TNil TNil))
                                assume nat
                                assume nat
                                  we must prove 
                                        eq TList (lifts __2 __1 TNil) (lifts __2 __1 TNil)
                                          eq TList TNil TNil
                                  or equivalently (eq TList TNil TNil)(eq TList TNil TNil)
                                  suppose eq TList TNil TNil
                                     by (refl_equal . .)
                                     we proved eq TList TNil TNil
                                  we proved (eq TList TNil TNil)(eq TList TNil TNil)
                                  that is equivalent to 
                                     eq TList (lifts __2 __1 TNil) (lifts __2 __1 TNil)
                                       eq TList TNil TNil

                                  nat
                                    (nat
                                         (eq TList (lifts __2 __1 TNil) (lifts __2 __1 TNil)
                                              eq TList TNil TNil))
                         case TCons : t:T t0:TList 
                            the thesis becomes 
                            h:nat
                              .d:nat
                                .eq TList (lifts h d TNil) (lifts h d (TCons t t0))
                                  eq TList TNil (TCons t t0)
                            () by induction hypothesis we know h:nat.d:nat.(eq TList TNil (lifts h d t0))(eq TList TNil t0)
                                assume hnat
                                assume dnat
                                  we must prove 
                                        eq TList (lifts h d TNil) (lifts h d (TCons t t0))
                                          eq TList TNil (TCons t t0)
                                  or equivalently 
                                        eq TList TNil (TCons (lift h d t) (lifts h d t0))
                                          eq TList TNil (TCons t t0)
                                  suppose H0eq TList TNil (TCons (lift h d t) (lifts h d t0))
                                     (H1
                                        we proceed by induction on H0 to prove 
                                           <λ:TList.Prop>
                                             CASE TCons (lift h d t) (lifts h d t0) OF
                                               TNilTrue
                                             | TCons  False
                                           case refl_equal : 
                                              the thesis becomes <λ:TList.Prop> CASE TNil OF TNilTrue | TCons  False
                                                 consider I
                                                 we proved True
<λ:TList.Prop> CASE TNil OF TNilTrue | TCons  False

                                           <λ:TList.Prop>
                                             CASE TCons (lift h d t) (lifts h d t0) OF
                                               TNilTrue
                                             | TCons  False
                                     end of H1
                                     consider H1
                                     we proved 
                                        <λ:TList.Prop>
                                          CASE TCons (lift h d t) (lifts h d t0) OF
                                            TNilTrue
                                          | TCons  False
                                     that is equivalent to False
                                     we proceed by induction on the previous result to prove eq TList TNil (TCons t t0)
                                     we proved eq TList TNil (TCons t t0)
                                  we proved 
                                     eq TList TNil (TCons (lift h d t) (lifts h d t0))
                                       eq TList TNil (TCons t t0)
                                  that is equivalent to 
                                     eq TList (lifts h d TNil) (lifts h d (TCons t t0))
                                       eq TList TNil (TCons t t0)

                                  h:nat
                                    .d:nat
                                      .eq TList (lifts h d TNil) (lifts h d (TCons t t0))
                                        eq TList TNil (TCons t t0)
                      we proved 
                         h:nat
                           .d:nat
                             .eq TList (lifts h d TNil) (lifts h d ts)
                               eq TList TNil ts

                      ts:TList
                        .h:nat
                          .d:nat
                            .eq TList (lifts h d TNil) (lifts h d ts)
                              eq TList TNil ts
             case TCons : t:T t0:TList 
                the thesis becomes 
                ts:TList
                  .h:nat
                    .d:nat
                      .eq TList (lifts h d (TCons t t0)) (lifts h d ts)
                        eq TList (TCons t t0) ts
                (H) by induction hypothesis we know 
                   ts:TList
                     .h:nat
                       .d:nat.(eq TList (lifts h d t0) (lifts h d ts))(eq TList t0 ts)
                   assume tsTList
                      we proceed by induction on ts to prove 
                         h:nat
                           .d:nat
                             .eq TList (lifts h d (TCons t t0)) (lifts h d ts)
                               eq TList (TCons t t0) ts
                         case TNil : 
                            the thesis becomes 
                            h:nat
                              .d:nat
                                .eq TList (lifts h d (TCons t t0)) (lifts h d TNil)
                                  eq TList (TCons t t0) TNil
                                assume hnat
                                assume dnat
                                  we must prove 
                                        eq TList (lifts h d (TCons t t0)) (lifts h d TNil)
                                          eq TList (TCons t t0) TNil
                                  or equivalently 
                                        eq TList (TCons (lift h d t) (lifts h d t0)) TNil
                                          eq TList (TCons t t0) TNil
                                  suppose H0eq TList (TCons (lift h d t) (lifts h d t0)) TNil
                                     (H1
                                        we proceed by induction on H0 to prove <λ:TList.Prop> CASE TNil OF TNilFalse | TCons  True
                                           case refl_equal : 
                                              the thesis becomes 
                                              <λ:TList.Prop>
                                                CASE TCons (lift h d t) (lifts h d t0) OF
                                                  TNilFalse
                                                | TCons  True
                                                 consider I
                                                 we proved True

                                                    <λ:TList.Prop>
                                                      CASE TCons (lift h d t) (lifts h d t0) OF
                                                        TNilFalse
                                                      | TCons  True
<λ:TList.Prop> CASE TNil OF TNilFalse | TCons  True
                                     end of H1
                                     consider H1
                                     we proved <λ:TList.Prop> CASE TNil OF TNilFalse | TCons  True
                                     that is equivalent to False
                                     we proceed by induction on the previous result to prove eq TList (TCons t t0) TNil
                                     we proved eq TList (TCons t t0) TNil
                                  we proved 
                                     eq TList (TCons (lift h d t) (lifts h d t0)) TNil
                                       eq TList (TCons t t0) TNil
                                  that is equivalent to 
                                     eq TList (lifts h d (TCons t t0)) (lifts h d TNil)
                                       eq TList (TCons t t0) TNil

                                  h:nat
                                    .d:nat
                                      .eq TList (lifts h d (TCons t t0)) (lifts h d TNil)
                                        eq TList (TCons t t0) TNil
                         case TCons : t1:T t2:TList 
                            the thesis becomes 
                            h:nat
                              .d:nat
                                .eq TList (lifts h d (TCons t t0)) (lifts h d (TCons t1 t2))
                                  eq TList (TCons t t0) (TCons t1 t2)
                            () by induction hypothesis we know 
                               h:nat
                                 .d:nat
                                   .eq TList (TCons (lift h d t) (lifts h d t0)) (lifts h d t2)
                                     eq TList (TCons t t0) t2
                                assume hnat
                                assume dnat
                                  we must prove 
                                        eq TList (lifts h d (TCons t t0)) (lifts h d (TCons t1 t2))
                                          eq TList (TCons t t0) (TCons t1 t2)
                                  or equivalently 
                                        (eq
                                            TList
                                            TCons (lift h d t) (lifts h d t0)
                                            TCons (lift h d t1) (lifts h d t2))
                                          eq TList (TCons t t0) (TCons t1 t2)
                                  suppose H1
                                     eq
                                       TList
                                       TCons (lift h d t) (lifts h d t0)
                                       TCons (lift h d t1) (lifts h d t2)
                                     (H2
                                        by (f_equal . . . . . H1)
                                        we proved 
                                           eq
                                             T
                                             <λ:TList.T>
                                               CASE TCons (lift h d t) (lifts h d t0) OF
                                                 TNil
                                                     FIXlref_map{
                                                         lref_map:(natnat)natTT
                                                         :=λf:natnat
                                                           .λd0:nat
                                                             .λt3:T
                                                               .<λt4:T.T>
                                                                 CASE t3 OF
                                                                   TSort nTSort n
                                                                 | TLRef iTLRef <λb:bool.nat> CASE blt i d0 OF truei | falsef i
                                                                 | THead k u t4THead k (lref_map f d0 u) (lref_map f (s k d0) t4)
                                                         }
                                                       λx:nat.plus x h
                                                       d
                                                       t
                                               | TCons t3 t3
                                             <λ:TList.T>
                                               CASE TCons (lift h d t1) (lifts h d t2) OF
                                                 TNil
                                                     FIXlref_map{
                                                         lref_map:(natnat)natTT
                                                         :=λf:natnat
                                                           .λd0:nat
                                                             .λt3:T
                                                               .<λt4:T.T>
                                                                 CASE t3 OF
                                                                   TSort nTSort n
                                                                 | TLRef iTLRef <λb:bool.nat> CASE blt i d0 OF truei | falsef i
                                                                 | THead k u t4THead k (lref_map f d0 u) (lref_map f (s k d0) t4)
                                                         }
                                                       λx:nat.plus x h
                                                       d
                                                       t
                                               | TCons t3 t3

                                           eq
                                             T
                                             λe:TList
                                                 .<λ:TList.T>
                                                   CASE e OF
                                                     TNil
                                                         FIXlref_map{
                                                             lref_map:(natnat)natTT
                                                             :=λf:natnat
                                                               .λd0:nat
                                                                 .λt3:T
                                                                   .<λt4:T.T>
                                                                     CASE t3 OF
                                                                       TSort nTSort n
                                                                     | TLRef iTLRef <λb:bool.nat> CASE blt i d0 OF truei | falsef i
                                                                     | THead k u t4THead k (lref_map f d0 u) (lref_map f (s k d0) t4)
                                                             }
                                                           λx:nat.plus x h
                                                           d
                                                           t
                                                   | TCons t3 t3
                                               TCons (lift h d t) (lifts h d t0)
                                             λe:TList
                                                 .<λ:TList.T>
                                                   CASE e OF
                                                     TNil
                                                         FIXlref_map{
                                                             lref_map:(natnat)natTT
                                                             :=λf:natnat
                                                               .λd0:nat
                                                                 .λt3:T
                                                                   .<λt4:T.T>
                                                                     CASE t3 OF
                                                                       TSort nTSort n
                                                                     | TLRef iTLRef <λb:bool.nat> CASE blt i d0 OF truei | falsef i
                                                                     | THead k u t4THead k (lref_map f d0 u) (lref_map f (s k d0) t4)
                                                             }
                                                           λx:nat.plus x h
                                                           d
                                                           t
                                                   | TCons t3 t3
                                               TCons (lift h d t1) (lifts h d t2)
                                     end of H2
                                     (h1
                                        (H3
                                           by (f_equal . . . . . H1)
                                           we proved 
                                              eq
                                                TList
                                                <λ:TList.TList>
                                                  CASE TCons (lift h d t) (lifts h d t0) OF
                                                    TNil
                                                        FIXlifts{
                                                            lifts:natnatTListTList
                                                            :=λh0:nat
                                                              .λd0:nat
                                                                .λts0:TList
                                                                  .<λt3:TList.TList>
                                                                    CASE ts0 OF
                                                                      TNilTNil
                                                                    | TCons t3 ts1TCons (lift h0 d0 t3) (lifts h0 d0 ts1)
                                                            }
                                                          h
                                                          d
                                                          t0
                                                  | TCons  t3t3
                                                <λ:TList.TList>
                                                  CASE TCons (lift h d t1) (lifts h d t2) OF
                                                    TNil
                                                        FIXlifts{
                                                            lifts:natnatTListTList
                                                            :=λh0:nat
                                                              .λd0:nat
                                                                .λts0:TList
                                                                  .<λt3:TList.TList>
                                                                    CASE ts0 OF
                                                                      TNilTNil
                                                                    | TCons t3 ts1TCons (lift h0 d0 t3) (lifts h0 d0 ts1)
                                                            }
                                                          h
                                                          d
                                                          t0
                                                  | TCons  t3t3

                                              eq
                                                TList
                                                λe:TList
                                                    .<λ:TList.TList>
                                                      CASE e OF
                                                        TNil
                                                            FIXlifts{
                                                                lifts:natnatTListTList
                                                                :=λh0:nat
                                                                  .λd0:nat
                                                                    .λts0:TList
                                                                      .<λt3:TList.TList>
                                                                        CASE ts0 OF
                                                                          TNilTNil
                                                                        | TCons t3 ts1TCons (lift h0 d0 t3) (lifts h0 d0 ts1)
                                                                }
                                                              h
                                                              d
                                                              t0
                                                      | TCons  t3t3
                                                  TCons (lift h d t) (lifts h d t0)
                                                λe:TList
                                                    .<λ:TList.TList>
                                                      CASE e OF
                                                        TNil
                                                            FIXlifts{
                                                                lifts:natnatTListTList
                                                                :=λh0:nat
                                                                  .λd0:nat
                                                                    .λts0:TList
                                                                      .<λt3:TList.TList>
                                                                        CASE ts0 OF
                                                                          TNilTNil
                                                                        | TCons t3 ts1TCons (lift h0 d0 t3) (lifts h0 d0 ts1)
                                                                }
                                                              h
                                                              d
                                                              t0
                                                      | TCons  t3t3
                                                  TCons (lift h d t1) (lifts h d t2)
                                        end of H3
                                        suppose H4eq T (lift h d t) (lift h d t1)
                                           by (lift_inj . . . . H4)
                                           we proved eq T t t1
                                           we proceed by induction on the previous result to prove eq TList (TCons t t0) (TCons t1 t2)
                                              case refl_equal : 
                                                 the thesis becomes eq TList (TCons t t0) (TCons t t2)
                                                    (h1
                                                       by (refl_equal . .)
eq T t t
                                                    end of h1
                                                    (h2
                                                       consider H3
                                                       we proved 
                                                          eq
                                                            TList
                                                            <λ:TList.TList>
                                                              CASE TCons (lift h d t) (lifts h d t0) OF
                                                                TNil
                                                                    FIXlifts{
                                                                        lifts:natnatTListTList
                                                                        :=λh0:nat
                                                                          .λd0:nat
                                                                            .λts0:TList
                                                                              .<λt3:TList.TList>
                                                                                CASE ts0 OF
                                                                                  TNilTNil
                                                                                | TCons t3 ts1TCons (lift h0 d0 t3) (lifts h0 d0 ts1)
                                                                        }
                                                                      h
                                                                      d
                                                                      t0
                                                              | TCons  t3t3
                                                            <λ:TList.TList>
                                                              CASE TCons (lift h d t1) (lifts h d t2) OF
                                                                TNil
                                                                    FIXlifts{
                                                                        lifts:natnatTListTList
                                                                        :=λh0:nat
                                                                          .λd0:nat
                                                                            .λts0:TList
                                                                              .<λt3:TList.TList>
                                                                                CASE ts0 OF
                                                                                  TNilTNil
                                                                                | TCons t3 ts1TCons (lift h0 d0 t3) (lifts h0 d0 ts1)
                                                                        }
                                                                      h
                                                                      d
                                                                      t0
                                                              | TCons  t3t3
                                                       that is equivalent to eq TList (lifts h d t0) (lifts h d t2)
                                                       by (H . . . previous)
eq TList t0 t2
                                                    end of h2
                                                    by (f_equal2 . . . . . . . . h1 h2)
eq TList (TCons t t0) (TCons t t2)
                                           we proved eq TList (TCons t t0) (TCons t1 t2)

                                           eq T (lift h d t) (lift h d t1)
                                             eq TList (TCons t t0) (TCons t1 t2)
                                     end of h1
                                     (h2
                                        consider H2
                                        we proved 
                                           eq
                                             T
                                             <λ:TList.T>
                                               CASE TCons (lift h d t) (lifts h d t0) OF
                                                 TNil
                                                     FIXlref_map{
                                                         lref_map:(natnat)natTT
                                                         :=λf:natnat
                                                           .λd0:nat
                                                             .λt3:T
                                                               .<λt4:T.T>
                                                                 CASE t3 OF
                                                                   TSort nTSort n
                                                                 | TLRef iTLRef <λb:bool.nat> CASE blt i d0 OF truei | falsef i
                                                                 | THead k u t4THead k (lref_map f d0 u) (lref_map f (s k d0) t4)
                                                         }
                                                       λx:nat.plus x h
                                                       d
                                                       t
                                               | TCons t3 t3
                                             <λ:TList.T>
                                               CASE TCons (lift h d t1) (lifts h d t2) OF
                                                 TNil
                                                     FIXlref_map{
                                                         lref_map:(natnat)natTT
                                                         :=λf:natnat
                                                           .λd0:nat
                                                             .λt3:T
                                                               .<λt4:T.T>
                                                                 CASE t3 OF
                                                                   TSort nTSort n
                                                                 | TLRef iTLRef <λb:bool.nat> CASE blt i d0 OF truei | falsef i
                                                                 | THead k u t4THead k (lref_map f d0 u) (lref_map f (s k d0) t4)
                                                         }
                                                       λx:nat.plus x h
                                                       d
                                                       t
                                               | TCons t3 t3
eq T (lift h d t) (lift h d t1)
                                     end of h2
                                     by (h1 h2)
                                     we proved eq TList (TCons t t0) (TCons t1 t2)
                                  we proved 
                                     (eq
                                         TList
                                         TCons (lift h d t) (lifts h d t0)
                                         TCons (lift h d t1) (lifts h d t2))
                                       eq TList (TCons t t0) (TCons t1 t2)
                                  that is equivalent to 
                                     eq TList (lifts h d (TCons t t0)) (lifts h d (TCons t1 t2))
                                       eq TList (TCons t t0) (TCons t1 t2)

                                  h:nat
                                    .d:nat
                                      .eq TList (lifts h d (TCons t t0)) (lifts h d (TCons t1 t2))
                                        eq TList (TCons t t0) (TCons t1 t2)
                      we proved 
                         h:nat
                           .d:nat
                             .eq TList (lifts h d (TCons t t0)) (lifts h d ts)
                               eq TList (TCons t t0) ts

                      ts:TList
                        .h:nat
                          .d:nat
                            .eq TList (lifts h d (TCons t t0)) (lifts h d ts)
                              eq TList (TCons t t0) ts
          we proved 
             ts:TList
               .h:nat
                 .d:nat
                   .(eq TList (lifts h d xs) (lifts h d ts))(eq TList xs ts)
       we proved 
          xs:TList
            .ts:TList
              .h:nat
                .d:nat
                  .(eq TList (lifts h d xs) (lifts h d ts))(eq TList xs ts)