Nuprl Lemma : count-bag-remove-repeats

[T:Type]. ∀[eq:EqDecider(T)]. ∀[bs:bag(T)]. ∀[x:T].
  ((#x in bag-remove-repeats(eq;bs)) if 0 <(#x in bs) then else fi )


Proof




Definitions occuring in Statement :  bag-remove-repeats: bag-remove-repeats(eq;bs) bag-count: (#x in bs) bag: bag(T) deq: EqDecider(T) ifthenelse: if then else fi  lt_int: i <j uall: [x:A]. B[x] natural_number: $n universe: Type sqequal: t
Definitions unfolded in proof :  uall: [x:A]. B[x] member: t ∈ T uimplies: supposing a nat: so_lambda: λ2x.t[x] so_apply: x[s] bag: bag(T) quotient: x,y:A//B[x; y] and: P ∧ Q all: x:A. B[x] implies:  Q squash: T so_lambda: λ2y.t[x; y] so_apply: x[s1;s2] true: True subtype_rel: A ⊆B sq_type: SQType(T) guard: {T} prop: bag-filter: [x∈b|p[x]] bag-size: #(bs) bag-remove-repeats: bag-remove-repeats(eq;bs) iff: ⇐⇒ Q deq: EqDecider(T) istype: istype(T) rev_implies:  Q ge: i ≥  decidable: Dec(P) or: P ∨ Q false: False le: A ≤ B not: ¬A satisfiable_int_formula: satisfiable_int_formula(fmla) exists: x:A. B[x] top: Top bool: 𝔹 unit: Unit it: btrue: tt uiff: uiff(P;Q) ifthenelse: if then else fi  bfalse: ff bnot: ¬bb assert: b less_than': less_than'(a;b) cons: [a b] sq_stable: SqStable(P) subtract: m
Lemmas referenced :  subtype_base_sq nat_wf set_subtype_base le_wf istype-int int_subtype_base bag-count_wf istype-universe bag-remove-repeats_wf quotient-member-eq list_wf permutation_wf permutation-equiv bag_wf deq_wf list-subtype-bag deq-member-length-filter2 l_member-iff-length-filter list-to-set_wf member-list-to-set length_wf filter_wf5 subtype_rel_dep_function bool_wf l_member_wf bag-count-sqequal non_neg_length decidable__le full-omega-unsat intformand_wf intformnot_wf intformle_wf itermConstant_wf itermVar_wf int_formula_prop_and_lemma istype-void int_formula_prop_not_lemma int_formula_prop_le_lemma int_term_value_constant_lemma int_term_value_var_lemma int_formula_prop_wf filter_functionality eta_conv deq-member_wf eqtt_to_assert assert-deq-member eqff_to_assert bool_cases_sqequal bool_subtype_base assert-bnot list-to-set-property no-repeats-iff-count decidable__equal_nat length_wf_nat istype-false list-cases length_of_nil_lemma product_subtype_list length_of_cons_lemma not-le-2 sq_stable__le condition-implies-le minus-add minus-one-mul add-swap minus-one-mul-top add-associates add-commutes add_functionality_wrt_le add-zero le-add-cancel2
Rules used in proof :  sqequalSubstitution sqequalTransitivity computationStep sqequalReflexivity isect_memberFormation_alt introduction cut thin instantiate extract_by_obid sqequalHypSubstitution isectElimination cumulativity hypothesis independent_isectElimination sqequalRule intEquality lambdaEquality_alt closedConclusion natural_numberEquality hypothesisEquality pointwiseFunctionalityForEquality pertypeElimination productElimination equalityTransitivity equalitySymmetry inhabitedIsType lambdaFormation_alt rename applyEquality imageElimination because_Cache universeIsType universeEquality dependent_functionElimination independent_functionElimination imageMemberEquality baseClosed equalityIsType1 productIsType equalityIsType4 axiomSqEquality isect_memberEquality_alt setElimination setEquality setIsType independent_pairFormation promote_hyp unionElimination approximateComputation dependent_pairFormation_alt int_eqEquality voidElimination dependent_set_memberEquality_alt equalityElimination hypothesis_subsumption addEquality minusEquality functionIsType

Latex:
\mforall{}[T:Type].  \mforall{}[eq:EqDecider(T)].  \mforall{}[bs:bag(T)].  \mforall{}[x:T].
    ((\#x  in  bag-remove-repeats(eq;bs))  \msim{}  if  0  <z  (\#x  in  bs)  then  1  else  0  fi  )



Date html generated: 2019_10_16-AM-11_30_39
Last ObjectModification: 2018_10_11-PM-11_28_59

Theory : bags_2


Home Index