2220 |
2220 |
2221 lemmas times_numeral_code [code] = |
2221 lemmas times_numeral_code [code] = |
2222 mult_bin_simps |
2222 mult_bin_simps |
2223 arith_extra_simps(4) [where 'a = int] |
2223 arith_extra_simps(4) [where 'a = int] |
2224 |
2224 |
2225 instantiation int :: eq |
2225 instantiation int :: equal |
2226 begin |
2226 begin |
2227 |
2227 |
2228 definition |
2228 definition |
2229 "eq_class.eq k l \<longleftrightarrow> k - l = (0\<Colon>int)" |
2229 "HOL.equal k l \<longleftrightarrow> k - l = (0\<Colon>int)" |
2230 |
2230 |
2231 instance by default (simp add: eq_int_def) |
2231 instance by default (simp add: equal_int_def) |
2232 |
2232 |
2233 end |
2233 end |
2234 |
2234 |
2235 lemma eq_number_of_int_code [code]: |
2235 lemma eq_number_of_int_code [code]: |
2236 "eq_class.eq (number_of k \<Colon> int) (number_of l) \<longleftrightarrow> eq_class.eq k l" |
2236 "HOL.equal (number_of k \<Colon> int) (number_of l) \<longleftrightarrow> HOL.equal k l" |
2237 unfolding eq_int_def number_of_is_id .. |
2237 unfolding equal_int_def number_of_is_id .. |
2238 |
2238 |
2239 lemma eq_int_code [code]: |
2239 lemma eq_int_code [code]: |
2240 "eq_class.eq Int.Pls Int.Pls \<longleftrightarrow> True" |
2240 "HOL.equal Int.Pls Int.Pls \<longleftrightarrow> True" |
2241 "eq_class.eq Int.Pls Int.Min \<longleftrightarrow> False" |
2241 "HOL.equal Int.Pls Int.Min \<longleftrightarrow> False" |
2242 "eq_class.eq Int.Pls (Int.Bit0 k2) \<longleftrightarrow> eq_class.eq Int.Pls k2" |
2242 "HOL.equal Int.Pls (Int.Bit0 k2) \<longleftrightarrow> HOL.equal Int.Pls k2" |
2243 "eq_class.eq Int.Pls (Int.Bit1 k2) \<longleftrightarrow> False" |
2243 "HOL.equal Int.Pls (Int.Bit1 k2) \<longleftrightarrow> False" |
2244 "eq_class.eq Int.Min Int.Pls \<longleftrightarrow> False" |
2244 "HOL.equal Int.Min Int.Pls \<longleftrightarrow> False" |
2245 "eq_class.eq Int.Min Int.Min \<longleftrightarrow> True" |
2245 "HOL.equal Int.Min Int.Min \<longleftrightarrow> True" |
2246 "eq_class.eq Int.Min (Int.Bit0 k2) \<longleftrightarrow> False" |
2246 "HOL.equal Int.Min (Int.Bit0 k2) \<longleftrightarrow> False" |
2247 "eq_class.eq Int.Min (Int.Bit1 k2) \<longleftrightarrow> eq_class.eq Int.Min k2" |
2247 "HOL.equal Int.Min (Int.Bit1 k2) \<longleftrightarrow> HOL.equal Int.Min k2" |
2248 "eq_class.eq (Int.Bit0 k1) Int.Pls \<longleftrightarrow> eq_class.eq k1 Int.Pls" |
2248 "HOL.equal (Int.Bit0 k1) Int.Pls \<longleftrightarrow> HOL.equal k1 Int.Pls" |
2249 "eq_class.eq (Int.Bit1 k1) Int.Pls \<longleftrightarrow> False" |
2249 "HOL.equal (Int.Bit1 k1) Int.Pls \<longleftrightarrow> False" |
2250 "eq_class.eq (Int.Bit0 k1) Int.Min \<longleftrightarrow> False" |
2250 "HOL.equal (Int.Bit0 k1) Int.Min \<longleftrightarrow> False" |
2251 "eq_class.eq (Int.Bit1 k1) Int.Min \<longleftrightarrow> eq_class.eq k1 Int.Min" |
2251 "HOL.equal (Int.Bit1 k1) Int.Min \<longleftrightarrow> HOL.equal k1 Int.Min" |
2252 "eq_class.eq (Int.Bit0 k1) (Int.Bit0 k2) \<longleftrightarrow> eq_class.eq k1 k2" |
2252 "HOL.equal (Int.Bit0 k1) (Int.Bit0 k2) \<longleftrightarrow> HOL.equal k1 k2" |
2253 "eq_class.eq (Int.Bit0 k1) (Int.Bit1 k2) \<longleftrightarrow> False" |
2253 "HOL.equal (Int.Bit0 k1) (Int.Bit1 k2) \<longleftrightarrow> False" |
2254 "eq_class.eq (Int.Bit1 k1) (Int.Bit0 k2) \<longleftrightarrow> False" |
2254 "HOL.equal (Int.Bit1 k1) (Int.Bit0 k2) \<longleftrightarrow> False" |
2255 "eq_class.eq (Int.Bit1 k1) (Int.Bit1 k2) \<longleftrightarrow> eq_class.eq k1 k2" |
2255 "HOL.equal (Int.Bit1 k1) (Int.Bit1 k2) \<longleftrightarrow> HOL.equal k1 k2" |
2256 unfolding eq_equals by simp_all |
2256 unfolding equal_eq by simp_all |
2257 |
2257 |
2258 lemma eq_int_refl [code nbe]: |
2258 lemma eq_int_refl [code nbe]: |
2259 "eq_class.eq (k::int) k \<longleftrightarrow> True" |
2259 "HOL.equal (k::int) k \<longleftrightarrow> True" |
2260 by (rule HOL.eq_refl) |
2260 by (rule equal_refl) |
2261 |
2261 |
2262 lemma less_eq_number_of_int_code [code]: |
2262 lemma less_eq_number_of_int_code [code]: |
2263 "(number_of k \<Colon> int) \<le> number_of l \<longleftrightarrow> k \<le> l" |
2263 "(number_of k \<Colon> int) \<le> number_of l \<longleftrightarrow> k \<le> l" |
2264 unfolding number_of_is_id .. |
2264 unfolding number_of_is_id .. |
2265 |
2265 |