equal
deleted
inserted
replaced
331 using add_strict_mono [of 0 a b c] by simp |
331 using add_strict_mono [of 0 a b c] by simp |
332 |
332 |
333 class ordered_idom = comm_ring_1 + ordered_comm_semiring_strict + lordered_ab_group + abs_if |
333 class ordered_idom = comm_ring_1 + ordered_comm_semiring_strict + lordered_ab_group + abs_if |
334 (*previously ordered_ring*) |
334 (*previously ordered_ring*) |
335 |
335 |
|
336 definition (in ordered_idom) sgn where |
|
337 "sgn x = (if x = \<^loc>0 then \<^loc>0 else if \<^loc>0 \<sqsubset> x then \<^loc>1 else uminus \<^loc>1)" |
|
338 |
336 instance ordered_idom \<subseteq> ordered_ring_strict .. |
339 instance ordered_idom \<subseteq> ordered_ring_strict .. |
337 |
340 |
338 instance ordered_idom \<subseteq> pordered_comm_ring .. |
341 instance ordered_idom \<subseteq> pordered_comm_ring .. |
339 |
342 |
340 class ordered_field = field + ordered_idom |
343 class ordered_field = field + ordered_idom |
1893 show "x < y \<Longrightarrow> \<exists>z>x. z < y" by (blast intro!: less_half_sum gt_half_sum) |
1896 show "x < y \<Longrightarrow> \<exists>z>x. z < y" by (blast intro!: less_half_sum gt_half_sum) |
1894 qed |
1897 qed |
1895 |
1898 |
1896 |
1899 |
1897 subsection {* Absolute Value *} |
1900 subsection {* Absolute Value *} |
|
1901 |
|
1902 lemma mult_sgn_abs: "sgn x * abs x = (x::'a::{ordered_idom,linorder})" |
|
1903 using less_linear[of x 0] |
|
1904 by(auto simp: sgn_def abs_if) |
1898 |
1905 |
1899 lemma abs_one [simp]: "abs 1 = (1::'a::ordered_idom)" |
1906 lemma abs_one [simp]: "abs 1 = (1::'a::ordered_idom)" |
1900 by (simp add: abs_if zero_less_one [THEN order_less_not_sym]) |
1907 by (simp add: abs_if zero_less_one [THEN order_less_not_sym]) |
1901 |
1908 |
1902 lemma abs_le_mult: "abs (a * b) \<le> (abs a) * (abs (b::'a::lordered_ring))" |
1909 lemma abs_le_mult: "abs (a * b) \<le> (abs a) * (abs (b::'a::lordered_ring))" |