Nuprl Lemma : bag-mapfilter-mapfilter

[A,B,C:Type]. ∀[b:bag(A)]. ∀[P:A ⟶ 𝔹]. ∀[f:{x:A| ↑P[x]}  ⟶ B]. ∀[Q:B ⟶ 𝔹]. ∀[g:{x:B| ↑Q[x]}  ⟶ C].
  (bag-mapfilter(g;Q;bag-mapfilter(f;P;b)) bag-mapfilter(g f;λx.(P[x] ∧b Q[f[x]]);b) ∈ bag(C))


Proof




Definitions occuring in Statement :  bag-mapfilter: bag-mapfilter(f;P;bs) bag: bag(T) compose: g band: p ∧b q assert: b bool: 𝔹 uall: [x:A]. B[x] so_apply: x[s] set: {x:A| B[x]}  lambda: λx.A[x] function: x:A ⟶ B[x] universe: Type equal: t ∈ T
Definitions unfolded in proof :  prop: so_apply: x[s] bag-mapfilter: bag-mapfilter(f;P;bs) member: t ∈ T uall: [x:A]. B[x] so_lambda: λ2x.t[x] true: True false: False assert: b bnot: ¬bb guard: {T} sq_type: SQType(T) or: P ∨ Q exists: x:A. B[x] bfalse: ff ifthenelse: if then else fi  band: p ∧b q uimplies: supposing a and: P ∧ Q uiff: uiff(P;Q) btrue: tt it: unit: Unit bool: 𝔹 implies:  Q all: x:A. B[x] compose: g rev_implies:  Q iff: ⇐⇒ Q subtype_rel: A ⊆B squash: T top: Top decidable: Dec(P) not: ¬A
Lemmas referenced :  bag_wf bool_wf assert_wf istype-universe bag-filter_wf bag-map_wf bfalse_wf assert-bnot bool_subtype_base subtype_base_sq bool_cases_sqequal eqff_to_assert eqtt_to_assert iff_weakening_equal subtype_rel_self bag-filter-map2 true_wf squash_wf equal_wf istype-void bag-map-map decidable__assert istype-assert iff_imp_equal_bool btrue_wf istype-true bag-filter-filter2 subtype_rel_sets subtype_rel_bag
Rules used in proof :  universeEquality inhabitedIsType because_Cache axiomEquality isect_memberEquality_alt applyEquality universeIsType hypothesisEquality thin isectElimination sqequalHypSubstitution extract_by_obid setIsType functionIsType hypothesis sqequalRule cut introduction isect_memberFormation_alt sqequalReflexivity computationStep sqequalTransitivity sqequalSubstitution closedConclusion setEquality natural_numberEquality voidElimination independent_functionElimination cumulativity instantiate dependent_functionElimination promote_hyp equalityIsType1 dependent_pairFormation_alt dependent_set_memberEquality_alt rename setElimination independent_isectElimination productElimination equalitySymmetry equalityTransitivity equalityElimination unionElimination lambdaFormation_alt lambdaEquality_alt baseClosed imageMemberEquality imageElimination independent_pairFormation applyLambdaEquality hyp_replacement

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{}[Q:B  {}\mrightarrow{}  \mBbbB{}].
\mforall{}[g:\{x:B|  \muparrow{}Q[x]\}    {}\mrightarrow{}  C].
    (bag-mapfilter(g;Q;bag-mapfilter(f;P;b))  =  bag-mapfilter(g  o  f;\mlambda{}x.(P[x]  \mwedge{}\msubb{}  Q[f[x]]);b))



Date html generated: 2020_05_20-AM-08_01_36
Last ObjectModification: 2020_01_24-PM-06_25_28

Theory : bags


Home Index