src/HOL/HOLCF/Domain.thy
author huffman
Tue Nov 30 15:56:19 2010 -0800 (2010-11-30)
changeset 40834 a1249aeff5b6
parent 40830 158d18502378
child 41285 efd23c1d9886
permissions -rw-r--r--
change cpodef-generated cont_Rep rules to cont2cont format
huffman@15741
     1
(*  Title:      HOLCF/Domain.thy
huffman@15741
     2
    Author:     Brian Huffman
huffman@15741
     3
*)
huffman@15741
     4
huffman@15741
     5
header {* Domain package *}
huffman@15741
     6
huffman@15741
     7
theory Domain
huffman@40504
     8
imports Bifinite Domain_Aux
huffman@30910
     9
uses
huffman@40575
    10
  ("Tools/domaindef.ML")
huffman@40504
    11
  ("Tools/Domain/domain_isomorphism.ML")
huffman@40504
    12
  ("Tools/Domain/domain_axioms.ML")
huffman@40504
    13
  ("Tools/Domain/domain.ML")
huffman@15741
    14
begin
huffman@15741
    15
huffman@40504
    16
default_sort "domain"
huffman@40504
    17
huffman@40504
    18
subsection {* Representations of types *}
huffman@40504
    19
huffman@40504
    20
lemma emb_prj: "emb\<cdot>((prj\<cdot>x)::'a) = cast\<cdot>DEFL('a)\<cdot>x"
huffman@40504
    21
by (simp add: cast_DEFL)
huffman@40504
    22
huffman@40504
    23
lemma emb_prj_emb:
huffman@40504
    24
  fixes x :: "'a"
huffman@40504
    25
  assumes "DEFL('a) \<sqsubseteq> DEFL('b)"
huffman@40504
    26
  shows "emb\<cdot>(prj\<cdot>(emb\<cdot>x) :: 'b) = emb\<cdot>x"
huffman@40504
    27
unfolding emb_prj
huffman@40504
    28
apply (rule cast.belowD)
huffman@40504
    29
apply (rule monofun_cfun_arg [OF assms])
huffman@40504
    30
apply (simp add: cast_DEFL)
huffman@40504
    31
done
huffman@40504
    32
huffman@40504
    33
lemma prj_emb_prj:
huffman@40504
    34
  assumes "DEFL('a) \<sqsubseteq> DEFL('b)"
huffman@40504
    35
  shows "prj\<cdot>(emb\<cdot>(prj\<cdot>x :: 'b)) = (prj\<cdot>x :: 'a)"
huffman@40504
    36
 apply (rule emb_eq_iff [THEN iffD1])
huffman@40504
    37
 apply (simp only: emb_prj)
huffman@40504
    38
 apply (rule deflation_below_comp1)
huffman@40504
    39
   apply (rule deflation_cast)
huffman@40504
    40
  apply (rule deflation_cast)
huffman@40504
    41
 apply (rule monofun_cfun_arg [OF assms])
huffman@40504
    42
done
huffman@40504
    43
huffman@40504
    44
text {* Isomorphism lemmas used internally by the domain package: *}
huffman@40504
    45
huffman@40504
    46
lemma domain_abs_iso:
huffman@40504
    47
  fixes abs and rep
huffman@40504
    48
  assumes DEFL: "DEFL('b) = DEFL('a)"
huffman@40504
    49
  assumes abs_def: "(abs :: 'a \<rightarrow> 'b) \<equiv> prj oo emb"
huffman@40504
    50
  assumes rep_def: "(rep :: 'b \<rightarrow> 'a) \<equiv> prj oo emb"
huffman@40504
    51
  shows "rep\<cdot>(abs\<cdot>x) = x"
huffman@40504
    52
unfolding abs_def rep_def
huffman@40504
    53
by (simp add: emb_prj_emb DEFL)
huffman@40504
    54
huffman@40504
    55
