Nuprl Lemma : bag-remove1-property

[T:Type]
  ∀eq:EqDecider(T). ∀x:T. ∀bs:bag(T).
    ((∃as:bag(T). ((bs ({x} as) ∈ bag(T)) ∧ (bag-remove1(eq;bs;x) (inl as) ∈ (bag(T)?))))
    ∨ ((¬x ↓∈ bs) ∧ (bag-remove1(eq;bs;x) (inr ⋅ ) ∈ (bag(T)?))))


Proof




Definitions occuring in Statement :  bag-remove1: bag-remove1(eq;bs;a) bag-member: x ↓∈ bs bag-append: as bs single-bag: {x} bag: bag(T) deq: EqDecider(T) it: uall: [x:A]. B[x] all: x:A. B[x] exists: x:A. B[x] not: ¬A or: P ∨ Q and: P ∧ Q unit: Unit inr: inr  inl: inl x union: left right universe: Type equal: t ∈ T
Definitions unfolded in proof :  uall: [x:A]. B[x] all: x:A. B[x] member: t ∈ T implies:  Q decidable: Dec(P) or: P ∨ Q and: P ∧ Q not: ¬A false: False squash: T exists: x:A. B[x] prop: isl: isl(x) outl: outl(x) uimplies: supposing a subtype_rel: A ⊆B assert: b ifthenelse: if then else fi  btrue: tt cand: c∧ B true: True iff: ⇐⇒ Q bag-append: as bs nat: so_lambda: λ2x.t[x] so_apply: x[s] guard: {T} rev_implies:  Q single-bag: {x} top: Top sq_stable: SqStable(P) bfalse: ff bag-member: x ↓∈ bs respects-equality: respects-equality(S;T)
Lemmas referenced :  decidable__bag-member decidable-equal-deq bag_wf deq_wf istype-universe istype-void bag_to_squash_list bag-member_wf decidable_wf squash_wf assert_wf bag-remove1_wf btrue_wf bfalse_wf equal_wf bag-append_wf single-bag_wf assert_elim unit_subtype_base btrue_neq_bfalse bag-remove1-property1 isl_wf list_wf unit_wf2 list-subtype-bag outl_wf bag-member-list length_wf_nat istype-nat set_subtype_base le_wf istype-int int_subtype_base true_wf bag-append-comm cons_wf nil_wf reverse_wf subtype_rel_self iff_weakening_equal bag-append-assoc2 reverse-bag subtype_rel_set equal-wf-base bag_qinc sq_stable__and sq_stable__assert sq_stable__equal istype-assert not_wf equal-wf-T-base subtype_rel_union equal_functionality_wrt_subtype_rel2 member_append append_wf cons_member l_member_wf subtype-respects-equality
Rules used in proof :  sqequalSubstitution sqequalTransitivity computationStep sqequalReflexivity isect_memberFormation_alt lambdaFormation_alt cut introduction extract_by_obid sqequalHypSubstitution isectElimination thin hypothesisEquality independent_functionElimination because_Cache hypothesis dependent_functionElimination universeIsType instantiate universeEquality unionElimination inlFormation_alt sqequalRule productIsType functionIsType inhabitedIsType voidElimination imageElimination productElimination promote_hyp equalitySymmetry hyp_replacement applyLambdaEquality functionEquality rename imageMemberEquality baseClosed productEquality equalityIstype equalityTransitivity independent_isectElimination dependent_set_memberEquality_alt independent_pairFormation baseApply closedConclusion applyEquality sqequalBase setElimination natural_numberEquality lambdaEquality_alt intEquality isect_memberEquality_alt axiomEquality functionIsTypeImplies dependent_pairFormation_alt inlEquality_alt inrFormation_alt unionIsType unionEquality

Latex:
\mforall{}[T:Type]
    \mforall{}eq:EqDecider(T).  \mforall{}x:T.  \mforall{}bs:bag(T).
        ((\mexists{}as:bag(T).  ((bs  =  (\{x\}  +  as))  \mwedge{}  (bag-remove1(eq;bs;x)  =  (inl  as))))
        \mvee{}  ((\mneg{}x  \mdownarrow{}\mmember{}  bs)  \mwedge{}  (bag-remove1(eq;bs;x)  =  (inr  \mcdot{}  ))))



Date html generated: 2019_10_16-AM-11_30_46
Last ObjectModification: 2018_11_30-PM-00_20_42

Theory : bags_2


Home Index