Nuprl Lemma : length-remove-first

[T:Type]
  ∀L:T List. ∀P:{x:T| (x ∈ L)}  ⟶ 𝔹.
    (((∀x∈L.¬↑(P x)) ∧ (remove-first(P;L) L)) ∨ ((∃x∈L. ↑(P x)) ∧ (||remove-first(P;L)|| (||L|| 1) ∈ ℤ)))


Proof




Definitions occuring in Statement :  remove-first: remove-first(P;L) l_exists: (∃x∈L. P[x]) l_all: (∀x∈L.P[x]) l_member: (x ∈ l) length: ||as|| list: List assert: b bool: 𝔹 uall: [x:A]. B[x] all: x:A. B[x] not: ¬A or: P ∨ Q and: P ∧ Q set: {x:A| B[x]}  apply: a function: x:A ⟶ B[x] subtract: m natural_number: $n int: universe: Type sqequal: t equal: t ∈ T
Definitions unfolded in proof :  uall: [x:A]. B[x] all: x:A. B[x] member: t ∈ T so_lambda: λ2x.t[x] so_apply: x[s] implies:  Q decidable: Dec(P) or: P ∨ Q and: P ∧ Q cand: c∧ B remove-first: remove-first(P;L) prop: so_lambda: so_lambda(x,y,z.t[x; y; z]) bool: 𝔹 unit: Unit it: btrue: tt uiff: uiff(P;Q) uimplies: supposing a ifthenelse: if then else fi  bfalse: ff exists: x:A. B[x] sq_type: SQType(T) guard: {T} bnot: ¬bb assert: b false: False so_apply: x[s1;s2;s3] top: Top subtract: m subtype_rel: A ⊆B l_exists: (∃x∈L. P[x]) int_seg: {i..j-} lelt: i ≤ j < k not: ¬A satisfiable_int_formula: satisfiable_int_formula(fmla) iff: ⇐⇒ Q l_all: (∀x∈L.P[x]) less_than: a < b squash: T nat: ge: i ≥  cons: [a b] le: A ≤ B less_than': less_than'(a;b) colength: colength(L) nil: [] so_lambda: λ2y.t[x; y] so_apply: x[s1;s2]
Lemmas referenced :  decidable__l_exists assert_wf decidable__assert list_wf bool_wf list_induction l_exists_wf l_member_wf equal_wf length_wf list_ind_wf nil_wf eqtt_to_assert eqff_to_assert bool_cases_sqequal subtype_base_sq bool_subtype_base assert-bnot cons_wf subtract_wf list_ind_nil_lemma istype-void length_of_nil_lemma l_exists_wf_nil list_ind_cons_lemma length_of_cons_lemma istype-int int_subtype_base int_seg_properties decidable__equal_int full-omega-unsat intformand_wf intformless_wf itermVar_wf itermConstant_wf intformle_wf int_formula_prop_and_lemma int_formula_prop_less_lemma int_term_value_var_lemma int_term_value_constant_lemma int_formula_prop_le_lemma int_formula_prop_wf l_exists_cons intformnot_wf intformeq_wf itermSubtract_wf itermAdd_wf int_formula_prop_not_lemma int_formula_prop_eq_lemma int_term_value_subtract_lemma int_term_value_add_lemma subtract-is-int-iff false_wf l_all_wf not_wf select_wf decidable__le decidable__lt int_seg_wf nat_properties ge_wf less_than_wf list-cases l_all_wf_nil product_subtype_list colength-cons-not-zero colength_wf_list le_wf subtract-1-ge-0 nat_wf set_subtype_base spread_cons_lemma l_all_cons list-subtype
Rules used in proof :  cut sqequalSubstitution sqequalTransitivity computationStep sqequalReflexivity Error :isect_memberFormation_alt,  Error :lambdaFormation_alt,  introduction extract_by_obid sqequalHypSubstitution isectElimination thin hypothesisEquality sqequalRule Error :lambdaEquality_alt,  applyEquality functionExtensionality cumulativity hypothesis Error :universeIsType,  dependent_functionElimination independent_functionElimination unionElimination Error :functionIsType,  universeEquality Error :inrFormation_alt,  independent_pairFormation functionEquality setElimination rename because_Cache Error :setIsType,  intEquality Error :inhabitedIsType,  equalityElimination productElimination independent_isectElimination equalityTransitivity equalitySymmetry Error :dependent_pairFormation_alt,  Error :equalityIsType1,  promote_hyp instantiate voidElimination natural_numberEquality Error :isect_memberEquality_alt,  Error :equalityIsType3,  minusEquality approximateComputation int_eqEquality pointwiseFunctionality baseApply closedConclusion baseClosed Error :productIsType,  Error :inlFormation_alt,  imageElimination intWeakElimination axiomSqEquality Error :functionIsTypeImplies,  hypothesis_subsumption Error :dependent_set_memberEquality_alt,  applyLambdaEquality Error :equalityIsType4,  addEquality setEquality lambdaFormation isect_memberFormation

Latex:
\mforall{}[T:Type]
    \mforall{}L:T  List.  \mforall{}P:\{x:T|  (x  \mmember{}  L)\}    {}\mrightarrow{}  \mBbbB{}.
        (((\mforall{}x\mmember{}L.\mneg{}\muparrow{}(P  x))  \mwedge{}  (remove-first(P;L)  \msim{}  L))
        \mvee{}  ((\mexists{}x\mmember{}L.  \muparrow{}(P  x))  \mwedge{}  (||remove-first(P;L)||  =  (||L||  -  1))))



Date html generated: 2019_06_20-PM-01_42_36
Last ObjectModification: 2018_10_03-PM-11_00_45

Theory : list_1


Home Index