lemma domain_rep_iso:
huffman@40504
    56
  fixes abs and rep
huffman@40504
    57
  assumes DEFL: "DEFL('b) = DEFL('a)"
huffman@40504
    58
  assumes abs_def: "(abs :: 'a \<rightarrow> 'b) \<equiv> prj oo emb"
huffman@40504
    59
  assumes rep_def: "(rep :: 'b \<rightarrow> 'a) \<equiv> prj oo emb"
huffman@40504
    60
  shows "abs\<cdot>(rep\<cdot>x) = x"
huffman@40504
    61
unfolding abs_def rep_def
huffman@40504
    62
by (simp add: emb_prj_emb DEFL)
huffman@40504
    63
huffman@40504
    64
subsection {* Deflations as sets *}
huffman@40504
    65
huffman@40504
    66
definition defl_set :: "defl \<Rightarrow> udom set"
huffman@40504
    67
where "defl_set A = {x. cast\<cdot>A\<cdot>x = x}"
huffman@40504
    68
huffman@40504
    69
lemma adm_defl_set: "adm (\<lambda>x. x \<in> defl_set A)"
huffman@40504
    70
unfolding defl_set_def by simp
huffman@40504
    71
huffman@40504
    72
lemma defl_set_bottom: "\<bottom> \<in> defl_set A"
huffman@40504
    73
unfolding defl_set_def by simp
huffman@40504
    74
huffman@40504
    75
lemma defl_set_cast [simp]: "cast\<cdot>A\<cdot>x \<in> defl_set A"
huffman@40504
    76
unfolding defl_set_def by simp
huffman@40504
    77
huffman@40504
    78
lemma defl_set_subset_iff: "defl_set A \<subseteq> defl_set B \<longleftrightarrow> A \<sqsubseteq> B"
huffman@40504
    79
apply (simp add: defl_set_def subset_eq cast_below_cast [symmetric])
huffman@40504
    80
apply (auto simp add: cast.belowI cast.belowD)
huffman@40504
    81
done
huffman@40504
    82
huffman@40504
    83
subsection {* Proving a subtype is representable *}
huffman@40504
    84
huffman@40504
    85
text {* Temporarily relax type constraints. *}
huffman@40504
    86
huffman@40504
    87
setup {*
huffman@40504
    88
  fold Sign.add_const_constraint
huffman@40504
    89
  [ (@{const_name defl}, SOME @{typ "'a::pcpo itself \<Rightarrow> defl"})
huffman@40504
    90
  , (@{const_name emb}, SOME @{typ "'a::pcpo \<rightarrow> udom"})
huffman@40504
    91
  , (@{const_name prj}, SOME @{typ "udom \<rightarrow> 'a::pcpo"})
huffman@40504
    92
  , (@{const_name liftdefl}, SOME @{typ "'a::pcpo itself \<Rightarrow> defl"})
huffman@40504
    93
  , (@{const_name liftemb}, SOME @{typ "'a::pcpo u \<rightarrow> udom"})
huffman@40504
    94
  , (@{const_name liftprj}, SOME @{typ "udom \<rightarrow> 'a::pcpo u"}) ]
huffman@40504
    95
*}
huffman@40504
    96
huffman@40575
    97
lemma typedef_liftdomain_class:
huffman@40504
    98
  fixes Rep :: "'a::pcpo \<Rightarrow> udom"
huffman@40504
    99
  fixes Abs :: "udom \<Rightarrow> 'a::pcpo"
huffman@40504
   100
  fixes t :: defl
huffman@40504
   101
  assumes type: "type_definition Rep Abs (defl_set t)"
huffman@40504
   102
  assumes below: "op \<sqsubseteq> \<equiv> \<lambda>x y. Rep x \<sqsubseteq> Rep y"
huffman@40504
   103
  assumes emb: "emb \<equiv> (\<Lambda> x. Rep x)"
