Step * 2 of Lemma filter-map


1. : ℤ
2. 0 < j
3. ∀Q,f,L:Base.
     (rec-case(λlist_ind,L. eval in
                            if is pair then let a,as' 
                                                in if (f a) then [a (list_ind as')] else list_ind as' fi 
                            otherwise if Ax then [] otherwise ⊥^j 
               ⊥ 
               L) of
      [] => []
      h::t =>
       r.[f r] ≤ rec-case(rec-case(L) of
                              [] => []
                              h::t =>
                               r.[f r]) of
                     [] => []
                     a::as' =>
                      r.if then [a r] else fi )
4. Base@i
5. Base@i
6. Base@i
7. 0 ≤ 0@i
8. ~ <fst(L), snd(L)>
⊢ eval if (f (fst(L)))
  then [fst(L) 
        list_ind,L. eval in
                      if is pair then let a,as' 
                                          in if (f a) then [a (list_ind as')] else list_ind as' fi 
                      otherwise if Ax then [] otherwise ⊥^j 
         ⊥ 
         (snd(L)))]
  else λlist_ind,L. eval in
                    if is pair then let a,as' 
                                        in if (f a) then [a (list_ind as')] else list_ind as' fi 
                    otherwise if Ax then [] otherwise ⊥^j 
       ⊥ 
       (snd(L))
  fi  in
  if is pair then let h,t 
                      in [f rec-case(t) of [] => [] h::t => r.[f r]] otherwise if Ax then [] otherwise ⊥ 
  ≤ if (f (fst(L)))
  then [f (fst(L)) 
        rec-case(rec-case(snd(L)) of
                 [] => []
                 h::t =>
                  r.[f r]) of
        [] => []
        h::t =>
         r.if then [h r] else fi ]
  else rec-case(rec-case(snd(L)) of
                [] => []
                h::t =>
                 r.[f r]) of
       [] => []
       h::t =>
        r.if then [h r] else fi 
  fi 
BY
(RW (AddrC [1] (LiftC true)) THEN Reduce THEN Repeat ((SqLeCD THEN Try (BackThruSomeHyp)))) }

1
1. : ℤ
2. 0 < j
3. ∀Q,f,L:Base.
     (rec-case(λlist_ind,L. eval in
                            if is pair then let a,as' 
                                                in if (f a) then [a (list_ind as')] else list_ind as' fi 
                            otherwise if Ax then [] otherwise ⊥^j 
               ⊥ 
               L) of
      [] => []
      h::t =>
       r.[f r] ≤ rec-case(rec-case(L) of
                              [] => []
                              h::t =>
                               r.[f r]) of
                     [] => []
                     a::as' =>
                      r.if then [a r] else fi )
4. Base@i
5. Base@i
6. Base@i
7. 0 ≤ 0@i
8. ~ <fst(L), snd(L)>
⊢ eval = λlist_ind,L. eval in
                        if is pair then let a,as' 
                                            in if (f a) then [a (list_ind as')] else list_ind as' fi 
                        otherwise if Ax then [] otherwise ⊥^j 
           ⊥ 
           (snd(L)) in
  if is pair then let h,t 
                      in [f rec-case(t) of [] => [] h::t => r.[f r]] otherwise if Ax then [] otherwise ⊥ 
  ≤ rec-case(rec-case(snd(L)) of
             [] => []
             h::t =>
              r.[f r]) of
    [] => []
    h::t =>
     r.if then [h r] else fi 


Latex:


Latex:

1.  j  :  \mBbbZ{}
2.  0  <  j
3.  \mforall{}Q,f,L:Base.
          (rec-case(\mlambda{}list$_{ind}$,L.  eval  v  =  L  in
                                                      if  v  is  a  pair  then  let  a,as'  =  v 
                                                                                              in  if  Q  (f  a)
                                                                                                    then  [a  /  (list$_{ind}$  as')]
                                                                                                    else  list$_{ind}$  as'
                                                                                                    fi    otherwise  if  v  =  Ax  then  []  otherwise  \mbot{}\^{}j  -  1 
                              \mbot{} 
                              L)  of
            []  =>  []
            h::t  =>
              r.[f  h  /  r]  \mleq{}  rec-case(rec-case(L)  of
                                                            []  =>  []
                                                            h::t  =>
                                                              r.[f  h  /  r])  of
                                          []  =>  []
                                          a::as'  =>
                                            r.if  Q  a  then  [a  /  r]  else  r  fi  )
4.  Q  :  Base@i
5.  f  :  Base@i
6.  L  :  Base@i
7.  0  \mleq{}  0@i
8.  L  \msim{}  <fst(L),  snd(L)>
\mvdash{}  eval  v  =  if  Q  (f  (fst(L)))
    then  [fst(L)  / 
                (\mlambda{}list$_{ind}$,L.  eval  v  =  L  in
                                          if  v  is  a  pair  then  let  a,as'  =  v 
                                                                                  in  if  Q  (f  a)  then  [a  /  (list$_{ind}$  a\000Cs')]  else  list$_{ind}$  as'  fi 
                                          otherwise  if  v  =  Ax  then  []  otherwise  \mbot{}\^{}j  -  1 
                  \mbot{} 
                  (snd(L)))]
    else  \mlambda{}list$_{ind}$,L.  eval  v  =  L  in
                                      if  v  is  a  pair  then  let  a,as'  =  v 
                                                                              in  if  Q  (f  a)  then  [a  /  (list$_{ind}$  as'\000C)]  else  list$_{ind}$  as'  fi 
                                      otherwise  if  v  =  Ax  then  []  otherwise  \mbot{}\^{}j  -  1 
              \mbot{} 
              (snd(L))
    fi    in
    if  v  is  a  pair  then  let  h,t  =  v 
                                            in  [f  h  /  rec-case(t)  of  []  =>  []  |  h::t  =>  r.[f  h  /  r]]
    otherwise  if  v  =  Ax  then  []  otherwise  \mbot{}  \mleq{}  if  Q  (f  (fst(L)))
    then  [f  (fst(L))  / 
                rec-case(rec-case(snd(L))  of
                                  []  =>  []
                                  h::t  =>
                                    r.[f  h  /  r])  of
                []  =>  []
                h::t  =>
                  r.if  Q  h  then  [h  /  r]  else  r  fi  ]
    else  rec-case(rec-case(snd(L))  of
                                []  =>  []
                                h::t  =>
                                  r.[f  h  /  r])  of
              []  =>  []
              h::t  =>
                r.if  Q  h  then  [h  /  r]  else  r  fi 
    fi 


By


Latex:
(RW  (AddrC  [1]  (LiftC  true))  0  THEN  Reduce  0  THEN  Repeat  ((SqLeCD  THEN  Try  (BackThruSomeHyp))))




Home Index