Step
*
1
2
1
1
2
of Lemma
taba-property
1. A : Type
2. B : Type
3. init : B
4. F : A ⟶ A ⟶ B ⟶ B
5. xs : A List
6. u : A
7. v : A List
8. ∀ys:A List
     ((||v|| ≤ ||ys||)
     
⇒ (rec-case(v) of
         [] => <init, ys>
         x::xs' =>
          p.let a,ys = p 
            in let h,t = ys 
               in <F[x;h;a], t>
        = <accumulate (with value a and list item p):
            let x,x' = p 
            in F[x;x';a]
           over list:
             zip(rev(v);firstn(||v||;ys))
           with starting value:
            init)
          , nth_tl(||v||;ys)
          >
        ∈ (B × (A List))))
9. ys : A List
10. (||v|| + 1) ≤ ||ys||
11. rec-case(v) of
    [] => <init, ys>
    x::xs' =>
     p.let a,ys = p 
       in let h,t = ys 
          in <F[x;h;a], t>
= <accumulate (with value a and list item p):
    let x,x' = p 
    in F[x;x';a]
   over list:
     zip(rev(v);firstn(||v||;ys))
   with starting value:
    init)
  , nth_tl(||v||;ys)
  >
∈ (B × (A List))
12. 0 < ||v|| + 1
13. z1 : B
14. <z1, []>
= <accumulate (with value a and list item p):
    let x,x' = p 
    in F[x;x';a]
   over list:
     zip(rev(v);firstn(||v||;ys))
   with starting value:
    init)
  , nth_tl(||v||;ys)
  >
∈ (B × (A List))
⊢ let h,t = Ax 
  in <F[u;h;z1], t> ∈ B × (A List)
BY
{ ((EqHD (-1) THENA Auto) THEN All Reduce) }
1
1. A : Type
2. B : Type
3. init : B
4. F : A ⟶ A ⟶ B ⟶ B
5. xs : A List
6. u : A
7. v : A List
8. ∀ys:A List
     ((||v|| ≤ ||ys||)
     
⇒ (rec-case(v) of
         [] => <init, ys>
         x::xs' =>
          p.let a,ys = p 
            in let h,t = ys 
               in <F[x;h;a], t>
        = <accumulate (with value a and list item p):
            let x,x' = p 
            in F[x;x';a]
           over list:
             zip(rev(v);firstn(||v||;ys))
           with starting value:
            init)
          , nth_tl(||v||;ys)
          >
        ∈ (B × (A List))))
9. ys : A List
10. (||v|| + 1) ≤ ||ys||
11. rec-case(v) of
    [] => <init, ys>
    x::xs' =>
     p.let a,ys = p 
       in let h,t = ys 
          in <F[x;h;a], t>
= <accumulate (with value a and list item p):
    let x,x' = p 
    in F[x;x';a]
   over list:
     zip(rev(v);firstn(||v||;ys))
   with starting value:
    init)
  , nth_tl(||v||;ys)
  >
∈ (B × (A List))
12. 0 < ||v|| + 1
13. z1 : B
14. z1
= accumulate (with value a and list item p):
   let x,x' = p 
   in F[x;x';a]
  over list:
    zip(rev(v);firstn(||v||;ys))
  with starting value:
   init)
∈ B
15. [] = nth_tl(||v||;ys) ∈ (A List)
⊢ let h,t = Ax 
  in <F[u;h;z1], t> ∈ B × (A List)
Latex:
Latex:
1.  A  :  Type
2.  B  :  Type
3.  init  :  B
4.  F  :  A  {}\mrightarrow{}  A  {}\mrightarrow{}  B  {}\mrightarrow{}  B
5.  xs  :  A  List
6.  u  :  A
7.  v  :  A  List
8.  \mforall{}ys:A  List
          ((||v||  \mleq{}  ||ys||)
          {}\mRightarrow{}  (rec-case(v)  of
                  []  =>  <init,  ys>
                  x::xs'  =>
                    p.let  a,ys  =  p 
                        in  let  h,t  =  ys 
                              in  <F[x;h;a],  t>
                =  <accumulate  (with  value  a  and  list  item  p):
                        let  x,x'  =  p 
                        in  F[x;x';a]
                      over  list:
                          zip(rev(v);firstn(||v||;ys))
                      with  starting  value:
                        init)
                    ,  nth\_tl(||v||;ys)
                    >))
9.  ys  :  A  List
10.  (||v||  +  1)  \mleq{}  ||ys||
11.  rec-case(v)  of
        []  =>  <init,  ys>
        x::xs'  =>
          p.let  a,ys  =  p 
              in  let  h,t  =  ys 
                    in  <F[x;h;a],  t>
=  <accumulate  (with  value  a  and  list  item  p):
        let  x,x'  =  p 
        in  F[x;x';a]
      over  list:
          zip(rev(v);firstn(||v||;ys))
      with  starting  value:
        init)
    ,  nth\_tl(||v||;ys)
    >
12.  0  <  ||v||  +  1
13.  z1  :  B
14.  <z1,  []>
=  <accumulate  (with  value  a  and  list  item  p):
        let  x,x'  =  p 
        in  F[x;x';a]
      over  list:
          zip(rev(v);firstn(||v||;ys))
      with  starting  value:
        init)
    ,  nth\_tl(||v||;ys)
    >
\mvdash{}  let  h,t  =  Ax 
    in  <F[u;h;z1],  t>  \mmember{}  B  \mtimes{}  (A  List)
By
Latex:
((EqHD  (-1)  THENA  Auto)  THEN  All  Reduce)
Home
Index