huffman@40504
   104
  assumes prj: "prj \<equiv> (\<Lambda> x. Abs (cast\<cdot>t\<cdot>x))"
huffman@40504
   105
  assumes defl: "defl \<equiv> (\<lambda> a::'a itself. t)"
huffman@40504
   106
  assumes liftemb: "(liftemb :: 'a u \<rightarrow> udom) \<equiv> udom_emb u_approx oo u_map\<cdot>emb"
huffman@40504
   107
  assumes liftprj: "(liftprj :: udom \<rightarrow> 'a u) \<equiv> u_map\<cdot>prj oo udom_prj u_approx"
huffman@40504
   108
  assumes liftdefl: "(liftdefl :: 'a itself \<Rightarrow> defl) \<equiv> (\<lambda>t. u_defl\<cdot>DEFL('a))"
huffman@40504
   109
  shows "OFCLASS('a, liftdomain_class)"
huffman@40504
   110
using liftemb [THEN meta_eq_to_obj_eq]
huffman@40504
   111
using liftprj [THEN meta_eq_to_obj_eq]
huffman@40504
   112
proof (rule liftdomain_class_intro)
huffman@40504
   113
  have emb_beta: "\<And>x. emb\<cdot>x = Rep x"
huffman@40504
   114
    unfolding emb
huffman@40504
   115
    apply (rule beta_cfun)
huffman@40834
   116
    apply (rule typedef_cont_Rep [OF type below adm_defl_set cont_id])
huffman@40504
   117
    done
huffman@40504
   118
  have prj_beta: "\<And>y. prj\<cdot>y = Abs (cast\<cdot>t\<cdot>y)"
huffman@40504
   119
    unfolding prj
huffman@40504
   120
    apply (rule beta_cfun)
huffman@40504
   121
    apply (rule typedef_cont_Abs [OF type below adm_defl_set])
huffman@40504
   122
    apply simp_all
huffman@40504
   123
    done
huffman@40504
   124
  have prj_emb: "\<And>x::'a. prj\<cdot>(emb\<cdot>x) = x"
huffman@40504
   125
    using type_definition.Rep [OF type]
huffman@40504
   126
    unfolding prj_beta emb_beta defl_set_def
huffman@40504
   127
    by (simp add: type_definition.Rep_inverse [OF type])
huffman@40504
   128
  have emb_prj: "\<And>y. emb\<cdot>(prj\<cdot>y :: 'a) = cast\<cdot>t\<cdot>y"
huffman@40504
   129
    unfolding prj_beta emb_beta
huffman@40504
   130
    by (simp add: type_definition.Abs_inverse [OF type])
huffman@40504
   131
  show "ep_pair (emb :: 'a \<rightarrow> udom) prj"
huffman@40504
   132
    apply default
huffman@40504
   133
    apply (simp add: prj_emb)
huffman@40504
   134
    apply (simp add: emb_prj cast.below)
huffman@40504
   135
    done
huffman@40504
   136
  show "cast\<cdot>DEFL('a) = emb oo (prj :: udom \<rightarrow> 'a)"
huffman@40504
   137
    by (rule cfun_eqI, simp add: defl emb_prj)
huffman@40504
   138
  show "LIFTDEFL('a) = u_defl\<cdot>DEFL('a)"
huffman@40504
   139
    unfolding liftdefl ..
huffman@40504
   140
qed
huffman@40504
   141
huffman@40504
   142
lemma typedef_DEFL:
huffman@40504
   143
  assumes "defl \<equiv> (\<lambda>a::'a::pcpo itself. t)"
huffman@40504
   144
  shows "DEFL('a::pcpo) = t"
huffman@40504
   145
unfolding assms ..
huffman@40504
   146
huffman@40504
   147
text {* Restore original typing constraints. *}
huffman@40504
   148
huffman@40504
   149
