Step
*
1
1
1
1
of Lemma
bag-bind-assoc
1. A : Type
2. B : Type
3. C : Type
4. f : A ⟶ bag(B)
5. g : B ⟶ bag(C)
⊢ bag-union(bag-map(g;bag-union(bag-map(f;[])))) = bag-union(bag-map(λa.bag-union(bag-map(g;f a));[])) ∈ bag(C)
BY
{ (RepUR ``bag-union bag-map`` 0 THEN Fold `empty-bag` 0 THEN Auto) }
Latex:
Latex:
1.  A  :  Type
2.  B  :  Type
3.  C  :  Type
4.  f  :  A  {}\mrightarrow{}  bag(B)
5.  g  :  B  {}\mrightarrow{}  bag(C)
\mvdash{}  bag-union(bag-map(g;bag-union(bag-map(f;[]))))
=  bag-union(bag-map(\mlambda{}a.bag-union(bag-map(g;f  a));[]))
By
Latex:
(RepUR  ``bag-union  bag-map``  0  THEN  Fold  `empty-bag`  0  THEN  Auto)
Home
Index