Nuprl Lemma : bag-combine-mapfilter
∀[A,B,C:Type]. ∀[b:bag(A)]. ∀[P:A ⟶ 𝔹]. ∀[f:{x:A| ↑P[x]}  ⟶ B]. ∀[g:B ⟶ bag(C)].
  (⋃x∈bag-mapfilter(f;P;b).g[x] = ⋃x∈b.if P[x] then g[f[x]] else {} fi  ∈ bag(C))
Proof
Definitions occuring in Statement : 
bag-combine: ⋃x∈bs.f[x]
, 
bag-mapfilter: bag-mapfilter(f;P;bs)
, 
empty-bag: {}
, 
bag: bag(T)
, 
assert: ↑b
, 
ifthenelse: if b then t else f fi 
, 
bool: 𝔹
, 
uall: ∀[x:A]. B[x]
, 
so_apply: x[s]
, 
set: {x:A| B[x]} 
, 
function: x:A ⟶ B[x]
, 
universe: Type
, 
equal: s = t ∈ T
Definitions unfolded in proof : 
uall: ∀[x:A]. B[x]
, 
member: t ∈ T
, 
bag-mapfilter: bag-mapfilter(f;P;bs)
, 
squash: ↓T
, 
prop: ℙ
, 
so_lambda: λ2x.t[x]
, 
so_apply: x[s]
, 
all: ∀x:A. B[x]
, 
implies: P 
⇒ Q
, 
bool: 𝔹
, 
unit: Unit
, 
it: ⋅
, 
btrue: tt
, 
ifthenelse: if b then t else f fi 
, 
uiff: uiff(P;Q)
, 
and: P ∧ Q
, 
uimplies: b supposing a
, 
bfalse: ff
, 
exists: ∃x:A. B[x]
, 
or: P ∨ Q
, 
sq_type: SQType(T)
, 
guard: {T}
, 
bnot: ¬bb
, 
assert: ↑b
, 
false: False
, 
true: True
, 
subtype_rel: A ⊆r B
, 
iff: P 
⇐⇒ Q
, 
rev_implies: P 
⇐ Q
Lemmas referenced : 
equal_wf, 
squash_wf, 
true_wf, 
bag_wf, 
bag-combine-map, 
assert_wf, 
bag-filter_wf, 
bag-combine_wf, 
bool_wf, 
eqtt_to_assert, 
eqff_to_assert, 
bool_cases_sqequal, 
subtype_base_sq, 
bool_subtype_base, 
assert-bnot, 
empty-bag_wf, 
iff_weakening_equal, 
bag-combine-filter
Rules used in proof : 
sqequalSubstitution, 
sqequalTransitivity, 
computationStep, 
sqequalReflexivity, 
isect_memberFormation, 
introduction, 
cut, 
applyEquality, 
thin, 
lambdaEquality, 
sqequalHypSubstitution, 
imageElimination, 
extract_by_obid, 
isectElimination, 
hypothesisEquality, 
equalityTransitivity, 
hypothesis, 
equalitySymmetry, 
because_Cache, 
setEquality, 
cumulativity, 
functionExtensionality, 
sqequalRule, 
lambdaFormation, 
unionElimination, 
equalityElimination, 
productElimination, 
independent_isectElimination, 
dependent_set_memberEquality, 
dependent_pairFormation, 
promote_hyp, 
dependent_functionElimination, 
instantiate, 
independent_functionElimination, 
voidElimination, 
natural_numberEquality, 
imageMemberEquality, 
baseClosed, 
universeEquality, 
setElimination, 
rename, 
functionEquality, 
isect_memberEquality, 
axiomEquality
Latex:
\mforall{}[A,B,C:Type].  \mforall{}[b:bag(A)].  \mforall{}[P:A  {}\mrightarrow{}  \mBbbB{}].  \mforall{}[f:\{x:A|  \muparrow{}P[x]\}    {}\mrightarrow{}  B].  \mforall{}[g:B  {}\mrightarrow{}  bag(C)].
    (\mcup{}x\mmember{}bag-mapfilter(f;P;b).g[x]  =  \mcup{}x\mmember{}b.if  P[x]  then  g[f[x]]  else  \{\}  fi  )
Date html generated:
2017_10_01-AM-08_47_43
Last ObjectModification:
2017_07_26-PM-04_32_07
Theory : bags
Home
Index