src/HOLCF/Bifinite.thy
author huffman
Fri, 20 Jun 2008 22:51:50 +0200
changeset 27309 c74270fd72a8
parent 27186 416d66c36d8f
child 27310 d0229bc6c461
permissions -rw-r--r--
clean up and rename some profinite lemmas
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
     1
(*  Title:      HOLCF/Bifinite.thy
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
     2
    ID:         $Id$
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
     3
    Author:     Brian Huffman
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
     4
*)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
     5
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
     6
header {* Bifinite domains and approximation *}
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
     7
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
     8
theory Bifinite
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
     9
imports Cfun
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    10
begin
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    11
26407
562a1d615336 rename class bifinite_cpo to profinite; generalize powerdomains from bifinite to profinite
huffman
parents: 25923
diff changeset
    12
subsection {* Omega-profinite and bifinite domains *}
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    13
26962
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26407
diff changeset
    14
class profinite = cpo +
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26407
diff changeset
    15
  fixes approx :: "nat \<Rightarrow> 'a \<rightarrow> 'a"
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26407
diff changeset
    16
  assumes chain_approx_app: "chain (\<lambda>i. approx i\<cdot>x)"
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26407
diff changeset
    17
  assumes lub_approx_app [simp]: "(\<Squnion>i. approx i\<cdot>x) = x"
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26407
diff changeset
    18
  assumes approx_idem: "approx i\<cdot>(approx i\<cdot>x) = approx i\<cdot>x"
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26407
diff changeset
    19
  assumes finite_fixes_approx: "finite {x. approx i\<cdot>x = x}"
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    20
26962
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26407
diff changeset
    21
class bifinite = profinite + pcpo
25909
6b96b9392873 add class bifinite_cpo for possibly-unpointed bifinite domains
huffman
parents: 25903
diff changeset
    22
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    23
lemma finite_range_imp_finite_fixes:
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    24
  "finite {x. \<exists>y. x = f y} \<Longrightarrow> finite {x. f x = x}"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    25
apply (subgoal_tac "{x. f x = x} \<subseteq> {x. \<exists>y. x = f y}")
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    26
apply (erule (1) finite_subset)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    27
apply (clarify, erule subst, rule exI, rule refl)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    28
done
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    29
27186
416d66c36d8f add lemma finite_image_approx; remove unnecessary sort annotations
huffman
parents: 26962
diff changeset
    30
lemma chain_approx [simp]: "chain approx"
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    31
apply (rule chainI)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    32
apply (rule less_cfun_ext)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    33
apply (rule chainE)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    34
apply (rule chain_approx_app)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    35
done
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    36
27186
416d66c36d8f add lemma finite_image_approx; remove unnecessary sort annotations
huffman
parents: 26962
diff changeset
    37
lemma lub_approx [simp]: "(\<Squnion>i. approx i) = (\<Lambda> x. x)"
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    38
by (rule ext_cfun, simp add: contlub_cfun_fun)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    39
27186
416d66c36d8f add lemma finite_image_approx; remove unnecessary sort annotations
huffman
parents: 26962
diff changeset
    40
lemma approx_less: "approx i\<cdot>x \<sqsubseteq> x"
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    41
apply (subgoal_tac "approx i\<cdot>x \<sqsubseteq> (\<Squnion>i. approx i\<cdot>x)", simp)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    42
apply (rule is_ub_thelub, simp)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    43
done
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    44
27309
c74270fd72a8 clean up and rename some profinite lemmas
huffman
parents: 27186
diff changeset
    45
lemma approx_strict [simp]: "approx i\<cdot>\<bottom> = \<bottom>"
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    46
by (rule UU_I, rule approx_less)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    47
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    48
lemma approx_approx1:
27186
416d66c36d8f add lemma finite_image_approx; remove unnecessary sort annotations
huffman
parents: 26962
diff changeset
    49
  "i \<le> j \<Longrightarrow> approx i\<cdot>(approx j\<cdot>x) = approx i\<cdot>x"
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    50
apply (rule antisym_less)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    51
apply (rule monofun_cfun_arg [OF approx_less])
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    52
apply (rule sq_ord_eq_less_trans [OF approx_idem [symmetric]])
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    53
apply (rule monofun_cfun_arg)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    54
apply (rule monofun_cfun_fun)
25922
cb04d05e95fb rename lemma chain_mono3 -> chain_mono, chain_mono -> chain_mono_less
huffman
parents: 25909
diff changeset
    55
apply (erule chain_mono [OF chain_approx])
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    56
done
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    57
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    58
lemma approx_approx2:
27186
416d66c36d8f add lemma finite_image_approx; remove unnecessary sort annotations
huffman
parents: 26962
diff changeset
    59
  "j \<le> i \<Longrightarrow> approx i\<cdot>(approx j\<cdot>x) = approx j\<cdot>x"
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    60
apply (rule antisym_less)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    61
apply (rule approx_less)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    62
apply (rule sq_ord_eq_less_trans [OF approx_idem [symmetric]])
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    63
apply (rule monofun_cfun_fun)
25922
cb04d05e95fb rename lemma chain_mono3 -> chain_mono, chain_mono -> chain_mono_less
huffman
parents: 25909
diff changeset
    64
