Nuprl Lemma : bag-drop-append

[T:Type]. ∀[eq:EqDecider(T)]. ∀[x:T]. ∀[bs,cs:bag(T)].
  (bag-drop(eq;bs cs;x) if ((#x in bs) =z 0) then bs bag-drop(eq;cs;x) else bag-drop(eq;bs;x) cs fi  ∈ bag(T))


Proof




Definitions occuring in Statement :  bag-drop: bag-drop(eq;bs;a) bag-count: (#x in bs) bag-append: as bs bag: bag(T) deq: EqDecider(T) ifthenelse: if then else fi  eq_int: (i =z j) uall: [x:A]. B[x] natural_number: $n universe: Type equal: t ∈ T
Definitions unfolded in proof :  uall: [x:A]. B[x] member: t ∈ T all: x:A. B[x] or: P ∨ Q and: P ∧ Q subtype_rel: A ⊆B nat: uiff: uiff(P;Q) uimplies: supposing a squash: T prop: true: True guard: {T} iff: ⇐⇒ Q rev_implies:  Q implies:  Q sq_or: a ↓∨ b bool: 𝔹 unit: Unit it: btrue: tt ifthenelse: if then else fi  bfalse: ff exists: x:A. B[x] sq_type: SQType(T) bnot: ¬bb assert: b false: False not: ¬A satisfiable_int_formula: satisfiable_int_formula(fmla) top: Top nequal: a ≠ b ∈  decidable: Dec(P) ge: i ≥  eq_int: (i =z j) so_lambda: λ2x.t[x] so_apply: x[s] le: A ≤ B less_than': less_than'(a;b) rev_uimplies: rev_uimplies(P;Q)
Lemmas referenced :  bag-drop-property bag-append_wf bag_wf bag-append-cancel single-bag_wf bag-drop_wf ifthenelse_wf eq_int_wf bag-count_wf nat_wf bag-member_wf squash_wf true_wf subtype_rel_self iff_weakening_equal bag-member-append bag-member-single bool_wf eqtt_to_assert assert_of_eq_int eqff_to_assert equal_wf bool_cases_sqequal subtype_base_sq bool_subtype_base assert-bnot neg_assert_of_eq_int bag-member-count full-omega-unsat intformand_wf intformle_wf itermConstant_wf itermVar_wf intformeq_wf int_formula_prop_and_lemma int_formula_prop_le_lemma int_term_value_constant_lemma int_term_value_var_lemma int_formula_prop_eq_lemma int_formula_prop_wf bag-append-assoc-comm bag-append-assoc2 decidable__le nat_properties intformnot_wf int_formula_prop_not_lemma set_subtype_base le_wf int_subtype_base decidable__equal_nat false_wf decidable__equal_int equal-wf-T-base
Rules used in proof :  cut introduction extract_by_obid sqequalSubstitution sqequalTransitivity computationStep sqequalReflexivity isect_memberFormation hypothesis sqequalHypSubstitution isectElimination thin hypothesisEquality dependent_functionElimination unionElimination productElimination sqequalRule isect_memberEquality axiomEquality because_Cache universeEquality equalityTransitivity equalitySymmetry applyEquality lambdaEquality setElimination rename natural_numberEquality independent_isectElimination imageElimination imageMemberEquality baseClosed instantiate independent_functionElimination inlFormation lambdaFormation equalityElimination dependent_pairFormation promote_hyp cumulativity voidElimination approximateComputation int_eqEquality intEquality voidEquality independent_pairFormation applyLambdaEquality dependent_set_memberEquality inrFormation

Latex:
\mforall{}[T:Type].  \mforall{}[eq:EqDecider(T)].  \mforall{}[x:T].  \mforall{}[bs,cs:bag(T)].
    (bag-drop(eq;bs  +  cs;x)
    =  if  ((\#x  in  bs)  =\msubz{}  0)  then  bs  +  bag-drop(eq;cs;x)  else  bag-drop(eq;bs;x)  +  cs  fi  )



Date html generated: 2018_05_21-PM-09_48_30
Last ObjectModification: 2018_05_19-PM-04_20_23

Theory : bags_2


Home Index