Nuprl Lemma : filter-equals
∀[T:Type]
  ∀P:T ⟶ 𝔹. ∀L1,L2:T List.
    (filter(P;L1) = L2 ∈ (T List)
       
⇐⇒ (∀x:T. ((x ∈ L2) 
⇐⇒ (x ∈ L1) ∧ (↑(P x)))) ∧ (∀x,y:T.  (x before y ∈ L2 
⇒ x before y ∈ L1))) supposing 
       (no_repeats(T;L2) and 
       no_repeats(T;L1))
Proof
Definitions occuring in Statement : 
l_before: x before y ∈ l
, 
no_repeats: no_repeats(T;l)
, 
l_member: (x ∈ l)
, 
filter: filter(P;l)
, 
list: T List
, 
assert: ↑b
, 
bool: 𝔹
, 
uimplies: b supposing a
, 
uall: ∀[x:A]. B[x]
, 
all: ∀x:A. B[x]
, 
iff: P 
⇐⇒ Q
, 
implies: P 
⇒ Q
, 
and: P ∧ Q
, 
apply: f a
, 
function: x:A ⟶ B[x]
, 
universe: Type
, 
equal: s = t ∈ T
Definitions unfolded in proof : 
implies: P 
⇒ Q
, 
rev_implies: P 
⇐ Q
, 
iff: P 
⇐⇒ Q
, 
and: P ∧ Q
, 
istype: istype(T)
, 
so_apply: x[s]
, 
subtype_rel: A ⊆r B
, 
uimplies: b supposing a
, 
prop: ℙ
, 
so_lambda: λ2x.t[x]
, 
member: t ∈ T
, 
all: ∀x:A. B[x]
, 
uall: ∀[x:A]. B[x]
, 
false: False
, 
not: ¬A
, 
top: Top
, 
ge: i ≥ j 
, 
uiff: uiff(P;Q)
, 
guard: {T}
, 
satisfiable_int_formula: satisfiable_int_formula(fmla)
, 
or: P ∨ Q
, 
decidable: Dec(P)
, 
nat_plus: ℕ+
, 
cand: A c∧ B
, 
cons: [a / b]
, 
select: L[n]
, 
less_than': less_than'(a;b)
, 
le: A ≤ B
, 
nat: ℕ
, 
exists: ∃x:A. B[x]
, 
l_member: (x ∈ l)
, 
bool: 𝔹
, 
unit: Unit
, 
it: ⋅
, 
btrue: tt
, 
ifthenelse: if b then t else f fi 
, 
bfalse: ff
, 
sq_type: SQType(T)
, 
assert: ↑b
, 
true: True
, 
squash: ↓T
Lemmas referenced : 
istype-universe, 
istype-assert, 
length_wf, 
l_before_wf, 
assert_wf, 
l_member_wf, 
bool_wf, 
subtype_rel_dep_function, 
filter_wf5, 
equal_wf, 
iff_wf, 
no_repeats_wf, 
list_wf, 
list_induction, 
length_of_nil_lemma, 
bfalse_wf, 
null_cons_lemma, 
null_wf, 
cons_wf, 
assert_witness, 
btrue_neq_bfalse, 
member-implies-null-eq-bfalse, 
btrue_wf, 
null_nil_lemma, 
no_repeats_witness, 
equal-wf-base-T, 
nil_wf, 
istype-void, 
filter_nil_lemma, 
int_formula_prop_le_lemma, 
intformle_wf, 
decidable__le, 
nat_properties, 
select_wf, 
false_wf, 
int_formula_prop_eq_lemma, 
int_term_value_add_lemma, 
int_term_value_var_lemma, 
int_formula_prop_and_lemma, 
intformeq_wf, 
itermAdd_wf, 
itermVar_wf, 
intformand_wf, 
add-is-int-iff, 
nat_plus_properties, 
istype-less_than, 
int_formula_prop_wf, 
int_term_value_constant_lemma, 
int_formula_prop_less_lemma, 
int_formula_prop_not_lemma, 
istype-int, 
itermConstant_wf, 
intformless_wf, 
intformnot_wf, 
full-omega-unsat, 
decidable__lt, 
length_wf_nat, 
add_nat_plus, 
length_of_cons_lemma, 
istype-le, 
not_wf, 
bnot_wf, 
equal-wf-T-base, 
filter_cons_lemma, 
eqtt_to_assert, 
uiff_transitivity, 
eqff_to_assert, 
assert_of_bnot, 
product_subtype_list, 
list-cases, 
no_repeats_cons, 
cons_one_one, 
cons_member, 
assert_elim, 
subtype_base_sq, 
bool_subtype_base, 
cons_before, 
l_before_member, 
true_wf, 
squash_wf, 
l_before_member2, 
not_assert_elim
Rules used in proof : 
universeEquality, 
instantiate, 
dependent_functionElimination, 
applyLambdaEquality, 
inhabitedIsType, 
equalityIstype, 
productIsType, 
isectIsType, 
functionIsType, 
independent_functionElimination, 
productEquality, 
rename, 
setElimination, 
independent_isectElimination, 
setIsType, 
setEquality, 
universeIsType, 
because_Cache, 
applyEquality, 
isectEquality, 
hypothesis, 
functionEquality, 
lambdaEquality_alt, 
sqequalRule, 
hypothesisEquality, 
isectElimination, 
sqequalHypSubstitution, 
extract_by_obid, 
introduction, 
thin, 
cut, 
lambdaFormation_alt, 
isect_memberFormation_alt, 
sqequalReflexivity, 
computationStep, 
sqequalTransitivity, 
sqequalSubstitution, 
dependent_set_memberEquality_alt, 
sqequalBase, 
productElimination, 
equalitySymmetry, 
equalityTransitivity, 
independent_pairFormation, 
baseClosed, 
voidElimination, 
isect_memberEquality_alt, 
int_eqEquality, 
closedConclusion, 
baseApply, 
promote_hyp, 
pointwiseFunctionality, 
approximateComputation, 
unionElimination, 
natural_numberEquality, 
dependent_pairFormation_alt, 
equalityElimination, 
hypothesis_subsumption, 
inlFormation_alt, 
inrFormation_alt, 
unionIsType, 
hyp_replacement, 
unionEquality, 
cumulativity, 
imageMemberEquality, 
imageElimination
Latex:
\mforall{}[T:Type]
    \mforall{}P:T  {}\mrightarrow{}  \mBbbB{}.  \mforall{}L1,L2:T  List.
        (filter(P;L1)  =  L2
              \mLeftarrow{}{}\mRightarrow{}  (\mforall{}x:T.  ((x  \mmember{}  L2)  \mLeftarrow{}{}\mRightarrow{}  (x  \mmember{}  L1)  \mwedge{}  (\muparrow{}(P  x))))
                      \mwedge{}  (\mforall{}x,y:T.    (x  before  y  \mmember{}  L2  {}\mRightarrow{}  x  before  y  \mmember{}  L1)))  supposing 
              (no\_repeats(T;L2)  and 
              no\_repeats(T;L1))
Date html generated:
2019_10_15-AM-10_23_04
Last ObjectModification:
2019_08_05-PM-02_01_26
Theory : list_1
Home
Index