apply (erule chain_mono [OF chain_approx])
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    65
done
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    66
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    67
lemma approx_approx [simp]:
27186
416d66c36d8f add lemma finite_image_approx; remove unnecessary sort annotations
huffman
parents: 26962
diff changeset
    68
  "approx i\<cdot>(approx j\<cdot>x) = approx (min i j)\<cdot>x"
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    69
apply (rule_tac x=i and y=j in linorder_le_cases)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    70
apply (simp add: approx_approx1 min_def)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    71
apply (simp add: approx_approx2 min_def)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    72
done
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    73
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    74
lemma idem_fixes_eq_range:
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    75
  "\<forall>x. f (f x) = f x \<Longrightarrow> {x. f x = x} = {y. \<exists>x. y = f x}"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    76
by (auto simp add: eq_sym_conv)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    77
27186
416d66c36d8f add lemma finite_image_approx; remove unnecessary sort annotations
huffman
parents: 26962
diff changeset
    78
lemma finite_approx: "finite {y. \<exists>x. y = approx n\<cdot>x}"
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    79
using finite_fixes_approx by (simp add: idem_fixes_eq_range)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    80
27186
416d66c36d8f add lemma finite_image_approx; remove unnecessary sort annotations
huffman
parents: 26962
diff changeset
    81
lemma finite_image_approx: "finite ((\<lambda>x. approx n\<cdot>x) ` A)"
416d66c36d8f add lemma finite_image_approx; remove unnecessary sort annotations
huffman
parents: 26962
diff changeset
    82
by (rule finite_subset [OF _ finite_fixes_approx [where i=n]]) auto
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    83
27186
416d66c36d8f add lemma finite_image_approx; remove unnecessary sort annotations
huffman
parents: 26962
diff changeset
    84
lemma finite_range_approx: "finite (range (\<lambda>x. approx n\<cdot>x))"
416d66c36d8f add lemma finite_image_approx; remove unnecessary sort annotations
huffman
parents: 26962
diff changeset
    85
by (rule finite_image_approx)
416d66c36d8f add lemma finite_image_approx; remove unnecessary sort annotations
huffman
parents: 26962
diff changeset
    86
416d66c36d8f add lemma finite_image_approx; remove unnecessary sort annotations
huffman
parents: 26962
diff changeset
    87
lemma compact_approx [simp]: "compact (approx n\<cdot>x)"
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    88
proof (rule compactI2)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    89
  fix Y::"nat \<Rightarrow> 'a"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    90
  assume Y: "chain Y"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    91
  have "finite_chain (\<lambda>i. approx n\<cdot>(Y i))"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    92
  proof (rule finite_range_imp_finch)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    93
    show "chain (\<lambda>i. approx n\<cdot>(Y i))"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    94
      using Y by simp
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    95
    have "range (\<lambda>i. approx n\<cdot>(Y i)) \<subseteq> {x. approx n\<cdot>x = x}"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    96
      by clarsimp
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    97
    thus "finite (range (\<lambda>i. approx n\<cdot>(Y i)))"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    98
      using finite_fixes_approx by (rule finite_subset)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
    99
  qed
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   100
  hence "\<exists>j. (\<Squnion>i. approx n\<cdot>(Y i)) = approx n\<cdot>(Y j)"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   101
    by (simp add: finite_chain_def maxinch_is_thelub Y)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   102
  then obtain j where j: "(\<Squnion>i. approx n\<cdot>(Y i)) = approx n\<cdot>(Y j)" ..
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   103
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   104
  assume "approx n\<cdot>x \<sqsubseteq> (\<Squnion>i. Y i)"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   105
  hence "approx n\<cdot>(approx n\<cdot>x) \<sqsubseteq> approx n\<cdot>(\<Squnion>i. Y i)"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   106
    by (rule monofun_cfun_arg)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   107
  hence "approx n\<cdot>x \<sqsubseteq> (\<Squnion>i. approx n\<cdot>(Y i))"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   108
    by (simp add: contlub_cfun_arg Y)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   109
  hence "approx n\<cdot>x \<sqsubseteq> approx n\<cdot>(Y j)"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   110
    using j by simp
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   111
  hence "approx n\<cdot>x \<sqsubseteq> Y j"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   112
    using approx_less by (rule trans_less)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   113
  thus "\<exists>j. approx n\<cdot>x \<sqsubseteq> Y j" ..
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   114
qed
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   115
27309
c74270fd72a8 clean up and rename some profinite lemmas
huffman
parents: 27186
diff changeset
   116
lemma profinite_compact_eq_approx: "compact x \<Longrightarrow> \<exists>i. approx i\<cdot>x = x"
c74270fd72a8 clean up and rename some profinite lemmas
huffman
parents: 27186
diff changeset
   117
