src/HOL/Bali/TypeSafe.thy
changeset 14700 2f885b7e5ba7
parent 14030 cd928c0ac225
child 14981 e73f8140af78
equal deleted inserted replaced
14699:2c9b463044ec 14700:2f885b7e5ba7
   774 apply (drule (1) conforms_globsD [THEN oconf_lconf, THEN lconfD])
   774 apply (drule (1) conforms_globsD [THEN oconf_lconf, THEN lconfD])
   775 defer apply assumption
   775 defer apply assumption
   776 apply (force intro: var_tys_Some_eq [THEN iffD2])
   776 apply (force intro: var_tys_Some_eq [THEN iffD2])
   777 done
   777 done
   778 
   778 
   779 lemma obj_split: "\<And> obj. \<exists> t vs. obj = \<lparr>tag=t,values=vs\<rparr>"
   779 lemma obj_split: "\<exists> t vs. obj = \<lparr>tag=t,values=vs\<rparr>"
   780 proof record_split
   780   by (cases obj) auto
   781   fix tag values more
       
   782   show "\<exists>t vs. \<lparr>tag = tag, values = values, \<dots> = more\<rparr> = \<lparr>tag = t, values = vs\<rparr>"
       
   783     by auto
       
   784 qed
       
   785  
   781  
   786 lemma AVar_lemma2: "error_free state 
   782 lemma AVar_lemma2: "error_free state 
   787        \<Longrightarrow> error_free
   783        \<Longrightarrow> error_free
   788            (assign
   784            (assign
   789              (\<lambda>v (x, s').
   785              (\<lambda>v (x, s').
  3600 	  by (auto simp add: member_is_static_simp)
  3596 	  by (auto simp add: member_is_static_simp)
  3601 	from accfield iscls_statC wf
  3597 	from accfield iscls_statC wf
  3602 	show "G\<turnstile>statC\<preceq>\<^sub>C statDeclC"
  3598 	show "G\<turnstile>statC\<preceq>\<^sub>C statDeclC"
  3603 	  by (auto dest!: accfield_fields dest: fields_declC)
  3599 	  by (auto dest!: accfield_fields dest: fields_declC)
  3604 	from accfield
  3600 	from accfield
  3605 	show fld: "table_of (fields G statC) (fn, statDeclC) = Some f"
  3601 	show fld: "table_of (DeclConcepts.fields G statC) (fn, statDeclC) = Some f"
  3606 	  by (auto dest!: accfield_fields)
  3602 	  by (auto dest!: accfield_fields)
  3607 	from wf show "wf_prog G" .
  3603 	from wf show "wf_prog G" .
  3608 	from conf_a s2 show "x2 = None \<longrightarrow> G,store2\<turnstile>a\<Colon>\<preceq>Class statC"
  3604 	from conf_a s2 show "x2 = None \<longrightarrow> G,store2\<turnstile>a\<Colon>\<preceq>Class statC"
  3609 	  by auto
  3605 	  by auto
  3610 	from fld wf iscls_statC
  3606 	from fld wf iscls_statC