Welcome to Abella 2.0.5-dev
Abella < Specification "trans".
Reading specification "/home/fac05/gopalan/test/sparrow/compiler-correctness/website/wang-phd-thesis/code/./trans" (from "/home/fac05/gopalan/test/sparrow/compiler-correctness/website/wang-phd-thesis/code/.")

Abella < Import "typing".
Importing from /home/fac05/gopalan/test/sparrow/compiler-correctness/website/wang-phd-thesis/code/./typing

Abella < Define cctx : (list o) -> prop by 
cctx nil;
nabla x, cctx (pi k\cps x k (k x) :: L) := cctx L.

Abella < Define vars_of_cctx : (list o) -> (list tm) -> prop by 
vars_of_cctx nil nil;
nabla x, vars_of_cctx (pi k\cps x k (k x) :: L) (x :: L') := vars_of_cctx L L'.

Abella < Theorem cctx_mem : 
forall L E, cctx L -> member E L ->
  (exists X, E = pi k\cps X k (k X) /\ name X).


============================
 forall L E, cctx L -> member E L ->
   (exists X, E = pi k\cps X k (k X) /\ name X)

cctx_mem < induction on 2.

IH : forall L E, cctx L -> member E L * ->
       (exists X, E = pi k\cps X k (k X) /\ name X)
============================
 forall L E, cctx L -> member E L @ ->
   (exists X, E = pi k\cps X k (k X) /\ name X)

cctx_mem < intros.

Variables: L E
IH : forall L E, cctx L -> member E L * ->
       (exists X, E = pi k\cps X k (k X) /\ name X)
H1 : cctx L
H2 : member E L @
============================
 exists X, E = pi k\cps X k (k X) /\ name X

cctx_mem < case H2.
Subgoal 1:

Variables: E L1
IH : forall L E, cctx L -> member E L * ->
       (exists X, E = pi k\cps X k (k X) /\ name X)
H1 : cctx (E :: L1)
============================
 exists X, E = pi k\cps X k (k X) /\ name X

Subgoal 2 is:
 exists X, E = pi k\cps X k (k X) /\ name X

cctx_mem < case H1.
Subgoal 1:

Variables: L2
IH : forall L E, cctx L -> member E L * ->
       (exists X, E = pi k\cps X k (k X) /\ name X)
H3 : cctx L2
============================
 exists X, pi k\cps n1 k (k n1) = pi k\cps X k (k X) /\ name X

Subgoal 2 is:
 exists X, E = pi k\cps X k (k X) /\ name X

cctx_mem < search.
Subgoal 2:

Variables: E L1 B
IH : forall L E, cctx L -> member E L * ->
       (exists X, E = pi k\cps X k (k X) /\ name X)
H1 : cctx (B :: L1)
H3 : member E L1 *
============================
 exists X, E = pi k\cps X k (k X) /\ name X

cctx_mem < case H1.
Subgoal 2:

Variables: E L2
IH : forall L E, cctx L -> member E L * ->
       (exists X, E = pi k\cps X k (k X) /\ name X)
H3 : member (E n1) L2 *
H4 : cctx L2
============================
 exists X, E n1 = pi k\cps X k (k X) /\ name X

cctx_mem < backchain IH.
Proof completed.
Abella < Define cps_ty : ty -> ty -> ty -> prop by 
cps_ty T tnat tnat;
cps_ty T tunit tunit;
cps_ty T (prod T1 T2) (prod T1' T2') := cps_ty T T1 T1' /\ cps_ty T T2 T2';
cps_ty T (arr T1 T2) (arr (prod (arr T2' T) T1') T) := cps_ty T T1 T1' /\ cps_ty T T2 T2'.

Abella < Define cps_sctx : ty -> (list o) -> (list o) -> prop by 
cps_sctx S nil nil;
nabla x, cps_sctx S (of x T :: L) (of x T' :: L') := cps_ty S T T' /\ cps_sctx S L L'.

Abella < Theorem cps_ty_exists : 
forall S T, {is_sty T} -> (exists T', cps_ty S T T').


============================
 forall S T, {is_sty T} -> (exists T', cps_ty S T T')

cps_ty_exists < induction on 1.

IH : forall S T, {is_sty T}* -> (exists T', cps_ty S T T')
============================
 forall S T, {is_sty T}@ -> (exists T', cps_ty S T T')

cps_ty_exists < intros.

Variables: S T
IH : forall S T, {is_sty T}* -> (exists T', cps_ty S T T')
H1 : {is_sty T}@
============================
 exists T', cps_ty S T T'

cps_ty_exists < case H1.
Subgoal 1:

Variables: S
IH : forall S T, {is_sty T}* -> (exists T', cps_ty S T T')
============================
 exists T', cps_ty S tnat T'

Subgoal 2 is:
 exists T', cps_ty S tunit T'

Subgoal 3 is:
 exists T', cps_ty S (prod T1 T2) T'

Subgoal 4 is:
 exists T', cps_ty S (arr T1 T2) T'

cps_ty_exists < search.
Subgoal 2:

Variables: S
IH : forall S T, {is_sty T}* -> (exists T', cps_ty S T T')
============================
 exists T', cps_ty S tunit T'

Subgoal 3 is:
 exists T', cps_ty S (prod T1 T2) T'

Subgoal 4 is:
 exists T', cps_ty S (arr T1 T2) T'

cps_ty_exists < search.
Subgoal 3:

Variables: S T2 T1
IH : forall S T, {is_sty T}* -> (exists T', cps_ty S T T')
H2 : {is_sty T1}*
H3 : {is_sty T2}*
============================
 exists T', cps_ty S (prod T1 T2) T'

Subgoal 4 is:
 exists T', cps_ty S (arr T1 T2) T'

cps_ty_exists < apply IH to H2 with S = S.
Subgoal 3:

Variables: S T2 T1 T'
IH : forall S T, {is_sty T}* -> (exists T', cps_ty S T T')
H2 : {is_sty T1}*
H3 : {is_sty T2}*
H4 : cps_ty S T1 T'
============================
 exists T', cps_ty S (prod T1 T2) T'

Subgoal 4 is:
 exists T', cps_ty S (arr T1 T2) T'

cps_ty_exists < apply IH to H3 with S = S.
Subgoal 3:

Variables: S T2 T1 T' T'1
IH : forall S T, {is_sty T}* -> (exists T', cps_ty S T T')
H2 : {is_sty T1}*
H3 : {is_sty T2}*
H4 : cps_ty S T1 T'
H5 : cps_ty S T2 T'1
============================
 exists T', cps_ty S (prod T1 T2) T'

Subgoal 4 is:
 exists T', cps_ty S (arr T1 T2) T'

cps_ty_exists < search.
Subgoal 4:

Variables: S T2 T1
IH : forall S T, {is_sty T}* -> (exists T', cps_ty S T T')
H2 : {is_sty T1}*
H3 : {is_sty T2}*
============================
 exists T', cps_ty S (arr T1 T2) T'

cps_ty_exists < apply IH to H2 with S = S.
Subgoal 4:

Variables: S T2 T1 T'
IH : forall S T, {is_sty T}* -> (exists T', cps_ty S T T')
H2 : {is_sty T1}*
H3 : {is_sty T2}*
H4 : cps_ty S T1 T'
============================
 exists T', cps_ty S (arr T1 T2) T'

cps_ty_exists < apply IH to H3 with S = S.
Subgoal 4:

Variables: S T2 T1 T' T'1
IH : forall S T, {is_sty T}* -> (exists T', cps_ty S T T')
H2 : {is_sty T1}*
H3 : {is_sty T2}*
H4 : cps_ty S T1 T'
H5 : cps_ty S T2 T'1
============================
 exists T', cps_ty S (arr T1 T2) T'

cps_ty_exists < search.
Proof completed.
Abella < Theorem cps_ty_pres : 
forall S T T', {is_sty S} -> {is_sty T} -> cps_ty S T T' -> {is_sty T'}.


============================
 forall S T T', {is_sty S} -> {is_sty T} -> cps_ty S T T' -> {is_sty T'}

cps_ty_pres < induction on 3.

IH : forall S T T', {is_sty S} -> {is_sty T} -> cps_ty S T T' * ->
       {is_sty T'}
============================
 forall S T T', {is_sty S} -> {is_sty T} -> cps_ty S T T' @ -> {is_sty T'}

cps_ty_pres < intros.

Variables: S T T'
IH : forall S T T', {is_sty S} -> {is_sty T} -> cps_ty S T T' * ->
       {is_sty T'}
H1 : {is_sty S}
H2 : {is_sty T}
H3 : cps_ty S T T' @
============================
 {is_sty T'}

cps_ty_pres < case H3.
Subgoal 1:

Variables: S
IH : forall S T T', {is_sty S} -> {is_sty T} -> cps_ty S T T' * ->
       {is_sty T'}
H1 : {is_sty S}
H2 : {is_sty tnat}
============================
 {is_sty tnat}

Subgoal 2 is:
 {is_sty tunit}

Subgoal 3 is:
 {is_sty (prod T1' T2')}

Subgoal 4 is:
 {is_sty (arr (prod (arr T2' S) T1') S)}

cps_ty_pres < search.
Subgoal 2:

Variables: S
IH : forall S T T', {is_sty S} -> {is_sty T} -> cps_ty S T T' * ->
       {is_sty T'}
H1 : {is_sty S}
H2 : {is_sty tunit}
============================
 {is_sty tunit}

Subgoal 3 is:
 {is_sty (prod T1' T2')}

Subgoal 4 is:
 {is_sty (arr (prod (arr T2' S) T1') S)}

cps_ty_pres < search.
Subgoal 3:

Variables: S T2' T1' T3 T2
IH : forall S T T', {is_sty S} -> {is_sty T} -> cps_ty S T T' * ->
       {is_sty T'}
H1 : {is_sty S}
H2 : {is_sty (prod T2 T3)}
H4 : cps_ty S T2 T1' *
H5 : cps_ty S T3 T2' *
============================
 {is_sty (prod T1' T2')}

Subgoal 4 is:
 {is_sty (arr (prod (arr T2' S) T1') S)}

cps_ty_pres < case H2.
Subgoal 3:

Variables: S T2' T1' T3 T2
IH : forall S T T', {is_sty S} -> {is_sty T} -> cps_ty S T T' * ->
       {is_sty T'}
H1 : {is_sty S}
H4 : cps_ty S T2 T1' *
H5 : cps_ty S T3 T2' *
H6 : {is_sty T2}
H7 : {is_sty T3}
============================
 {is_sty (prod T1' T2')}

Subgoal 4 is:
 {is_sty (arr (prod (arr T2' S) T1') S)}

cps_ty_pres < apply IH to _ _ H4.
Subgoal 3:

Variables: S T2' T1' T3 T2
IH : forall S T T', {is_sty S} -> {is_sty T} -> cps_ty S T T' * ->
       {is_sty T'}
H1 : {is_sty S}
H4 : cps_ty S T2 T1' *
H5 : cps_ty S T3 T2' *
H6 : {is_sty T2}
H7 : {is_sty T3}
H8 : {is_sty T1'}
============================
 {is_sty (prod T1' T2')}

Subgoal 4 is:
 {is_sty (arr (prod (arr T2' S) T1') S)}

cps_ty_pres < apply IH to _ _ H5.
Subgoal 3:

Variables: S T2' T1' T3 T2
IH : forall S T T', {is_sty S} -> {is_sty T} -> cps_ty S T T' * ->
       {is_sty T'}
H1 : {is_sty S}
H4 : cps_ty S T2 T1' *
H5 : cps_ty S T3 T2' *
H6 : {is_sty T2}
H7 : {is_sty T3}
H8 : {is_sty T1'}
H9 : {is_sty T2'}
============================
 {is_sty (prod T1' T2')}

Subgoal 4 is:
 {is_sty (arr (prod (arr T2' S) T1') S)}

cps_ty_pres < search.
Subgoal 4:

Variables: S T1' T2' T3 T2
IH : forall S T T', {is_sty S} -> {is_sty T} -> cps_ty S T T' * ->
       {is_sty T'}
H1 : {is_sty S}
H2 : {is_sty (arr T2 T3)}
H4 : cps_ty S T2 T1' *
H5 : cps_ty S T3 T2' *
============================
 {is_sty (arr (prod (arr T2' S) T1') S)}

cps_ty_pres < case H2.
Subgoal 4:

Variables: S T1' T2' T3 T2
IH : forall S T T', {is_sty S} -> {is_sty T} -> cps_ty S T T' * ->
       {is_sty T'}
H1 : {is_sty S}
H4 : cps_ty S T2 T1' *
H5 : cps_ty S T3 T2' *
H6 : {is_sty T2}
H7 : {is_sty T3}
============================
 {is_sty (arr (prod (arr T2' S) T1') S)}

cps_ty_pres < apply IH to _ _ H4.
Subgoal 4:

Variables: S T1' T2' T3 T2
IH : forall S T T', {is_sty S} -> {is_sty T} -> cps_ty S T T' * ->
       {is_sty T'}
H1 : {is_sty S}
H4 : cps_ty S T2 T1' *
H5 : cps_ty S T3 T2' *
H6 : {is_sty T2}
H7 : {is_sty T3}
H8 : {is_sty T1'}
============================
 {is_sty (arr (prod (arr T2' S) T1') S)}

cps_ty_pres < apply IH to _ _ H5.
Subgoal 4:

Variables: S T1' T2' T3 T2
IH : forall S T T', {is_sty S} -> {is_sty T} -> cps_ty S T T' * ->
       {is_sty T'}
H1 : {is_sty S}
H4 : cps_ty S T2 T1' *
H5 : cps_ty S T3 T2' *
H6 : {is_sty T2}
H7 : {is_sty T3}
H8 : {is_sty T1'}
H9 : {is_sty T2'}
============================
 {is_sty (arr (prod (arr T2' S) T1') S)}

cps_ty_pres < search.
Proof completed.
Abella < Theorem cps_ty_det : 
forall S T T' T'', cps_ty S T T' -> cps_ty S T T'' -> T' = T''.


============================
 forall S T T' T'', cps_ty S T T' -> cps_ty S T T'' -> T' = T''

cps_ty_det < induction on 1.

IH : forall S T T' T'', cps_ty S T T' * -> cps_ty S T T'' -> T' = T''
============================
 forall S T T' T'', cps_ty S T T' @ -> cps_ty S T T'' -> T' = T''

cps_ty_det < intros.

Variables: S T T' T''
IH : forall S T T' T'', cps_ty S T T' * -> cps_ty S T T'' -> T' = T''
H1 : cps_ty S T T' @
H2 : cps_ty S T T''
============================
 T' = T''

cps_ty_det < case H1.
Subgoal 1:

Variables: S T''
IH : forall S T T' T'', cps_ty S T T' * -> cps_ty S T T'' -> T' = T''
H2 : cps_ty S tnat T''
============================
 tnat = T''

Subgoal 2 is:
 tunit = T''

Subgoal 3 is:
 prod T1' T2' = T''

Subgoal 4 is:
 arr (prod (arr T2' S) T1') S = T''

cps_ty_det < case H2.
Subgoal 1:

Variables: S
IH : forall S T T' T'', cps_ty S T T' * -> cps_ty S T T'' -> T' = T''
============================
 tnat = tnat

Subgoal 2 is:
 tunit = T''

Subgoal 3 is:
 prod T1' T2' = T''

Subgoal 4 is:
 arr (prod (arr T2' S) T1') S = T''

cps_ty_det < search.
Subgoal 2:

Variables: S T''
IH : forall S T T' T'', cps_ty S T T' * -> cps_ty S T T'' -> T' = T''
H2 : cps_ty S tunit T''
============================
 tunit = T''

Subgoal 3 is:
 prod T1' T2' = T''

Subgoal 4 is:
 arr (prod (arr T2' S) T1') S = T''

cps_ty_det < case H2.
Subgoal 2:

Variables: S
IH : forall S T T' T'', cps_ty S T T' * -> cps_ty S T T'' -> T' = T''
============================
 tunit = tunit

Subgoal 3 is:
 prod T1' T2' = T''

Subgoal 4 is:
 arr (prod (arr T2' S) T1') S = T''

cps_ty_det < search.
Subgoal 3:

Variables: S T'' T2' T1' T3 T2
IH : forall S T T' T'', cps_ty S T T' * -> cps_ty S T T'' -> T' = T''
H2 : cps_ty S (prod T2 T3) T''
H3 : cps_ty S T2 T1' *
H4 : cps_ty S T3 T2' *
============================
 prod T1' T2' = T''

Subgoal 4 is:
 arr (prod (arr T2' S) T1') S = T''

cps_ty_det < case H2.
Subgoal 3:

Variables: S T2' T1' T3 T2 T2'1 T1'1
IH : forall S T T' T'', cps_ty S T T' * -> cps_ty S T T'' -> T' = T''
H3 : cps_ty S T2 T1' *
H4 : cps_ty S T3 T2' *
H5 : cps_ty S T2 T1'1
H6 : cps_ty S T3 T2'1
============================
 prod T1' T2' = prod T1'1 T2'1

Subgoal 4 is:
 arr (prod (arr T2' S) T1') S = T''

cps_ty_det < apply IH to H3 H5.
Subgoal 3:

Variables: S T2' T3 T2 T2'1 T1'1
IH : forall S T T' T'', cps_ty S T T' * -> cps_ty S T T'' -> T' = T''
H3 : cps_ty S T2 T1'1 *
H4 : cps_ty S T3 T2' *
H5 : cps_ty S T2 T1'1
H6 : cps_ty S T3 T2'1
============================
 prod T1'1 T2' = prod T1'1 T2'1

Subgoal 4 is:
 arr (prod (arr T2' S) T1') S = T''

cps_ty_det < apply IH to H4 H6.
Subgoal 3:

Variables: S T3 T2 T2'1 T1'1
IH : forall S T T' T'', cps_ty S T T' * -> cps_ty S T T'' -> T' = T''
H3 : cps_ty S T2 T1'1 *
H4 : cps_ty S T3 T2'1 *
H5 : cps_ty S T2 T1'1
H6 : cps_ty S T3 T2'1
============================
 prod T1'1 T2'1 = prod T1'1 T2'1

Subgoal 4 is:
 arr (prod (arr T2' S) T1') S = T''

cps_ty_det < search.
Subgoal 4:

Variables: S T'' T1' T2' T3 T2
IH : forall S T T' T'', cps_ty S T T' * -> cps_ty S T T'' -> T' = T''
H2 : cps_ty S (arr T2 T3) T''
H3 : cps_ty S T2 T1' *
H4 : cps_ty S T3 T2' *
============================
 arr (prod (arr T2' S) T1') S = T''

cps_ty_det < case H2.
Subgoal 4:

Variables: S T1' T2' T3 T2 T1'1 T2'1
IH : forall S T T' T'', cps_ty S T T' * -> cps_ty S T T'' -> T' = T''
H3 : cps_ty S T2 T1' *
H4 : cps_ty S T3 T2' *
H5 : cps_ty S T2 T1'1
H6 : cps_ty S T3 T2'1
============================
 arr (prod (arr T2' S) T1') S = arr (prod (arr T2'1 S) T1'1) S

cps_ty_det < apply IH to H3 H5.
Subgoal 4:

Variables: S T2' T3 T2 T1'1 T2'1
IH : forall S T T' T'', cps_ty S T T' * -> cps_ty S T T'' -> T' = T''
H3 : cps_ty S T2 T1'1 *
H4 : cps_ty S T3 T2' *
H5 : cps_ty S T2 T1'1
H6 : cps_ty S T3 T2'1
============================
 arr (prod (arr T2' S) T1'1) S = arr (prod (arr T2'1 S) T1'1) S

cps_ty_det < apply IH to H4 H6.
Subgoal 4:

Variables: S T3 T2 T1'1 T2'1
IH : forall S T T' T'', cps_ty S T T' * -> cps_ty S T T'' -> T' = T''
H3 : cps_ty S T2 T1'1 *
H4 : cps_ty S T3 T2'1 *
H5 : cps_ty S T2 T1'1
H6 : cps_ty S T3 T2'1
============================
 arr (prod (arr T2'1 S) T1'1) S = arr (prod (arr T2'1 S) T1'1) S

cps_ty_det < search.
Proof completed.
Abella < Theorem cps_sctx_exists : 
forall TL S, sctx TL -> (exists TL', cps_sctx S TL TL').


============================
 forall TL S, sctx TL -> (exists TL', cps_sctx S TL TL')

cps_sctx_exists < induction on 1.

IH : forall TL S, sctx TL * -> (exists TL', cps_sctx S TL TL')
============================
 forall TL S, sctx TL @ -> (exists TL', cps_sctx S TL TL')

cps_sctx_exists < intros.

Variables: TL S
IH : forall TL S, sctx TL * -> (exists TL', cps_sctx S TL TL')
H1 : sctx TL @
============================
 exists TL', cps_sctx S TL TL'

cps_sctx_exists < case H1.
Subgoal 1:

Variables: S
IH : forall TL S, sctx TL * -> (exists TL', cps_sctx S TL TL')
============================
 exists TL', cps_sctx S nil TL'

Subgoal 2 is:
 exists TL', cps_sctx S (of n1 T :: L) TL'

cps_sctx_exists < search.
Subgoal 2:

Variables: S L T
IH : forall TL S, sctx TL * -> (exists TL', cps_sctx S TL TL')
H2 : sctx L *
H3 : {is_sty T}
============================
 exists TL', cps_sctx S (of n1 T :: L) TL'

cps_sctx_exists < apply cps_ty_exists to H3 with S = S.
Subgoal 2:

Variables: S L T T'
IH : forall TL S, sctx TL * -> (exists TL', cps_sctx S TL TL')
H2 : sctx L *
H3 : {is_sty T}
H4 : cps_ty S T T'
============================
 exists TL', cps_sctx S (of n1 T :: L) TL'

cps_sctx_exists < apply IH to H2 with S = S.
Subgoal 2:

Variables: S L T T' TL'
IH : forall TL S, sctx TL * -> (exists TL', cps_sctx S TL TL')
H2 : sctx L *
H3 : {is_sty T}
H4 : cps_ty S T T'
H5 : cps_sctx S L TL'
============================
 exists TL', cps_sctx S (of n1 T :: L) TL'

cps_sctx_exists < search.
Proof completed.
Abella < Theorem cps_sctx_pres : 
forall S L L', {is_sty S} -> sctx L -> cps_sctx S L L' -> sctx L'.


============================
 forall S L L', {is_sty S} -> sctx L -> cps_sctx S L L' -> sctx L'

cps_sctx_pres < induction on 3.

IH : forall S L L', {is_sty S} -> sctx L -> cps_sctx S L L' * -> sctx L'
============================
 forall S L L', {is_sty S} -> sctx L -> cps_sctx S L L' @ -> sctx L'

cps_sctx_pres < intros.

Variables: S L L'
IH : forall S L L', {is_sty S} -> sctx L -> cps_sctx S L L' * -> sctx L'
H1 : {is_sty S}
H2 : sctx L
H3 : cps_sctx S L L' @
============================
 sctx L'

cps_sctx_pres < case H3.
Subgoal 1:

Variables: S
IH : forall S L L', {is_sty S} -> sctx L -> cps_sctx S L L' * -> sctx L'
H1 : {is_sty S}
H2 : sctx nil
============================
 sctx nil

Subgoal 2 is:
 sctx (of n1 T' :: L'1)

cps_sctx_pres < search.
Subgoal 2:

Variables: S L'1 T' L1 T
IH : forall S L L', {is_sty S} -> sctx L -> cps_sctx S L L' * -> sctx L'
H1 : {is_sty S}
H2 : sctx (of n1 T :: L1)
H4 : cps_ty S T T'
H5 : cps_sctx S L1 L'1 *
============================
 sctx (of n1 T' :: L'1)

cps_sctx_pres < case H2.
Subgoal 2:

Variables: S L'1 T' L1 T
IH : forall S L L', {is_sty S} -> sctx L -> cps_sctx S L L' * -> sctx L'
H1 : {is_sty S}
H4 : cps_ty S T T'
H5 : cps_sctx S L1 L'1 *
H6 : sctx L1
H7 : {is_sty T}
============================
 sctx (of n1 T' :: L'1)

cps_sctx_pres < apply cps_ty_pres to _ _ H4.
Subgoal 2:

Variables: S L'1 T' L1 T
IH : forall S L L', {is_sty S} -> sctx L -> cps_sctx S L L' * -> sctx L'
H1 : {is_sty S}
H4 : cps_ty S T T'
H5 : cps_sctx S L1 L'1 *
H6 : sctx L1
H7 : {is_sty T}
H8 : {is_sty T'}
============================
 sctx (of n1 T' :: L'1)

cps_sctx_pres < apply IH to _ _ H5.
Subgoal 2:

Variables: S L'1 T' L1 T
IH : forall S L L', {is_sty S} -> sctx L -> cps_sctx S L L' * -> sctx L'
H1 : {is_sty S}
H4 : cps_ty S T T'
H5 : cps_sctx S L1 L'1 *
H6 : sctx L1
H7 : {is_sty T}
H8 : {is_sty T'}
H9 : sctx L'1
============================
 sctx (of n1 T' :: L'1)

cps_sctx_pres < search.
Proof completed.
Abella < Theorem cps_sctx_mem_sync : 
forall S T T' TL TL' M, cps_ty S T T' -> cps_sctx S TL TL' ->
  member (of M T) TL -> member (of M T') TL'.


============================
 forall S T T' TL TL' M, cps_ty S T T' -> cps_sctx S TL TL' ->
   member (of M T) TL -> member (of M T') TL'

cps_sctx_mem_sync < induction on 3.

IH : forall S T T' TL TL' M, cps_ty S T T' -> cps_sctx S TL TL' ->
       member (of M T) TL * -> member (of M T') TL'
============================
 forall S T T' TL TL' M, cps_ty S T T' -> cps_sctx S TL TL' ->
   member (of M T) TL @ -> member (of M T') TL'

cps_sctx_mem_sync < intros.

Variables: S T T' TL TL' M
IH : forall S T T' TL TL' M, cps_ty S T T' -> cps_sctx S TL TL' ->
       member (of M T) TL * -> member (of M T') TL'
H1 : cps_ty S T T'
H2 : cps_sctx S TL TL'
H3 : member (of M T) TL @
============================
 member (of M T') TL'

cps_sctx_mem_sync < case H3.
Subgoal 1:

Variables: S T T' TL' M L
IH : forall S T T' TL TL' M, cps_ty S T T' -> cps_sctx S TL TL' ->
       member (of M T) TL * -> member (of M T') TL'
H1 : cps_ty S T T'
H2 : cps_sctx S (of M T :: L) TL'
============================
 member (of M T') TL'

Subgoal 2 is:
 member (of M T') TL'

cps_sctx_mem_sync < case H2.
Subgoal 1:

Variables: S T T' L' T'1 L1
IH : forall S T T' TL TL' M, cps_ty S T T' -> cps_sctx S TL TL' ->
       member (of M T) TL * -> member (of M T') TL'
H1 : cps_ty S T T'
H4 : cps_ty S T T'1
H5 : cps_sctx S L1 L'
============================
 member (of n1 T') (of n1 T'1 :: L')

Subgoal 2 is:
 member (of M T') TL'

cps_sctx_mem_sync < apply cps_ty_det to H1 H4.
Subgoal 1:

Variables: S T L' T'1 L1
IH : forall S T T' TL TL' M, cps_ty S T T' -> cps_sctx S TL TL' ->
       member (of M T) TL * -> member (of M T') TL'
H1 : cps_ty S T T'1
H4 : cps_ty S T T'1
H5 : cps_sctx S L1 L'
============================
 member (of n1 T'1) (of n1 T'1 :: L')

Subgoal 2 is:
 member (of M T') TL'

cps_sctx_mem_sync < search.
Subgoal 2:

Variables: S T T' TL' M L B
IH : forall S T T' TL TL' M, cps_ty S T T' -> cps_sctx S TL TL' ->
       member (of M T) TL * -> member (of M T') TL'
H1 : cps_ty S T T'
H2 : cps_sctx S (B :: L) TL'
H4 : member (of M T) L *
============================
 member (of M T') TL'

cps_sctx_mem_sync < case H2.
Subgoal 2:

Variables: S T T' M L' T'1 L1 T1
IH : forall S T T' TL TL' M, cps_ty S T T' -> cps_sctx S TL TL' ->
       member (of M T) TL * -> member (of M T') TL'
H1 : cps_ty S T T'
H4 : member (of (M n1) T) L1 *
H5 : cps_ty S T1 T'1
H6 : cps_sctx S L1 L'
============================
 member (of (M n1) T') (of n1 T'1 :: L')

cps_sctx_mem_sync < apply IH to H1 H6 H4.
Subgoal 2:

Variables: S T T' M L' T'1 L1 T1
IH : forall S T T' TL TL' M, cps_ty S T T' -> cps_sctx S TL TL' ->
       member (of M T) TL * -> member (of M T') TL'
H1 : cps_ty S T T'
H4 : member (of (M n1) T) L1 *
H5 : cps_ty S T1 T'1
H6 : cps_sctx S L1 L'
H7 : member (of (M n1) T') L'
============================
 member (of (M n1) T') (of n1 T'1 :: L')

cps_sctx_mem_sync < search.
Proof completed.
Abella < Theorem cps_sctx_vars_sync : 
forall S TL TL' Vs, cps_sctx S TL TL' -> vars_of_sctx TL Vs ->
  vars_of_sctx TL' Vs.


============================
 forall S TL TL' Vs, cps_sctx S TL TL' -> vars_of_sctx TL Vs ->
   vars_of_sctx TL' Vs

cps_sctx_vars_sync < induction on 1.

IH : forall S TL TL' Vs, cps_sctx S TL TL' * -> vars_of_sctx TL Vs ->
       vars_of_sctx TL' Vs
============================
 forall S TL TL' Vs, cps_sctx S TL TL' @ -> vars_of_sctx TL Vs ->
   vars_of_sctx TL' Vs

cps_sctx_vars_sync < intros.

Variables: S TL TL' Vs
IH : forall S TL TL' Vs, cps_sctx S TL TL' * -> vars_of_sctx TL Vs ->
       vars_of_sctx TL' Vs
H1 : cps_sctx S TL TL' @
H2 : vars_of_sctx TL Vs
============================
 vars_of_sctx TL' Vs

cps_sctx_vars_sync < case H1.
Subgoal 1:

Variables: S Vs
IH : forall S TL TL' Vs, cps_sctx S TL TL' * -> vars_of_sctx TL Vs ->
       vars_of_sctx TL' Vs
H2 : vars_of_sctx nil Vs
============================
 vars_of_sctx nil Vs

Subgoal 2 is:
 vars_of_sctx (of n1 T' :: L') (Vs n1)

cps_sctx_vars_sync < search.
Subgoal 2:

Variables: S Vs L' T' L T
IH : forall S TL TL' Vs, cps_sctx S TL TL' * -> vars_of_sctx TL Vs ->
       vars_of_sctx TL' Vs
H2 : vars_of_sctx (of n1 T :: L) (Vs n1)
H3 : cps_ty S T T'
H4 : cps_sctx S L L' *
============================
 vars_of_sctx (of n1 T' :: L') (Vs n1)

cps_sctx_vars_sync < case H2.
Subgoal 2:

Variables: S L' T' L T L'1
IH : forall S TL TL' Vs, cps_sctx S TL TL' * -> vars_of_sctx TL Vs ->
       vars_of_sctx TL' Vs
H3 : cps_ty S T T'
H4 : cps_sctx S L L' *
H5 : vars_of_sctx L L'1
============================
 vars_of_sctx (of n1 T' :: L') (n1 :: L'1)

cps_sctx_vars_sync < unfold.
Subgoal 2:

Variables: S L' T' L T L'1
IH : forall S TL TL' Vs, cps_sctx S TL TL' * -> vars_of_sctx TL Vs ->
       vars_of_sctx TL' Vs
H3 : cps_ty S T T'
H4 : cps_sctx S L L' *
H5 : vars_of_sctx L L'1
============================
 vars_of_sctx L' L'1

cps_sctx_vars_sync < backchain IH.
Proof completed.
Abella < Theorem cps_typ_pres : 
forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
  cctx CL -> {TL |- of M T} -> {CL |- cps M K M'} -> cps_ty S T T' ->
  cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}.


============================
 forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
   cctx CL -> {TL |- of M T} -> {CL |- cps M K M'} -> cps_ty S T T' ->
   cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < induction on 6.

IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
============================
 forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
   cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}@ -> cps_ty S T T' ->
   cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < intros.

Variables: TL CL M T K M' T' TL' S
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of M T}
H6 : {CL |- cps M K M'}@
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H6.
Subgoal 1:

Variables: TL CL T K T' TL' S N
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of (nat N) T}
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
============================
 {TL', pi x\of x T' => of (K x) S |- of (K (nat N)) S}

Subgoal 2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 3 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply sof_nat_inv to _ H5.
Subgoal 1:

Variables: TL CL K T' TL' S N
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of (nat N) tnat}
H7 : cps_ty S tnat T'
H8 : cps_sctx S TL TL'
============================
 {TL', pi x\of x T' => of (K x) S |- of (K (nat N)) S}

Subgoal 2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 3 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H7.
Subgoal 1:

Variables: TL CL K TL' S N
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of (nat N) tnat}
H8 : cps_sctx S TL TL'
============================
 {TL', pi x\of x tnat => of (K x) S |- of (K (nat N)) S}

Subgoal 2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 3 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < search.
Subgoal 2:

Variables: TL CL T K M' T' TL' S M1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of (pred M1) T}
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (pred x) (v\K v)) M'}*
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 3 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H5.
Subgoal 2.1:

Variables: TL CL K M' T' TL' S M1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S tnat T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (pred x) (v\K v)) M'}*
H10 : {TL |- of M1 tnat}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 2.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 3 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H7.
Subgoal 2.1:

Variables: TL CL K M' TL' S M1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (pred x) (v\K v)) M'}*
H10 : {TL |- of M1 tnat}
============================
 {TL', pi x\of x tnat => of (K x) S |- of M' S}

Subgoal 2.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 3 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', pi x\of x tnat => of (let (pred x) K) S |- of M' S}.
Subgoal 2.1.1:

Variables: TL CL K M' TL' S M1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (pred x) (v\K v)) M'}*
H10 : {TL |- of M1 tnat}
============================
 {TL', pi x\of x tnat => of (let (pred x) K) S |- of M' S}

Subgoal 2.1 is:
 {TL', pi x\of x tnat => of (K x) S |- of M' S}

Subgoal 2.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 3 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain IH.
Subgoal 2.1:

Variables: TL CL K M' TL' S M1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (pred x) (v\K v)) M'}*
H10 : {TL |- of M1 tnat}
H11 : {TL', pi x\of x tnat => of (let (pred x) K) S |- of M' S}
============================
 {TL', pi x\of x tnat => of (K x) S |- of M' S}

Subgoal 2.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 3 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {pi x\of x tnat => of (K x) S |- pi x\of x tnat => of (let (pred x) K) S}.
Subgoal 2.1:

Variables: TL CL K M' TL' S M1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (pred x) (v\K v)) M'}*
H10 : {TL |- of M1 tnat}
H11 : {TL', pi x\of x tnat => of (let (pred x) K) S |- of M' S}
H12 : {pi x\of x tnat => of (K x) S |-
         pi x\of x tnat => of (let (pred x) K) S}
============================
 {TL', pi x\of x tnat => of (K x) S |- of M' S}

Subgoal 2.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 3 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < cut H11 with H12.
Subgoal 2.1:

Variables: TL CL K M' TL' S M1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (pred x) (v\K v)) M'}*
H10 : {TL |- of M1 tnat}
H11 : {TL', pi x\of x tnat => of (let (pred x) K) S |- of M' S}
H12 : {pi x\of x tnat => of (K x) S |-
         pi x\of x tnat => of (let (pred x) K) S}
H13 : {TL', pi x\of x tnat => of (K x) S |- of M' S}
============================
 {TL', pi x\of x tnat => of (K x) S |- of M' S}

Subgoal 2.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 3 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < search.
Subgoal 2.2:

Variables: TL CL T K M' T' TL' S M1 F
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (pred x) (v\K v)) M'}*
H10 : {TL, [F] |- of (pred M1) T}
H11 : member F TL
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 3 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply sctx_mem to _ H11.
Subgoal 2.2:

Variables: TL CL T K M' T' TL' S M1 X T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (pred x) (v\K v)) M'}*
H10 : {TL, [of X T1] |- of (pred M1) T}
H11 : member (of X T1) TL
H12 : name X
H13 : {is_sty T1}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 3 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H10.
Subgoal 2.2:

Variables: TL CL T K M' T' TL' S M1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (pred x) (v\K v)) M'}*
H11 : member (of (pred M1) T) TL
H12 : name (pred M1)
H13 : {is_sty T}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 3 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H12.
Subgoal 3:

Variables: TL CL T K M' T' TL' S M2' M1 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of (plus M1 M2) T}
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (plus n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H5.
Subgoal 3.1:

Variables: TL CL K M' T' TL' S M2' M1 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S tnat T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (plus n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 tnat}
H12 : {TL |- of M2 tnat}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 3.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H7.
Subgoal 3.1:

Variables: TL CL K M' TL' S M2' M1 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (plus n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 tnat}
H12 : {TL |- of M2 tnat}
============================
 {TL', pi x\of x tnat => of (K x) S |- of M' S}

Subgoal 3.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', pi x\of x tnat => of (M2' x) S |- of M' S}.
Subgoal 3.1.1:

Variables: TL CL K M' TL' S M2' M1 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (plus n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 tnat}
H12 : {TL |- of M2 tnat}
============================
 {TL', pi x\of x tnat => of (M2' x) S |- of M' S}

Subgoal 3.1 is:
 {TL', pi x\of x tnat => of (K x) S |- of M' S}

Subgoal 3.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain IH.
Subgoal 3.1:

Variables: TL CL K M' TL' S M2' M1 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (plus n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 tnat}
H12 : {TL |- of M2 tnat}
H13 : {TL', pi x\of x tnat => of (M2' x) S |- of M' S}
============================
 {TL', pi x\of x tnat => of (K x) S |- of M' S}

Subgoal 3.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', pi x\of x tnat => of (let (plus n1 x) K) S |- of (M2' n1) S}.
Subgoal 3.1.2:

Variables: TL CL K M' TL' S M2' M1 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (plus n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 tnat}
H12 : {TL |- of M2 tnat}
H13 : {TL', pi x\of x tnat => of (M2' x) S |- of M' S}
============================
 {TL', pi x\of x tnat => of (let (plus n1 x) K) S |- of (M2' n1) S}

Subgoal 3.1 is:
 {TL', pi x\of x tnat => of (K x) S |- of M' S}

Subgoal 3.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain IH with M = M2.
Subgoal 3.1:

Variables: TL CL K M' TL' S M2' M1 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (plus n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 tnat}
H12 : {TL |- of M2 tnat}
H13 : {TL', pi x\of x tnat => of (M2' x) S |- of M' S}
H14 : {TL', pi x\of x tnat => of (let (plus n1 x) K) S |- of (M2' n1) S}
============================
 {TL', pi x\of x tnat => of (K x) S |- of M' S}

Subgoal 3.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {pi x\of x tnat => of (K x) S, of n1 tnat |-
   pi x\of x tnat => of (let (plus n1 x) K) S}.
Subgoal 3.1:

Variables: TL CL K M' TL' S M2' M1 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (plus n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 tnat}
H12 : {TL |- of M2 tnat}
H13 : {TL', pi x\of x tnat => of (M2' x) S |- of M' S}
H14 : {TL', pi x\of x tnat => of (let (plus n1 x) K) S |- of (M2' n1) S}
H15 : {pi x\of x tnat => of (K x) S, of n1 tnat |-
         pi x\of x tnat => of (let (plus n1 x) K) S}
============================
 {TL', pi x\of x tnat => of (K x) S |- of M' S}

Subgoal 3.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < cut H14 with H15.
Subgoal 3.1:

Variables: TL CL K M' TL' S M2' M1 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (plus n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 tnat}
H12 : {TL |- of M2 tnat}
H13 : {TL', pi x\of x tnat => of (M2' x) S |- of M' S}
H14 : {TL', pi x\of x tnat => of (let (plus n1 x) K) S |- of (M2' n1) S}
H15 : {pi x\of x tnat => of (K x) S, of n1 tnat |-
         pi x\of x tnat => of (let (plus n1 x) K) S}
H16 : {TL', pi x\of x tnat => of (K x) S, of n1 tnat |- of (M2' n1) S}
============================
 {TL', pi x\of x tnat => of (K x) S |- of M' S}

Subgoal 3.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', pi x\of x tnat => of (K x) S |- pi x\of x tnat => of (M2' x) S}.
Subgoal 3.1:

Variables: TL CL K M' TL' S M2' M1 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (plus n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 tnat}
H12 : {TL |- of M2 tnat}
H13 : {TL', pi x\of x tnat => of (M2' x) S |- of M' S}
H14 : {TL', pi x\of x tnat => of (let (plus n1 x) K) S |- of (M2' n1) S}
H15 : {pi x\of x tnat => of (K x) S, of n1 tnat |-
         pi x\of x tnat => of (let (plus n1 x) K) S}
H16 : {TL', pi x\of x tnat => of (K x) S, of n1 tnat |- of (M2' n1) S}
H17 : {TL', pi x\of x tnat => of (K x) S |- pi x\of x tnat => of (M2' x) S}
============================
 {TL', pi x\of x tnat => of (K x) S |- of M' S}

Subgoal 3.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < cut H13 with H17.
Subgoal 3.1:

Variables: TL CL K M' TL' S M2' M1 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tnat}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (plus n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 tnat}
H12 : {TL |- of M2 tnat}
H13 : {TL', pi x\of x tnat => of (M2' x) S |- of M' S}
H14 : {TL', pi x\of x tnat => of (let (plus n1 x) K) S |- of (M2' n1) S}
H15 : {pi x\of x tnat => of (K x) S, of n1 tnat |-
         pi x\of x tnat => of (let (plus n1 x) K) S}
H16 : {TL', pi x\of x tnat => of (K x) S, of n1 tnat |- of (M2' n1) S}
H17 : {TL', pi x\of x tnat => of (K x) S |- pi x\of x tnat => of (M2' x) S}
H18 : {TL', pi x\of x tnat => of (K x) S |- of M' S}
============================
 {TL', pi x\of x tnat => of (K x) S |- of M' S}

Subgoal 3.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < search.
Subgoal 3.2:

Variables: TL CL T K M' T' TL' S M2' M1 M2 F
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (plus n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL, [F] |- of (plus M1 M2) T}
H12 : member F TL
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply sctx_mem to _ H12.
Subgoal 3.2:

Variables: TL CL T K M' T' TL' S M2' M1 M2 X T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (plus n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL, [of X T1] |- of (plus M1 M2) T}
H12 : member (of X T1) TL
H13 : name X
H14 : {is_sty T1}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H11.
Subgoal 3.2:

Variables: TL CL T K M' T' TL' S M2' M1 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (plus n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H12 : member (of (plus M1 M2) T) TL
H13 : name (plus M1 M2)
H14 : {is_sty T}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H13.
Subgoal 4:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of (ifz M1 M2 M3) T}
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H5.
Subgoal 4.1:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL |- of M1 tnat}
H13 : {TL |- of M2 T}
H14 : {TL |- of M3 T}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S |-
   of M' S}.
Subgoal 4.1.1:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL |- of M1 tnat}
H13 : {TL |- of M2 T}
H14 : {TL |- of M3 T}
============================
 {TL', pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S |-
    of M' S}

Subgoal 4.1 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain IH with M = M1, T = tnat.
Subgoal 4.1:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL |- of M1 tnat}
H13 : {TL |- of M2 T}
H14 : {TL |- of M3 T}
H15 : {TL', pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S |-
         of M' S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', pi x\of x T' => of (app n1 x) S |- of (M2' n1) S}.
Subgoal 4.1.2:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL |- of M1 tnat}
H13 : {TL |- of M2 T}
H14 : {TL |- of M3 T}
H15 : {TL', pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S |-
         of M' S}
============================
 {TL', pi x\of x T' => of (app n1 x) S |- of (M2' n1) S}

Subgoal 4.1 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain IH with M = M2, T = T.
Subgoal 4.1:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL |- of M1 tnat}
H13 : {TL |- of M2 T}
H14 : {TL |- of M3 T}
H15 : {TL', pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S |-
         of M' S}
H16 : {TL', pi x\of x T' => of (app n1 x) S |- of (M2' n1) S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', pi x\of x T' => of (app n1 x) S |- of (M3' n1) S}.
Subgoal 4.1.3:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL |- of M1 tnat}
H13 : {TL |- of M2 T}
H14 : {TL |- of M3 T}
H15 : {TL', pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S |-
         of M' S}
H16 : {TL', pi x\of x T' => of (app n1 x) S |- of (M2' n1) S}
============================
 {TL', pi x\of x T' => of (app n1 x) S |- of (M3' n1) S}

Subgoal 4.1 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain IH with M = M3, T = T.
Subgoal 4.1:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL |- of M1 tnat}
H13 : {TL |- of M2 T}
H14 : {TL |- of M3 T}
H15 : {TL', pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S |-
         of M' S}
H16 : {TL', pi x\of x T' => of (app n1 x) S |- of (M2' n1) S}
H17 : {TL', pi x\of x T' => of (app n1 x) S |- of (M3' n1) S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {of n1 (arr T' S) |- pi x\of x T' => of (app n1 x) S}.
Subgoal 4.1:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL |- of M1 tnat}
H13 : {TL |- of M2 T}
H14 : {TL |- of M3 T}
H15 : {TL', pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S |-
         of M' S}
H16 : {TL', pi x\of x T' => of (app n1 x) S |- of (M2' n1) S}
H17 : {TL', pi x\of x T' => of (app n1 x) S |- of (M3' n1) S}
H18 : {of n1 (arr T' S) |- pi x\of x T' => of (app n1 x) S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < cut H16 with H18.
Subgoal 4.1:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL |- of M1 tnat}
H13 : {TL |- of M2 T}
H14 : {TL |- of M3 T}
H15 : {TL', pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S |-
         of M' S}
H16 : {TL', pi x\of x T' => of (app n1 x) S |- of (M2' n1) S}
H17 : {TL', pi x\of x T' => of (app n1 x) S |- of (M3' n1) S}
H18 : {of n1 (arr T' S) |- pi x\of x T' => of (app n1 x) S}
H19 : {TL', of n1 (arr T' S) |- of (M2' n1) S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < cut H17 with H18.
Subgoal 4.1:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL |- of M1 tnat}
H13 : {TL |- of M2 T}
H14 : {TL |- of M3 T}
H15 : {TL', pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S |-
         of M' S}
H16 : {TL', pi x\of x T' => of (app n1 x) S |- of (M2' n1) S}
H17 : {TL', pi x\of x T' => of (app n1 x) S |- of (M3' n1) S}
H18 : {of n1 (arr T' S) |- pi x\of x T' => of (app n1 x) S}
H19 : {TL', of n1 (arr T' S) |- of (M2' n1) S}
H20 : {TL', of n1 (arr T' S) |- of (M3' n1) S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', of n1 (arr T' S), of n2 tnat |- of (ifz n2 (M2' n1) (M3' n1)) S}.
Subgoal 4.1:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL |- of M1 tnat}
H13 : {TL |- of M2 T}
H14 : {TL |- of M3 T}
H15 : {TL', pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S |-
         of M' S}
H16 : {TL', pi x\of x T' => of (app n1 x) S |- of (M2' n1) S}
H17 : {TL', pi x\of x T' => of (app n1 x) S |- of (M3' n1) S}
H18 : {of n1 (arr T' S) |- pi x\of x T' => of (app n1 x) S}
H19 : {TL', of n1 (arr T' S) |- of (M2' n1) S}
H20 : {TL', of n1 (arr T' S) |- of (M3' n1) S}
H21 : {TL', of n1 (arr T' S), of n2 tnat |- of (ifz n2 (M2' n1) (M3' n1)) S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {pi x\of x T' => of (K x) S |- of (fix f\K) (arr T' S)}.
Subgoal 4.1.4:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL |- of M1 tnat}
H13 : {TL |- of M2 T}
H14 : {TL |- of M3 T}
H15 : {TL', pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S |-
         of M' S}
H16 : {TL', pi x\of x T' => of (app n1 x) S |- of (M2' n1) S}
H17 : {TL', pi x\of x T' => of (app n1 x) S |- of (M3' n1) S}
H18 : {of n1 (arr T' S), of n2 T' |- of (app n1 n2) S}
H19 : {TL', of n1 (arr T' S) |- of (M2' n1) S}
H20 : {TL', of n1 (arr T' S) |- of (M3' n1) S}
H21 : {TL', of n1 (arr T' S), of n2 tnat |- of (ifz n2 (M2' n1) (M3' n1)) S}
============================
 {pi x\of x T' => of (K x) S |- of (fix f\K) (arr T' S)}

Subgoal 4.1 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply cps_ty_pres to _ _ H7.
Subgoal 4.1.4:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL |- of M1 tnat}
H13 : {TL |- of M2 T}
H14 : {TL |- of M3 T}
H15 : {TL', pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S |-
         of M' S}
H16 : {TL', pi x\of x T' => of (app n1 x) S |- of (M2' n1) S}
H17 : {TL', pi x\of x T' => of (app n1 x) S |- of (M3' n1) S}
H18 : {of n1 (arr T' S), of n2 T' |- of (app n1 n2) S}
H19 : {TL', of n1 (arr T' S) |- of (M2' n1) S}
H20 : {TL', of n1 (arr T' S) |- of (M3' n1) S}
H21 : {TL', of n1 (arr T' S), of n2 tnat |- of (ifz n2 (M2' n1) (M3' n1)) S}
H22 : {is_sty T'}
============================
 {pi x\of x T' => of (K x) S |- of (fix f\K) (arr T' S)}

Subgoal 4.1 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < search.
Subgoal 4.1:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL |- of M1 tnat}
H13 : {TL |- of M2 T}
H14 : {TL |- of M3 T}
H15 : {TL', pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S |-
         of M' S}
H16 : {TL', pi x\of x T' => of (app n1 x) S |- of (M2' n1) S}
H17 : {TL', pi x\of x T' => of (app n1 x) S |- of (M3' n1) S}
H18 : {of n1 (arr T' S), of n2 T' |- of (app n1 n2) S}
H19 : {TL', of n1 (arr T' S) |- of (M2' n1) S}
H20 : {TL', of n1 (arr T' S) |- of (M3' n1) S}
H21 : {TL', of n1 (arr T' S), of n2 tnat |- of (ifz n2 (M2' n1) (M3' n1)) S}
H22 : {pi x\of x T' => of (K x) S |- of (fix f\K) (arr T' S)}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', pi x\of x T' => of (K x) S |-
   pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S}.
Subgoal 4.1:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL |- of M1 tnat}
H13 : {TL |- of M2 T}
H14 : {TL |- of M3 T}
H15 : {TL', pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S |-
         of M' S}
H16 : {TL', pi x\of x T' => of (app n1 x) S |- of (M2' n1) S}
H17 : {TL', pi x\of x T' => of (app n1 x) S |- of (M3' n1) S}
H18 : {of n1 (arr T' S), of n2 T' |- of (app n1 n2) S}
H19 : {TL', of n1 (arr T' S) |- of (M2' n1) S}
H20 : {TL', of n1 (arr T' S) |- of (M3' n1) S}
H21 : {TL', of n1 (arr T' S), of n2 tnat |- of (ifz n2 (M2' n1) (M3' n1)) S}
H22 : {pi x\of x T' => of (K x) S |- of (fix f\K) (arr T' S)}
H23 : {TL', pi x\of x T' => of (K x) S |-
         pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < cut H15 with H23.
Subgoal 4.1:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL |- of M1 tnat}
H13 : {TL |- of M2 T}
H14 : {TL |- of M3 T}
H15 : {TL', pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S |-
         of M' S}
H16 : {TL', pi x\of x T' => of (app n1 x) S |- of (M2' n1) S}
H17 : {TL', pi x\of x T' => of (app n1 x) S |- of (M3' n1) S}
H18 : {of n1 (arr T' S), of n2 T' |- of (app n1 n2) S}
H19 : {TL', of n1 (arr T' S) |- of (M2' n1) S}
H20 : {TL', of n1 (arr T' S) |- of (M3' n1) S}
H21 : {TL', of n1 (arr T' S), of n2 tnat |- of (ifz n2 (M2' n1) (M3' n1)) S}
H22 : {pi x\of x T' => of (K x) S |- of (fix f\K) (arr T' S)}
H23 : {TL', pi x\of x T' => of (K x) S |-
         pi x\of x tnat => of (let (fix f\K) (k\ifz x (M2' k) (M3' k))) S}
H24 : {TL', pi x\of x T' => of (K x) S |- of M' S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 4.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < search.
Subgoal 4.2:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2 F
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL, [F] |- of (ifz M1 M2 M3) T}
H13 : member F TL
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply sctx_mem to _ H13.
Subgoal 4.2:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2 X T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H12 : {TL, [of X T1] |- of (ifz M1 M2 M3) T}
H13 : member (of X T1) TL
H14 : name X
H15 : {is_sty T1}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H12.
Subgoal 4.2:

Variables: TL CL T K M' T' TL' S M3' M2' M1 M3 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x\app n1 x) (M2' n1)}*
H10 : {CL |- cps M3 (x\app n1 x) (M3' n1)}*
H11 : {CL |- cps M1 (x1\let (fix f\K) (k\ifz x1 (M2' k) (M3' k))) M'}*
H13 : member (of (ifz M1 M2 M3) T) TL
H14 : name (ifz M1 M2 M3)
H15 : {is_sty T}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 5 is:
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H14.
Subgoal 5:

Variables: TL CL T K T' TL' S
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of unit T}
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
============================
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply sof_unit_inv to _ H5.
Subgoal 5:

Variables: TL CL K T' TL' S
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tunit}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of unit tunit}
H7 : cps_ty S tunit T'
H8 : cps_sctx S TL TL'
============================
 {TL', pi x\of x T' => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H7.
Subgoal 5:

Variables: TL CL K TL' S
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty tunit}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of unit tunit}
H8 : cps_sctx S TL TL'
============================
 {TL', pi x\of x tunit => of (K x) S |- of (K unit) S}

Subgoal 6 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < search.
Subgoal 6:

Variables: TL CL T K M' T' TL' S M2' M1 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of (pair M1 M2) T}
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (pair n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H5.
Subgoal 6.1:

Variables: TL CL K M' T' TL' S M2' M1 M2 T2 T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (prod T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S (prod T1 T2) T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (pair n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL |- of M2 T2}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 6.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H7.
Subgoal 6.1:

Variables: TL CL K M' TL' S M2' M1 M2 T2 T1 T2' T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (prod T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (pair n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL |- of M2 T2}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
============================
 {TL', pi x\of x (prod T1' T2') => of (K x) S |- of M' S}

Subgoal 6.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply sof_is_sty to _ H11.
Subgoal 6.1:

Variables: TL CL K M' TL' S M2' M1 M2 T2 T1 T2' T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (prod T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (pair n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL |- of M2 T2}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
============================
 {TL', pi x\of x (prod T1' T2') => of (K x) S |- of M' S}

Subgoal 6.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply sof_is_sty to _ H12.
Subgoal 6.1:

Variables: TL CL K M' TL' S M2' M1 M2 T2 T1 T2' T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (prod T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (pair n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL |- of M2 T2}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
H16 : {is_sty T2}
============================
 {TL', pi x\of x (prod T1' T2') => of (K x) S |- of M' S}

Subgoal 6.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', pi x\of x T1' => of (M2' x) S |- of M' S}.
Subgoal 6.1.1:

Variables: TL CL K M' TL' S M2' M1 M2 T2 T1 T2' T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (prod T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (pair n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL |- of M2 T2}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
H16 : {is_sty T2}
============================
 {TL', pi x\of x T1' => of (M2' x) S |- of M' S}

Subgoal 6.1 is:
 {TL', pi x\of x (prod T1' T2') => of (K x) S |- of M' S}

Subgoal 6.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain IH with M = M1, T = T1.
Subgoal 6.1:

Variables: TL CL K M' TL' S M2' M1 M2 T2 T1 T2' T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (prod T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (pair n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL |- of M2 T2}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
H16 : {is_sty T2}
H17 : {TL', pi x\of x T1' => of (M2' x) S |- of M' S}
============================
 {TL', pi x\of x (prod T1' T2') => of (K x) S |- of M' S}

Subgoal 6.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', pi x\of x T2' => of (let (pair n1 x) K) S |- of (M2' n1) S}.
Subgoal 6.1.2:

Variables: TL CL K M' TL' S M2' M1 M2 T2 T1 T2' T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (prod T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (pair n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL |- of M2 T2}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
H16 : {is_sty T2}
H17 : {TL', pi x\of x T1' => of (M2' x) S |- of M' S}
============================
 {TL', pi x\of x T2' => of (let (pair n1 x) K) S |- of (M2' n1) S}

Subgoal 6.1 is:
 {TL', pi x\of x (prod T1' T2') => of (K x) S |- of M' S}

Subgoal 6.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain IH with M = M2, T = T2.
Subgoal 6.1:

Variables: TL CL K M' TL' S M2' M1 M2 T2 T1 T2' T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (prod T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (pair n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL |- of M2 T2}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
H16 : {is_sty T2}
H17 : {TL', pi x\of x T1' => of (M2' x) S |- of M' S}
H18 : {TL', pi x\of x T2' => of (let (pair n1 x) K) S |- of (M2' n1) S}
============================
 {TL', pi x\of x (prod T1' T2') => of (K x) S |- of M' S}

Subgoal 6.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {pi x\of x T' => of (K x) S, of n1 T1' |-
   pi x\of x T2' => of (let (pair n1 x) K) S}.
Subgoal 6.1:

Variables: TL CL K M' TL' S M2' M1 M2 T2 T1 T2' T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (prod T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (pair n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL |- of M2 T2}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
H16 : {is_sty T2}
H17 : {TL', pi x\of x T1' => of (M2' x) S |- of M' S}
H18 : {TL', pi x\of x T2' => of (let (pair n1 x) K) S |- of (M2' n1) S}
H19 : {pi x\of x (prod T1' T2') => of (K x) S, of n1 T1' |-
         pi x\of x T2' => of (let (pair n1 x) K) S}
============================
 {TL', pi x\of x (prod T1' T2') => of (K x) S |- of M' S}

Subgoal 6.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < cut H18 with H19.
Subgoal 6.1:

Variables: TL CL K M' TL' S M2' M1 M2 T2 T1 T2' T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (prod T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (pair n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL |- of M2 T2}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
H16 : {is_sty T2}
H17 : {TL', pi x\of x T1' => of (M2' x) S |- of M' S}
H18 : {TL', pi x\of x T2' => of (let (pair n1 x) K) S |- of (M2' n1) S}
H19 : {pi x\of x (prod T1' T2') => of (K x) S, of n1 T1' |-
         pi x\of x T2' => of (let (pair n1 x) K) S}
H20 : {TL', pi x\of x (prod T1' T2') => of (K x) S, of n1 T1' |-
         of (M2' n1) S}
============================
 {TL', pi x\of x (prod T1' T2') => of (K x) S |- of M' S}

Subgoal 6.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', pi x\of x T' => of (K x) S |- pi x\of x T1' => of (M2' x) S}.
Subgoal 6.1:

Variables: TL CL K M' TL' S M2' M1 M2 T2 T1 T2' T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (prod T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (pair n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL |- of M2 T2}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
H16 : {is_sty T2}
H17 : {TL', pi x\of x T1' => of (M2' x) S |- of M' S}
H18 : {TL', pi x\of x T2' => of (let (pair n1 x) K) S |- of (M2' n1) S}
H19 : {pi x\of x (prod T1' T2') => of (K x) S, of n1 T1' |-
         pi x\of x T2' => of (let (pair n1 x) K) S}
H20 : {TL', pi x\of x (prod T1' T2') => of (K x) S, of n1 T1' |-
         of (M2' n1) S}
H21 : {TL', pi x\of x (prod T1' T2') => of (K x) S |-
         pi x\of x T1' => of (M2' x) S}
============================
 {TL', pi x\of x (prod T1' T2') => of (K x) S |- of M' S}

Subgoal 6.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < cut H17 with H21.
Subgoal 6.1:

Variables: TL CL K M' TL' S M2' M1 M2 T2 T1 T2' T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (prod T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (pair n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL |- of M2 T2}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
H16 : {is_sty T2}
H17 : {TL', pi x\of x T1' => of (M2' x) S |- of M' S}
H18 : {TL', pi x\of x T2' => of (let (pair n1 x) K) S |- of (M2' n1) S}
H19 : {pi x\of x (prod T1' T2') => of (K x) S, of n1 T1' |-
         pi x\of x T2' => of (let (pair n1 x) K) S}
H20 : {TL', pi x\of x (prod T1' T2') => of (K x) S, of n1 T1' |-
         of (M2' n1) S}
H21 : {TL', pi x\of x (prod T1' T2') => of (K x) S |-
         pi x\of x T1' => of (M2' x) S}
H22 : {TL', pi x\of x (prod T1' T2') => of (K x) S |- of M' S}
============================
 {TL', pi x\of x (prod T1' T2') => of (K x) S |- of M' S}

Subgoal 6.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < search.
Subgoal 6.2:

Variables: TL CL T K M' T' TL' S M2' M1 M2 F
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (pair n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL, [F] |- of (pair M1 M2) T}
H12 : member F TL
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply sctx_mem to _ H12.
Subgoal 6.2:

Variables: TL CL T K M' T' TL' S M2' M1 M2 X T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (pair n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL, [of X T1] |- of (pair M1 M2) T}
H12 : member (of X T1) TL
H13 : name X
H14 : {is_sty T1}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H11.
Subgoal 6.2:

Variables: TL CL T K M' T' TL' S M2' M1 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M2 (x2\let (pair n1 x2) (v\K v)) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H12 : member (of (pair M1 M2) T) TL
H13 : name (pair M1 M2)
H14 : {is_sty T}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H13.
Subgoal 7:

Variables: TL CL T K M' T' TL' S M1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of (fst M1) T}
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (fst x) (v\K v)) M'}*
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H5.
Subgoal 7.1:

Variables: TL CL T K M' T' TL' S M1 T2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (fst x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T T2)}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply sof_is_sty to _ H10.
Subgoal 7.1:

Variables: TL CL T K M' T' TL' S M1 T2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (fst x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T T2)}
H11 : {is_sty (prod T T2)}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H11.
Subgoal 7.1:

Variables: TL CL T K M' T' TL' S M1 T2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (fst x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T T2)}
H12 : {is_sty T}
H13 : {is_sty T2}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert exists T2', cps_ty S T2 T2'.
Subgoal 7.1.1:

Variables: TL CL T K M' T' TL' S M1 T2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (fst x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T T2)}
H12 : {is_sty T}
H13 : {is_sty T2}
============================
 exists T2', cps_ty S T2 T2'

Subgoal 7.1 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain cps_ty_exists.
Subgoal 7.1:

Variables: TL CL T K M' T' TL' S M1 T2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (fst x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T T2)}
H12 : {is_sty T}
H13 : {is_sty T2}
H14 : exists T2', cps_ty S T2 T2'
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H14.
Subgoal 7.1:

Variables: TL CL T K M' T' TL' S M1 T2 T2'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (fst x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T T2)}
H12 : {is_sty T}
H13 : {is_sty T2}
H15 : cps_ty S T2 T2'
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', pi x\of x (prod T' T2') => of (let (fst x) K) S |- of M' S}.
Subgoal 7.1.2:

Variables: TL CL T K M' T' TL' S M1 T2 T2'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (fst x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T T2)}
H12 : {is_sty T}
H13 : {is_sty T2}
H15 : cps_ty S T2 T2'
============================
 {TL', pi x\of x (prod T' T2') => of (let (fst x) K) S |- of M' S}

Subgoal 7.1 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain IH with M = M1, T = prod T T2.
Subgoal 7.1:

Variables: TL CL T K M' T' TL' S M1 T2 T2'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (fst x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T T2)}
H12 : {is_sty T}
H13 : {is_sty T2}
H15 : cps_ty S T2 T2'
H16 : {TL', pi x\of x (prod T' T2') => of (let (fst x) K) S |- of M' S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {pi x\of x T' => of (K x) S |-
   pi x\of x (prod T' T2') => of (let (fst x) K) S}.
Subgoal 7.1:

Variables: TL CL T K M' T' TL' S M1 T2 T2'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (fst x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T T2)}
H12 : {is_sty T}
H13 : {is_sty T2}
H15 : cps_ty S T2 T2'
H16 : {TL', pi x\of x (prod T' T2') => of (let (fst x) K) S |- of M' S}
H17 : {pi x\of x T' => of (K x) S |-
         pi x\of x (prod T' T2') => of (let (fst x) K) S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < cut H16 with H17.
Subgoal 7.1:

Variables: TL CL T K M' T' TL' S M1 T2 T2'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (fst x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T T2)}
H12 : {is_sty T}
H13 : {is_sty T2}
H15 : cps_ty S T2 T2'
H16 : {TL', pi x\of x (prod T' T2') => of (let (fst x) K) S |- of M' S}
H17 : {pi x\of x T' => of (K x) S |-
         pi x\of x (prod T' T2') => of (let (fst x) K) S}
H18 : {TL', pi x\of x T' => of (K x) S |- of M' S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 7.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < search.
Subgoal 7.2:

Variables: TL CL T K M' T' TL' S M1 F
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (fst x) (v\K v)) M'}*
H10 : {TL, [F] |- of (fst M1) T}
H11 : member F TL
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply sctx_mem to _ H11.
Subgoal 7.2:

Variables: TL CL T K M' T' TL' S M1 X T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (fst x) (v\K v)) M'}*
H10 : {TL, [of X T1] |- of (fst M1) T}
H11 : member (of X T1) TL
H12 : name X
H13 : {is_sty T1}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H10.
Subgoal 7.2:

Variables: TL CL T K M' T' TL' S M1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (fst x) (v\K v)) M'}*
H11 : member (of (fst M1) T) TL
H12 : name (fst M1)
H13 : {is_sty T}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H12.
Subgoal 8:

Variables: TL CL T K M' T' TL' S M1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of (snd M1) T}
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (snd x) (v\K v)) M'}*
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H5.
Subgoal 8.1:

Variables: TL CL T K M' T' TL' S M1 T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (snd x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T1 T)}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply sof_is_sty to _ H10.
Subgoal 8.1:

Variables: TL CL T K M' T' TL' S M1 T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (snd x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T1 T)}
H11 : {is_sty (prod T1 T)}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H11.
Subgoal 8.1:

Variables: TL CL T K M' T' TL' S M1 T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (snd x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T1 T)}
H12 : {is_sty T1}
H13 : {is_sty T}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert exists T1', cps_ty S T1 T1'.
Subgoal 8.1.1:

Variables: TL CL T K M' T' TL' S M1 T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (snd x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T1 T)}
H12 : {is_sty T1}
H13 : {is_sty T}
============================
 exists T1', cps_ty S T1 T1'

Subgoal 8.1 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain cps_ty_exists.
Subgoal 8.1:

Variables: TL CL T K M' T' TL' S M1 T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (snd x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T1 T)}
H12 : {is_sty T1}
H13 : {is_sty T}
H14 : exists T1', cps_ty S T1 T1'
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H14.
Subgoal 8.1:

Variables: TL CL T K M' T' TL' S M1 T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (snd x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T1 T)}
H12 : {is_sty T1}
H13 : {is_sty T}
H15 : cps_ty S T1 T1'
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', pi x\of x (prod T1' T') => of (let (snd x) K) S |- of M' S}.
Subgoal 8.1.2:

Variables: TL CL T K M' T' TL' S M1 T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (snd x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T1 T)}
H12 : {is_sty T1}
H13 : {is_sty T}
H15 : cps_ty S T1 T1'
============================
 {TL', pi x\of x (prod T1' T') => of (let (snd x) K) S |- of M' S}

Subgoal 8.1 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain IH with M = M1, T = prod T1 T.
Subgoal 8.1:

Variables: TL CL T K M' T' TL' S M1 T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (snd x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T1 T)}
H12 : {is_sty T1}
H13 : {is_sty T}
H15 : cps_ty S T1 T1'
H16 : {TL', pi x\of x (prod T1' T') => of (let (snd x) K) S |- of M' S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {pi x\of x T' => of (K x) S |-
   pi x\of x (prod T1' T') => of (let (snd x) K) S}.
Subgoal 8.1:

Variables: TL CL T K M' T' TL' S M1 T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (snd x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T1 T)}
H12 : {is_sty T1}
H13 : {is_sty T}
H15 : cps_ty S T1 T1'
H16 : {TL', pi x\of x (prod T1' T') => of (let (snd x) K) S |- of M' S}
H17 : {pi x\of x T' => of (K x) S |-
         pi x\of x (prod T1' T') => of (let (snd x) K) S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < cut H16 with H17.
Subgoal 8.1:

Variables: TL CL T K M' T' TL' S M1 T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (snd x) (v\K v)) M'}*
H10 : {TL |- of M1 (prod T1 T)}
H12 : {is_sty T1}
H13 : {is_sty T}
H15 : cps_ty S T1 T1'
H16 : {TL', pi x\of x (prod T1' T') => of (let (snd x) K) S |- of M' S}
H17 : {pi x\of x T' => of (K x) S |-
         pi x\of x (prod T1' T') => of (let (snd x) K) S}
H18 : {TL', pi x\of x T' => of (K x) S |- of M' S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 8.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < search.
Subgoal 8.2:

Variables: TL CL T K M' T' TL' S M1 F
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (snd x) (v\K v)) M'}*
H10 : {TL, [F] |- of (snd M1) T}
H11 : member F TL
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply sctx_mem to _ H11.
Subgoal 8.2:

Variables: TL CL T K M' T' TL' S M1 X T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (snd x) (v\K v)) M'}*
H10 : {TL, [of X T1] |- of (snd M1) T}
H11 : member (of X T1) TL
H12 : name X
H13 : {is_sty T1}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H10.
Subgoal 8.2:

Variables: TL CL T K M' T' TL' S M1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |- cps M1 (x\let (snd x) (v\K v)) M'}*
H11 : member (of (snd M1) T) TL
H12 : name (snd M1)
H13 : {is_sty T}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H12.
Subgoal 9:

Variables: TL CL T K M' T' TL' S R' M1 R
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of (let M1 R) T}
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n1 k (k n1) |- cps (R n1) K (R' n1)}*
H10 : {CL |- cps M1 R' M'}*
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H5.
Subgoal 9.1:

Variables: TL CL T K M' T' TL' S R' M1 R T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n1 k (k n1) |- cps (R n1) K (R' n1)}*
H10 : {CL |- cps M1 R' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL, of n1 T1 |- of (R n1) T}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply sof_is_sty to _ H11.
Subgoal 9.1:

Variables: TL CL T K M' T' TL' S R' M1 R T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n1 k (k n1) |- cps (R n1) K (R' n1)}*
H10 : {CL |- cps M1 R' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL, of n1 T1 |- of (R n1) T}
H13 : {is_sty T1}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert exists T1', cps_ty S T1 T1'.
Subgoal 9.1.1:

Variables: TL CL T K M' T' TL' S R' M1 R T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n1 k (k n1) |- cps (R n1) K (R' n1)}*
H10 : {CL |- cps M1 R' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL, of n1 T1 |- of (R n1) T}
H13 : {is_sty T1}
============================
 exists T1', cps_ty S T1 T1'

Subgoal 9.1 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain cps_ty_exists.
Subgoal 9.1:

Variables: TL CL T K M' T' TL' S R' M1 R T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n1 k (k n1) |- cps (R n1) K (R' n1)}*
H10 : {CL |- cps M1 R' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL, of n1 T1 |- of (R n1) T}
H13 : {is_sty T1}
H14 : exists T1', cps_ty S T1 T1'
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H14.
Subgoal 9.1:

Variables: TL CL T K M' T' TL' S R' M1 R T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n1 k (k n1) |- cps (R n1) K (R' n1)}*
H10 : {CL |- cps M1 R' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL, of n1 T1 |- of (R n1) T}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', of n1 T1', pi x\of x T' => of (K x) S |- of (R' n1) S}.
Subgoal 9.1.2:

Variables: TL CL T K M' T' TL' S R' M1 R T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n1 k (k n1) |- cps (R n1) K (R' n1)}*
H10 : {CL |- cps M1 R' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL, of n1 T1 |- of (R n1) T}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
============================
 {TL', of n1 T1', pi x\of x T' => of (K x) S |- of (R' n1) S}

Subgoal 9.1 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain IH with M = R n1, T = T, TL = of n1 T1 :: TL, CL = pi k\cps n1 k (k n1) :: CL.
Subgoal 9.1:

Variables: TL CL T K M' T' TL' S R' M1 R T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n1 k (k n1) |- cps (R n1) K (R' n1)}*
H10 : {CL |- cps M1 R' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL, of n1 T1 |- of (R n1) T}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
H16 : {TL', of n1 T1', pi x\of x T' => of (K x) S |- of (R' n1) S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', pi x\of x T1' => of (R' x) S |- of M' S}.
Subgoal 9.1.3:

Variables: TL CL T K M' T' TL' S R' M1 R T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n1 k (k n1) |- cps (R n1) K (R' n1)}*
H10 : {CL |- cps M1 R' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL, of n1 T1 |- of (R n1) T}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
H16 : {TL', of n1 T1', pi x\of x T' => of (K x) S |- of (R' n1) S}
============================
 {TL', pi x\of x T1' => of (R' x) S |- of M' S}

Subgoal 9.1 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain IH with M = M1, T = T1.
Subgoal 9.1:

Variables: TL CL T K M' T' TL' S R' M1 R T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n1 k (k n1) |- cps (R n1) K (R' n1)}*
H10 : {CL |- cps M1 R' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL, of n1 T1 |- of (R n1) T}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
H16 : {TL', of n1 T1', pi x\of x T' => of (K x) S |- of (R' n1) S}
H17 : {TL', pi x\of x T1' => of (R' x) S |- of M' S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', pi x\of x T' => of (K x) S |- pi x\of x T1' => of (R' x) S}.
Subgoal 9.1:

Variables: TL CL T K M' T' TL' S R' M1 R T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n1 k (k n1) |- cps (R n1) K (R' n1)}*
H10 : {CL |- cps M1 R' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL, of n1 T1 |- of (R n1) T}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
H16 : {TL', of n1 T1', pi x\of x T' => of (K x) S |- of (R' n1) S}
H17 : {TL', pi x\of x T1' => of (R' x) S |- of M' S}
H18 : {TL', pi x\of x T' => of (K x) S |- pi x\of x T1' => of (R' x) S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < cut H17 with H18.
Subgoal 9.1:

Variables: TL CL T K M' T' TL' S R' M1 R T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n1 k (k n1) |- cps (R n1) K (R' n1)}*
H10 : {CL |- cps M1 R' M'}*
H11 : {TL |- of M1 T1}
H12 : {TL, of n1 T1 |- of (R n1) T}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
H16 : {TL', of n1 T1', pi x\of x T' => of (K x) S |- of (R' n1) S}
H17 : {TL', pi x\of x T1' => of (R' x) S |- of M' S}
H18 : {TL', pi x\of x T' => of (K x) S |- pi x\of x T1' => of (R' x) S}
H19 : {TL', pi x\of x T' => of (K x) S |- of M' S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 9.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < search.
Subgoal 9.2:

Variables: TL CL T K M' T' TL' S R' M1 R F
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n1 k (k n1) |- cps (R n1) K (R' n1)}*
H10 : {CL |- cps M1 R' M'}*
H11 : {TL, [F] |- of (let M1 R) T}
H12 : member F TL
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply sctx_mem to _ H12.
Subgoal 9.2:

Variables: TL CL T K M' T' TL' S R' M1 R X T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n1 k (k n1) |- cps (R n1) K (R' n1)}*
H10 : {CL |- cps M1 R' M'}*
H11 : {TL, [of X T1] |- of (let M1 R) T}
H12 : member (of X T1) TL
H13 : name X
H14 : {is_sty T1}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H11.
Subgoal 9.2:

Variables: TL CL T K M' T' TL' S R' M1 R
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n1 k (k n1) |- cps (R n1) K (R' n1)}*
H10 : {CL |- cps M1 R' M'}*
H12 : member (of (let M1 R) T) TL
H13 : name (let M1 R)
H14 : {is_sty T}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 10 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H13.
Subgoal 10:

Variables: TL CL T K T' TL' S R' R
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of (fix R) T}
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
============================
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H5.
Subgoal 10.1:

Variables: TL CL K T' TL' S R' R T2 T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (arr T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S (arr T1 T2) T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
H10 : {TL, of n1 (arr T1 T2), of n2 T1 |- of (R n1 n2) T2}
H11 : {TL |- is_sty (arr T1 T2)}
============================
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 10.2 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert exists T1' T2', T' = arr (prod (arr T2' S) T1') S.
Subgoal 10.1.1:

Variables: TL CL K T' TL' S R' R T2 T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (arr T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S (arr T1 T2) T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
H10 : {TL, of n1 (arr T1 T2), of n2 T1 |- of (R n1 n2) T2}
H11 : {TL |- is_sty (arr T1 T2)}
============================
 exists T1' T2', T' = arr (prod (arr T2' S) T1') S

Subgoal 10.1 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 10.2 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H7.
Subgoal 10.1.1:

Variables: TL CL K TL' S R' R T2 T1 T1' T2'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (arr T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
H10 : {TL, of n1 (arr T1 T2), of n2 T1 |- of (R n1 n2) T2}
H11 : {TL |- is_sty (arr T1 T2)}
H12 : cps_ty S T1 T1'
H13 : cps_ty S T2 T2'
============================
 exists T1'1 T2'1, arr (prod (arr T2' S) T1') S =
 arr (prod (arr T2'1 S) T1'1) S

Subgoal 10.1 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 10.2 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < search.
Subgoal 10.1:

Variables: TL CL K T' TL' S R' R T2 T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (arr T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S (arr T1 T2) T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
H10 : {TL, of n1 (arr T1 T2), of n2 T1 |- of (R n1 n2) T2}
H11 : {TL |- is_sty (arr T1 T2)}
H12 : exists T1' T2', T' = arr (prod (arr T2' S) T1') S
============================
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 10.2 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H12.
Subgoal 10.1:

Variables: TL CL K TL' S R' R T2 T1 T1' T2'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (arr T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S (arr T1 T2) (arr (prod (arr T2' S) T1') S)
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
H10 : {TL, of n1 (arr T1 T2), of n2 T1 |- of (R n1 n2) T2}
H11 : {TL |- is_sty (arr T1 T2)}
============================
 {TL', pi x\of x (arr (prod (arr T2' S) T1') S) => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 10.2 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H7.
Subgoal 10.1:

Variables: TL CL K TL' S R' R T2 T1 T1' T2'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty (arr T1 T2)}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
H10 : {TL, of n1 (arr T1 T2), of n2 T1 |- of (R n1 n2) T2}
H11 : {TL |- is_sty (arr T1 T2)}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
============================
 {TL', pi x\of x (arr (prod (arr T2' S) T1') S) => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 10.2 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H1.
Subgoal 10.1:

Variables: TL CL K TL' S R' R T2 T1 T1' T2'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
H10 : {TL, of n1 (arr T1 T2), of n2 T1 |- of (R n1 n2) T2}
H11 : {TL |- is_sty (arr T1 T2)}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
H16 : {is_sty T2}
============================
 {TL', pi x\of x (arr (prod (arr T2' S) T1') S) => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 10.2 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply cps_ty_pres to _ _ H13.
Subgoal 10.1:

Variables: TL CL K TL' S R' R T2 T1 T1' T2'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
H10 : {TL, of n1 (arr T1 T2), of n2 T1 |- of (R n1 n2) T2}
H11 : {TL |- is_sty (arr T1 T2)}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
H16 : {is_sty T2}
H17 : {is_sty T1'}
============================
 {TL', pi x\of x (arr (prod (arr T2' S) T1') S) => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 10.2 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply cps_ty_pres to _ _ H14.
Subgoal 10.1:

Variables: TL CL K TL' S R' R T2 T1 T1' T2'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
H10 : {TL, of n1 (arr T1 T2), of n2 T1 |- of (R n1 n2) T2}
H11 : {TL |- is_sty (arr T1 T2)}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
H16 : {is_sty T2}
H17 : {is_sty T1'}
H18 : {is_sty T2'}
============================
 {TL', pi x\of x (arr (prod (arr T2' S) T1') S) => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 10.2 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', of n2 (arr (prod (arr T2' S) T1') S), of n3 T1',
 pi x\of x T2' => of (app n1 x) S |- of (R' n2 n1 n3) S}.
Subgoal 10.1.2:

Variables: TL CL K TL' S R' R T2 T1 T1' T2'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
H10 : {TL, of n1 (arr T1 T2), of n2 T1 |- of (R n1 n2) T2}
H11 : {TL |- is_sty (arr T1 T2)}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
H16 : {is_sty T2}
H17 : {is_sty T1'}
H18 : {is_sty T2'}
============================
 {TL', of n2 (arr (prod (arr T2' S) T1') S), of n3 T1',
  pi x\of x T2' => of (app n1 x) S |- of (R' n2 n1 n3) S}

Subgoal 10.1 is:
 {TL', pi x\of x (arr (prod (arr T2' S) T1') S) => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 10.2 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain IH with TL = of n3 T1 :: of n2 (arr T1 T2) :: TL, TL' = of n3 T1' :: of n2 (arr (prod (arr T2' S) T1') S) :: TL', CL = pi k\cps n3 k (k n3) :: pi k\cps n2 k (k n2) :: CL, M = R n2 n3, K = y\app n1 y, M' = R' n2 n1 n3, T = T2, T' = T2', S = S.
Subgoal 10.1:

Variables: TL CL K TL' S R' R T2 T1 T1' T2'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
H10 : {TL, of n1 (arr T1 T2), of n2 T1 |- of (R n1 n2) T2}
H11 : {TL |- is_sty (arr T1 T2)}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
H16 : {is_sty T2}
H17 : {is_sty T1'}
H18 : {is_sty T2'}
H19 : {TL', of n2 (arr (prod (arr T2' S) T1') S), of n3 T1',
       pi x\of x T2' => of (app n1 x) S |- of (R' n2 n1 n3) S}
============================
 {TL', pi x\of x (arr (prod (arr T2' S) T1') S) => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 10.2 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {of n1 (arr T2' S) |- pi x\of x T2' => of (app n1 x) S}.
Subgoal 10.1:

Variables: TL CL K TL' S R' R T2 T1 T1' T2'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
H10 : {TL, of n1 (arr T1 T2), of n2 T1 |- of (R n1 n2) T2}
H11 : {TL |- is_sty (arr T1 T2)}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
H16 : {is_sty T2}
H17 : {is_sty T1'}
H18 : {is_sty T2'}
H19 : {TL', of n2 (arr (prod (arr T2' S) T1') S), of n3 T1',
       pi x\of x T2' => of (app n1 x) S |- of (R' n2 n1 n3) S}
H20 : {of n1 (arr T2' S) |- pi x\of x T2' => of (app n1 x) S}
============================
 {TL', pi x\of x (arr (prod (arr T2' S) T1') S) => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 10.2 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < cut H19 with H20.
Subgoal 10.1:

Variables: TL CL K TL' S R' R T2 T1 T1' T2'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
H10 : {TL, of n1 (arr T1 T2), of n2 T1 |- of (R n1 n2) T2}
H11 : {TL |- is_sty (arr T1 T2)}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
H16 : {is_sty T2}
H17 : {is_sty T1'}
H18 : {is_sty T2'}
H19 : {TL', of n2 (arr (prod (arr T2' S) T1') S), of n3 T1',
       pi x\of x T2' => of (app n1 x) S |- of (R' n2 n1 n3) S}
H20 : {of n1 (arr T2' S) |- pi x\of x T2' => of (app n1 x) S}
H21 : {TL', of n1 (arr T2' S), of n2 (arr (prod (arr T2' S) T1') S),
       of n3 T1' |- of (R' n2 n1 n3) S}
============================
 {TL', pi x\of x (arr (prod (arr T2' S) T1') S) => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 10.2 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL' |-
   of (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x))))
     (arr (prod (arr T2' S) T1') S)}.
Subgoal 10.1:

Variables: TL CL K TL' S R' R T2 T1 T1' T2'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
H10 : {TL, of n1 (arr T1 T2), of n2 T1 |- of (R n1 n2) T2}
H11 : {TL |- is_sty (arr T1 T2)}
H13 : cps_ty S T1 T1'
H14 : cps_ty S T2 T2'
H15 : {is_sty T1}
H16 : {is_sty T2}
H17 : {is_sty T1'}
H18 : {is_sty T2'}
H19 : {TL', of n2 (arr (prod (arr T2' S) T1') S), of n3 T1',
       pi x\of x T2' => of (app n1 x) S |- of (R' n2 n1 n3) S}
H20 : {of n1 (arr T2' S) |- pi x\of x T2' => of (app n1 x) S}
H21 : {TL', of n1 (arr T2' S), of n2 (arr (prod (arr T2' S) T1') S),
       of n3 T1' |- of (R' n2 n1 n3) S}
H22 : {TL' |-
         of (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x))))
           (arr (prod (arr T2' S) T1') S)}
============================
 {TL', pi x\of x (arr (prod (arr T2' S) T1') S) => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 10.2 is:
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < search.
Subgoal 10.2:

Variables: TL CL T K T' TL' S R' R F
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
H10 : {TL, [F] |- of (fix R) T}
H11 : member F TL
============================
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply sctx_mem to _ H11.
Subgoal 10.2:

Variables: TL CL T K T' TL' S R' R X T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
H10 : {TL, [of X T1] |- of (fix R) T}
H11 : member (of X T1) TL
H12 : name X
H13 : {is_sty T1}
============================
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H10.
Subgoal 10.2:

Variables: TL CL T K T' TL' S R' R
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, pi k\cps n2 k (k n2), pi k\cps n3 k (k n3) |-
        cps (R n2 n3) (y\app n1 y) (R' n2 n1 n3)}*
H11 : member (of (fix R) T) TL
H12 : name (fix R)
H13 : {is_sty T}
============================
 {TL', pi x\of x T' => of (K x) S |-
    of (let (fix (f\p\let (fst p) (k\let (snd p) (x\R' f k x)))) K) S}

Subgoal 11 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H12.
Subgoal 11:

Variables: TL CL T K M' T' TL' S M2' M1 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of (app M1 M2) T}
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H5.
Subgoal 11.1:

Variables: TL CL T K M' T' TL' S M2' M1 M2 T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 (arr T1 T)}
H12 : {TL |- of M2 T1}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 11.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply sof_is_sty to _ H12.
Subgoal 11.1:

Variables: TL CL T K M' T' TL' S M2' M1 M2 T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 (arr T1 T)}
H12 : {TL |- of M2 T1}
H13 : {is_sty T1}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 11.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert exists T1', cps_ty S T1 T1'.
Subgoal 11.1.1:

Variables: TL CL T K M' T' TL' S M2' M1 M2 T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 (arr T1 T)}
H12 : {TL |- of M2 T1}
H13 : {is_sty T1}
============================
 exists T1', cps_ty S T1 T1'

Subgoal 11.1 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 11.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain cps_ty_exists.
Subgoal 11.1:

Variables: TL CL T K M' T' TL' S M2' M1 M2 T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 (arr T1 T)}
H12 : {TL |- of M2 T1}
H13 : {is_sty T1}
H14 : exists T1', cps_ty S T1 T1'
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 11.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H14.
Subgoal 11.1:

Variables: TL CL T K M' T' TL' S M2' M1 M2 T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 (arr T1 T)}
H12 : {TL |- of M2 T1}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 11.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply cps_ty_pres to _ _ H7.
Subgoal 11.1:

Variables: TL CL T K M' T' TL' S M2' M1 M2 T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 (arr T1 T)}
H12 : {TL |- of M2 T1}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
H16 : {is_sty T'}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 11.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply cps_ty_pres to _ _ H15.
Subgoal 11.1:

Variables: TL CL T K M' T' TL' S M2' M1 M2 T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 (arr T1 T)}
H12 : {TL |- of M2 T1}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
H16 : {is_sty T'}
H17 : {is_sty T1'}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 11.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert cps_ty S (arr T1 T) (arr (prod (arr T' S) T1') S).
Subgoal 11.1:

Variables: TL CL T K M' T' TL' S M2' M1 M2 T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 (arr T1 T)}
H12 : {TL |- of M2 T1}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
H16 : {is_sty T'}
H17 : {is_sty T1'}
H18 : cps_ty S (arr T1 T) (arr (prod (arr T' S) T1') S)
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 11.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', pi x\of x (arr (prod (arr T' S) T1') S) => of (M2' x) S |- of M' S}.
Subgoal 11.1.2:

Variables: TL CL T K M' T' TL' S M2' M1 M2 T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 (arr T1 T)}
H12 : {TL |- of M2 T1}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
H16 : {is_sty T'}
H17 : {is_sty T1'}
H18 : cps_ty S (arr T1 T) (arr (prod (arr T' S) T1') S)
============================
 {TL', pi x\of x (arr (prod (arr T' S) T1') S) => of (M2' x) S |- of M' S}

Subgoal 11.1 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 11.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain IH with TL = TL, CL = CL, M = M1, K = M2', M' = M', T = arr T1 T, S = S.
Subgoal 11.1:

Variables: TL CL T K M' T' TL' S M2' M1 M2 T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 (arr T1 T)}
H12 : {TL |- of M2 T1}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
H16 : {is_sty T'}
H17 : {is_sty T1'}
H18 : cps_ty S (arr T1 T) (arr (prod (arr T' S) T1') S)
H19 : {TL', pi x\of x (arr (prod (arr T' S) T1') S) => of (M2' x) S |-
         of M' S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 11.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL',
 pi x2\of x2 T1' => of (let (fix f\K) (k\let (pair k x2) (p\app n1 p))) S |-
   of (M2' n1) S}.
Subgoal 11.1.3:

Variables: TL CL T K M' T' TL' S M2' M1 M2 T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 (arr T1 T)}
H12 : {TL |- of M2 T1}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
H16 : {is_sty T'}
H17 : {is_sty T1'}
H18 : cps_ty S (arr T1 T) (arr (prod (arr T' S) T1') S)
H19 : {TL', pi x\of x (arr (prod (arr T' S) T1') S) => of (M2' x) S |-
         of M' S}
============================
 {TL',
  pi x2\of x2 T1' => of (let (fix f\K) (k\let (pair k x2) (p\app n1 p))) S |-
    of (M2' n1) S}

Subgoal 11.1 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 11.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < backchain IH with TL = TL, CL = CL, T = T1, S = S, M = M2, K = x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p)), M' = M2' n1.
Subgoal 11.1:

Variables: TL CL T K M' T' TL' S M2' M1 M2 T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 (arr T1 T)}
H12 : {TL |- of M2 T1}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
H16 : {is_sty T'}
H17 : {is_sty T1'}
H18 : cps_ty S (arr T1 T) (arr (prod (arr T' S) T1') S)
H19 : {TL', pi x\of x (arr (prod (arr T' S) T1') S) => of (M2' x) S |-
         of M' S}
H20 : {TL',
       pi x2\of x2 T1' =>
         of (let (fix f\K) (k\let (pair k x2) (p\app n1 p))) S |-
         of (M2' n1) S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 11.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {pi x\of x T' => of (K x) S, of n1 (arr (prod (arr T' S) T1') S) |-
   pi x2\of x2 T1' => of (let (fix f\K) (k\let (pair k x2) (p\app n1 p))) S}.
Subgoal 11.1:

Variables: TL CL T K M' T' TL' S M2' M1 M2 T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 (arr T1 T)}
H12 : {TL |- of M2 T1}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
H16 : {is_sty T'}
H17 : {is_sty T1'}
H18 : cps_ty S (arr T1 T) (arr (prod (arr T' S) T1') S)
H19 : {TL', pi x\of x (arr (prod (arr T' S) T1') S) => of (M2' x) S |-
         of M' S}
H20 : {TL',
       pi x2\of x2 T1' =>
         of (let (fix f\K) (k\let (pair k x2) (p\app n1 p))) S |-
         of (M2' n1) S}
H21 : {pi x\of x T' => of (K x) S, of n1 (arr (prod (arr T' S) T1') S) |-
         pi x2\of x2 T1' =>
           of (let (fix f\K) (k\let (pair k x2) (p\app n1 p))) S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 11.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < cut H20 with H21.
Subgoal 11.1:

Variables: TL CL T K M' T' TL' S M2' M1 M2 T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 (arr T1 T)}
H12 : {TL |- of M2 T1}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
H16 : {is_sty T'}
H17 : {is_sty T1'}
H18 : cps_ty S (arr T1 T) (arr (prod (arr T' S) T1') S)
H19 : {TL', pi x\of x (arr (prod (arr T' S) T1') S) => of (M2' x) S |-
         of M' S}
H20 : {TL',
       pi x2\of x2 T1' =>
         of (let (fix f\K) (k\let (pair k x2) (p\app n1 p))) S |-
         of (M2' n1) S}
H21 : {pi x\of x T' => of (K x) S, of n1 (arr (prod (arr T' S) T1') S) |-
         pi x2\of x2 T1' =>
           of (let (fix f\K) (k\let (pair k x2) (p\app n1 p))) S}
H22 : {TL', pi x\of x T' => of (K x) S, of n1 (arr (prod (arr T' S) T1') S) |-
         of (M2' n1) S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 11.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < assert {TL', pi x\of x T' => of (K x) S |-
   pi x\of x (arr (prod (arr T' S) T1') S) => of (M2' x) S}.
Subgoal 11.1:

Variables: TL CL T K M' T' TL' S M2' M1 M2 T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 (arr T1 T)}
H12 : {TL |- of M2 T1}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
H16 : {is_sty T'}
H17 : {is_sty T1'}
H18 : cps_ty S (arr T1 T) (arr (prod (arr T' S) T1') S)
H19 : {TL', pi x\of x (arr (prod (arr T' S) T1') S) => of (M2' x) S |-
         of M' S}
H20 : {TL',
       pi x2\of x2 T1' =>
         of (let (fix f\K) (k\let (pair k x2) (p\app n1 p))) S |-
         of (M2' n1) S}
H21 : {pi x\of x T' => of (K x) S, of n1 (arr (prod (arr T' S) T1') S) |-
         pi x2\of x2 T1' =>
           of (let (fix f\K) (k\let (pair k x2) (p\app n1 p))) S}
H22 : {TL', pi x\of x T' => of (K x) S, of n1 (arr (prod (arr T' S) T1') S) |-
         of (M2' n1) S}
H23 : {TL', pi x\of x T' => of (K x) S |-
         pi x\of x (arr (prod (arr T' S) T1') S) => of (M2' x) S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 11.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < cut H19 with H23.
Subgoal 11.1:

Variables: TL CL T K M' T' TL' S M2' M1 M2 T1 T1'
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL |- of M1 (arr T1 T)}
H12 : {TL |- of M2 T1}
H13 : {is_sty T1}
H15 : cps_ty S T1 T1'
H16 : {is_sty T'}
H17 : {is_sty T1'}
H18 : cps_ty S (arr T1 T) (arr (prod (arr T' S) T1') S)
H19 : {TL', pi x\of x (arr (prod (arr T' S) T1') S) => of (M2' x) S |-
         of M' S}
H20 : {TL',
       pi x2\of x2 T1' =>
         of (let (fix f\K) (k\let (pair k x2) (p\app n1 p))) S |-
         of (M2' n1) S}
H21 : {pi x\of x T' => of (K x) S, of n1 (arr (prod (arr T' S) T1') S) |-
         pi x2\of x2 T1' =>
           of (let (fix f\K) (k\let (pair k x2) (p\app n1 p))) S}
H22 : {TL', pi x\of x T' => of (K x) S, of n1 (arr (prod (arr T' S) T1') S) |-
         of (M2' n1) S}
H23 : {TL', pi x\of x T' => of (K x) S |-
         pi x\of x (arr (prod (arr T' S) T1') S) => of (M2' x) S}
H24 : {TL', pi x\of x T' => of (K x) S |- of M' S}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 11.2 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < search.
Subgoal 11.2:

Variables: TL CL T K M' T' TL' S M2' M1 M2 F
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL, [F] |- of (app M1 M2) T}
H12 : member F TL
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply sctx_mem to _ H12.
Subgoal 11.2:

Variables: TL CL T K M' T' TL' S M2' M1 M2 X T1
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H11 : {TL, [of X T1] |- of (app M1 M2) T}
H12 : member (of X T1) TL
H13 : name X
H14 : {is_sty T1}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H11.
Subgoal 11.2:

Variables: TL CL T K M' T' TL' S M2' M1 M2
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL |-
        cps M2 (x2\let (fix f\K) (k\let (pair k x2) (p\app n1 p))) (M2' n1)}*
H10 : {CL |- cps M1 M2' M'}*
H12 : member (of (app M1 M2) T) TL
H13 : name (app M1 M2)
H14 : {is_sty T}
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

Subgoal 12 is:
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H13.
Subgoal 12:

Variables: TL CL M T K M' T' TL' S F
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of M T}
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, [F] |- cps M K M'}*
H10 : member F CL
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < apply cctx_mem to _ H10.
Subgoal 12:

Variables: TL CL M T K M' T' TL' S X
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of M T}
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H9 : {CL, [pi k\cps X k (k X)] |- cps M K M'}*
H10 : member (pi k\cps X k (k X)) CL
H11 : name X
============================
 {TL', pi x\of x T' => of (K x) S |- of M' S}

cps_typ_pres < case H9.
Subgoal 12:

Variables: TL CL M T K T' TL' S
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of M T}
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H10 : member (pi k\cps M k (k M)) CL
H11 : name M
============================
 {TL', pi x\of x T' => of (K x) S |- of (K M) S}

cps_typ_pres < apply sctx_var_mem to _ H5 _.
Subgoal 12:

Variables: TL CL M T K T' TL' S
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of M T}
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H10 : member (pi k\cps M k (k M)) CL
H11 : name M
H12 : member (of M T) TL
============================
 {TL', pi x\of x T' => of (K x) S |- of (K M) S}

cps_typ_pres < apply cps_sctx_mem_sync to H7 H8 H12.
Subgoal 12:

Variables: TL CL M T K T' TL' S
IH : forall TL CL M T K M' T' TL' S, {is_sty T} -> {is_sty S} -> sctx TL ->
       cctx CL -> {TL |- of M T} -> {CL |- cps M K M'}* -> cps_ty S T T' ->
       cps_sctx S TL TL' -> {TL', pi x\of x T' => of (K x) S |- of M' S}
H1 : {is_sty T}
H2 : {is_sty S}
H3 : sctx TL
H4 : cctx CL
H5 : {TL |- of M T}
H7 : cps_ty S T T'
H8 : cps_sctx S TL TL'
H10 : member (pi k\cps M k (k M)) CL
H11 : name M
H12 : member (of M T) TL
H13 : member (of M T') TL'
============================
 {TL', pi x\of x T' => of (K x) S |- of (K M) S}

cps_typ_pres < search.
Proof completed.
Abella < Theorem cps_typ_pres_closed : 
forall S M K M', {is_sty S} -> {of M tnat} -> {cps M K M'} ->
  {pi x\of x tnat => of (K x) S |- of M' S}.


============================
 forall S M K M', {is_sty S} -> {of M tnat} -> {cps M K M'} ->
   {pi x\of x tnat => of (K x) S |- of M' S}

cps_typ_pres_closed < intros.

Variables: S M K M'
H1 : {is_sty S}
H2 : {of M tnat}
H3 : {cps M K M'}
============================
 {pi x\of x tnat => of (K x) S |- of M' S}

cps_typ_pres_closed < apply cps_typ_pres to _ H1 _ _ H2 H3 _ _.

Variables: S M K M'
H1 : {is_sty S}
H2 : {of M tnat}
H3 : {cps M K M'}
H4 : {pi x\of x tnat => of (K x) S |- of M' S}
============================
 {pi x\of x tnat => of (K x) S |- of M' S}

cps_typ_pres_closed < search.
Proof completed.
Abella < Theorem cps_typ_pres_atom : 
forall M M', {of M tnat} -> {cps' M M'} -> {of M' tnat}.


============================
 forall M M', {of M tnat} -> {cps' M M'} -> {of M' tnat}

cps_typ_pres_atom < intros.

Variables: M M'
H1 : {of M tnat}
H2 : {cps' M M'}
============================
 {of M' tnat}

cps_typ_pres_atom < case H2.

Variables: M M'
H1 : {of M tnat}
H3 : {cps M x\x M'}
============================
 {of M' tnat}

cps_typ_pres_atom < apply cps_typ_pres_closed to _ H1 H3.

Variables: M M'
H1 : {of M tnat}
H3 : {cps M x\x M'}
H4 : {pi x\of x tnat => of x tnat |- of M' tnat}
============================
 {of M' tnat}

cps_typ_pres_atom < assert {pi x\of x tnat => of x tnat}.

Variables: M M'
H1 : {of M tnat}
H3 : {cps M x\x M'}
H4 : {pi x\of x tnat => of x tnat |- of M' tnat}
H5 : {pi x\of x tnat => of x tnat}
============================
 {of M' tnat}

cps_typ_pres_atom < cut H4 with H5.

Variables: M M'
H1 : {of M tnat}
H3 : {cps M x\x M'}
H4 : {pi x\of x tnat => of x tnat |- of M' tnat}
H5 : {pi x\of x tnat => of x tnat}
H6 : {of M' tnat}
============================
 {of M' tnat}

cps_typ_pres_atom < search.
Proof completed.
Abella <