Step
*
of Lemma
bag-combine-mapfilter
∀[A,B,C:Type]. ∀[b:bag(A)]. ∀[P:A ⟶ 𝔹]. ∀[f:{x:A| ↑P[x]}  ⟶ B]. ∀[g:B ⟶ bag(C)].
  (⋃x∈bag-mapfilter(f;P;b).g[x] = ⋃x∈b.if P[x] then g[f[x]] else {} fi  ∈ bag(C))
BY
{ (Auto
   THEN RepUR ``bag-mapfilter`` 0
   THEN (RWO "bag-combine-map" 0 THENA Auto)
   THEN (RWO "bag-combine-filter" 0 THENA Auto)
   THEN RepUR ``so_apply`` 0
   THEN Auto) }
Latex:
Latex:
\mforall{}[A,B,C:Type].  \mforall{}[b:bag(A)].  \mforall{}[P:A  {}\mrightarrow{}  \mBbbB{}].  \mforall{}[f:\{x:A|  \muparrow{}P[x]\}    {}\mrightarrow{}  B].  \mforall{}[g:B  {}\mrightarrow{}  bag(C)].
    (\mcup{}x\mmember{}bag-mapfilter(f;P;b).g[x]  =  \mcup{}x\mmember{}b.if  P[x]  then  g[f[x]]  else  \{\}  fi  )
By
Latex:
(Auto
  THEN  RepUR  ``bag-mapfilter``  0
  THEN  (RWO  "bag-combine-map"  0  THENA  Auto)
  THEN  (RWO  "bag-combine-filter"  0  THENA  Auto)
  THEN  RepUR  ``so\_apply``  0
  THEN  Auto)
Home
Index