Step
*
1
2
of Lemma
bag-bind-filter
1. A : Type
2. B : Type
3. p : A ⟶ 𝔹
4. f : {a:A| ↑p[a]}  ⟶ bag(B)
5. b1 : A List
6. b2 : A List
7. permutation(A;b1;b2)
⊢ bag-union(bag-map(λa.if p[a] then f[a] else {} fi b1))
= bag-union(bag-map(λa.if p[a] then f[a] else {} fi b2))
∈ bag(B)
BY
{ (Assert b1 = b2 ∈ bag(A) BY
         (EqTypeCD THEN Auto))⋅ }
1
1. A : Type
2. B : Type
3. p : A ⟶ 𝔹
4. f : {a:A| ↑p[a]}  ⟶ bag(B)
5. b1 : A List
6. b2 : A List
7. permutation(A;b1;b2)
8. b1 = b2 ∈ bag(A)
⊢ bag-union(bag-map(λa.if p[a] then f[a] else {} fi b1))
= bag-union(bag-map(λa.if p[a] then f[a] else {} fi b2))
∈ bag(B)
Latex:
Latex:
1.  A  :  Type
2.  B  :  Type
3.  p  :  A  {}\mrightarrow{}  \mBbbB{}
4.  f  :  \{a:A|  \muparrow{}p[a]\}    {}\mrightarrow{}  bag(B)
5.  b1  :  A  List
6.  b2  :  A  List
7.  permutation(A;b1;b2)
\mvdash{}  bag-union(bag-map(\mlambda{}a.if  p[a]  then  f[a]  else  \{\}  fi  ;b1))
=  bag-union(bag-map(\mlambda{}a.if  p[a]  then  f[a]  else  \{\}  fi  ;b2))
By
Latex:
(Assert  b1  =  b2  BY
              (EqTypeCD  THEN  Auto))\mcdot{}
Home
Index