Nuprl Lemma : last-mapfilter2
∀[A,B:Type]. ∀[f:A ⟶ B]. ∀[P:A ⟶ 𝔹]. ∀[L:A List].
  (last(mapfilter(f;P;L)) = (f last(L)) ∈ B) supposing ((↑(P last(L))) and (¬↑null(mapfilter(f;P;L))))
Proof
Definitions occuring in Statement : 
mapfilter: mapfilter(f;P;L)
, 
last: last(L)
, 
null: null(as)
, 
list: T List
, 
assert: ↑b
, 
bool: 𝔹
, 
uimplies: b supposing a
, 
uall: ∀[x:A]. B[x]
, 
not: ¬A
, 
apply: f a
, 
function: x:A ⟶ B[x]
, 
universe: Type
, 
equal: s = t ∈ T
Definitions unfolded in proof : 
uall: ∀[x:A]. B[x]
, 
uimplies: b supposing a
, 
not: ¬A
, 
implies: P 
⇒ Q
, 
member: t ∈ T
, 
uiff: uiff(P;Q)
, 
and: P ∧ Q
, 
assert: ↑b
, 
ifthenelse: if b then t else f fi 
, 
null: null(as)
, 
mapfilter: mapfilter(f;P;L)
, 
map: map(f;as)
, 
list_ind: list_ind, 
filter: filter(P;l)
, 
reduce: reduce(f;k;as)
, 
nil: []
, 
it: ⋅
, 
btrue: tt
, 
true: True
, 
prop: ℙ
, 
subtype_rel: A ⊆r B
, 
so_lambda: λ2x.t[x]
, 
so_apply: x[s]
, 
all: ∀x:A. B[x]
, 
false: False
, 
top: Top
, 
bool: 𝔹
, 
unit: Unit
, 
bfalse: ff
, 
exists: ∃x:A. B[x]
, 
or: P ∨ Q
, 
sq_type: SQType(T)
, 
guard: {T}
, 
bnot: ¬bb
, 
squash: ↓T
, 
iff: P 
⇐⇒ Q
, 
rev_uimplies: rev_uimplies(P;Q)
Lemmas referenced : 
assert_of_null, 
assert_wf, 
null_wf, 
mapfilter_wf, 
subtype_rel_dep_function, 
set_wf, 
last-mapfilter, 
filter_wf5, 
bool_wf, 
l_member_wf, 
subtype_rel_self, 
eqtt_to_assert, 
map_nil_lemma, 
null_nil_lemma, 
map_wf, 
eqff_to_assert, 
equal_wf, 
bool_cases_sqequal, 
subtype_base_sq, 
bool_subtype_base, 
assert-bnot, 
equal-wf-T-base, 
list_wf, 
last_wf, 
not_wf, 
list_induction, 
null-mapfilter, 
filter_nil_lemma, 
mapfilter_nil_lemma, 
nil_wf, 
equal-wf-base, 
filter_cons_lemma, 
null_cons_lemma, 
subtype_rel_list, 
top_wf, 
cons_wf, 
false_wf, 
null-map, 
last-cons, 
length_wf_nat, 
nat_wf, 
squash_wf, 
true_wf, 
iff_weakening_equal, 
null-filter2, 
l_all_iff, 
last_member
Rules used in proof : 
sqequalSubstitution, 
sqequalTransitivity, 
computationStep, 
sqequalReflexivity, 
isect_memberFormation, 
cut, 
lambdaFormation, 
introduction, 
sqequalHypSubstitution, 
independent_functionElimination, 
thin, 
extract_by_obid, 
isectElimination, 
hypothesisEquality, 
hypothesis, 
productElimination, 
independent_isectElimination, 
natural_numberEquality, 
hyp_replacement, 
equalitySymmetry, 
applyLambdaEquality, 
cumulativity, 
functionExtensionality, 
applyEquality, 
sqequalRule, 
lambdaEquality, 
setEquality, 
setElimination, 
rename, 
because_Cache, 
voidElimination, 
promote_hyp, 
isect_memberEquality, 
voidEquality, 
unionElimination, 
equalityElimination, 
equalityTransitivity, 
dependent_functionElimination, 
dependent_pairFormation, 
instantiate, 
baseClosed, 
functionEquality, 
universeEquality, 
addLevel, 
impliesFunctionality, 
levelHypothesis, 
dependent_set_memberEquality, 
imageElimination, 
imageMemberEquality
Latex:
\mforall{}[A,B:Type].  \mforall{}[f:A  {}\mrightarrow{}  B].  \mforall{}[P:A  {}\mrightarrow{}  \mBbbB{}].  \mforall{}[L:A  List].
    (last(mapfilter(f;P;L))  =  (f  last(L)))  supposing  ((\muparrow{}(P  last(L)))  and  (\mneg{}\muparrow{}null(mapfilter(f;P;L))))
Date html generated:
2017_04_17-AM-07_52_44
Last ObjectModification:
2017_02_27-PM-04_26_42
Theory : list_1
Home
Index