### Nuprl Lemma : filter-equal

`∀[T:Type]. ∀[P:T ⟶ 𝔹]. ∀[L1,L2:T List].`
`  (filter(P;L1) = filter(P;L2) ∈ (T List)) supposing `
`     ((∀i:ℕ||L1||. ((L1[i] = L2[i] ∈ T) ∨ ((¬↑(P L1[i])) ∧ (¬↑(P L2[i]))))) and `
`     (||L1|| = ||L2|| ∈ ℤ))`

Proof

Definitions occuring in Statement :  select: `L[n]` length: `||as||` filter: `filter(P;l)` list: `T List` int_seg: `{i..j-}` assert: `↑b` bool: `𝔹` uimplies: `b supposing a` uall: `∀[x:A]. B[x]` all: `∀x:A. B[x]` not: `¬A` or: `P ∨ Q` and: `P ∧ Q` apply: `f a` function: `x:A ⟶ B[x]` natural_number: `\$n` int: `ℤ` universe: `Type` equal: `s = t ∈ T`
Definitions unfolded in proof :  true: `True` assert: `↑b` iff: `P `⇐⇒` Q` rev_implies: `P `` Q` bfalse: `ff` ifthenelse: `if b then t else f fi ` btrue: `tt` unit: `Unit` bool: `𝔹` uall: `∀[x:A]. B[x]` member: `t ∈ T` all: `∀x:A. B[x]` nat: `ℕ` implies: `P `` Q` false: `False` ge: `i ≥ j ` uimplies: `b supposing a` not: `¬A` satisfiable_int_formula: `satisfiable_int_formula(fmla)` exists: `∃x:A. B[x]` top: `Top` and: `P ∧ Q` prop: `ℙ` or: `P ∨ Q` select: `L[n]` nil: `[]` it: `⋅` so_lambda: `λ2x y.t[x; y]` so_apply: `x[s1;s2]` int_seg: `{i..j-}` lelt: `i ≤ j < k` cons: `[a / b]` colength: `colength(L)` guard: `{T}` so_lambda: `λ2x.t[x]` so_apply: `x[s]` sq_type: `SQType(T)` le: `A ≤ B` subtype_rel: `A ⊆r B` decidable: `Dec(P)` less_than: `a < b` squash: `↓T` less_than': `less_than'(a;b)` uiff: `uiff(P;Q)` nat_plus: `ℕ+`
Lemmas referenced :  select-cons squash_wf true_wf add-subtract-cancel bool_subtype_base iff_imp_equal_bool le_int_wf bfalse_wf iff_functionality_wrt_iff iff_weakening_uiff assert_of_le_int iff_weakening_equal assert_of_bnot eqff_to_assert uiff_transitivity eqtt_to_assert nat_properties full-omega-unsat intformand_wf intformle_wf itermConstant_wf itermVar_wf intformless_wf istype-int int_formula_prop_and_lemma istype-void int_formula_prop_le_lemma int_term_value_constant_lemma int_term_value_var_lemma int_formula_prop_less_lemma int_formula_prop_wf ge_wf istype-less_than list-cases length_of_nil_lemma stuck-spread istype-base filter_nil_lemma nil_wf int_seg_wf int_seg_properties product_subtype_list colength-cons-not-zero subtract-1-ge-0 subtype_base_sq intformeq_wf int_formula_prop_eq_lemma set_subtype_base int_subtype_base spread_cons_lemma length_of_cons_lemma filter_cons_lemma non_neg_length itermAdd_wf int_term_value_add_lemma length_wf colength_wf_list decidable__le intformnot_wf int_formula_prop_not_lemma istype-le decidable__equal_int subtract_wf itermSubtract_wf int_term_value_subtract_lemma le_wf add-is-int-iff false_wf select_wf cons_wf decidable__lt istype-assert istype-nat list_wf bool_wf istype-universe istype-false add_nat_plus length_wf_nat nat_plus_properties equal-wf-T-base assert_wf bnot_wf not_wf assert_elim not_assert_elim btrue_neq_bfalse
Rules used in proof :  imageMemberEquality cumulativity equalityElimination sqequalSubstitution sqequalTransitivity computationStep sqequalReflexivity Error :isect_memberFormation_alt,  introduction cut thin Error :lambdaFormation_alt,  extract_by_obid sqequalHypSubstitution isectElimination hypothesisEquality hypothesis setElimination rename intWeakElimination natural_numberEquality independent_isectElimination approximateComputation independent_functionElimination Error :dependent_pairFormation_alt,  Error :lambdaEquality_alt,  int_eqEquality dependent_functionElimination Error :isect_memberEquality_alt,  voidElimination sqequalRule independent_pairFormation Error :universeIsType,  axiomEquality Error :isectIsTypeImplies,  Error :inhabitedIsType,  Error :functionIsTypeImplies,  unionElimination baseClosed because_Cache Error :functionIsType,  equalityTransitivity equalitySymmetry productElimination Error :equalityIstype,  sqequalBase promote_hyp hypothesis_subsumption instantiate applyLambdaEquality addEquality applyEquality Error :dependent_set_memberEquality_alt,  imageElimination baseApply closedConclusion intEquality pointwiseFunctionality Error :unionIsType,  Error :productIsType,  universeEquality

Latex:
\mforall{}[T:Type].  \mforall{}[P:T  {}\mrightarrow{}  \mBbbB{}].  \mforall{}[L1,L2:T  List].
(filter(P;L1)  =  filter(P;L2))  supposing
((\mforall{}i:\mBbbN{}||L1||.  ((L1[i]  =  L2[i])  \mvee{}  ((\mneg{}\muparrow{}(P  L1[i]))  \mwedge{}  (\mneg{}\muparrow{}(P  L2[i])))))  and
(||L1||  =  ||L2||))

Date html generated: 2019_06_20-PM-02_13_14
Last ObjectModification: 2019_06_20-PM-02_08_13

Theory : list_1

Home Index