# HG changeset patch # User wenzelm # Date 1322672834 -3600 # Node ID 476ad865f1259053e03597830190b010e6f03ccf # Parent b108b3d7c49e14deebf371dfd364946ad269743b prefer typedef without alternative name; diff -r b108b3d7c49e -r 476ad865f125 src/HOL/Nat.thy --- a/src/HOL/Nat.thy Wed Nov 30 17:30:01 2011 +0100 +++ b/src/HOL/Nat.thy Wed Nov 30 18:07:14 2011 +0100 @@ -35,7 +35,8 @@ Zero_RepI: "Nat Zero_Rep" | Suc_RepI: "Nat i \ Nat (Suc_Rep i)" -typedef (open Nat) nat = "{n. Nat n}" +typedef (open) nat = "{n. Nat n}" + morphisms Rep_Nat Abs_Nat using Nat.Zero_RepI by auto lemma Nat_Rep_Nat: diff -r b108b3d7c49e -r 476ad865f125 src/HOL/Product_Type.thy --- a/src/HOL/Product_Type.thy Wed Nov 30 17:30:01 2011 +0100 +++ b/src/HOL/Product_Type.thy Wed Nov 30 18:07:14 2011 +0100 @@ -132,8 +132,10 @@ definition Pair_Rep :: "'a \ 'b \ 'a \ 'b \ bool" where "Pair_Rep a b = (\x y. x = a \ y = b)" -typedef ('a, 'b) prod (infixr "*" 20) = "{f. \a b. f = Pair_Rep (a\'a) (b\'b)}" - by auto +definition "prod = {f. \a b. f = Pair_Rep (a\'a) (b\'b)}" + +typedef (open) ('a, 'b) prod (infixr "*" 20) = "prod :: ('a \ 'b \ bool) set" + unfolding prod_def by auto type_notation (xsymbols) "prod" ("(_ \/ _)" [21, 20] 20)