Step
*
of Lemma
bag-mapfilter-map
ā[A,B,C:Type]. ā[b:bag(A)]. ā[P:B ā¶ š¹]. ā[f:{x:B| āP[x]} ā¶ C]. ā[g:A ā¶ B].
(bag-mapfilter(f;P;bag-map(g;b)) = bag-mapfilter(f o g;P o g;b) ā bag(C))
BY
{ (Auto
THEN RepUR ``bag-mapfilter`` 0
THEN (RWO "bag-filter-map2" 0
THENA (Try (Complete (Auto))
THEN Try (Fold `member` 0)
THEN Using [`A',ā{x:A| ā(P (g x))} ā;`B',āCā] (BLemma `bag-map_wf`)ā
THEN Try (Complete (Auto))
THEN Unfold `compose` 0
THEN (MemCD THENA Auto)
THEN D (-1)
THEN Auto)
)
THEN (RWO "bag-map-map" 0 THENA (Auto THEN DoSubsume THEN Auto))
THEN Try (Fold `member` 0)
THEN Using [`A',ā{x:A| ā(P (g x))} ā;`B',āCā] (BLemma `bag-map_wf`)ā
THEN Try (Complete (Auto))
THEN Unfold `compose` 0
THEN (MemCD THENA Auto)
THEN D (-1)
THEN Auto) }
Latex:
Latex:
\mforall{}[A,B,C:Type]. \mforall{}[b:bag(A)]. \mforall{}[P:B {}\mrightarrow{} \mBbbB{}]. \mforall{}[f:\{x:B| \muparrow{}P[x]\} {}\mrightarrow{} C]. \mforall{}[g:A {}\mrightarrow{} B].
(bag-mapfilter(f;P;bag-map(g;b)) = bag-mapfilter(f o g;P o g;b))
By
Latex:
(Auto
THEN RepUR ``bag-mapfilter`` 0
THEN (RWO "bag-filter-map2" 0
THENA (Try (Complete (Auto))
THEN Try (Fold `member` 0)
THEN Using [`A',\mkleeneopen{}\{x:A| \muparrow{}(P (g x))\} \mkleeneclose{};`B',\mkleeneopen{}C\mkleeneclose{}] (BLemma `bag-map\_wf`)\mcdot{}
THEN Try (Complete (Auto))
THEN Unfold `compose` 0
THEN (MemCD THENA Auto)
THEN D (-1)
THEN Auto)
)
THEN (RWO "bag-map-map" 0 THENA (Auto THEN DoSubsume THEN Auto))
THEN Try (Fold `member` 0)
THEN Using [`A',\mkleeneopen{}\{x:A| \muparrow{}(P (g x))\} \mkleeneclose{};`B',\mkleeneopen{}C\mkleeneclose{}] (BLemma `bag-map\_wf`)\mcdot{}
THEN Try (Complete (Auto))
THEN Unfold `compose` 0
THEN (MemCD THENA Auto)
THEN D (-1)
THEN Auto)
Home
Index