Step * of Lemma mapfilter-as-accum

[A:Type]. ∀[L:A List]. ∀[p:A ⟶ 𝔹]. ∀[f:Top].
  (mapfilter(f;p;L) accumulate (with value and list item x):
                       if p[x] then [f[x]] else fi 
                      over list:
                        L
                      with starting value:
                       []))
BY
(Auto THEN (InstLemma `mapfilter-as-accum-aux` [⌜A⌝;⌜p⌝;⌜L⌝;⌜[]⌝;⌜f⌝]⋅ THENA Auto) THEN Reduce (-1) THEN Auto) }


Latex:


Latex:
\mforall{}[A:Type].  \mforall{}[L:A  List].  \mforall{}[p:A  {}\mrightarrow{}  \mBbbB{}].  \mforall{}[f:Top].
    (mapfilter(f;p;L)  \msim{}  accumulate  (with  value  a  and  list  item  x):
                                              if  p[x]  then  a  @  [f[x]]  else  a  fi 
                                            over  list:
                                                L
                                            with  starting  value:
                                              []))


By


Latex:
(Auto
  THEN  (InstLemma  `mapfilter-as-accum-aux`  [\mkleeneopen{}A\mkleeneclose{};\mkleeneopen{}p\mkleeneclose{};\mkleeneopen{}L\mkleeneclose{};\mkleeneopen{}[]\mkleeneclose{};\mkleeneopen{}f\mkleeneclose{}]\mcdot{}  THENA  Auto)
  THEN  Reduce  (-1)
  THEN  Auto)




Home Index