Nuprl Lemma : first_index_cons

[T:Type]. ∀[L:T List]. ∀[a:T]. ∀[P:T ⟶ 𝔹].
  (index-of-first in [a L].P[x] if P[a] then 1
  if 0 <index-of-first in L.P[x] then index-of-first in L.P[x] 1
  else 0
  fi )


Proof




Definitions occuring in Statement :  first_index: index-of-first in L.P[x] cons: [a b] list: List ifthenelse: if then else fi  lt_int: i <j bool: 𝔹 uall: [x:A]. B[x] so_apply: x[s] function: x:A ⟶ B[x] add: m natural_number: $n universe: Type sqequal: t
Definitions unfolded in proof :  first_index: index-of-first in L.P[x] uall: [x:A]. B[x] member: t ∈ T uimplies: supposing a int_seg: {i..j-} so_lambda: λ2x.t[x] so_apply: x[s] all: x:A. B[x] top: Top sq_type: SQType(T) implies:  Q guard: {T} lelt: i ≤ j < k and: P ∧ Q decidable: Dec(P) or: P ∨ Q satisfiable_int_formula: satisfiable_int_formula(fmla) exists: x:A. B[x] false: False not: ¬A prop: ge: i ≥  le: A ≤ B select: L[n] cons: [a b] less_than: a < b squash: T subtype_rel: A ⊆B bool: 𝔹 unit: Unit it: btrue: tt uiff: uiff(P;Q) ifthenelse: if then else fi  bfalse: ff less_than': less_than'(a;b) subtract: m
Lemmas referenced :  subtype_base_sq int_seg_wf length_wf cons_wf set_subtype_base lelt_wf int_subtype_base length_of_cons_lemma bool_wf list_wf search_succ length_wf_nat select_wf int_seg_properties decidable__le satisfiable-full-omega-tt intformand_wf intformnot_wf intformle_wf itermConstant_wf itermVar_wf int_formula_prop_and_lemma int_formula_prop_not_lemma int_formula_prop_le_lemma int_term_value_constant_lemma int_term_value_var_lemma int_formula_prop_wf non_neg_length decidable__lt intformless_wf itermAdd_wf int_formula_prop_less_lemma int_term_value_add_lemma select-cons-tl add-subtract-cancel search_wf equal_wf equal-wf-T-base assert_wf bnot_wf not_wf eqtt_to_assert uiff_transitivity eqff_to_assert assert_of_bnot false_wf lt_int_wf less_than_wf add-member-int_seg2 int_seg_subtype subtract_wf add-is-int-iff itermSubtract_wf int_term_value_subtract_lemma le_int_wf le_wf assert_of_lt_int assert_functionality_wrt_uiff bnot_of_lt_int assert_of_le_int
Rules used in proof :  sqequalSubstitution sqequalRule sqequalReflexivity sqequalTransitivity computationStep isect_memberFormation introduction cut thin instantiate extract_by_obid sqequalHypSubstitution isectElimination cumulativity natural_numberEquality addEquality hypothesisEquality hypothesis independent_isectElimination intEquality lambdaEquality dependent_functionElimination isect_memberEquality voidElimination voidEquality equalityTransitivity equalitySymmetry independent_functionElimination sqequalAxiom functionEquality because_Cache universeEquality applyEquality functionExtensionality setElimination rename productElimination unionElimination dependent_pairFormation int_eqEquality independent_pairFormation computeAll imageElimination hyp_replacement applyLambdaEquality baseClosed lambdaFormation equalityElimination dependent_set_memberEquality pointwiseFunctionality promote_hyp baseApply closedConclusion

Latex:
\mforall{}[T:Type].  \mforall{}[L:T  List].  \mforall{}[a:T].  \mforall{}[P:T  {}\mrightarrow{}  \mBbbB{}].
    (index-of-first  x  in  [a  /  L].P[x]  \msim{}  if  P[a]  then  1
    if  0  <z  index-of-first  x  in  L.P[x]  then  index-of-first  x  in  L.P[x]  +  1
    else  0
    fi  )



Date html generated: 2017_10_01-AM-08_38_45
Last ObjectModification: 2017_07_26-PM-04_27_11

Theory : list!


Home Index