by (rule admD2) simp_all
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   118
27309
c74270fd72a8 clean up and rename some profinite lemmas
huffman
parents: 27186
diff changeset
   119
lemma profinite_compact_iff: "compact x \<longleftrightarrow> (\<exists>n. approx n\<cdot>x = x)"
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   120
 apply (rule iffI)
27309
c74270fd72a8 clean up and rename some profinite lemmas
huffman
parents: 27186
diff changeset
   121
  apply (erule profinite_compact_eq_approx)
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   122
 apply (erule exE)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   123
 apply (erule subst)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   124
 apply (rule compact_approx)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   125
done
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   126
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   127
lemma approx_induct:
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   128
  assumes adm: "adm P" and P: "\<And>n x. P (approx n\<cdot>x)"
27186
416d66c36d8f add lemma finite_image_approx; remove unnecessary sort annotations
huffman
parents: 26962
diff changeset
   129
  shows "P x"
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   130
proof -
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   131
  have "P (\<Squnion>n. approx n\<cdot>x)"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   132
    by (rule admD [OF adm], simp, simp add: P)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   133
  thus "P x" by simp
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   134
qed
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   135
27309
c74270fd72a8 clean up and rename some profinite lemmas
huffman
parents: 27186
diff changeset
   136
lemma profinite_less_ext: "(\<And>i. approx i\<cdot>x \<sqsubseteq> approx i\<cdot>y) \<Longrightarrow> x \<sqsubseteq> y"
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   137
apply (subgoal_tac "(\<Squnion>i. approx i\<cdot>x) \<sqsubseteq> (\<Squnion>i. approx i\<cdot>y)", simp)
25923
5fe4b543512e convert lemma lub_mono to rule_format
huffman
parents: 25922
diff changeset
   138
apply (rule lub_mono, simp, simp, simp)
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   139
done
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   140
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   141
subsection {* Instance for continuous function space *}
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   142
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   143
lemma finite_range_lemma:
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   144
  fixes h :: "'a::cpo \<rightarrow> 'b::cpo"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   145
  fixes k :: "'c::cpo \<rightarrow> 'd::cpo"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   146
  shows "\<lbrakk>finite {y. \<exists>x. y = h\<cdot>x}; finite {y. \<exists>x. y = k\<cdot>x}\<rbrakk>
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   147
    \<Longrightarrow> finite {g. \<exists>f. g = (\<Lambda> x. k\<cdot>(f\<cdot>(h\<cdot>x)))}"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   148
 apply (rule_tac f="\<lambda>g. {(h\<cdot>x, y) |x y. y = g\<cdot>x}" in finite_imageD)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   149
  apply (rule_tac B="Pow ({y. \<exists>x. y = h\<cdot>x} \<times> {y. \<exists>x. y = k\<cdot>x})"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   150
           in finite_subset)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   151
   apply (rule image_subsetI)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   152
   apply (clarsimp, fast)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   153
  apply simp
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   154
 apply (rule inj_onI)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   155
 apply (clarsimp simp add: expand_set_eq)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   156
 apply (rule ext_cfun, simp)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   157
 apply (drule_tac x="h\<cdot>x" in spec)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   158
 apply (drule_tac x="k\<cdot>(f\<cdot>(h\<cdot>x))" in spec)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   159
 apply (drule iffD1, fast)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   160
 apply clarsimp
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   161
done
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   162
26962
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26407
diff changeset
   163
instantiation "->" :: (profinite, profinite) profinite
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26407
diff changeset
   164
begin
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   165
26962
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26407
diff changeset
   166
definition
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   167
  approx_cfun_def:
26962
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26407
diff changeset
   168
    "approx = (\<lambda>n. \<Lambda> f x. approx n\<cdot>(f\<cdot>(approx n\<cdot>x)))"
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   169
26962
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26407
diff changeset
   170
instance
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   171
 apply (intro_classes, unfold approx_cfun_def)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   172
    apply simp
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   173
   apply (simp add: lub_distribs eta_cfun)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   174
  apply simp
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   175
 apply simp
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   176
 apply (rule finite_range_imp_finite_fixes)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   177
 apply (intro finite_range_lemma finite_approx)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   178
done
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   179
26962
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26407
diff changeset
   180
end
c8b20f615d6c use new class package for classes profinite, bifinite; remove approx class
huffman
parents: 26407
diff changeset
   181
26407
562a1d615336 rename class bifinite_cpo to profinite; generalize powerdomains from bifinite to profinite
huffman
parents: 25923
diff changeset
   182
instance "->" :: (profinite, bifinite) bifinite ..
25909
6b96b9392873 add class bifinite_cpo for possibly-unpointed bifinite domains
huffman
parents: 25903
diff changeset
   183
25903
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   184
lemma approx_cfun: "approx n\<cdot>f\<cdot>x = approx n\<cdot>(f\<cdot>(approx n\<cdot>x))"
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   185
by (simp add: approx_cfun_def)
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   186
5e59af604d4f new theory of bifinite domains
huffman
parents:
diff changeset
   187
end