Nuprl Lemma : bag-subtract-size
∀[T:Type]. ∀[eq:EqDecider(T)]. ∀[as,bs:bag(T)].
  #(bag-subtract(eq;bs;as)) = (#(bs) - #(as)) ∈ ℤ supposing sub-bag(T;as;bs)
Proof
Definitions occuring in Statement : 
bag-subtract: bag-subtract(eq;bs;as)
, 
sub-bag: sub-bag(T;as;bs)
, 
bag-size: #(bs)
, 
bag: bag(T)
, 
deq: EqDecider(T)
, 
uimplies: b supposing a
, 
uall: ∀[x:A]. B[x]
, 
subtract: n - m
, 
int: ℤ
, 
universe: Type
, 
equal: s = t ∈ T
Definitions unfolded in proof : 
uall: ∀[x:A]. B[x]
, 
member: t ∈ T
, 
uimplies: b supposing a
, 
sub-bag: sub-bag(T;as;bs)
, 
exists: ∃x:A. B[x]
, 
prop: ℙ
, 
subtype_rel: A ⊆r B
, 
nat: ℕ
, 
true: True
, 
top: Top
, 
all: ∀x:A. B[x]
, 
decidable: Dec(P)
, 
or: P ∨ Q
, 
satisfiable_int_formula: satisfiable_int_formula(fmla)
, 
false: False
, 
implies: P 
⇒ Q
, 
not: ¬A
, 
squash: ↓T
, 
guard: {T}
, 
iff: P 
⇐⇒ Q
, 
and: P ∧ Q
, 
rev_implies: P 
⇐ Q
Lemmas referenced : 
equal_wf, 
bag-size_wf, 
bag-subtract_wf, 
nat_wf, 
subtract_wf, 
sub-bag_wf, 
bag_wf, 
deq_wf, 
bag-size-append, 
decidable__equal_int, 
satisfiable-full-omega-tt, 
intformnot_wf, 
intformeq_wf, 
itermVar_wf, 
itermSubtract_wf, 
itermAdd_wf, 
int_formula_prop_not_lemma, 
int_formula_prop_eq_lemma, 
int_term_value_var_lemma, 
int_term_value_subtract_lemma, 
int_term_value_add_lemma, 
int_formula_prop_wf, 
squash_wf, 
true_wf, 
bag-subtract-append, 
iff_weakening_equal
Rules used in proof : 
sqequalSubstitution, 
sqequalTransitivity, 
computationStep, 
sqequalReflexivity, 
isect_memberFormation, 
introduction, 
cut, 
sqequalHypSubstitution, 
productElimination, 
thin, 
hypothesis, 
hyp_replacement, 
equalitySymmetry, 
applyLambdaEquality, 
extract_by_obid, 
isectElimination, 
intEquality, 
cumulativity, 
hypothesisEquality, 
applyEquality, 
lambdaEquality, 
setElimination, 
rename, 
sqequalRule, 
because_Cache, 
isect_memberEquality, 
axiomEquality, 
equalityTransitivity, 
universeEquality, 
natural_numberEquality, 
voidElimination, 
voidEquality, 
dependent_functionElimination, 
unionElimination, 
independent_isectElimination, 
dependent_pairFormation, 
int_eqEquality, 
computeAll, 
imageElimination, 
imageMemberEquality, 
baseClosed, 
independent_functionElimination
Latex:
\mforall{}[T:Type].  \mforall{}[eq:EqDecider(T)].  \mforall{}[as,bs:bag(T)].
    \#(bag-subtract(eq;bs;as))  =  (\#(bs)  -  \#(as))  supposing  sub-bag(T;as;bs)
Date html generated:
2018_05_21-PM-09_49_27
Last ObjectModification:
2017_07_26-PM-06_31_05
Theory : bags_2
Home
Index