Nuprl Lemma : firstn-filter

[T:Type]. ∀P:T ⟶ 𝔹. ∀L:T List. ∀n:ℕ.  ∃m:ℕ||L|| 1. (firstn(n;filter(P;L)) filter(P;firstn(m;L)) ∈ (T List))


Proof




Definitions occuring in Statement :  firstn: firstn(n;as) length: ||as|| filter: filter(P;l) list: List int_seg: {i..j-} nat: bool: 𝔹 uall: [x:A]. B[x] all: x:A. B[x] exists: x:A. B[x] function: x:A ⟶ B[x] add: m natural_number: $n universe: Type 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] subtype_rel: A ⊆B so_apply: x[s] prop: uimplies: supposing a nat: int_seg: {i..j-} implies:  Q top: Top firstn: firstn(n;as) so_lambda: so_lambda(x,y,z.t[x; y; z]) so_apply: x[s1;s2;s3] exists: x:A. B[x] lelt: i ≤ j < k and: P ∧ Q le: A ≤ B less_than': less_than'(a;b) false: False not: ¬A less_than: a < b squash: T true: True bool: 𝔹 unit: Unit it: btrue: tt uiff: uiff(P;Q) ifthenelse: if then else fi  bfalse: ff or: P ∨ Q sq_type: SQType(T) guard: {T} bnot: ¬bb assert: b ge: i ≥  decidable: Dec(P) satisfiable_int_formula: satisfiable_int_formula(fmla) subtract: m iff: ⇐⇒ Q rev_implies:  Q lt_int: i <j
Lemmas referenced :  list_induction all_wf nat_wf exists_wf int_seg_wf length_wf equal_wf list_wf firstn_wf filter_wf5 subtype_rel_dep_function bool_wf l_member_wf subtype_rel_self set_wf length_of_nil_lemma filter_nil_lemma list_ind_nil_lemma false_wf lelt_wf nil_wf equal-wf-base length_of_cons_lemma filter_cons_lemma eqtt_to_assert list_ind_cons_lemma eqff_to_assert bool_cases_sqequal subtype_base_sq bool_subtype_base assert-bnot lt_int_wf assert_of_lt_int less_than_wf subtract_wf nat_properties decidable__le satisfiable-full-omega-tt intformand_wf intformnot_wf intformle_wf itermConstant_wf itermSubtract_wf itermVar_wf intformless_wf int_formula_prop_and_lemma int_formula_prop_not_lemma int_formula_prop_le_lemma int_term_value_constant_lemma int_term_value_subtract_lemma int_term_value_var_lemma int_formula_prop_less_lemma int_formula_prop_wf le_wf add-member-int_seg2 decidable__lt add-is-int-iff itermAdd_wf int_term_value_add_lemma squash_wf true_wf cons_wf iff_weakening_equal add-subtract-cancel int_seg_properties ifthenelse_wf non_neg_length equal-wf-base-T
Rules used in proof :  sqequalSubstitution sqequalTransitivity computationStep sqequalReflexivity isect_memberFormation lambdaFormation cut thin introduction extract_by_obid sqequalHypSubstitution isectElimination hypothesisEquality sqequalRule lambdaEquality hypothesis natural_numberEquality addEquality cumulativity because_Cache applyEquality setEquality independent_isectElimination setElimination rename independent_functionElimination dependent_functionElimination isect_memberEquality voidElimination voidEquality dependent_pairFormation dependent_set_memberEquality independent_pairFormation imageMemberEquality baseClosed functionExtensionality unionElimination equalityElimination equalityTransitivity equalitySymmetry productElimination promote_hyp instantiate functionEquality universeEquality int_eqEquality intEquality computeAll pointwiseFunctionality imageElimination baseApply closedConclusion equalityUniverse levelHypothesis

Latex:
\mforall{}[T:Type]
    \mforall{}P:T  {}\mrightarrow{}  \mBbbB{}.  \mforall{}L:T  List.  \mforall{}n:\mBbbN{}.    \mexists{}m:\mBbbN{}||L||  +  1.  (firstn(n;filter(P;L))  =  filter(P;firstn(m;L)))



Date html generated: 2017_04_14-AM-09_24_34
Last ObjectModification: 2017_02_27-PM-03_59_21

Theory : list_1


Home Index