Step * 1 1 1 2 of Lemma bag-bind-assoc


1. Type
2. Type
3. Type
4. A ⟶ bag(B)
5. B ⟶ bag(C)
6. A@i
7. List@i
8. bag-union(bag-map(g;bag-union(bag-map(f;v)))) bag-union(bag-map(λa.bag-union(bag-map(g;f a));v)) ∈ bag(C)
⊢ bag-union(bag-map(g;bag-union(bag-map(f;[u v]))))
bag-union(bag-map(λa.bag-union(bag-map(g;f a));[u v]))
∈ bag(C)
BY
(RepUR ``bag-union bag-map concat`` THEN Fold `concat` THEN Folds ``bag-union`` 0) }

1
1. Type
2. Type
3. Type
4. A ⟶ bag(B)
5. B ⟶ bag(C)
6. A@i
7. List@i
8. bag-union(bag-map(g;bag-union(bag-map(f;v)))) bag-union(bag-map(λa.bag-union(bag-map(g;f a));v)) ∈ bag(C)
⊢ bag-union(map(g;(f u) bag-union(map(f;v))))
(bag-union(map(g;f u)) bag-union(map(λa.bag-union(map(g;f a));v)))
∈ bag(C)


Latex:


Latex:

1.  A  :  Type
2.  B  :  Type
3.  C  :  Type
4.  f  :  A  {}\mrightarrow{}  bag(B)
5.  g  :  B  {}\mrightarrow{}  bag(C)
6.  u  :  A@i
7.  v  :  A  List@i
8.  bag-union(bag-map(g;bag-union(bag-map(f;v))))
=  bag-union(bag-map(\mlambda{}a.bag-union(bag-map(g;f  a));v))
\mvdash{}  bag-union(bag-map(g;bag-union(bag-map(f;[u  /  v]))))
=  bag-union(bag-map(\mlambda{}a.bag-union(bag-map(g;f  a));[u  /  v]))


By


Latex:
(RepUR  ``bag-union  bag-map  concat``  0  THEN  Fold  `concat`  0  THEN  Folds  ``bag-union``  0)




Home Index