Nuprl Lemma : C_Struct_vs_DVALp

∀store:C_STOREp(). ∀ctyp:C_TYPE(). ∀env:C_TYPE_env(). ∀dval:C_DVALUEp().
  (C_STOREp-welltyped(env;store)
  ⇒ (↑C_Struct?(ctyp))
  ⇒ C_TYPE_vs_DVALp(env;ctyp) dval 
     = if DVp_Struct?(dval)
       then let r = map(λp.<fst(p), C_TYPE_vs_DVALp(env;snd(p))>;C_Struct-fields(ctyp)) in
             let lbls = DVp_Struct-lbls(dval) in
             let g = DVp_Struct-struct(dval) in
             (∀p∈r.let a,wt = p 
                   in a ∈b lbls ∧b (wt (g a)))_b
       else ff
       fi )


Proof




Definitions occuring in Statement :  C_STOREp-welltyped: C_STOREp-welltyped(env;store),  C_STOREp: C_STOREp(),  C_TYPE_vs_DVALp: C_TYPE_vs_DVALp(env;ctyp),  DVp_Struct-struct: DVp_Struct-struct(v),  DVp_Struct-lbls: DVp_Struct-lbls(v),  DVp_Struct?: DVp_Struct?(v),  C_DVALUEp: C_DVALUEp(),  C_TYPE_env: C_TYPE_env(),  C_Struct-fields: C_Struct-fields(v),  C_Struct?: C_Struct?(v),  C_TYPE: C_TYPE(),  bl-all: (∀x∈L.P[x])_b,  deq-member: x ∈b L,  map: map(f;as),  atom-deq: AtomDeq,  band: p ∧b q,  assert: ↑b,  ifthenelse: if b then t else f fi ,  bfalse: ff,  bool: 𝔹,  let: let,  pi1: fst(t),  pi2: snd(t),  all: ∀x:A. B[x],  implies: P ⇒ Q,  apply: f a,  lambda: λx.A[x],  spread: spread def,  pair: <a, b>,  equal: s = t ∈ T
Definitions unfolded in proof :  all: ∀x:A. B[x],  uall: ∀[x:A]. B[x],  so_lambda: λ2x.t[x],  member: t ∈ T,  let: let,  implies: P ⇒ Q,  prop: ℙ,  bool: 𝔹,  unit: Unit,  it: ⋅,  btrue: tt,  ifthenelse: if b then t else f fi ,  uiff: uiff(P;Q),  and: P ∧ Q,  uimplies: b supposing a,  pi1: fst(t),  pi2: snd(t),  subtype_rel: A ⊆r B,  so_apply: x[s],  top: Top,  band: p ∧b q,  iff: P ⇐⇒ Q,  bfalse: ff,  C_Void: C_Void(),  C_Struct?: C_Struct?(v),  C_Struct-fields: C_Struct-fields(v),  eq_atom: x =a y,  assert: ↑b,  false: False,  C_Int: C_Int(),  C_Struct: C_Struct(fields),  C_TYPE_vs_DVALp: C_TYPE_vs_DVALp(env;ctyp),  C_TYPE_ind: C_TYPE_ind,  exists: ∃x:A. B[x],  or: P ∨ Q,  sq_type: SQType(T),  guard: {T},  bnot: ¬bb,  C_Array: C_Array(length;elems),  C_Pointer: C_Pointer(to),  has-value: (a)↓,  int_seg: {i..j-},  lelt: i ≤ j < k,  decidable: Dec(P),  satisfiable_int_formula: satisfiable_int_formula(fmla),  not: ¬A,  less_than: a < b,  squash: ↓T,  ext-eq: A ≡ B,  DVp_Null: DVp_Null(x),  DVp_Struct?: DVp_Struct?(v),  DVp_Struct-lbls: DVp_Struct-lbls(v),  DVp_Struct-struct: DVp_Struct-struct(v),  DVp_Int: DVp_Int(int),  DVp_Pointer: DVp_Pointer(ptr),  DVp_Array: DVp_Array(lower;upper;arr),  DVp_Struct: DVp_Struct(lbls;struct),  rev_implies: P ⇐ Q,  select: L[n],  nil: [],  so_lambda: λ2x y.t[x; y],  so_apply: x[s1;s2],  ge: i ≥ j ,  le: A ≤ B,  less_than': less_than'(a;b),  nat_plus: ℕ+,  true: True,  cons: [a / b],  subtract: n - m
Lemmas referenced :  select-cons-tl,  C_TYPE_subtype_base,  product_subtype_base,  int_subtype_base,  decidable__equal_int,  select_cons_tl_sq,  int_term_value_subtract_lemma,  itermSubtract_wf,  subtract_wf,  add-member-int_seg2,  lelt_wf,  int_formula_prop_eq_lemma,  intformeq_wf,  add-is-int-iff,  nat_plus_properties,  nat_plus_wf,  less_than_wf,  add_nat_plus,  int_term_value_add_lemma,  itermAdd_wf,  non_neg_length,  cons_wf,  l_all_cons,  nil_wf,  l_all_nil,  map_cons_lemma,  length_of_cons_lemma,  map_nil_lemma,  base_wf,  stuck-spread,  length_of_nil_lemma,  list_induction,  iff_wf,  assert-bl-all,  assert-bdd-all,  neg_assert_of_eq_atom,  it_wf,  unit_subtype_base,  atom_subtype_base,  assert_of_eq_atom,  eq_atom_wf,  C_DVALUEp-ext,  int_seg_wf,  int_formula_prop_less_lemma,  intformless_wf,  decidable__lt,  int_formula_prop_wf,  int_term_value_var_lemma,  int_term_value_constant_lemma,  int_formula_prop_le_lemma,  int_formula_prop_not_lemma,  int_formula_prop_and_lemma,  itermVar_wf,  itermConstant_wf,  intformle_wf,  intformnot_wf,  intformand_wf,  satisfiable-full-omega-tt,  decidable__le,  length_wf,  int_seg_properties,  select_wf,  atom-value-type,  value-type-has-value,  length_wf_nat,  bdd-all_wf,  iff_imp_equal_bool,  C_STOREp_wf,  nat_wf,  list_wf,  l_all_wf2,  true_wf,  bfalse_wf,  assert-bnot,  bool_subtype_base,  subtype_base_sq,  bool_cases_sqequal,  equal_wf,  eqff_to_assert,  false_wf,  DVp_Struct-struct_wf,  assert-deq-member,  DVp_Struct-lbls_wf,  atom-deq_wf,  deq-member_wf,  pi2_wf,  top_wf,  subtype_rel_product,  pi1_wf_top,  l_member_wf,  C_Struct-fields_wf,  C_TYPE_wf,  map_wf,  bl-all_wf,  eqtt_to_assert,  DVp_Struct?_wf,  C_TYPE_vs_DVALp_wf,  bool_wf,  C_Struct?_wf,  assert_wf,  C_STOREp-welltyped_wf,  C_DVALUEp_wf,  C_TYPE_env_wf,  all_wf,  C_TYPE-induction
Rules used in proof :  sqequalSubstitution,  sqequalTransitivity,  computationStep,  sqequalReflexivity,  lambdaFormation,  cut,  lemma_by_obid,  sqequalHypSubstitution,  isectElimination,  thin,  sqequalRule,  lambdaEquality,  hypothesis,  functionEquality,  dependent_functionElimination,  hypothesisEquality,  equalityEquality,  applyEquality,  because_Cache,  unionElimination,  equalityElimination,  productElimination,  independent_isectElimination,  productEquality,  atomEquality,  independent_pairEquality,  isect_memberEquality,  voidElimination,  voidEquality,  setElimination,  rename,  independent_functionElimination,  dependent_set_memberEquality,  equalityTransitivity,  equalitySymmetry,  setEquality,  dependent_pairFormation,  promote_hyp,  instantiate,  callbyvalueReduce,  natural_numberEquality,  int_eqEquality,  intEquality,  independent_pairFormation,  computeAll,  imageElimination,  spreadEquality,  hypothesis_subsumption,  tokenEquality,  cumulativity,  addLevel,  impliesFunctionality,  baseClosed,  addEquality,  andLevelFunctionality,  introduction,  imageMemberEquality,  pointwiseFunctionality,  baseApply,  closedConclusion

Latex:
\mforall{}store:C\_STOREp().  \mforall{}ctyp:C\_TYPE().  \mforall{}env:C\_TYPE\_env().  \mforall{}dval:C\_DVALUEp().
    (C\_STOREp-welltyped(env;store)
    {}\mRightarrow{}  (\muparrow{}C\_Struct?(ctyp))
    {}\mRightarrow{}  C\_TYPE\_vs\_DVALp(env;ctyp)  dval 
          =  if  DVp\_Struct?(dval)
              then  let  r  =  map(\mlambda{}p.<fst(p),  C\_TYPE\_vs\_DVALp(env;snd(p))>C\_Struct-fields(ctyp))  in
                          let  lbls  =  DVp\_Struct-lbls(dval)  in
                          let  g  =  DVp\_Struct-struct(dval)  in
                          (\mforall{}p\mmember{}r.let  a,wt  =  p 
                                      in  a  \mmember{}\msubb{}  lbls  \mwedge{}\msubb{}  (wt  (g  a)))\_b
              else  ff
              fi  )



Date html generated: 2016_05_16-AM-08_51_56
Last ObjectModification: 2016_01_17-AM-09_45_08

Theory : C-semantics


Home Index