Step * of Lemma filter-map

[f,Q,L:Top].  (filter(Q;map(f;L)) map(f;filter(Q f;L)))
BY
(RepUR ``filter map reduce`` 0
   THEN MutualFixpointInduction1 `L'
   THEN Reduce 0
   THEN RW (SubC (TryC RecUnfoldTopAbC)) 0
   THEN RW (AddrC [2;1] (RecUnfoldTopAbC)) 0
   THEN RW (SubC (LiftC true)) 0
   THEN UseCbvSqle
   THEN RW (SubC (LiftC true)) 0
   THEN HVimplies2 [1]
   THEN Try (((RWO "-1" THENA MemTop)
              THEN UseCbvSqle
              THEN HasValueD (-1)
              THEN HVimplies2 [1;1]
              THEN (RWO "-1" THENA Auto)
              THEN Strictness))) }

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

2
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 


Latex:


Latex:
\mforall{}[f,Q,L:Top].    (filter(Q;map(f;L))  \msim{}  map(f;filter(Q  o  f;L)))


By


Latex:
(RepUR  ``filter  map  reduce``  0
  THEN  MutualFixpointInduction1  `L'
  THEN  Reduce  0
  THEN  RW  (SubC  (TryC  RecUnfoldTopAbC))  0
  THEN  RW  (AddrC  [2;1]  (RecUnfoldTopAbC))  0
  THEN  RW  (SubC  (LiftC  true))  0
  THEN  UseCbvSqle
  THEN  RW  (SubC  (LiftC  true))  0
  THEN  HVimplies2  0  [1]
  THEN  Try  (((RWO  "-1"  0  THENA  MemTop)
                        THEN  UseCbvSqle
                        THEN  HasValueD  (-1)
                        THEN  HVimplies2  0  [1;1]
                        THEN  (RWO  "-1"  0  THENA  Auto)
                        THEN  Strictness)))




Home Index