src/HOL/Bali/DeclConcepts.thy
changeset 38540 8c08631cb4b6
parent 37956 ee939247b2fb
child 41778 5f79a9e42507
equal deleted inserted replaced
38539:3be65f879bcd 38540:8c08631cb4b6
    96 end
    96 end
    97 
    97 
    98 lemma acc_modi_accmodi_simp[simp]: "accmodi (a::acc_modi) = a"
    98 lemma acc_modi_accmodi_simp[simp]: "accmodi (a::acc_modi) = a"
    99 by (simp add: acc_modi_accmodi_def)
    99 by (simp add: acc_modi_accmodi_def)
   100 
   100 
   101 instantiation decl_ext_type:: (type) has_accmodi
   101 instantiation decl_ext :: (type) has_accmodi
   102 begin
   102 begin
   103 
   103 
   104 definition
   104 definition
   105   decl_acc_modi_def: "accmodi (d::('a:: type) decl_scheme) = access d"
   105   decl_acc_modi_def: "accmodi (d::('a:: type) decl_scheme) = access d"
   106 
   106 
   148 out of various HOL types *}
   148 out of various HOL types *}
   149 
   149 
   150 class has_declclass =
   150 class has_declclass =
   151   fixes declclass:: "'a \<Rightarrow> qtname"
   151   fixes declclass:: "'a \<Rightarrow> qtname"
   152 
   152 
   153 instantiation qtname_ext_type :: (type) has_declclass
   153 instantiation qtname_ext :: (type) has_declclass
   154 begin
   154 begin
   155 
   155 
   156 definition
   156 definition
   157   "declclass q = \<lparr> pid = pid q, tid = tid q \<rparr>"
   157   "declclass q = \<lparr> pid = pid q, tid = tid q \<rparr>"
   158 
   158 
   160 
   160 
   161 end
   161 end
   162 
   162 
   163 lemma qtname_declclass_def:
   163 lemma qtname_declclass_def:
   164   "declclass q \<equiv> (q::qtname)"
   164   "declclass q \<equiv> (q::qtname)"
   165   by (induct q) (simp add: declclass_qtname_ext_type_def)
   165   by (induct q) (simp add: declclass_qtname_ext_def)
   166 
   166 
   167 lemma qtname_declclass_simp[simp]: "declclass (q::qtname) = q"
   167 lemma qtname_declclass_simp[simp]: "declclass (q::qtname) = q"
   168 by (simp add: qtname_declclass_def)
   168 by (simp add: qtname_declclass_def)
   169 
   169 
   170 instantiation prod :: (has_declclass, type) has_declclass
   170 instantiation prod :: (has_declclass, type) has_declclass
   184 out of various HOL types *}
   184 out of various HOL types *}
   185 
   185 
   186 class has_static =
   186 class has_static =
   187   fixes is_static :: "'a \<Rightarrow> bool"
   187   fixes is_static :: "'a \<Rightarrow> bool"
   188 
   188 
   189 instantiation decl_ext_type :: (has_static) has_static
   189 instantiation decl_ext :: (has_static) has_static
   190 begin
   190 begin
   191 
   191 
   192 instance ..
   192 instance ..
   193 
   193 
   194 end
   194 end
   195 
   195 
   196 instantiation member_ext_type :: (type) has_static
   196 instantiation member_ext :: (type) has_static
   197 begin
   197 begin
   198 
   198 
   199 instance ..
   199 instance ..
   200 
   200 
   201 end
   201 end
   455 out of various HOL types *}
   455 out of various HOL types *}
   456 
   456 
   457 class has_resTy =
   457 class has_resTy =
   458   fixes resTy:: "'a \<Rightarrow> ty"
   458   fixes resTy:: "'a \<Rightarrow> ty"
   459 
   459 
   460 instantiation decl_ext_type :: (has_resTy) has_resTy
   460 instantiation decl_ext :: (has_resTy) has_resTy
   461 begin
   461 begin
   462 
   462 
   463 instance ..
   463 instance ..
   464 
   464 
   465 end
   465 end
   466 
   466 
   467 instantiation member_ext_type :: (has_resTy) has_resTy
   467 instantiation member_ext :: (has_resTy) has_resTy
   468 begin
   468 begin
   469 
   469 
   470 instance ..
   470 instance ..
   471 
   471 
   472 end
   472 end
   473 
   473 
   474 instantiation mhead_ext_type :: (type) has_resTy
   474 instantiation mhead_ext :: (type) has_resTy
   475 begin
   475 begin
   476 
   476 
   477 instance ..
   477 instance ..
   478 
   478 
   479 end
   479 end
   485 by (simp add: mhead_ext_type_resTy_def)
   485 by (simp add: mhead_ext_type_resTy_def)
   486 
   486 
   487 lemma resTy_mhead [simp]:"resTy (mhead m) = resTy m"
   487 lemma resTy_mhead [simp]:"resTy (mhead m) = resTy m"
   488 by (simp add: mhead_def mhead_resTy_simp)
   488 by (simp add: mhead_def mhead_resTy_simp)
   489 
   489 
   490 instantiation prod :: ("type","has_resTy") has_resTy
   490 instantiation prod :: (type, has_resTy) has_resTy
   491 begin
   491 begin
   492 
   492 
   493 definition
   493 definition
   494   pair_resTy_def: "resTy p = resTy (snd p)"
   494   pair_resTy_def: "resTy p = resTy (snd p)"
   495 
   495