equal
deleted
inserted
replaced
104 by (rule zdiv_int) |
104 by (rule zdiv_int) |
105 |
105 |
106 lemma int_mod_zmod: "int (a mod b) = (int a) mod (int b)" |
106 lemma int_mod_zmod: "int (a mod b) = (int a) mod (int b)" |
107 by (rule zmod_int) |
107 by (rule zmod_int) |
108 |
108 |
109 lemma abs_div_2_less: "a \<noteq> 0 \<Longrightarrow> a \<noteq> -1 \<Longrightarrow> abs((a::int) div 2) < abs a" |
109 lemma abs_div_2_less: "a \<noteq> 0 \<Longrightarrow> a \<noteq> -1 \<Longrightarrow> \<bar>(a::int) div 2\<bar> < \<bar>a\<bar>" |
110 by arith |
110 by arith |
111 |
111 |
112 lemma norm_0_1: "(1::_::numeral) = Numeral1" |
112 lemma norm_0_1: "(1::_::numeral) = Numeral1" |
113 by auto |
113 by auto |
114 |
114 |
193 lemma float_le_zero: |
193 lemma float_le_zero: |
194 "(float (a,b) <= 0) = (a <= 0)" |
194 "(float (a,b) <= 0) = (a <= 0)" |
195 by (simp add: float_def mult_le_0_iff) (simp add: not_less [symmetric]) |
195 by (simp add: float_def mult_le_0_iff) (simp add: not_less [symmetric]) |
196 |
196 |
197 lemma float_abs: |
197 lemma float_abs: |
198 "abs (float (a,b)) = (if 0 <= a then (float (a,b)) else (float (-a,b)))" |
198 "\<bar>float (a,b)\<bar> = (if 0 <= a then (float (a,b)) else (float (-a,b)))" |
199 by (simp add: float_def abs_if mult_less_0_iff not_less) |
199 by (simp add: float_def abs_if mult_less_0_iff not_less) |
200 |
200 |
201 lemma float_zero: |
201 lemma float_zero: |
202 "float (0, b) = 0" |
202 "float (0, b) = 0" |
203 by (simp add: float_def) |
203 by (simp add: float_def) |