Nuprl Lemma : sum-as-bag-accum
∀[n:ℕ]. ∀[f:ℕn ⟶ ℤ].  (Σ(f[x] | x < n) ~ bag-accum(x,y.x + y;0;[x∈bag-map(λx.f[x];upto(n))|¬b(x =z 0)]))
Proof
Definitions occuring in Statement : 
bag-accum: bag-accum(v,x.f[v; x];init;bs)
, 
bag-filter: [x∈b|p[x]]
, 
bag-map: bag-map(f;bs)
, 
upto: upto(n)
, 
sum: Σ(f[x] | x < k)
, 
int_seg: {i..j-}
, 
nat: ℕ
, 
bnot: ¬bb
, 
eq_int: (i =z j)
, 
uall: ∀[x:A]. B[x]
, 
so_apply: x[s]
, 
lambda: λx.A[x]
, 
function: x:A ⟶ B[x]
, 
add: n + m
, 
natural_number: $n
, 
int: ℤ
, 
sqequal: s ~ t
Definitions unfolded in proof : 
uall: ∀[x:A]. B[x]
, 
member: t ∈ T
, 
uimplies: b supposing a
, 
so_lambda: λ2x.t[x]
, 
so_apply: x[s]
, 
nat: ℕ
, 
bag-map: bag-map(f;bs)
, 
bag-filter: [x∈b|p[x]]
, 
bag-accum: bag-accum(v,x.f[v; x];init;bs)
, 
all: ∀x:A. B[x]
, 
prop: ℙ
, 
so_lambda: λ2x y.t[x; y]
, 
so_apply: x[s1;s2]
, 
sq_type: SQType(T)
, 
implies: P 
⇒ Q
, 
guard: {T}
Lemmas referenced : 
subtype_base_sq, 
int_subtype_base, 
sum-as-accum-filter, 
int_seg_wf, 
list_accum_wf, 
filter_wf5, 
map_wf, 
upto_wf, 
l_member_wf, 
bnot_wf, 
eq_int_wf, 
nat_wf
Rules used in proof : 
sqequalSubstitution, 
sqequalTransitivity, 
computationStep, 
sqequalReflexivity, 
isect_memberFormation, 
introduction, 
cut, 
thin, 
instantiate, 
lemma_by_obid, 
sqequalHypSubstitution, 
isectElimination, 
because_Cache, 
independent_isectElimination, 
hypothesis, 
sqequalRule, 
hypothesisEquality, 
lambdaEquality, 
applyEquality, 
natural_numberEquality, 
setElimination, 
rename, 
intEquality, 
lambdaFormation, 
setEquality, 
addEquality, 
dependent_functionElimination, 
equalityTransitivity, 
equalitySymmetry, 
independent_functionElimination, 
sqequalAxiom, 
functionEquality, 
isect_memberEquality
Latex:
\mforall{}[n:\mBbbN{}].  \mforall{}[f:\mBbbN{}n  {}\mrightarrow{}  \mBbbZ{}].
    (\mSigma{}(f[x]  |  x  <  n)  \msim{}  bag-accum(x,y.x  +  y;0;[x\mmember{}bag-map(\mlambda{}x.f[x];upto(n))|\mneg{}\msubb{}(x  =\msubz{}  0)]))
Date html generated:
2016_05_15-PM-02_30_14
Last ObjectModification:
2015_12_27-AM-09_48_54
Theory : bags
Home
Index