Nuprl Lemma : int-list-index-append
∀[x:ℤ]. ∀[L1,L2:ℤ List].
  (int-list-index(L1 @ L2;x) ~ if int-list-member(x;L1)
  then int-list-index(L1;x)
  else ||L1|| + int-list-index(L2;x)
  fi )
Proof
Definitions occuring in Statement : 
int-list-index: int-list-index(L;x)
, 
int-list-member: int-list-member(i;xs)
, 
length: ||as||
, 
append: as @ bs
, 
list: T List
, 
ifthenelse: if b then t else f fi 
, 
uall: ∀[x:A]. B[x]
, 
add: n + m
, 
int: ℤ
, 
sqequal: s ~ t
Definitions unfolded in proof : 
uall: ∀[x:A]. B[x]
, 
member: t ∈ T
, 
all: ∀x:A. B[x]
, 
nat: ℕ
, 
implies: P 
⇒ Q
, 
false: False
, 
ge: i ≥ j 
, 
uimplies: b supposing a
, 
not: ¬A
, 
satisfiable_int_formula: satisfiable_int_formula(fmla)
, 
exists: ∃x:A. B[x]
, 
and: P ∧ Q
, 
prop: ℙ
, 
or: P ∨ Q
, 
append: as @ bs
, 
so_lambda: so_lambda3, 
so_apply: x[s1;s2;s3]
, 
cons: [a / b]
, 
le: A ≤ B
, 
less_than': less_than'(a;b)
, 
colength: colength(L)
, 
nil: []
, 
it: ⋅
, 
guard: {T}
, 
so_lambda: λ2x.t[x]
, 
so_apply: x[s]
, 
sq_type: SQType(T)
, 
less_than: a < b
, 
squash: ↓T
, 
so_lambda: λ2x y.t[x; y]
, 
so_apply: x[s1;s2]
, 
decidable: Dec(P)
, 
subtype_rel: A ⊆r B
, 
bool: 𝔹
, 
unit: Unit
, 
btrue: tt
, 
uiff: uiff(P;Q)
, 
iff: P 
⇐⇒ Q
, 
ifthenelse: if b then t else f fi 
, 
bfalse: ff
, 
bnot: ¬bb
, 
assert: ↑b
, 
rev_implies: P 
⇐ Q
, 
int_seg: {i..j-}
, 
int-list-index: int-list-index(L;x)
, 
lelt: i ≤ j < k
, 
nat_plus: ℕ+
, 
nequal: a ≠ b ∈ T 
, 
subtract: n - m
Lemmas referenced : 
nat_properties, 
full-omega-unsat, 
intformand_wf, 
intformle_wf, 
itermConstant_wf, 
itermVar_wf, 
intformless_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_less_lemma, 
int_formula_prop_wf, 
ge_wf, 
istype-less_than, 
list-cases, 
list_ind_nil_lemma, 
length_of_nil_lemma, 
product_subtype_list, 
colength-cons-not-zero, 
colength_wf_list, 
istype-void, 
istype-le, 
subtract-1-ge-0, 
subtype_base_sq, 
intformeq_wf, 
int_formula_prop_eq_lemma, 
set_subtype_base, 
int_subtype_base, 
spread_cons_lemma, 
decidable__equal_int, 
subtract_wf, 
intformnot_wf, 
itermSubtract_wf, 
itermAdd_wf, 
int_formula_prop_not_lemma, 
int_term_value_subtract_lemma, 
int_term_value_add_lemma, 
decidable__le, 
le_wf, 
list_ind_cons_lemma, 
length_of_cons_lemma, 
istype-nat, 
list_wf, 
int-list-member_wf, 
nil_wf, 
eqtt_to_assert, 
assert-int-list-member, 
null_nil_lemma, 
btrue_wf, 
member-implies-null-eq-bfalse, 
btrue_neq_bfalse, 
eqff_to_assert, 
bool_cases_sqequal, 
bool_wf, 
bool_subtype_base, 
assert-bnot, 
l_member_wf, 
zero-add, 
int-list-index_wf, 
int_seg_wf, 
length_wf, 
cons_wf, 
append_wf, 
lelt_wf, 
eq_int_wf, 
assert_of_eq_int, 
istype-false, 
add_nat_plus, 
add_nat_wf, 
length_wf_nat, 
length-append, 
add-is-int-iff, 
false_wf, 
decidable__lt, 
nat_plus_properties, 
neg_assert_of_eq_int, 
cons_member, 
add-member-int_seg2, 
int_seg_subtype, 
non_neg_length, 
length_append, 
subtype_rel_list, 
top_wf, 
int_seg_properties, 
int_seg_subtype_nat
Rules used in proof : 
sqequalSubstitution, 
sqequalTransitivity, 
computationStep, 
sqequalReflexivity, 
isect_memberFormation_alt, 
introduction, 
cut, 
thin, 
lambdaFormation_alt, 
extract_by_obid, 
sqequalHypSubstitution, 
isectElimination, 
hypothesisEquality, 
hypothesis, 
setElimination, 
rename, 
intWeakElimination, 
natural_numberEquality, 
independent_isectElimination, 
approximateComputation, 
independent_functionElimination, 
dependent_pairFormation_alt, 
lambdaEquality_alt, 
int_eqEquality, 
dependent_functionElimination, 
Error :memTop, 
sqequalRule, 
independent_pairFormation, 
universeIsType, 
voidElimination, 
isect_memberEquality_alt, 
axiomSqEquality, 
isectIsTypeImplies, 
inhabitedIsType, 
functionIsTypeImplies, 
intEquality, 
unionElimination, 
promote_hyp, 
hypothesis_subsumption, 
productElimination, 
equalityIstype, 
because_Cache, 
dependent_set_memberEquality_alt, 
instantiate, 
equalityTransitivity, 
equalitySymmetry, 
applyLambdaEquality, 
imageElimination, 
baseApply, 
closedConclusion, 
baseClosed, 
applyEquality, 
sqequalBase, 
equalityElimination, 
cumulativity, 
addEquality, 
pointwiseFunctionality, 
productIsType, 
minusEquality, 
inlFormation_alt, 
inrFormation_alt
Latex:
\mforall{}[x:\mBbbZ{}].  \mforall{}[L1,L2:\mBbbZ{}  List].
    (int-list-index(L1  @  L2;x)  \msim{}  if  int-list-member(x;L1)
    then  int-list-index(L1;x)
    else  ||L1||  +  int-list-index(L2;x)
    fi  )
Date html generated:
2020_05_20-AM-08_08_37
Last ObjectModification:
2020_01_31-AM-09_41_04
Theory : general
Home
Index