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