setup {*
huffman@40504
   150
  fold Sign.add_const_constraint
huffman@40504
   151
  [ (@{const_name defl}, SOME @{typ "'a::domain itself \<Rightarrow> defl"})
huffman@40504
   152
  , (@{const_name emb}, SOME @{typ "'a::domain \<rightarrow> udom"})
huffman@40504
   153
  , (@{const_name prj}, SOME @{typ "udom \<rightarrow> 'a::domain"})
huffman@40504
   154
  , (@{const_name liftdefl}, SOME @{typ "'a::predomain itself \<Rightarrow> defl"})
huffman@40504
   155
  , (@{const_name liftemb}, SOME @{typ "'a::predomain u \<rightarrow> udom"})
huffman@40504
   156
  , (@{const_name liftprj}, SOME @{typ "udom \<rightarrow> 'a::predomain u"}) ]
huffman@40504
   157
*}
huffman@40504
   158
huffman@40575
   159
use "Tools/domaindef.ML"
huffman@40504
   160
huffman@40504
   161
subsection {* Isomorphic deflations *}
huffman@40504
   162
huffman@40504
   163
definition
huffman@40504
   164
  isodefl :: "('a \<rightarrow> 'a) \<Rightarrow> defl \<Rightarrow> bool"
huffman@40504
   165
where
huffman@40504
   166
  "isodefl d t \<longleftrightarrow> cast\<cdot>t = emb oo d oo prj"
huffman@40504
   167
huffman@40504
   168
lemma isodeflI: "(\<And>x. cast\<cdot>t\<cdot>x = emb\<cdot>(d\<cdot>(prj\<cdot>x))) \<Longrightarrow> isodefl d t"
huffman@40504
   169
unfolding isodefl_def by (simp add: cfun_eqI)
huffman@40504
   170
huffman@40504
   171
lemma cast_isodefl: "isodefl d t \<Longrightarrow> cast\<cdot>t = (\<Lambda> x. emb\<cdot>(d\<cdot>(prj\<cdot>x)))"
huffman@40504
   172
unfolding isodefl_def by (simp add: cfun_eqI)
huffman@40504
   173
huffman@40504
   174
lemma isodefl_strict: "isodefl d t \<Longrightarrow> d\<cdot>\<bottom> = \<bottom>"
huffman@40504
   175
unfolding isodefl_def
huffman@40504
   176
by (drule cfun_fun_cong [where x="\<bottom>"], simp)
huffman@40504
   177
huffman@40504
   178
lemma isodefl_imp_deflation:
huffman@40504
   179
  fixes d :: "'a \<rightarrow> 'a"
huffman@40504
   180
  assumes "isodefl d t" shows "deflation d"
huffman@40504
   181
proof
huffman@40504
   182
  note assms [unfolded isodefl_def, simp]
huffman@40504
   183
  fix x :: 'a
huffman@40504
   184
  show "d\<cdot>(d\<cdot>x) = d\<cdot>x"
huffman@40504
   185
    using cast.idem [of t "emb\<cdot>x"] by simp
huffman@40504
   186
  show "d\<cdot>x \<sqsubseteq> x"
huffman@40504
   187
    using cast.below [of t "emb\<cdot>x"] by simp
huffman@40504
   188
qed
huffman@40504
   189
huffman@40504
   190
lemma isodefl_ID_DEFL: "isodefl (ID :: 'a \<rightarrow> 'a) DEFL('a)"
huffman@40504
   191
unfolding isodefl_def by (simp add: cast_DEFL)
huffman@40504
   192
huffman@40504
   193
lemma isodefl_LIFTDEFL:
huffman@40504
   194
  "isodefl (u_map\<cdot>(ID :: 'a \<rightarrow> 'a)) LIFTDEFL('a::predomain)"
huffman@40504
   195
unfolding u_map_ID DEFL_u [symmetric]
huffman@40504
   196
by (rule isodefl_ID_DEFL)
huffman@40504
   197
