### Nuprl Lemma : filter_of_filter2

`∀[T:Type]. ∀[L:T List]. ∀[P:ℕ||L|| ⟶ 𝔹]. ∀[Q:T ⟶ 𝔹].`
`  (filter(Q;filter2(P;L)) = filter2(λi.((P i) ∧b (Q L[i]));L) ∈ (T List))`

Proof

Definitions occuring in Statement :  filter2: `filter2(P;L)` select: `L[n]` length: `||as||` filter: `filter(P;l)` list: `T List` band: `p ∧b q` int_seg: `{i..j-}` bool: `𝔹` uall: `∀[x:A]. B[x]` apply: `f a` lambda: `λx.A[x]` function: `x:A ⟶ B[x]` natural_number: `\$n` universe: `Type` equal: `s = t ∈ T`
Definitions unfolded in proof :  uall: `∀[x:A]. B[x]` member: `t ∈ T` so_lambda: `λ2x.t[x]` subtype_rel: `A ⊆r B` so_apply: `x[s]` prop: `ℙ` uimplies: `b supposing a` all: `∀x:A. B[x]` implies: `P `` Q` bool: `𝔹` unit: `Unit` it: `⋅` btrue: `tt` band: `p ∧b q` ifthenelse: `if b then t else f fi ` uiff: `uiff(P;Q)` and: `P ∧ Q` int_seg: `{i..j-}` guard: `{T}` lelt: `i ≤ j < k` decidable: `Dec(P)` or: `P ∨ Q` not: `¬A` satisfiable_int_formula: `satisfiable_int_formula(fmla)` exists: `∃x:A. B[x]` false: `False` top: `Top` less_than: `a < b` squash: `↓T` bfalse: `ff` assert: `↑b` bnot: `¬bb` sq_type: `SQType(T)` subtract: `n - m` true: `True` nat_plus: `ℕ+` less_than': `less_than'(a;b)` cons: `[a / b]` select: `L[n]` le: `A ≤ B` ge: `i ≥ j ` rev_implies: `P `` Q` iff: `P `⇐⇒` Q`
Lemmas referenced :  list_induction uall_wf int_seg_wf length_wf bool_wf equal_wf list_wf filter_wf5 filter2_wf subtype_rel_dep_function l_member_wf subtype_rel_self set_wf eqtt_to_assert select_wf int_seg_properties decidable__le full-omega-unsat intformand_wf intformnot_wf intformle_wf itermConstant_wf itermVar_wf int_formula_prop_and_lemma int_formula_prop_not_lemma int_formula_prop_le_lemma int_term_value_constant_lemma int_term_value_var_lemma int_formula_prop_wf decidable__lt intformless_wf int_formula_prop_less_lemma length_of_nil_lemma filter2_nil_lemma filter_nil_lemma nil_wf length_of_cons_lemma assert-bnot bool_subtype_base subtype_base_sq bool_cases_sqequal eqff_to_assert int_term_value_subtract_lemma itermSubtract_wf subtract_wf add-member-int_seg2 lelt_wf int_formula_prop_eq_lemma intformeq_wf add-is-int-iff nat_plus_properties nat_plus_wf less_than_wf length_wf_nat add_nat_plus false_wf int_term_value_add_lemma itermAdd_wf non_neg_length cons_wf cons_filter2 iff_weakening_equal true_wf squash_wf add-subtract-cancel select-cons-tl filter2_functionality filter_cons_lemma equal-wf-T-base assert_wf bnot_wf not_wf uiff_transitivity assert_of_bnot
Rules used in proof :  sqequalSubstitution sqequalTransitivity computationStep sqequalReflexivity isect_memberFormation_alt introduction cut thin extract_by_obid sqequalHypSubstitution isectElimination hypothesisEquality sqequalRule lambdaEquality functionEquality natural_numberEquality cumulativity hypothesis because_Cache functionExtensionality applyEquality setEquality independent_isectElimination setElimination rename lambdaFormation unionElimination equalityElimination productElimination dependent_functionElimination approximateComputation independent_functionElimination dependent_pairFormation int_eqEquality intEquality isect_memberEquality voidElimination voidEquality independent_pairFormation imageElimination equalityTransitivity equalitySymmetry functionIsType universeIsType axiomEquality inhabitedIsType addEquality universeEquality instantiate closedConclusion baseApply promote_hyp pointwiseFunctionality baseClosed imageMemberEquality dependent_set_memberEquality applyLambdaEquality hyp_replacement

Latex:
\mforall{}[T:Type].  \mforall{}[L:T  List].  \mforall{}[P:\mBbbN{}||L||  {}\mrightarrow{}  \mBbbB{}].  \mforall{}[Q:T  {}\mrightarrow{}  \mBbbB{}].
(filter(Q;filter2(P;L))  =  filter2(\mlambda{}i.((P  i)  \mwedge{}\msubb{}  (Q  L[i]));L))

Date html generated: 2019_10_15-AM-10_55_12
Last ObjectModification: 2018_09_27-AM-10_44_55

Theory : list!

Home Index