### Nuprl Lemma : bag-summation-single-non-zero

`∀[T,R:Type]. ∀[eq:EqDecider(T)]. ∀[add:R ⟶ R ⟶ R]. ∀[zero:R]. ∀[b:bag(T)]. ∀[f:T ⟶ R].`
`  ∀z:T. Σ(x∈b). f[x] = Σ(x∈[x∈b|eq x z]). f[x] ∈ R supposing ∀x:T. (x ↓∈ b `` ((x = z ∈ T) ∨ (f[x] = zero ∈ R))) `
`  supposing IsMonoid(R;add;zero) ∧ Comm(R;add)`

Proof

Definitions occuring in Statement :  bag-member: `x ↓∈ bs` bag-summation: `Σ(x∈b). f[x]` bag-filter: `[x∈b|p[x]]` bag: `bag(T)` deq: `EqDecider(T)` comm: `Comm(T;op)` uimplies: `b supposing a` uall: `∀[x:A]. B[x]` so_apply: `x[s]` all: `∀x:A. B[x]` implies: `P `` Q` or: `P ∨ Q` and: `P ∧ Q` apply: `f a` function: `x:A ⟶ B[x]` universe: `Type` equal: `s = t ∈ T` monoid_p: `IsMonoid(T;op;id)`
Definitions unfolded in proof :  uall: `∀[x:A]. B[x]` member: `t ∈ T` uimplies: `b supposing a` all: `∀x:A. B[x]` and: `P ∧ Q` so_lambda: `λ2x.t[x]` deq: `EqDecider(T)` so_apply: `x[s]` cand: `A c∧ B` prop: `ℙ` implies: `P `` Q` or: `P ∨ Q` monoid_p: `IsMonoid(T;op;id)` uiff: `uiff(P;Q)` not: `¬A` false: `False` eqof: `eqof(d)` iff: `P `⇐⇒` Q` rev_implies: `P `` Q` guard: `{T}` ident: `Ident(T;op;id)`
Lemmas referenced :  bag-summation-split equal_wf infix_ap_wf bag-summation_wf assert_wf bag-filter_wf bag-member_wf istype-universe monoid_p_wf comm_wf bag_wf deq_wf bag-summation-is-zero bnot_wf bag-member-filter-set eqof_wf not_wf istype-void iff_transitivity iff_weakening_uiff assert_of_bnot safe-assert-deq
Rules used in proof :  cut introduction extract_by_obid sqequalSubstitution sqequalTransitivity computationStep sqequalReflexivity isect_memberFormation_alt hypothesis sqequalHypSubstitution isectElimination thin hypothesisEquality promote_hyp lambdaFormation_alt productElimination sqequalRule lambdaEquality_alt applyEquality setElimination rename because_Cache inhabitedIsType independent_isectElimination independent_pairFormation equalitySymmetry hyp_replacement applyLambdaEquality equalityTransitivity setEquality setIsType universeIsType functionIsType unionIsType equalityIsType1 dependent_functionElimination isect_memberEquality_alt axiomEquality functionIsTypeImplies productIsType universeEquality independent_functionElimination unionElimination voidElimination

Latex:
\mforall{}[T,R:Type].  \mforall{}[eq:EqDecider(T)].  \mforall{}[add:R  {}\mrightarrow{}  R  {}\mrightarrow{}  R].  \mforall{}[zero:R].  \mforall{}[b:bag(T)].  \mforall{}[f:T  {}\mrightarrow{}  R].
\mforall{}z:T
\mSigma{}(x\mmember{}b).  f[x]  =  \mSigma{}(x\mmember{}[x\mmember{}b|eq  x  z]).  f[x]  supposing  \mforall{}x:T.  (x  \mdownarrow{}\mmember{}  b  {}\mRightarrow{}  ((x  =  z)  \mvee{}  (f[x]  =  zero)))