dropped duplicate of of_bool
authorhaftmann
Fri, 15 Nov 2013 22:02:05 +0100
changeset 54438 82ef58dba83b
parent 54437 0060957404c7
child 54453 b9d6e7acad38
child 54459 f43ae1afd08a
dropped duplicate of of_bool
src/HOL/ex/Coercion_Examples.thy
--- a/src/HOL/ex/Coercion_Examples.thy	Fri Nov 15 22:02:01 2013 +0100
+++ b/src/HOL/ex/Coercion_Examples.thy	Fri Nov 15 22:02:05 2013 +0100
@@ -37,10 +37,9 @@
 
 (* Coercion/type maps definitions *)
 
-primrec nat_of_bool :: "bool \<Rightarrow> nat"
+abbreviation nat_of_bool :: "bool \<Rightarrow> nat"
 where
-  "nat_of_bool False = 0"
-| "nat_of_bool True = 1"
+  "nat_of_bool \<equiv> of_bool"
 
 declare [[coercion nat_of_bool]]
 
@@ -201,5 +200,5 @@
 declare [[coercion_args uminus -]]
 declare [[coercion_args plus + +]]
 term "- (n + m)"
- 
+
 end