authentic syntax for Pow and image
authorhaftmann
Mon, 15 Jun 2009 16:13:19 +0200
changeset 31643 b040f1679f77
parent 31642 ce68241f711f
child 31644 f4723b1ae5a1
child 31665 a1f4d3b3f6c8
authentic syntax for Pow and image
NEWS
src/HOL/Set.thy
src/HOL/Tools/datatype_package/datatype_rep_proofs.ML
--- a/NEWS	Mon Jun 15 16:13:04 2009 +0200
+++ b/NEWS	Mon Jun 15 16:13:19 2009 +0200
@@ -40,6 +40,9 @@
 * Implementation of quickcheck using generic code generator; default generators
 are provided for all suitable HOL types, records and datatypes.
 
+* Constants Set.Pow and Set.image now with authentic syntax; object-logic definitions
+Set.Pow_def and Set.image_def.  INCOMPATIBILITY.
+
 
 *** ML ***
 
--- a/src/HOL/Set.thy	Mon Jun 15 16:13:04 2009 +0200
+++ b/src/HOL/Set.thy	Mon Jun 15 16:13:19 2009 +0200
@@ -23,8 +23,6 @@
   Ball          :: "'a set => ('a => bool) => bool"      -- "bounded universal quantifiers"
   Bex           :: "'a set => ('a => bool) => bool"      -- "bounded existential quantifiers"
   Bex1          :: "'a set => ('a => bool) => bool"      -- "bounded unique existential quantifiers"
-  Pow           :: "'a set => 'a set set"                -- "powerset"
-  image         :: "('a => 'b) => 'a set => 'b set"      (infixr "`" 90)
 
 local
 
@@ -215,9 +213,6 @@
   supset_eq  ("op \<supseteq>") and
   supset_eq  ("(_/ \<supseteq> _)" [50, 51] 50)
 
-abbreviation
-  range :: "('a => 'b) => 'b set" where -- "of function"
-  "range f == f ` UNIV"
 
 
 subsubsection "Bounded quantifiers"
@@ -408,9 +403,15 @@
 
 end
 
-defs
-  Pow_def:      "Pow A          == {B. B <= A}"
-  image_def:    "f`A            == {y. EX x:A. y = f(x)}"
+definition Pow :: "'a set => 'a set set" where
+  Pow_def: "Pow A = {B. B \<le> A}"
+
+definition image :: "('a => 'b) => 'a set => 'b set" (infixr "`" 90) where
+  image_def: "f ` A = {y. EX x:A. y = f(x)}"
+
+abbreviation
+  range :: "('a => 'b) => 'b set" where -- "of function"
+  "range f == f ` UNIV"
 
 
 subsection {* Lemmas and proof tool setup *}
--- a/src/HOL/Tools/datatype_package/datatype_rep_proofs.ML	Mon Jun 15 16:13:04 2009 +0200
+++ b/src/HOL/Tools/datatype_package/datatype_rep_proofs.ML	Mon Jun 15 16:13:19 2009 +0200
@@ -458,9 +458,9 @@
       let val isoT = T --> Univ_elT
       in HOLogic.imp $ 
         (Const (set_name, UnivT') $ mk_Free "x" Univ_elT i) $
-          (if i < length newTs then Const ("True", HOLogic.boolT)
+          (if i < length newTs then HOLogic.true_const
            else HOLogic.mk_mem (mk_Free "x" Univ_elT i,
-             Const ("image", [isoT, HOLogic.mk_setT T] ---> UnivT) $
+             Const (@{const_name image}, isoT --> HOLogic.mk_setT T --> UnivT) $
                Const (iso_name, isoT) $ Const (@{const_name UNIV}, HOLogic.mk_setT T)))
       end;