Nuprl Lemma : bag-size-filter-member-bound
∀[T:Type]. ∀[eq:EqDecider(T)]. ∀[as,bs:bag(T)].
  #([x∈as|bag-deq-member(eq;x;bs)]) ≤ #(bs) supposing bag-no-repeats(T;as)
Proof
Definitions occuring in Statement : 
bag-deq-member: bag-deq-member(eq;x;b)
, 
bag-no-repeats: bag-no-repeats(T;bs)
, 
bag-size: #(bs)
, 
bag-filter: [x∈b|p[x]]
, 
bag: bag(T)
, 
deq: EqDecider(T)
, 
uimplies: b supposing a
, 
uall: ∀[x:A]. B[x]
, 
le: A ≤ B
, 
universe: Type
Definitions unfolded in proof : 
uall: ∀[x:A]. B[x]
, 
uimplies: b supposing a
, 
member: t ∈ T
, 
squash: ↓T
, 
prop: ℙ
, 
so_lambda: λ2x.t[x]
, 
so_apply: x[s]
, 
subtype_rel: A ⊆r B
, 
nat: ℕ
, 
sq_stable: SqStable(P)
, 
implies: P 
⇒ Q
, 
exists: ∃x:A. B[x]
, 
bag-size: #(bs)
, 
bag-deq-member: bag-deq-member(eq;x;b)
, 
bag-filter: [x∈b|p[x]]
, 
uiff: uiff(P;Q)
, 
and: P ∧ Q
, 
all: ∀x:A. B[x]
, 
false: False
, 
ge: i ≥ j 
, 
not: ¬A
, 
satisfiable_int_formula: satisfiable_int_formula(fmla)
, 
le: A ≤ B
, 
or: P ∨ Q
, 
cons: [a / b]
, 
less_than': less_than'(a;b)
, 
colength: colength(L)
, 
nil: []
, 
it: ⋅
, 
guard: {T}
, 
sq_type: SQType(T)
, 
less_than: a < b
, 
so_lambda: λ2x y.t[x; y]
, 
so_apply: x[s1;s2]
, 
decidable: Dec(P)
, 
filter: filter(P;l)
, 
reduce: reduce(f;k;as)
, 
list_ind: list_ind, 
bool: 𝔹
, 
unit: Unit
, 
btrue: tt
, 
ifthenelse: if b then t else f fi 
, 
bfalse: ff
, 
bnot: ¬bb
, 
assert: ↑b
, 
iff: P 
⇐⇒ Q
, 
rev_implies: P 
⇐ Q
, 
append: as @ bs
, 
so_lambda: so_lambda3, 
so_apply: x[s1;s2;s3]
Lemmas referenced : 
bag_to_squash_list, 
sq_stable__le, 
bag-size_wf, 
assert_wf, 
bag-deq-member_wf, 
bag-filter_wf, 
list-subtype-bag, 
bag-no-repeats_wf, 
bag-no-repeats-list, 
nat_properties, 
full-omega-unsat, 
intformand_wf, 
intformle_wf, 
itermConstant_wf, 
itermVar_wf, 
intformless_wf, 
istype-int, 
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, 
istype-less_than, 
le_witness_for_triv, 
list-cases, 
list_wf, 
product_subtype_list, 
colength-cons-not-zero, 
colength_wf_list, 
istype-void, 
istype-le, 
subtract-1-ge-0, 
subtype_base_sq, 
intformeq_wf, 
int_formula_prop_eq_lemma, 
set_subtype_base, 
int_subtype_base, 
spread_cons_lemma, 
decidable__equal_int, 
subtract_wf, 
intformnot_wf, 
itermSubtract_wf, 
itermAdd_wf, 
int_formula_prop_not_lemma, 
int_term_value_subtract_lemma, 
int_term_value_add_lemma, 
decidable__le, 
le_wf, 
istype-nat, 
bag_wf, 
deq_wf, 
istype-universe, 
no_repeats_wf, 
nil_wf, 
true_wf, 
length_wf, 
non_neg_length, 
istype-true, 
cons_wf, 
not_wf, 
l_member_wf, 
filter_wf5, 
deq-member_wf, 
eqtt_to_assert, 
length_of_cons_lemma, 
eqff_to_assert, 
bool_cases_sqequal, 
bool_wf, 
bool_subtype_base, 
assert-bnot, 
sqequal-tt-to-assert, 
assert-deq-member, 
l_member_decomp, 
length-append, 
length-singleton, 
sqequal-ff-to-assert, 
implies_functionality_wrt_iff, 
iff_weakening_uiff, 
no_repeats_nil_uiff, 
filter-nil, 
length-nil, 
iff_weakening_equal, 
no_repeats_cons, 
filter-cons, 
filter-sq, 
list_ind_cons_lemma, 
list_ind_nil_lemma, 
append_wf, 
istype-assert, 
member_append, 
cons_member, 
add-is-int-iff, 
false_wf
Rules used in proof : 
sqequalSubstitution, 
sqequalTransitivity, 
computationStep, 
sqequalReflexivity, 
isect_memberFormation_alt, 
cut, 
introduction, 
extract_by_obid, 
sqequalHypSubstitution, 
isectElimination, 
thin, 
hypothesisEquality, 
imageElimination, 
setEquality, 
hypothesis, 
sqequalRule, 
lambdaEquality_alt, 
universeIsType, 
applyEquality, 
setElimination, 
rename, 
inhabitedIsType, 
equalityTransitivity, 
equalitySymmetry, 
independent_functionElimination, 
productElimination, 
promote_hyp, 
because_Cache, 
independent_isectElimination, 
hyp_replacement, 
applyLambdaEquality, 
lambdaFormation_alt, 
intWeakElimination, 
natural_numberEquality, 
approximateComputation, 
dependent_pairFormation_alt, 
int_eqEquality, 
dependent_functionElimination, 
Error :memTop, 
independent_pairFormation, 
voidElimination, 
functionIsTypeImplies, 
unionElimination, 
hypothesis_subsumption, 
equalityIstype, 
dependent_set_memberEquality_alt, 
instantiate, 
baseApply, 
closedConclusion, 
baseClosed, 
intEquality, 
sqequalBase, 
imageMemberEquality, 
universeEquality, 
productEquality, 
setIsType, 
equalityElimination, 
addEquality, 
cumulativity, 
productIsType, 
functionIsType, 
inlFormation_alt, 
unionIsType, 
inrFormation_alt, 
pointwiseFunctionality
Latex:
\mforall{}[T:Type].  \mforall{}[eq:EqDecider(T)].  \mforall{}[as,bs:bag(T)].
    \#([x\mmember{}as|bag-deq-member(eq;x;bs)])  \mleq{}  \#(bs)  supposing  bag-no-repeats(T;as)
Date html generated:
2020_05_20-AM-09_04_23
Last ObjectModification:
2020_01_27-PM-05_19_58
Theory : bags_2
Home
Index