huffman@40504
   198
lemma isodefl_DEFL_imp_ID: "isodefl (d :: 'a \<rightarrow> 'a) DEFL('a) \<Longrightarrow> d = ID"
huffman@40504
   199
unfolding isodefl_def
huffman@40504
   200
apply (simp add: cast_DEFL)
huffman@40504
   201
apply (simp add: cfun_eq_iff)
huffman@40504
   202
apply (rule allI)
huffman@40504
   203
apply (drule_tac x="emb\<cdot>x" in spec)
huffman@40504
   204
apply simp
huffman@40504
   205
done
huffman@40504
   206
huffman@40504
   207
lemma isodefl_bottom: "isodefl \<bottom> \<bottom>"
huffman@40504
   208
unfolding isodefl_def by (simp add: cfun_eq_iff)
huffman@40504
   209
huffman@40504
   210
lemma adm_isodefl:
huffman@40504
   211
  "cont f \<Longrightarrow> cont g \<Longrightarrow> adm (\<lambda>x. isodefl (f x) (g x))"
huffman@40504
   212
unfolding isodefl_def by simp
huffman@40504
   213
huffman@40504
   214
lemma isodefl_lub:
huffman@40504
   215
  assumes "chain d" and "chain t"
huffman@40504
   216
  assumes "\<And>i. isodefl (d i) (t i)"
huffman@40504
   217
  shows "isodefl (\<Squnion>i. d i) (\<Squnion>i. t i)"
huffman@40504
   218
using prems unfolding isodefl_def
huffman@40504
   219
by (simp add: contlub_cfun_arg contlub_cfun_fun)
huffman@40504
   220
huffman@40504
   221
lemma isodefl_fix:
huffman@40504
   222
  assumes "\<And>d t. isodefl d t \<Longrightarrow> isodefl (f\<cdot>d) (g\<cdot>t)"
huffman@40504
   223
  shows "isodefl (fix\<cdot>f) (fix\<cdot>g)"
huffman@40504
   224
unfolding fix_def2
huffman@40504
   225
apply (rule isodefl_lub, simp, simp)
huffman@40504
   226
apply (induct_tac i)
huffman@40504
   227
apply (simp add: isodefl_bottom)
huffman@40504
   228
apply (simp add: assms)
huffman@40504
   229
done
huffman@40504
   230
huffman@40504
   231
lemma isodefl_abs_rep:
huffman@40504
   232
  fixes abs and rep and d
huffman@40504
   233
  assumes DEFL: "DEFL('b) = DEFL('a)"
huffman@40504
   234
  assumes abs_def: "(abs :: 'a \<rightarrow> 'b) \<equiv> prj oo emb"
huffman@40504
   235
  assumes rep_def: "(rep :: 'b \<rightarrow> 'a) \<equiv> prj oo emb"
huffman@40504
   236
  shows "isodefl d t \<Longrightarrow> isodefl (abs oo d oo rep) t"
huffman@40504
   237
unfolding isodefl_def
huffman@40504
   238
by (simp add: cfun_eq_iff assms prj_emb_prj emb_prj_emb)
huffman@40504
   239
huffman@40592
   240
lemma isodefl_sfun:
huffman@40504
   241
  "isodefl d1 t1 \<Longrightarrow> isodefl d2 t2 \<Longrightarrow>
huffman@40592
   242
    isodefl (sfun_map\<cdot>d1\<cdot>d2) (sfun_defl\<cdot>t1\<cdot>t2)"
huffman@40504
   243
apply (rule isodeflI)
huffman@40592
   244
apply (simp add: cast_sfun_defl cast_isodefl)
huffman@40592
   245
apply (simp add: emb_sfun_def prj_sfun_def)
huffman@40592
   246
apply (simp add: sfun_map_map isodefl_strict)
huffman@40504
   247
done
huffman@40504
   248
huffman@40504
   249
