### Nuprl Lemma : bag-count-rep

`∀[T:Type]. ∀[n:ℕ]. ∀[eq:EqDecider(T)]. ∀[x,y:T].  ((#x in bag-rep(n;y)) = if eq x y then n else 0 fi  ∈ ℤ)`

Proof

Definitions occuring in Statement :  bag-count: `(#x in bs)` bag-rep: `bag-rep(n;x)` deq: `EqDecider(T)` nat: `ℕ` 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` nat: `ℕ` implies: `P `` Q` false: `False` ge: `i ≥ j ` uimplies: `b supposing a` satisfiable_int_formula: `satisfiable_int_formula(fmla)` exists: `∃x:A. B[x]` not: `¬A` all: `∀x:A. B[x]` top: `Top` and: `P ∧ Q` prop: `ℙ` bag-rep: `bag-rep(n;x)` eq_int: `(i =z j)` subtract: `n - m` ifthenelse: `if b then t else f fi ` btrue: `tt` deq: `EqDecider(T)` bool: `𝔹` unit: `Unit` it: `⋅` uiff: `uiff(P;Q)` eqof: `eqof(d)` bfalse: `ff` or: `P ∨ Q` sq_type: `SQType(T)` guard: `{T}` bnot: `¬bb` assert: `↑b` decidable: `Dec(P)` cons-bag: `x.b` bag-count: `(#x in bs)` count: `count(P;L)` nequal: `a ≠ b ∈ T ` subtype_rel: `A ⊆r B` true: `True` squash: `↓T` iff: `P `⇐⇒` Q` rev_implies: `P `` Q`
Lemmas referenced :  nat_properties satisfiable-full-omega-tt intformand_wf intformle_wf itermConstant_wf itermVar_wf intformless_wf int_formula_prop_and_lemma int_formula_prop_le_lemma int_term_value_constant_lemma int_term_value_var_lemma int_formula_prop_less_lemma int_formula_prop_wf ge_wf less_than_wf deq_wf primrec-unroll bool_wf eqtt_to_assert safe-assert-deq bag-count-empty eqff_to_assert equal_wf bool_cases_sqequal subtype_base_sq bool_subtype_base assert-bnot decidable__le subtract_wf intformnot_wf itermSubtract_wf int_formula_prop_not_lemma int_term_value_subtract_lemma eq_int_wf assert_of_eq_int intformeq_wf int_formula_prop_eq_lemma neg_assert_of_eq_int reduce_cons_lemma nat_wf ifthenelse_wf bag-count_wf bag-rep_wf le_wf list-subtype-bag decidable__equal_int itermAdd_wf int_term_value_add_lemma squash_wf true_wf add_functionality_wrt_eq iff_weakening_equal
Rules used in proof :  sqequalSubstitution sqequalTransitivity computationStep sqequalReflexivity isect_memberFormation introduction cut extract_by_obid sqequalHypSubstitution isectElimination thin hypothesisEquality hypothesis setElimination rename intWeakElimination lambdaFormation natural_numberEquality independent_isectElimination dependent_pairFormation lambdaEquality int_eqEquality intEquality dependent_functionElimination isect_memberEquality voidElimination voidEquality sqequalRule independent_pairFormation computeAll independent_functionElimination axiomEquality cumulativity applyEquality unionElimination equalityElimination because_Cache productElimination equalityTransitivity equalitySymmetry promote_hyp instantiate universeEquality dependent_set_memberEquality imageElimination imageMemberEquality baseClosed

Latex:
\mforall{}[T:Type].  \mforall{}[n:\mBbbN{}].  \mforall{}[eq:EqDecider(T)].  \mforall{}[x,y:T].
((\#x  in  bag-rep(n;y))  =  if  eq  x  y  then  n  else  0  fi  )

Date html generated: 2018_05_21-PM-09_46_12
Last ObjectModification: 2017_07_26-PM-06_29_57

Theory : bags_2

Home Index