Nuprl Lemma : apply-updated-alist

[A,T:Type]. ∀[eq:EqDecider(T)]. ∀[x,y:T]. ∀[L:(T × A) List]. ∀[z:A]. ∀[f:A ⟶ A].
  (apply-alist(eq;update-alist(eq;L;x;z;v.f[v]);y)
  case apply-alist(eq;L;y)
     of inl(v) =>
     inl if eq then f[v] else fi 
     inr(any) =>
     if eq then inl else inr ⋅  fi 
  ∈ (A?))


Proof




Definitions occuring in Statement :  apply-alist: apply-alist(eq;L;x) update-alist: update-alist(eq;L;x;z;v.f[v]) list: List deq: EqDecider(T) ifthenelse: if then else fi  it: uall: [x:A]. B[x] so_apply: x[s] unit: Unit apply: a function: x:A ⟶ B[x] product: x:A × B[x] decide: case of inl(x) => s[x] inr(y) => t[y] inr: inr  inl: inl x union: left right universe: Type equal: t ∈ T
Definitions unfolded in proof :  uall: [x:A]. B[x] member: t ∈ T so_lambda: λ2x.t[x] so_apply: x[s] all: x:A. B[x] implies:  Q deq: EqDecider(T) prop: apply-alist: apply-alist(eq;L;x) update-alist: update-alist(eq;L;x;z;v.f[v]) so_lambda: so_lambda(x,y,z.t[x; y; z]) top: Top so_apply: x[s1;s2;s3] list_ind: list_ind nil: [] it: pi1: fst(t) pi2: snd(t) exposed-bfalse: exposed-bfalse bool: 𝔹 unit: Unit btrue: tt eqof: eqof(d) uiff: uiff(P;Q) and: P ∧ Q uimplies: supposing a ifthenelse: if then else fi  bfalse: ff iff: ⇐⇒ Q not: ¬A rev_implies:  Q exists: x:A. B[x] or: P ∨ Q sq_type: SQType(T) guard: {T} bnot: ¬bb assert: b false: False
Lemmas referenced :  list_induction uall_wf equal_wf unit_wf2 apply-alist_wf update-alist_wf ifthenelse_wf it_wf list_wf deq_wf list_ind_nil_lemma list_ind_cons_lemma bool_wf equal-wf-T-base assert_wf bnot_wf not_wf eqof_wf uiff_transitivity eqtt_to_assert safe-assert-deq iff_transitivity iff_weakening_uiff eqff_to_assert assert_of_bnot apply_alist_cons_lemma bool_cases_sqequal subtype_base_sq bool_subtype_base assert-bnot equal-unit bool_cases
Rules used in proof :  sqequalSubstitution sqequalTransitivity computationStep sqequalReflexivity isect_memberFormation introduction cut thin extract_by_obid sqequalHypSubstitution isectElimination productEquality hypothesisEquality sqequalRule lambdaEquality functionEquality unionEquality hypothesis applyEquality lambdaFormation equalityTransitivity equalitySymmetry unionElimination inlEquality setElimination rename inrEquality dependent_functionElimination independent_functionElimination because_Cache isect_memberEquality axiomEquality universeEquality voidElimination voidEquality baseClosed equalityElimination productElimination independent_isectElimination independent_pairFormation addLevel impliesFunctionality levelHypothesis dependent_pairFormation promote_hyp instantiate cumulativity

Latex:
\mforall{}[A,T:Type].  \mforall{}[eq:EqDecider(T)].  \mforall{}[x,y:T].  \mforall{}[L:(T  \mtimes{}  A)  List].  \mforall{}[z:A].  \mforall{}[f:A  {}\mrightarrow{}  A].
    (apply-alist(eq;update-alist(eq;L;x;z;v.f[v]);y)
    =  case  apply-alist(eq;L;y)
          of  inl(v)  =>
          inl  if  eq  x  y  then  f[v]  else  v  fi 
          |  inr(any)  =>
          if  eq  x  y  then  inl  z  else  inr  \mcdot{}    fi  )



Date html generated: 2019_06_20-PM-00_43_06
Last ObjectModification: 2018_08_21-PM-01_53_58

Theory : list_0


Home Index