lemma isodefl_ssum:
huffman@40504
   250
  "isodefl d1 t1 \<Longrightarrow> isodefl d2 t2 \<Longrightarrow>
huffman@40504
   251
    isodefl (ssum_map\<cdot>d1\<cdot>d2) (ssum_defl\<cdot>t1\<cdot>t2)"
huffman@40504
   252
apply (rule isodeflI)
huffman@40504
   253
apply (simp add: cast_ssum_defl cast_isodefl)
huffman@40504
   254
apply (simp add: emb_ssum_def prj_ssum_def)
huffman@40504
   255
apply (simp add: ssum_map_map isodefl_strict)
huffman@40504
   256
done
huffman@40504
   257
huffman@40504
   258
lemma isodefl_sprod:
huffman@40504
   259
  "isodefl d1 t1 \<Longrightarrow> isodefl d2 t2 \<Longrightarrow>
huffman@40504
   260
    isodefl (sprod_map\<cdot>d1\<cdot>d2) (sprod_defl\<cdot>t1\<cdot>t2)"
huffman@40504
   261
apply (rule isodeflI)
huffman@40504
   262
apply (simp add: cast_sprod_defl cast_isodefl)
huffman@40504
   263
apply (simp add: emb_sprod_def prj_sprod_def)
huffman@40504
   264
apply (simp add: sprod_map_map isodefl_strict)
huffman@40504
   265
done
huffman@40504
   266
huffman@40504
   267
lemma isodefl_cprod:
huffman@40504
   268
  "isodefl d1 t1 \<Longrightarrow> isodefl d2 t2 \<Longrightarrow>
huffman@40504
   269
    isodefl (cprod_map\<cdot>d1\<cdot>d2) (prod_defl\<cdot>t1\<cdot>t2)"
huffman@40504
   270
apply (rule isodeflI)
huffman@40504
   271
apply (simp add: cast_prod_defl cast_isodefl)
huffman@40504
   272
apply (simp add: emb_prod_def prj_prod_def)
huffman@40504
   273
apply (simp add: cprod_map_map cfcomp1)
huffman@40504
   274
done
huffman@40504
   275
huffman@40504
   276
lemma isodefl_u:
huffman@40504
   277
  fixes d :: "'a::liftdomain \<rightarrow> 'a"
huffman@40504
   278
  shows "isodefl (d :: 'a \<rightarrow> 'a) t \<Longrightarrow> isodefl (u_map\<cdot>d) (u_defl\<cdot>t)"
huffman@40504
   279
apply (rule isodeflI)
huffman@40504
   280
apply (simp add: cast_u_defl cast_isodefl)
huffman@40504
   281
apply (simp add: emb_u_def prj_u_def liftemb_eq liftprj_eq)
huffman@40504
   282
apply (simp add: u_map_map)
huffman@40504
   283
done
huffman@40504
   284
huffman@40504
   285
lemma encode_prod_u_map:
huffman@40504
   286
  "encode_prod_u\<cdot>(u_map\<cdot>(cprod_map\<cdot>f\<cdot>g)\<cdot>(decode_prod_u\<cdot>x))
huffman@40504
   287
    = sprod_map\<cdot>(u_map\<cdot>f)\<cdot>(u_map\<cdot>g)\<cdot>x"
huffman@40504
   288
unfolding encode_prod_u_def decode_prod_u_def
huffman@40504
   289
apply (case_tac x, simp, rename_tac a b)
huffman@40504
   290
apply (case_tac a, simp, case_tac b, simp, simp)
huffman@40504
   291
done
huffman@40504
   292
huffman@40504
   293
lemma isodefl_cprod_u:
huffman@40504
   294
  assumes "isodefl (u_map\<cdot>d1) t1" and "isodefl (u_map\<cdot>d2) t2"
huffman@40504
   295
  shows "isodefl (u_map\<cdot>(cprod_map\<cdot>d1\<cdot>d2)) (sprod_defl\<cdot>t1\<cdot>t2)"
