Nuprl Lemma : last-decomp2
∀[l:Top List]. (l ~ if (||l|| =z 0) then [] else firstn(||l|| - 1;l) @ [last(l)] fi )
Proof
Definitions occuring in Statement : 
firstn: firstn(n;as), 
last: last(L), 
length: ||as||, 
append: as @ bs, 
cons: [a / b], 
nil: [], 
list: T List, 
ifthenelse: if b then t else f fi , 
eq_int: (i =z j), 
uall: ∀[x:A]. B[x], 
top: Top, 
subtract: n - m, 
natural_number: $n, 
sqequal: s ~ t
Definitions unfolded in proof : 
uall: ∀[x:A]. B[x], 
member: t ∈ T, 
all: ∀x:A. B[x], 
implies: P ⇒ Q, 
bool: 𝔹, 
unit: Unit, 
it: ⋅, 
btrue: tt, 
uiff: uiff(P;Q), 
and: P ∧ Q, 
uimplies: b supposing a, 
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, 
false: False, 
cons: [a / b], 
ge: i ≥ j , 
le: A ≤ B, 
not: ¬A, 
satisfiable_int_formula: satisfiable_int_formula(fmla), 
prop: ℙ, 
decidable: Dec(P), 
nequal: a ≠ b ∈ T 
Lemmas referenced : 
eq_int_wf, 
length_wf, 
top_wf, 
eqtt_to_assert, 
assert_of_eq_int, 
eqff_to_assert, 
bool_cases_sqequal, 
subtype_base_sq, 
bool_subtype_base, 
assert-bnot, 
neg_assert_of_eq_int, 
list_wf, 
list-cases, 
product_subtype_list, 
length_of_cons_lemma, 
le_weakening2, 
non_neg_length, 
decidable__lt, 
full-omega-unsat, 
intformand_wf, 
intformle_wf, 
itermConstant_wf, 
itermVar_wf, 
intformeq_wf, 
itermAdd_wf, 
istype-int, 
int_formula_prop_and_lemma, 
int_formula_prop_le_lemma, 
int_term_value_constant_lemma, 
int_term_value_var_lemma, 
int_formula_prop_eq_lemma, 
int_term_value_add_lemma, 
int_formula_prop_wf, 
last-decomp, 
intformnot_wf, 
intformless_wf, 
int_formula_prop_not_lemma, 
int_formula_prop_less_lemma
Rules used in proof : 
sqequalSubstitution, 
sqequalTransitivity, 
computationStep, 
sqequalReflexivity, 
isect_memberFormation_alt, 
introduction, 
cut, 
extract_by_obid, 
sqequalHypSubstitution, 
isectElimination, 
thin, 
hypothesis, 
hypothesisEquality, 
natural_numberEquality, 
inhabitedIsType, 
lambdaFormation_alt, 
unionElimination, 
equalityElimination, 
equalityTransitivity, 
equalitySymmetry, 
productElimination, 
independent_isectElimination, 
sqequalRule, 
dependent_pairFormation_alt, 
equalityIstype, 
promote_hyp, 
dependent_functionElimination, 
instantiate, 
because_Cache, 
independent_functionElimination, 
voidElimination, 
axiomSqEquality, 
universeIsType, 
hypothesis_subsumption, 
Error :memTop, 
approximateComputation, 
lambdaEquality_alt, 
int_eqEquality, 
independent_pairFormation
Latex:
\mforall{}[l:Top  List].  (l  \msim{}  if  (||l||  =\msubz{}  0)  then  []  else  firstn(||l||  -  1;l)  @  [last(l)]  fi  )
Date html generated:
2020_05_19-PM-09_44_00
Last ObjectModification:
2020_03_09-PM-00_43_04
Theory : list_1
Home
Index