Nuprl Lemma : last_cons2
∀[L:Top List]. ∀[x:Top].  (last([x / L]) ~ if null(L) then x else last(L) fi )
Proof
Definitions occuring in Statement : 
last: last(L)
, 
null: null(as)
, 
cons: [a / b]
, 
list: T List
, 
ifthenelse: if b then t else f fi 
, 
uall: ∀[x:A]. B[x]
, 
top: Top
, 
sqequal: s ~ t
Definitions unfolded in proof : 
last: last(L)
, 
all: ∀x:A. B[x]
, 
member: t ∈ T
, 
top: Top
, 
uall: ∀[x:A]. B[x]
, 
select: L[n]
, 
so_lambda: λ2x y.t[x; y]
, 
so_apply: x[s1;s2]
, 
implies: P 
⇒ Q
, 
bool: 𝔹
, 
unit: Unit
, 
it: ⋅
, 
btrue: tt
, 
uiff: uiff(P;Q)
, 
and: P ∧ Q
, 
uimplies: b supposing a
, 
less_than: a < b
, 
less_than': less_than'(a;b)
, 
true: True
, 
squash: ↓T
, 
not: ¬A
, 
false: False
, 
prop: ℙ
, 
ifthenelse: if b then t else f fi 
, 
bfalse: ff
, 
exists: ∃x:A. B[x]
, 
or: P ∨ Q
, 
sq_type: SQType(T)
, 
guard: {T}
, 
bnot: ¬bb
, 
assert: ↑b
, 
subtract: n - m
, 
nil: []
, 
cons: [a / b]
, 
subtype_rel: A ⊆r B
, 
ge: i ≥ j 
, 
le: A ≤ B
, 
length: ||as||
, 
list_ind: list_ind, 
has-value: (a)↓
, 
nat_plus: ℕ+
, 
nat: ℕ
Lemmas referenced : 
length_of_cons_lemma, 
spread_cons_lemma, 
lt_int_wf, 
subtract_wf, 
length_wf, 
top_wf, 
bool_wf, 
eqtt_to_assert, 
assert_of_lt_int, 
less_than_wf, 
null_wf, 
assert_of_null, 
eqff_to_assert, 
equal_wf, 
bool_cases_sqequal, 
subtype_base_sq, 
bool_subtype_base, 
assert-bnot, 
equal-wf-T-base, 
list_wf, 
list-cases, 
length_of_nil_lemma, 
stuck-spread, 
base_wf, 
nil_wf, 
product_subtype_list, 
non_neg_length, 
length_wf_nat, 
nat_wf, 
subtype_rel-equal, 
less-iff-le, 
condition-implies-le, 
minus-add, 
minus-one-mul, 
add-swap, 
minus-one-mul-top, 
add-associates, 
minus-minus, 
add-commutes, 
add_functionality_wrt_le, 
zero-add, 
le-add-cancel2, 
not-lt-2, 
null_nil_lemma, 
btrue_wf, 
and_wf, 
null_cons_lemma, 
bfalse_wf, 
btrue_neq_bfalse, 
value-type-has-value, 
int-value-type, 
int_subtype_base, 
le_reflexive, 
one-mul, 
add-mul-special, 
two-mul, 
mul-distributes-right, 
zero-mul, 
false_wf, 
omega-shadow, 
nat_properties
Rules used in proof : 
sqequalSubstitution, 
sqequalRule, 
sqequalReflexivity, 
sqequalTransitivity, 
computationStep, 
cut, 
introduction, 
extract_by_obid, 
sqequalHypSubstitution, 
dependent_functionElimination, 
thin, 
isect_memberEquality, 
voidElimination, 
voidEquality, 
hypothesis, 
isect_memberFormation, 
isectElimination, 
addEquality, 
hypothesisEquality, 
natural_numberEquality, 
lambdaFormation, 
unionElimination, 
equalityElimination, 
equalityTransitivity, 
equalitySymmetry, 
productElimination, 
independent_isectElimination, 
lessCases, 
sqequalAxiom, 
because_Cache, 
independent_pairFormation, 
imageMemberEquality, 
baseClosed, 
imageElimination, 
independent_functionElimination, 
dependent_pairFormation, 
promote_hyp, 
instantiate, 
hypothesis_subsumption, 
sqequalIntensionalEquality, 
applyEquality, 
lambdaEquality, 
intEquality, 
minusEquality, 
cumulativity, 
callbyvalueReduce, 
sqleReflexivity, 
dependent_set_memberEquality, 
applyLambdaEquality, 
setElimination, 
rename, 
multiplyEquality
Latex:
\mforall{}[L:Top  List].  \mforall{}[x:Top].    (last([x  /  L])  \msim{}  if  null(L)  then  x  else  last(L)  fi  )
Date html generated:
2017_04_14-AM-08_37_51
Last ObjectModification:
2017_02_27-PM-03_29_32
Theory : list_0
Home
Index