Nuprl Lemma : bag-count-single
∀[T:Type]. ∀[eq:EqDecider(T)]. ∀[x,y:T].  ((#x in [y]) = if eq x y then 1 else 0 fi  ∈ ℤ)
Proof
Definitions occuring in Statement : 
bag-count: (#x in bs)
, 
cons: [a / b]
, 
nil: []
, 
deq: EqDecider(T)
, 
ifthenelse: if b then t else f fi 
, 
uall: ∀[x:A]. B[x]
, 
apply: f a
, 
natural_number: $n
, 
int: ℤ
, 
universe: Type
, 
equal: s = t ∈ T
Definitions unfolded in proof : 
uall: ∀[x:A]. B[x]
, 
member: t ∈ T
, 
subtype_rel: A ⊆r B
, 
uimplies: b supposing a
, 
bag-filter: [x∈b|p[x]]
, 
all: ∀x:A. B[x]
, 
top: Top
, 
deq: EqDecider(T)
, 
implies: P 
⇒ Q
, 
bool: 𝔹
, 
unit: Unit
, 
it: ⋅
, 
btrue: tt
, 
uiff: uiff(P;Q)
, 
and: P ∧ Q
, 
eqof: eqof(d)
, 
ifthenelse: if b then t else f fi 
, 
bag-size: #(bs)
, 
length: ||as||
, 
list_ind: list_ind, 
cons: [a / b]
, 
nil: []
, 
bfalse: ff
, 
exists: ∃x:A. B[x]
, 
prop: ℙ
, 
or: P ∨ Q
, 
sq_type: SQType(T)
, 
guard: {T}
, 
bnot: ¬bb
, 
assert: ↑b
, 
false: False
, 
not: ¬A
Lemmas referenced : 
bag-count-sqequal, 
cons_wf, 
nil_wf, 
list-subtype-bag, 
filter_cons_lemma, 
filter_nil_lemma, 
bool_wf, 
eqtt_to_assert, 
safe-assert-deq, 
eqff_to_assert, 
equal_wf, 
bool_cases_sqequal, 
subtype_base_sq, 
bool_subtype_base, 
assert-bnot, 
deq_wf
Rules used in proof : 
sqequalSubstitution, 
sqequalTransitivity, 
computationStep, 
sqequalReflexivity, 
isect_memberFormation, 
introduction, 
cut, 
sqequalRule, 
extract_by_obid, 
sqequalHypSubstitution, 
isectElimination, 
thin, 
because_Cache, 
cumulativity, 
hypothesisEquality, 
hypothesis, 
applyEquality, 
independent_isectElimination, 
lambdaEquality, 
dependent_functionElimination, 
isect_memberEquality, 
voidElimination, 
voidEquality, 
setElimination, 
rename, 
lambdaFormation, 
unionElimination, 
equalityElimination, 
equalityTransitivity, 
equalitySymmetry, 
productElimination, 
natural_numberEquality, 
dependent_pairFormation, 
promote_hyp, 
instantiate, 
independent_functionElimination, 
axiomEquality, 
universeEquality
Latex:
\mforall{}[T:Type].  \mforall{}[eq:EqDecider(T)].  \mforall{}[x,y:T].    ((\#x  in  [y])  =  if  eq  x  y  then  1  else  0  fi  )
Date html generated:
2018_05_21-PM-09_45_50
Last ObjectModification:
2017_07_26-PM-06_29_53
Theory : bags_2
Home
Index