### Nuprl Lemma : filter_is_singleton2

`∀[T:Type]`
`  ∀P:T ⟶ 𝔹. ∀L:T List.`
`    (||filter(P;L)|| = 1 ∈ ℤ `⇐⇒` ∃i:ℕ||L||. ((↑(P L[i])) ∧ (∀j:ℕ||L||. i = j ∈ ℤ supposing ↑(P L[j]))))`

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]` exists: `∃x:A. B[x]` iff: `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 :  member: `t ∈ T` uall: `∀[x:A]. B[x]` all: `∀x:A. B[x]` so_lambda: `λ2x.t[x]` prop: `ℙ` and: `P ∧ Q` int_seg: `{i..j-}` uimplies: `b supposing a` guard: `{T}` lelt: `i ≤ j < k` decidable: `Dec(P)` or: `P ∨ Q` not: `¬A` implies: `P `` Q` satisfiable_int_formula: `satisfiable_int_formula(fmla)` exists: `∃x:A. B[x]` false: `False` top: `Top` less_than: `a < b` squash: `↓T` so_apply: `x[s]` select: `L[n]` nil: `[]` it: `⋅` so_lambda: `λ2x y.t[x; y]` so_apply: `x[s1;s2]` iff: `P `⇐⇒` Q` sq_type: `SQType(T)` true: `True` rev_implies: `P `` Q` bool: `𝔹` unit: `Unit` btrue: `tt` uiff: `uiff(P;Q)` ifthenelse: `if b then t else f fi ` bfalse: `ff` subtype_rel: `A ⊆r B` ge: `i ≥ j ` le: `A ≤ B` less_than': `less_than'(a;b)` nat_plus: `ℕ+` cons: `[a / b]` cand: `A c∧ B` rev_uimplies: `rev_uimplies(P;Q)` subtract: `n - m`
Lemmas referenced :  bool_wf equal-wf-T-base assert_wf bnot_wf not_wf list_induction iff_wf exists_wf int_seg_wf length_wf 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 all_wf isect_wf equal_wf list_wf filter_nil_lemma length_of_nil_lemma stuck-spread base_wf subtype_base_sq int_subtype_base equal-wf-base filter_cons_lemma length_of_cons_lemma eqtt_to_assert uiff_transitivity eqff_to_assert assert_of_bnot filter_wf5 subtype_rel_dep_function l_member_wf subtype_rel_self set_wf cons_wf non_neg_length itermAdd_wf int_term_value_add_lemma decidable__assert null_wf not_functionality_wrt_uiff assert_of_null pos_length intformeq_wf int_formula_prop_eq_lemma filter_is_empty false_wf add_nat_plus length_wf_nat less_than_wf nat_plus_wf nat_plus_properties add-is-int-iff lelt_wf decidable__equal_int assert_functionality_wrt_uiff subtract_wf itermSubtract_wf int_term_value_subtract_lemma select_cons_tl add-member-int_seg2 select-cons-tl add-subtract-cancel
Rules used in proof :  sqequalSubstitution sqequalTransitivity computationStep sqequalReflexivity applyEquality hypothesisEquality cut introduction extract_by_obid hypothesis equalityTransitivity equalitySymmetry sqequalHypSubstitution isectElimination thin baseClosed isect_memberFormation lambdaFormation sqequalRule lambdaEquality because_Cache natural_numberEquality cumulativity productEquality functionExtensionality setElimination rename independent_isectElimination productElimination dependent_functionElimination unionElimination approximateComputation independent_functionElimination dependent_pairFormation int_eqEquality intEquality isect_memberEquality voidElimination voidEquality independent_pairFormation imageElimination instantiate equalityElimination functionEquality universeEquality addEquality setEquality dependent_set_memberEquality imageMemberEquality applyLambdaEquality pointwiseFunctionality promote_hyp baseApply closedConclusion hyp_replacement

Latex:
\mforall{}[T:Type]
\mforall{}P:T  {}\mrightarrow{}  \mBbbB{}.  \mforall{}L:T  List.
(||filter(P;L)||  =  1  \mLeftarrow{}{}\mRightarrow{}  \mexists{}i:\mBbbN{}||L||.  ((\muparrow{}(P  L[i]))  \mwedge{}  (\mforall{}j:\mBbbN{}||L||.  i  =  j  supposing  \muparrow{}(P  L[j]))))

Date html generated: 2019_06_20-PM-01_26_15
Last ObjectModification: 2018_09_17-PM-06_29_20

Theory : list_1

Home Index