diff -r add8f7f311cd -r 810d59a3d9b0 Quot/Examples/IntEx2.thy --- a/Quot/Examples/IntEx2.thy Fri Dec 11 11:25:52 2009 +0100 +++ b/Quot/Examples/IntEx2.thy Fri Dec 11 11:30:00 2009 +0100 @@ -18,13 +18,13 @@ instantiation int :: "{zero, one, plus, minus, uminus, times, ord, abs, sgn}" begin -ML {* @{term "0 :: int"} *} +ML {* @{term "0 \ int"} *} quotient_def - "0 :: int" as "(0::nat, 0::nat)" + "0 \ int" as "(0\nat, 0\nat)" quotient_def - "1 :: int" as "(1::nat, 0::nat)" + "1 \ int" as "(1\nat, 0\nat)" fun plus_raw :: "(nat \ nat) \ (nat \ nat) \ (nat \ nat)" @@ -32,7 +32,7 @@ "plus_raw (x, y) (u, v) = (x + u, y + v)" quotient_def - "(op +) :: (int \ int \ int)" as "plus_raw" + "(op +) \ (int \ int \ int)" as "plus_raw" fun uminus_raw :: "(nat \ nat) \ (nat \ nat)" @@ -40,10 +40,10 @@ "uminus_raw (x, y) = (y, x)" quotient_def - "(uminus :: (int \ int))" as "uminus_raw" + "(uminus \ (int \ int))" as "uminus_raw" definition - minus_int_def [code del]: "z - w = z + (-w::int)" + minus_int_def [code del]: "z - w = z + (-w\int)" fun mult_raw :: "(nat \ nat) \ (nat \ nat) \ (nat \ nat)" @@ -65,10 +65,10 @@ less_int_def [code del]: "(z\int) < w = (z \ w \ z \ w)" definition - abs_int_def: "\i\int\ = (if i < 0 then - i else i)" + zabs_def: "\i\int\ = (if i < 0 then - i else i)" definition - sgn_int_def: "sgn (i\int) = (if i = 0 then 0 else if 0 < i then 1 else - 1)" + zsgn_def: "sgn (i\int) = (if i = 0 then 0 else if 0 < i then 1 else - 1)" instance .. @@ -324,16 +324,16 @@ show "i < j \ 0 < k \ k * i < k * j" by (rule zmult_zless_mono2) show "\i\ = (if i < 0 then -i else i)" - by (simp only: abs_int_def) + by (simp only: zabs_def) show "sgn (i\int) = (if i=0 then 0 else if 0