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


1. Type
2. Type
3. Type
4. A ⟶ B ⟶ bag(C)
5. ba bag(A)
6. B
7. List
8. bag-union(bag-map(λa.bag-union(bag-map(λb.f[a;b];v));ba))
bag-union(bag-map(λb.bag-union(bag-map(λa.f[a;b];ba));v))
∈ bag(C)
9. v ∈ bag(B)
⊢ bag-union(bag-map(λa.bag-union(bag-map(λb.f[a;b];[u v]));ba))
bag-union(bag-map(λb.bag-union(bag-map(λa.f[a;b];ba));[u v]))
∈ bag(C)
BY
(RepUR ``bag-union concat bag-map`` 0
   THEN Folds ``bag-map concat`` 0
   THEN Fold `bag-union` 0
   THEN Fold `bag-append` 0
   THEN RWO "-2<0
   THEN Auto)⋅ }

1
1. Type
2. Type
3. Type
4. A ⟶ B ⟶ bag(C)
5. ba bag(A)
6. B
7. List
8. bag-union(bag-map(λa.bag-union(bag-map(λb.f[a;b];v));ba))
bag-union(bag-map(λb.bag-union(bag-map(λa.f[a;b];ba));v))
∈ bag(C)
9. v ∈ bag(B)
⊢ bag-union(bag-map(λa.(f[a;u] bag-union(bag-map(λb.f[a;b];v)));ba))
(bag-union(bag-map(λa.f[a;u];ba)) bag-union(bag-map(λa.bag-union(bag-map(λb.f[a;b];v));ba)))
∈ bag(C)


Latex:


Latex:

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


By


Latex:
(RepUR  ``bag-union  concat  bag-map``  0
  THEN  Folds  ``bag-map  concat``  0
  THEN  Fold  `bag-union`  0
  THEN  Fold  `bag-append`  0
  THEN  RWO  "-2<"  0
  THEN  Auto)\mcdot{}




Home Index