Nuprl Lemma : first-success-is-inl
∀[T:Type]. ∀[A:T ⟶ Type]. ∀[f:x:T ⟶ (A[x]?)]. ∀[L:T List]. ∀[j:ℕ||L||]. ∀[a:A[L[j]]].
  (first-success(f;L) = (inl <j, a>) ∈ (i:ℕ||L|| × A[L[i]]?)
  
⇐⇒ j < ||L|| ∧ ((f L[j]) = (inl a) ∈ (A[L[j]]?)) ∧ (∀x∈firstn(j;L).↑isr(f x)))
Proof
Definitions occuring in Statement : 
firstn: firstn(n;as)
, 
l_all: (∀x∈L.P[x])
, 
first-success: first-success(f;L)
, 
select: L[n]
, 
length: ||as||
, 
list: T List
, 
int_seg: {i..j-}
, 
assert: ↑b
, 
isr: isr(x)
, 
less_than: a < b
, 
uall: ∀[x:A]. B[x]
, 
so_apply: x[s]
, 
iff: P 
⇐⇒ Q
, 
and: P ∧ Q
, 
unit: Unit
, 
apply: f a
, 
function: x:A ⟶ B[x]
, 
pair: <a, b>
, 
product: x:A × B[x]
, 
inl: inl x
, 
union: left + right
, 
natural_number: $n
, 
universe: Type
, 
equal: s = t ∈ 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]
, 
top: Top
, 
and: P ∧ Q
, 
prop: ℙ
, 
iff: P 
⇐⇒ Q
, 
int_seg: {i..j-}
, 
lelt: i ≤ j < k
, 
le: A ≤ B
, 
less_than: a < b
, 
squash: ↓T
, 
guard: {T}
, 
rev_implies: P 
⇐ Q
, 
l_all: (∀x∈L.P[x])
, 
or: P ∨ Q
, 
first-success: first-success(f;L)
, 
select: L[n]
, 
nil: []
, 
it: ⋅
, 
so_lambda: λ2x y.t[x; y]
, 
so_apply: x[s1;s2]
, 
so_lambda: so_lambda3, 
so_apply: x[s1;s2;s3]
, 
cons: [a / b]
, 
decidable: Dec(P)
, 
isr: isr(x)
, 
colength: colength(L)
, 
so_lambda: λ2x.t[x]
, 
so_apply: x[s]
, 
sq_type: SQType(T)
, 
less_than': less_than'(a;b)
, 
subtype_rel: A ⊆r B
, 
firstn: firstn(n;as)
, 
list_ind: list_ind, 
uiff: uiff(P;Q)
, 
pi2: snd(t)
, 
pi1: fst(t)
, 
cand: A c∧ B
, 
bfalse: ff
, 
btrue: tt
, 
ifthenelse: if b then t else f fi 
, 
assert: ↑b
, 
outl: outl(x)
, 
isl: isl(x)
, 
true: True
, 
unit: Unit
, 
bool: 𝔹
, 
bnot: ¬bb
, 
istype: istype(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, 
istype-void, 
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, 
member-less_than, 
int_seg_properties, 
intformeq_wf, 
int_formula_prop_eq_lemma, 
assert_witness, 
list-cases, 
length_of_nil_lemma, 
stuck-spread, 
istype-base, 
list_ind_nil_lemma, 
product_subtype_list, 
colength-cons-not-zero, 
colength_wf_list, 
decidable__le, 
intformnot_wf, 
int_formula_prop_not_lemma, 
istype-le, 
select_wf, 
firstn_wf, 
decidable__lt, 
length_wf, 
bfalse_wf, 
btrue_wf, 
subtract-1-ge-0, 
subtype_base_sq, 
set_subtype_base, 
int_subtype_base, 
spread_cons_lemma, 
decidable__equal_int, 
subtract_wf, 
itermSubtract_wf, 
itermAdd_wf, 
int_term_value_subtract_lemma, 
int_term_value_add_lemma, 
le_wf, 
length_of_cons_lemma, 
list_ind_cons_lemma, 
istype-nat, 
list_wf, 
unit_wf2, 
istype-universe, 
satisfiable-full-omega-tt, 
equal-wf-base-T, 
less_than_wf, 
equal_wf, 
l_all_wf, 
nil_wf, 
assert_wf, 
isr_wf, 
l_member_wf, 
int_seg_wf, 
non_neg_length, 
add-is-int-iff, 
false_wf, 
cons_wf, 
istype-false, 
lelt_wf, 
first0, 
subtype_rel_list, 
top_wf, 
l_all_nil, 
assert_of_bnot, 
iff_weakening_uiff, 
iff_transitivity, 
eqff_to_assert, 
assert_of_lt_int, 
eqtt_to_assert, 
bool_subtype_base, 
bool_wf, 
bool_cases, 
lt_int_wf, 
bnot_wf, 
not_wf, 
istype-assert, 
l_all_cons, 
outl_wf, 
true_wf, 
first-success_wf, 
assert-bnot, 
bool_cases_sqequal, 
iff_weakening_equal, 
select_cons_tl, 
squash_wf, 
subtype_rel_wf, 
add-subtract-cancel, 
select-cons-tl, 
subtype_rel-equal, 
add-member-int_seg2, 
equal_functionality_wrt_subtype_rel2, 
subtype_rel_self, 
subtype_rel_union, 
select-cons, 
assert_of_le_int, 
le_int_wf, 
l_all_wf_nil, 
btrue_neq_bfalse, 
select-cons-hd, 
isr-first-success
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, 
isect_memberEquality_alt, 
voidElimination, 
sqequalRule, 
independent_pairFormation, 
universeIsType, 
productElimination, 
independent_pairEquality, 
imageElimination, 
equalityTransitivity, 
equalitySymmetry, 
applyLambdaEquality, 
axiomEquality, 
functionIsTypeImplies, 
inhabitedIsType, 
isectIsTypeImplies, 
unionElimination, 
baseClosed, 
promote_hyp, 
hypothesis_subsumption, 
equalityIstype, 
because_Cache, 
dependent_set_memberEquality_alt, 
applyEquality, 
instantiate, 
baseApply, 
closedConclusion, 
intEquality, 
sqequalBase, 
functionIsType, 
unionIsType, 
universeEquality, 
isect_memberFormation, 
lambdaFormation, 
dependent_pairFormation, 
lambdaEquality, 
isect_memberEquality, 
voidEquality, 
computeAll, 
unionEquality, 
productEquality, 
inlEquality, 
dependent_pairEquality, 
functionExtensionality, 
cumulativity, 
setEquality, 
productIsType, 
addEquality, 
inlEquality_alt, 
dependent_pairEquality_alt, 
pointwiseFunctionality, 
setIsType, 
Error :memTop, 
hyp_replacement, 
equalityIsType1, 
equalityIsType2, 
equalityElimination, 
isectIsType, 
imageMemberEquality, 
equalityIsType3
Latex:
\mforall{}[T:Type].  \mforall{}[A:T  {}\mrightarrow{}  Type].  \mforall{}[f:x:T  {}\mrightarrow{}  (A[x]?)].  \mforall{}[L:T  List].  \mforall{}[j:\mBbbN{}||L||].  \mforall{}[a:A[L[j]]].
    (first-success(f;L)  =  (inl  <j,  a>)  \mLeftarrow{}{}\mRightarrow{}  j  <  ||L||  \mwedge{}  ((f  L[j])  =  (inl  a))  \mwedge{}  (\mforall{}x\mmember{}firstn(j;L).\muparrow{}isr(f  x\000C)))
Date html generated:
2020_05_19-PM-09_41_49
Last ObjectModification:
2019_12_31-PM-07_21_56
Theory : list_1
Home
Index