src/HOL/HOLCF/Domain_Aux.thy
author huffman
Wed Dec 15 19:15:06 2010 -0800 (2010-12-15)
changeset 41182 717404c7d59a
parent 40774 0437dbc127b3
child 41430 1aa23e9f2c87
permissions -rw-r--r--
add notsqsubseteq syntax
huffman@35652
     1
(*  Title:      HOLCF/Domain_Aux.thy
huffman@35652
     2
    Author:     Brian Huffman
huffman@35652
     3
*)
huffman@35652
     4
huffman@35652
     5
header {* Domain package support *}
huffman@35652
     6
huffman@35652
     7
theory Domain_Aux
huffman@40502
     8
imports Map_Functions Fixrec
huffman@35652
     9
uses
huffman@35652
    10
  ("Tools/Domain/domain_take_proofs.ML")
huffman@40503
    11
  ("Tools/cont_consts.ML")
huffman@40503
    12
  ("Tools/cont_proc.ML")
huffman@40503
    13
  ("Tools/Domain/domain_constructors.ML")
huffman@40503
    14
  ("Tools/Domain/domain_induction.ML")
huffman@35652
    15
begin
huffman@35652
    16
huffman@35653
    17
subsection {* Continuous isomorphisms *}
huffman@35653
    18
huffman@35653
    19
text {* A locale for continuous isomorphisms *}
huffman@35653
    20
huffman@35653
    21
locale iso =
huffman@35653
    22
  fixes abs :: "'a \<rightarrow> 'b"
huffman@35653
    23
  fixes rep :: "'b \<rightarrow> 'a"
huffman@35653
    24
  assumes abs_iso [simp]: "rep\<cdot>(abs\<cdot>x) = x"
huffman@35653
    25
  assumes rep_iso [simp]: "abs\<cdot>(rep\<cdot>y) = y"
huffman@35653
    26
begin
huffman@35653
    27
huffman@35653
    28
lemma swap: "iso rep abs"
huffman@35653
    29
  by (rule iso.intro [OF rep_iso abs_iso])
huffman@35653
    30
huffman@35653
    31
lemma abs_below: "(abs\<cdot>x \<sqsubseteq> abs\<cdot>y) = (x \<sqsubseteq> y)"
huffman@35653
    32
proof
huffman@35653
    33
  assume "abs\<cdot>x \<sqsubseteq> abs\<cdot>y"
huffman@35653
    34
  then have "rep\<cdot>(abs\<cdot>x) \<sqsubseteq> rep\<cdot>(abs\<cdot>y)" by (rule monofun_cfun_arg)
huffman@35653
    35
  then show "x \<sqsubseteq> y" by simp
huffman@35653
    36
next
huffman@35653
    37
  assume "x \<sqsubseteq> y"
huffman@35653
    38
  then show "abs\<cdot>x \<sqsubseteq> abs\<cdot>y" by (rule monofun_cfun_arg)
huffman@35653
    39
qed
huffman@35653
    40
huffman@35653
    41
lemma rep_below: "(rep\<cdot>x \<sqsubseteq> rep\<cdot>y) = (x \<sqsubseteq> y)"
huffman@35653
    42
  by (rule iso.abs_below [OF swap])
huffman@35653
    43
huffman@35653
    44
lemma abs_eq: "(abs\<cdot>x = abs\<cdot>y) = (x = y)"
huffman@35653
    45
  by (simp add: po_eq_conv abs_below)
huffman@35653
    46
huffman@35653
    47
lemma rep_eq: "(rep\<cdot>x = rep\<cdot>y) = (x = y)"
huffman@35653
    48
  by (rule iso.abs_eq [OF swap])
huffman@35653
    49
huffman@35653
    50
lemma abs_strict: "abs\<cdot>\<bottom> = \<bottom>"
huffman@35653
    51
proof -
huffman@35653
    52
  have "\<bottom> \<sqsubseteq> rep\<cdot>\<bottom>" ..
huffman@35653
    53
  then have "abs\<cdot>\<bottom> \<sqsubseteq> abs\<cdot>(rep\<cdot>\<bottom>)" by (rule monofun_cfun_arg)
huffman@35653
    54
  then have "abs\<cdot>\<bottom> \<sqsubseteq> \<bottom>" by simp
huffman@35653
    55
  then show ?thesis by (rule UU_I)
huffman@35653
    56
qed
huffman@35653
    57
huffman@35653
    58
