# HG changeset patch # User huffman # Date 1229626813 28800 # Node ID d5582ab1311f865561db3e43e80e438e13f6ab45 # Parent 6e0b7b11407268a032ebfb10d9eaca100dfc31f6 constdefs -> definition diff -r 6e0b7b114072 -r d5582ab1311f src/HOLCF/Fixrec.thy --- a/src/HOLCF/Fixrec.thy Thu Dec 18 09:30:36 2008 -0800 +++ b/src/HOLCF/Fixrec.thy Thu Dec 18 11:00:13 2008 -0800 @@ -16,13 +16,13 @@ pcpodef (open) 'a maybe = "UNIV::(one ++ 'a u) set" by simp_all -constdefs - fail :: "'a maybe" - "fail \ Abs_maybe (sinl\ONE)" +definition + fail :: "'a maybe" where + "fail = Abs_maybe (sinl\ONE)" -constdefs +definition return :: "'a \ 'a maybe" where - "return \ \ x. Abs_maybe (sinr\(up\x))" + "return = (\ x. Abs_maybe (sinr\(up\x)))" definition maybe_when :: "'b \ ('a \ 'b) \ 'a maybe \ 'b::pcpo" where @@ -58,7 +58,8 @@ cont_Abs_maybe Abs_maybe_inverse Rep_maybe_strict) translations - "case m of fail \ t1 | return\x \ t2" == "CONST maybe_when\t1\(\ x. t2)\m" + "case m of XCONST fail \ t1 | XCONST return\x \ t2" + == "CONST maybe_when\t1\(\ x. t2)\m" subsubsection {* Monadic bind operator *} @@ -163,8 +164,8 @@ subsection {* Case branch combinator *} -constdefs - branch :: "('a \ 'b maybe) \ ('b \ 'c) \ ('a \ 'c maybe)" +definition + branch :: "('a \ 'b maybe) \ ('b \ 'c) \ ('a \ 'c maybe)" where "branch p \ \ r x. bind\(p\x)\(\ y. return\(r\y))" lemma branch_rews: diff -r 6e0b7b114072 -r d5582ab1311f src/HOLCF/One.thy --- a/src/HOLCF/One.thy Thu Dec 18 09:30:36 2008 -0800 +++ b/src/HOLCF/One.thy Thu Dec 18 11:00:13 2008 -0800 @@ -12,8 +12,9 @@ translations "one" <= (type) "unit lift" -constdefs +definition ONE :: "one" +where "ONE == Def ()" text {* Exhaustion and Elimination for type @{typ one} *}