# HG changeset patch # User wenzelm # Date 1731526553 -3600 # Wed Nov 13 20:35:53 2024 +0100 # Node ID e5e20175c534859bd1814eee51e5cb5fdeef7c20 # Parent b3c0d032ed6e440172993616c562f932434ff893 avoid clash with HOL-Library.Discrete; diff -r b3c0d032ed6e -r e5e20175c534 src/HOL/HOLCF/Lift.thy --- a/src/HOL/HOLCF/Lift.thy Wed Nov 13 20:14:24 2024 +0100 +++ b/src/HOL/HOLCF/Lift.thy Wed Nov 13 20:35:53 2024 +0100 @@ -5,9 +5,40 @@ section \Lifting types of class type to flat pcpo's\ theory Lift -imports Discrete Up +imports Cont Up +begin + +section \Discrete cpo types\ + +datatype 'a discr = Discr "'a :: type" + +subsection \Discrete cpo class instance\ + +instantiation discr :: (type) discrete_cpo begin +definition "((\) :: 'a discr \ 'a discr \ bool) = (=)" + +instance + by standard (simp add: below_discr_def) + +end + + +subsection \\emph{undiscr}\ + +definition undiscr :: "('a::type)discr \ 'a" + where "undiscr x = (case x of Discr y \ y)" + +lemma undiscr_Discr [simp]: "undiscr (Discr x) = x" + by (simp add: undiscr_def) + +lemma Discr_undiscr [simp]: "Discr (undiscr y) = y" + by (induct y) simp + + +section \Lifting types\ + default_sort type pcpodef 'a lift = "UNIV :: 'a discr u set"