lemma rep_strict: "rep\<cdot>\<bottom> = \<bottom>"
huffman@35653
    59
  by (rule iso.abs_strict [OF swap])
huffman@35653
    60
huffman@35653
    61
lemma abs_defin': "abs\<cdot>x = \<bottom> \<Longrightarrow> x = \<bottom>"
huffman@35653
    62
proof -
huffman@35653
    63
  have "x = rep\<cdot>(abs\<cdot>x)" by simp
huffman@35653
    64
  also assume "abs\<cdot>x = \<bottom>"
huffman@35653
    65
  also note rep_strict
huffman@35653
    66
  finally show "x = \<bottom>" .
huffman@35653
    67
qed
huffman@35653
    68
huffman@35653
    69
lemma rep_defin': "rep\<cdot>z = \<bottom> \<Longrightarrow> z = \<bottom>"
huffman@35653
    70
  by (rule iso.abs_defin' [OF swap])
huffman@35653
    71
huffman@35653
    72
lemma abs_defined: "z \<noteq> \<bottom> \<Longrightarrow> abs\<cdot>z \<noteq> \<bottom>"
huffman@35653
    73
  by (erule contrapos_nn, erule abs_defin')
huffman@35653
    74
huffman@35653
    75
lemma rep_defined: "z \<noteq> \<bottom> \<Longrightarrow> rep\<cdot>z \<noteq> \<bottom>"
huffman@35653
    76
  by (rule iso.abs_defined [OF iso.swap]) (rule iso_axioms)
huffman@35653
    77
huffman@40321
    78
lemma abs_bottom_iff: "(abs\<cdot>x = \<bottom>) = (x = \<bottom>)"
huffman@35653
    79
  by (auto elim: abs_defin' intro: abs_strict)
huffman@35653
    80
huffman@40321
    81
lemma rep_bottom_iff: "(rep\<cdot>x = \<bottom>) = (x = \<bottom>)"
huffman@40321
    82
  by (rule iso.abs_bottom_iff [OF iso.swap]) (rule iso_axioms)
huffman@35653
    83
huffman@35653
    84
lemma casedist_rule: "rep\<cdot>x = \<bottom> \<or> P \<Longrightarrow> x = \<bottom> \<or> P"
huffman@40321
    85
  by (simp add: rep_bottom_iff)
huffman@35653
    86
huffman@35653
    87
lemma compact_abs_rev: "compact (abs\<cdot>x) \<Longrightarrow> compact x"
huffman@35653
    88
proof (unfold compact_def)
huffman@41182
    89
  assume "adm (\<lambda>y. abs\<cdot>x \<notsqsubseteq> y)"
huffman@40327
    90
  with cont_Rep_cfun2
huffman@41182
    91
  have "adm (\<lambda>y. abs\<cdot>x \<notsqsubseteq> abs\<cdot>y)" by (rule adm_subst)
huffman@41182
    92
  then show "adm (\<lambda>y. x \<notsqsubseteq> y)" using abs_below by simp
huffman@35653
    93
qed
huffman@35653
    94
huffman@35653
    95
lemma compact_rep_rev: "compact (rep\<cdot>x) \<Longrightarrow> compact x"
huffman@35653
    96
  by (rule iso.compact_abs_rev [OF iso.swap]) (rule iso_axioms)
huffman@35653
    97
huffman@35653
    98
lemma compact_abs: "compact x \<Longrightarrow> compact (abs\<cdot>x)"
huffman@35653
    99
  by (rule compact_rep_rev) simp
huffman@35653
   100
huffman@35653
   101
lemma compact_rep: "compact x \<Longrightarrow> compact (rep\<cdot>x)"
huffman@35653
   102
  by (rule iso.compact_abs [OF iso.swap]) (rule iso_axioms)
huffman@35653
   103
huffman@35653
   104
lemma iso_swap: "(x = abs\<cdot>y) = (rep\<cdot>x = y)"
huffman@35653
   105
proof
huffman@35653
   106
  assume "x = abs\<cdot>y"
huffman@35653
   107
  then have "rep\<cdot>x = rep\<cdot>(abs\<cdot>y)" by simp
huffman@35653
   108
  then show "rep\<cdot>x = y" by simp
huffman@35653
   109
next
huffman@35653
   110
  assume "rep\<cdot>x = y"
huffman@35653
   111
  then have "abs\<cdot>(rep\<cdot>x) = abs\<cdot>y" by simp
huffman@35653
   112
  then show "x = abs\<cdot>y" by simp
huffman@35653
   113
qed
huffman@35653
   114
huffman@35653
   115
end
huffman@35653
   116
huffman@35652
   117
subsection {* Proofs about take functions *}
huffman@35652
   118
huffman@35652
   119
text {*
huffman@35652
   120
  This section contains lemmas that are used in a module that supports
huffman@35652
   121
  the domain isomorphism package; the module contains proofs related
huffman@35652
   122
  to take functions and the finiteness predicate.
huffman@35652
   123
*}
huffman@35652
   124
huffman@35652
   125
lemma deflation_abs_rep:
huffman@35652
   126
  fixes abs and rep and d
huffman@35652
   127
  assumes abs_iso: "\<And>x. rep\<cdot>(abs\<cdot>x) = x"
huffman@35652
   128
  assumes rep_iso: "\<And>y. abs\<cdot>(rep\<cdot>y) = y"
huffman@35652
   129
  shows "deflation d \<Longrightarrow> deflation (abs oo d oo rep)"
huffman@35652
   130
by (rule ep_pair.deflation_e_d_p) (simp add: ep_pair.intro assms)
huffman@35652
   131
huffman@35652
   132
lemma deflation_chain_min:
huffman@35652
   133
  assumes chain: "chain d"
huffman@35652
   134
  assumes defl: "\<And>n. deflation (d n)"
huffman@35652
   135
  shows "d m\<cdot>(d n\<cdot>x) = d (min m n)\<cdot>x"
huffman@35652
   136
proof (rule linorder_le_cases)
huffman@35652
   137
  assume "m \<le> n"
huffman@35652
   138
  with chain have "d m \<sqsubseteq> d n" by (rule chain_mono)
huffman@35652
   139
  then have "d m\<cdot>(d n\<cdot>x) = d m\<cdot>x"
huffman@35652
   140
    by (rule deflation_below_comp1 [OF defl defl])
huffman@35652
   141
  moreover from `m \<le> n` have "min m n = m" by simp
huffman@35652
   142
  ultimately show ?thesis by simp
huffman@35652
   143
next
huffman@35652
   144
  assume "n \<le> m"
huffman@35652
   145
  with chain have "d n \<sqsubseteq> d m" by (rule chain_mono)
huffman@35652
   146
  then have "d m\<cdot>(d n\<cdot>x) = d n\<cdot>x"
huffman@35652
   147
    by (rule deflation_below_comp2 [OF defl defl])
huffman@35652
   148
  moreover from `n \<le> m` have "min m n = n" by simp
huffman@35652
   149
  ultimately show ?thesis by simp
huffman@35652
   150
qed
huffman@35652
   151
huffman@35653
   152
lemma lub_ID_take_lemma:
huffman@35653
   153
  assumes "chain t" and "(\<Squnion>n. t n) = ID"
huffman@35653
   154
  assumes "\<And>n. t n\<cdot>x = t n\<cdot>y" shows "x = y"
huffman@35653
   155
proof -
huffman@35653
   156
  have "(\<Squnion>n. t n\<cdot>x) = (\<Squnion>n. t n\<cdot>y)"
huffman@35653
   157
    using assms(3) by simp
huffman@35653
   158
  then have "(\<Squnion>n. t n)\<cdot>x = (\<Squnion>n. t n)\<cdot>y"
huffman@35653
   159
    using assms(1) by (simp add: lub_distribs)
huffman@35653
   160
  then show "x = y"
huffman@35653
   161
    using assms(2) by simp
huffman@35653
   162
qed
huffman@35653
   163
huffman@35653
   164
lemma lub_ID_reach:
huffman@35653
   165
  assumes "chain t" and "(\<Squnion>n. t n) = ID"
huffman@35653
   166
  shows "(\<Squnion>n. t n\<cdot>x) = x"
huffman@35653
   167
using assms by (simp add: lub_distribs)
huffman@35653
   168
huffman@35655
   169
lemma lub_ID_take_induct:
huffman@35655
   170
  assumes "chain t" and "(\<Squnion>n. t n) = ID"
huffman@35655
   171
  assumes "adm P" and "\<And>n. P (t n\<cdot>x)" shows "P x"
huffman@35655
   172
proof -
huffman@35655
   173
  from `chain t` have "chain (\<lambda>n. t n\<cdot>x)" by simp
huffman@35655
   174
  from `adm P` this `\<And>n. P (t n\<cdot>x)` have "P (\<Squnion>n. t n\<cdot>x)" by (rule admD)
huffman@35655
   175
  with `chain t` `(\<Squnion>n. t n) = ID` show "P x" by (simp add: lub_distribs)
huffman@35655
   176
qed
huffman@35655
   177
huffman@35653
   178
subsection {* Finiteness *}
huffman@35653
   179
huffman@35653
   180
text {*
huffman@35653
   181
  Let a ``decisive'' function be a deflation that maps every input to
huffman@35653
   182
  either itself or bottom.  Then if a domain's take functions are all
huffman@35653
   183
  decisive, then all values in the domain are finite.
huffman@35653
   184
*}
huffman@35653
   185
huffman@35653
   186
definition
huffman@35653
   187
  decisive :: "('a::pcpo \<rightarrow> 'a) \<Rightarrow> bool"
huffman@35653
   188
where
huffman@35653
   189
  "decisive d \<longleftrightarrow> (\<forall>x. d\<cdot>x = x \<or> d\<cdot>x = \<bottom>)"
huffman@35653
   190
huffman@35653
   191
lemma decisiveI: "(\<And>x. d\<cdot>x = x \<or> d\<cdot>x = \<bottom>) \<Longrightarrow> decisive d"
huffman@35653
   192
  unfolding decisive_def by simp
huffman@35653
   193
huffman@35653
   194
lemma decisive_cases:
huffman@35653
   195
  assumes "decisive d" obtains "d\<cdot>x = x" | "d\<cdot>x = \<bottom>"
huffman@35653
   196
using assms unfolding decisive_def by auto
huffman@35653
   197
huffman@35653
   198
lemma decisive_bottom: "decisive \<bottom>"
huffman@35653
   199
  unfolding decisive_def by simp
huffman@35653
   200
huffman@35653
   201
lemma decisive_ID: "decisive ID"
huffman@35653
   202
  unfolding decisive_def by simp
huffman@35653
   203
huffman@35653
   204
lemma decisive_ssum_map:
huffman@35653
   205
  assumes f: "decisive f"
huffman@35653
   206
  assumes g: "decisive g"
huffman@35653
   207
  shows "decisive (ssum_map\<cdot>f\<cdot>g)"
huffman@35653
   208
apply (rule decisiveI, rename_tac s)
huffman@35653
   209
apply (case_tac s, simp_all)
huffman@35653
   210
apply (rule_tac x=x in decisive_cases [OF f], simp_all)
huffman@35653
   211
apply (rule_tac x=y in decisive_cases [OF g], simp_all)
huffman@35653
   212
done
huffman@35653
   213
huffman@35653
   214
lemma decisive_sprod_map:
huffman@35653
   215
  assumes f: "decisive f"
huffman@35653
   216
  assumes g: "decisive g"
huffman@35653
   217
  shows "decisive (sprod_map\<cdot>f\<cdot>g)"
huffman@35653
   218
apply (rule decisiveI, rename_tac s)
huffman@35653
   219
apply (case_tac s, simp_all)
huffman@35653
   220
apply (rule_tac x=x in decisive_cases [OF f], simp_all)
huffman@35653
   221
apply (rule_tac x=y in decisive_cases [OF g], simp_all)
huffman@35653
   222
done
huffman@35653
   223
huffman@35653
   224
lemma decisive_abs_rep:
huffman@35653
   225
  fixes abs rep
huffman@35653
   226
  assumes iso: "iso abs rep"
huffman@35653
   227
  assumes d: "decisive d"
huffman@35653
   228
  shows "decisive (abs oo d oo rep)"
huffman@35653
   229
apply (rule decisiveI)
huffman@35653
   230
apply (rule_tac x="rep\<cdot>x" in decisive_cases [OF d])
huffman@35653
   231
apply (simp add: iso.rep_iso [OF iso])
huffman@35653
   232
apply (simp add: iso.abs_strict [OF iso])
huffman@35653
   233
done
huffman@35653
   234
huffman@35653
   235
lemma lub_ID_finite:
huffman@35653
   236
  assumes chain: "chain d"
huffman@35653
   237
  assumes lub: "(\<Squnion>n. d n) = ID"
huffman@35653
   238
  assumes decisive: "\<And>n. decisive (d n)"
huffman@35653
   239
  shows "\<exists>n. d n\<cdot>x = x"
huffman@35653
   240
proof -
huffman@35653
   241
  have 1: "chain (\<lambda>n. d n\<cdot>x)" using chain by simp
huffman@35653
   242
  have 2: "(\<Squnion>n. d n\<cdot>x) = x" using chain lub by (rule lub_ID_reach)
huffman@35653
   243
  have "\<forall>n. d n\<cdot>x = x \<or> d n\<cdot>x = \<bottom>"
huffman@35653
   244
    using decisive unfolding decisive_def by simp
huffman@35653
   245
  hence "range (\<lambda>n. d n\<cdot>x) \<subseteq> {x, \<bottom>}"
huffman@35653
   246
    by auto
huffman@35653
   247
  hence "finite (range (\<lambda>n. d n\<cdot>x))"
huffman@35653
   248
    by (rule finite_subset, simp)
huffman@35653
   249
  with 1 have "finite_chain (\<lambda>n. d n\<cdot>x)"
huffman@35653
   250
    by (rule finite_range_imp_finch)
huffman@35653
   251
  then have "\<exists>n. (\<Squnion>n. d n\<cdot>x) = d n\<cdot>x"
huffman@35653
   252
    unfolding finite_chain_def by (auto simp add: maxinch_is_thelub)
huffman@35653
   253
  with 2 show "\<exists>n. d n\<cdot>x = x" by (auto elim: sym)
huffman@35653
   254
qed
huffman@35653
   255
huffman@35655
   256
lemma lub_ID_finite_take_induct:
huffman@35655
   257
  assumes "chain d" and "(\<Squnion>n. d n) = ID" and "\<And>n. decisive (d n)"
huffman@35655
   258
  shows "(\<And>n. P (d n\<cdot>x)) \<Longrightarrow> P x"
huffman@35655
   259
using lub_ID_finite [OF assms] by metis
huffman@35655
   260
huffman@40503
   261
subsection {* Proofs about constructor functions *}
huffman@40503
   262
huffman@40503
   263
text {* Lemmas for proving nchotomy rule: *}
huffman@40503
   264
huffman@40503
   265
lemma ex_one_bottom_iff:
huffman@40503
   266
  "(\<exists>x. P x \<and> x \<noteq> \<bottom>) = P ONE"
huffman@40503
   267
by simp
huffman@40503
   268
huffman@40503
   269
lemma ex_up_bottom_iff:
huffman@40503
   270
  "(\<exists>x. P x \<and> x \<noteq> \<bottom>) = (\<exists>x. P (up\<cdot>x))"
huffman@40503
   271
by (safe, case_tac x, auto)
huffman@40503
   272
huffman@40503
   273
lemma ex_sprod_bottom_iff:
huffman@40503
   274
 "(\<exists>y. P y \<and> y \<noteq> \<bottom>) =
huffman@40503
   275
  (\<exists>x y. (P (:x, y:) \<and> x \<noteq> \<bottom>) \<and> y \<noteq> \<bottom>)"
huffman@40503
   276
by (safe, case_tac y, auto)
huffman@40503
   277
huffman@40503
   278
lemma ex_sprod_up_bottom_iff:
huffman@40503
   279
 "(\<exists>y. P y \<and> y \<noteq> \<bottom>) =
huffman@40503
   280
  (\<exists>x y. P (:up\<cdot>x, y:) \<and> y \<noteq> \<bottom>)"
huffman@40503
   281
by (safe, case_tac y, simp, case_tac x, auto)
huffman@40503
   282
huffman@40503
   283
lemma ex_ssum_bottom_iff:
huffman@40503
   284
 "(\<exists>x. P x \<and> x \<noteq> \<bottom>) =
huffman@40503
   285
 ((\<exists>x. P (sinl\<cdot>x) \<and> x \<noteq> \<bottom>) \<or>
huffman@40503
   286
  (\<exists>x. P (sinr\<cdot>x) \<and> x \<noteq> \<bottom>))"
huffman@40503
   287
by (safe, case_tac x, auto)
huffman@40503
   288
huffman@40503
   289
lemma exh_start: "p = \<bottom> \<or> (\<exists>x. p = x \<and> x \<noteq> \<bottom>)"
huffman@40503
   290
  by auto
huffman@40503
   291
huffman@40503
   292
lemmas ex_bottom_iffs =
huffman@40503
   293
   ex_ssum_bottom_iff
huffman@40503
   294
   ex_sprod_up_bottom_iff
huffman@40503
   295
   ex_sprod_bottom_iff
huffman@40503
   296
   ex_up_bottom_iff
huffman@40503
   297
   ex_one_bottom_iff
huffman@40503
   298
huffman@40503
   299
text {* Rules for turning nchotomy into exhaust: *}
huffman@40503
   300
huffman@40503
   301
lemma exh_casedist0: "\<lbrakk>R; R \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P" (* like make_elim *)
huffman@40503
   302
  by auto
huffman@40503
   303
huffman@40503
   304
lemma exh_casedist1: "((P \<or> Q \<Longrightarrow> R) \<Longrightarrow> S) \<equiv> (\<lbrakk>P \<Longrightarrow> R; Q \<Longrightarrow> R\<rbrakk> \<Longrightarrow> S)"
huffman@40503
   305
  by rule auto
huffman@40503
   306
huffman@40503
   307
lemma exh_casedist2: "(\<exists>x. P x \<Longrightarrow> Q) \<equiv> (\<And>x. P x \<Longrightarrow> Q)"
huffman@40503
   308
  by rule auto
huffman@40503
   309
huffman@40503
   310
lemma exh_casedist3: "(P \<and> Q \<Longrightarrow> R) \<equiv> (P \<Longrightarrow> Q \<Longrightarrow> R)"
huffman@40503
   311
  by rule auto
huffman@40503
   312
huffman@40503
   313
lemmas exh_casedists = exh_casedist1 exh_casedist2 exh_casedist3
huffman@40503
   314
huffman@40503
   315
text {* Rules for proving constructor properties *}
huffman@40503
   316
huffman@40503
   317
lemmas con_strict_rules =
huffman@40503
   318
  sinl_strict sinr_strict spair_strict1 spair_strict2
huffman@40503
   319
huffman@40503
   320
lemmas con_bottom_iff_rules =
huffman@40503
   321
  sinl_bottom_iff sinr_bottom_iff spair_bottom_iff up_defined ONE_defined
huffman@40503
   322
huffman@40503
   323
lemmas con_below_iff_rules =
huffman@40503
   324
  sinl_below sinr_below sinl_below_sinr sinr_below_sinl con_bottom_iff_rules
huffman@40503
   325
huffman@40503
   326
lemmas con_eq_iff_rules =
huffman@40503
   327
  sinl_eq sinr_eq sinl_eq_sinr sinr_eq_sinl con_bottom_iff_rules
huffman@40503
   328
huffman@40503
   329
lemmas sel_strict_rules =
huffman@40503
   330
  cfcomp2 sscase1 sfst_strict ssnd_strict fup1
huffman@40503
   331
huffman@40503
   332
lemma sel_app_extra_rules:
huffman@40503
   333
  "sscase\<cdot>ID\<cdot>\<bottom>\<cdot>(sinr\<cdot>x) = \<bottom>"
huffman@40503
   334
  "sscase\<cdot>ID\<cdot>\<bottom>\<cdot>(sinl\<cdot>x) = x"
huffman@40503
   335
  "sscase\<cdot>\<bottom>\<cdot>ID\<cdot>(sinl\<cdot>x) = \<bottom>"
huffman@40503
   336
  "sscase\<cdot>\<bottom>\<cdot>ID\<cdot>(sinr\<cdot>x) = x"
huffman@40503
   337
  "fup\<cdot>ID\<cdot>(up\<cdot>x) = x"
huffman@40503
   338
by (cases "x = \<bottom>", simp, simp)+
huffman@40503
   339
huffman@40503
   340
lemmas sel_app_rules =
huffman@40503
   341
  sel_strict_rules sel_app_extra_rules
huffman@40503
   342
  ssnd_spair sfst_spair up_defined spair_defined
huffman@40503
   343
huffman@40503
   344
lemmas sel_bottom_iff_rules =
huffman@40503
   345
  cfcomp2 sfst_bottom_iff ssnd_bottom_iff
huffman@40503
   346
huffman@40503
   347
lemmas take_con_rules =
huffman@40503
   348
  ssum_map_sinl' ssum_map_sinr' sprod_map_spair' u_map_up
huffman@40503
   349
  deflation_strict deflation_ID ID1 cfcomp2
huffman@40503
   350
huffman@35653
   351
subsection {* ML setup *}
huffman@35653
   352
huffman@35652
   353
use "Tools/Domain/domain_take_proofs.ML"
huffman@40503
   354
use "Tools/cont_consts.ML"
huffman@40503
   355
use "Tools/cont_proc.ML"
huffman@40503
   356
use "Tools/Domain/domain_constructors.ML"
huffman@40503
   357
use "Tools/Domain/domain_induction.ML"
huffman@35652
   358
huffman@40216
   359
setup Domain_Take_Proofs.setup
huffman@40216
   360
huffman@35652
   361
end