src/HOL/HOLCF/Discrete.thy
author blanchet
Tue Nov 07 15:16:42 2017 +0100 (20 months ago)
changeset 67022 49309fe530fd
parent 62175 8ffc4d0e652d
child 67312 0d25e02759b7
permissions -rw-r--r--
more robust parsing for THF proofs (esp. polymorphic Leo-III proofs)
     1 (*  Title:      HOL/HOLCF/Discrete.thy
     2     Author:     Tobias Nipkow
     3 *)
     4 
     5 section \<open>Discrete cpo types\<close>
     6 
     7 theory Discrete
     8 imports Cont
     9 begin
    10 
    11 datatype 'a discr = Discr "'a :: type"
    12 
    13 subsection \<open>Discrete cpo class instance\<close>
    14 
    15 instantiation discr :: (type) discrete_cpo
    16 begin
    17 
    18 definition
    19   "(op \<sqsubseteq> :: 'a discr \<Rightarrow> 'a discr \<Rightarrow> bool) = (op =)"
    20 
    21 instance
    22   by standard (simp add: below_discr_def)
    23 
    24 end
    25 
    26 subsection \<open>\emph{undiscr}\<close>
    27 
    28 definition
    29   undiscr :: "('a::type)discr => 'a" where
    30   "undiscr x = (case x of Discr y => y)"
    31 
    32 lemma undiscr_Discr [simp]: "undiscr (Discr x) = x"
    33 by (simp add: undiscr_def)
    34 
    35 lemma Discr_undiscr [simp]: "Discr (undiscr y) = y"
    36 by (induct y) simp
    37 
    38 end