huffman@40830
   296
using isodefl_sprod [OF assms] unfolding isodefl_def
huffman@40830
   297
unfolding emb_u_def prj_u_def liftemb_prod_def liftprj_prod_def
huffman@40830
   298
by (simp add: cfcomp1 encode_prod_u_map)
huffman@40504
   299
huffman@40592
   300
lemma encode_cfun_map:
huffman@40592
   301
  "encode_cfun\<cdot>(cfun_map\<cdot>f\<cdot>g\<cdot>(decode_cfun\<cdot>x))
huffman@40592
   302
    = sfun_map\<cdot>(u_map\<cdot>f)\<cdot>g\<cdot>x"
huffman@40592
   303
unfolding encode_cfun_def decode_cfun_def
huffman@40592
   304
apply (simp add: sfun_eq_iff cfun_map_def sfun_map_def)
huffman@40592
   305
apply (rule cfun_eqI, rename_tac y, case_tac y, simp_all)
huffman@40592
   306
done
huffman@40592
   307
huffman@40592
   308
lemma isodefl_cfun:
huffman@40830
   309
  assumes "isodefl (u_map\<cdot>d1) t1" and "isodefl d2 t2"
huffman@40830
   310
  shows "isodefl (cfun_map\<cdot>d1\<cdot>d2) (sfun_defl\<cdot>t1\<cdot>t2)"
huffman@40830
   311
using isodefl_sfun [OF assms] unfolding isodefl_def
huffman@40830
   312
by (simp add: emb_cfun_def prj_cfun_def cfcomp1 encode_cfun_map)
huffman@40592
   313
huffman@40504
   314
subsection {* Setting up the domain package *}
huffman@40504
   315
huffman@40504
   316
use "Tools/Domain/domain_isomorphism.ML"
huffman@40504
   317
use "Tools/Domain/domain_axioms.ML"
huffman@40504
   318
use "Tools/Domain/domain.ML"
huffman@40504
   319
huffman@40504
   320
setup Domain_Isomorphism.setup
huffman@40504
   321
huffman@40504
   322
lemmas [domain_defl_simps] =
huffman@40592
   323
  DEFL_cfun DEFL_sfun DEFL_ssum DEFL_sprod DEFL_prod DEFL_u
huffman@40504
   324
  liftdefl_eq LIFTDEFL_prod
huffman@40504
   325
huffman@40504
   326
lemmas [domain_map_ID] =
huffman@40592
   327
  cfun_map_ID sfun_map_ID ssum_map_ID sprod_map_ID cprod_map_ID u_map_ID
huffman@40504
   328
huffman@40504
   329
lemmas [domain_isodefl] =
huffman@40592
   330
  isodefl_u isodefl_sfun isodefl_ssum isodefl_sprod
huffman@40592
   331
  isodefl_cfun isodefl_cprod isodefl_cprod_u
huffman@40504
   332
huffman@40504
   333
lemmas [domain_deflation] =
huffman@40592
   334
  deflation_cfun_map deflation_sfun_map deflation_ssum_map
huffman@40592
   335
  deflation_sprod_map deflation_cprod_map deflation_u_map
huffman@40504
   336
huffman@40504
   337
setup {*
huffman@40737
   338
  fold Domain_Take_Proofs.add_rec_type
huffman@40737
   339
    [(@{type_name cfun}, [true, true]),
huffman@40737
   340
     (@{type_name "sfun"}, [true, true]),
huffman@40737
   341
     (@{type_name ssum}, [true, true]),
huffman@40737
   342
     (@{type_name sprod}, [true, true]),
huffman@40737
   343
     (@{type_name prod}, [true, true]),
huffman@40737
   344
     (@{type_name "u"}, [true])]
huffman@40504
   345
*}
huffman@40504
   346
huffman@15741
   347
end