src/HOLCF/Universal.thy
changeset 35900 aa5dfb03eb1e
parent 35794 8cd7134275cc
child 36176 3fe7e97ccca8
equal deleted inserted replaced
35897:8758895ea413 35900:aa5dfb03eb1e
   185 apply (rule finite_subset [where B="insert 0 {x. P x}"])
   185 apply (rule finite_subset [where B="insert 0 {x. P x}"])
   186 apply (clarsimp simp add: ubasis_until')
   186 apply (clarsimp simp add: ubasis_until')
   187 apply simp
   187 apply simp
   188 done
   188 done
   189 
   189 
   190 subsubsection {* Take function for @{typ ubasis} *}
   190 subsubsection {* Take function for \emph{ubasis} *}
   191 
   191 
   192 definition
   192 definition
   193   ubasis_take :: "nat \<Rightarrow> ubasis \<Rightarrow> ubasis"
   193   ubasis_take :: "nat \<Rightarrow> ubasis \<Rightarrow> ubasis"
   194 where
   194 where
   195   "ubasis_take n = ubasis_until (\<lambda>x. x \<le> n)"
   195   "ubasis_take n = ubasis_until (\<lambda>x. x \<le> n)"
   336   "\<exists>a\<in>Rep_udom x. approx n\<cdot>x = udom_principal (ubasis_take n a)"
   336   "\<exists>a\<in>Rep_udom x. approx n\<cdot>x = udom_principal (ubasis_take n a)"
   337 unfolding approx_udom_def
   337 unfolding approx_udom_def
   338 by (rule udom.completion_approx_eq_principal)
   338 by (rule udom.completion_approx_eq_principal)
   339 
   339 
   340 
   340 
   341 subsection {* Universality of @{typ udom} *}
   341 subsection {* Universality of \emph{udom} *}
   342 
   342 
   343 defaultsort bifinite
   343 defaultsort bifinite
   344 
   344 
   345 subsubsection {* Choosing a maximal element from a finite set *}
   345 subsubsection {* Choosing a maximal element from a finite set *}
   346 
   346 
   814   choose
   814   choose
   815   choose_pos
   815   choose_pos
   816   place
   816   place
   817   sub
   817   sub
   818 
   818 
   819 subsubsection {* EP-pair from any bifinite domain into @{typ udom} *}
   819 subsubsection {* EP-pair from any bifinite domain into \emph{udom} *}
   820 
   820 
   821 definition
   821 definition
   822   udom_emb :: "'a::bifinite \<rightarrow> udom"
   822   udom_emb :: "'a::bifinite \<rightarrow> udom"
   823 where
   823 where
   824   "udom_emb = compact_basis.basis_fun (\<lambda>x. udom_principal (basis_emb x))"
   824   "udom_emb = compact_basis.basis_fun (\<lambda>x. udom_principal (basis_emb x))"