equal
deleted
inserted
replaced
563 by (rule power2_le_imp_le, simp_all) |
563 by (rule power2_le_imp_le, simp_all) |
564 |
564 |
565 lemma le_real_sqrt_sumsq [simp]: "x \<le> sqrt (x * x + y * y)" |
565 lemma le_real_sqrt_sumsq [simp]: "x \<le> sqrt (x * x + y * y)" |
566 by (simp add: power2_eq_square [symmetric]) |
566 by (simp add: power2_eq_square [symmetric]) |
567 |
567 |
568 lemma power2_sum: |
|
569 fixes x y :: "'a::{number_ring,recpower}" |
|
570 shows "(x + y)\<twosuperior> = x\<twosuperior> + y\<twosuperior> + 2 * x * y" |
|
571 by (simp add: ring_distribs power2_eq_square) |
|
572 |
|
573 lemma power2_diff: |
|
574 fixes x y :: "'a::{number_ring,recpower}" |
|
575 shows "(x - y)\<twosuperior> = x\<twosuperior> + y\<twosuperior> - 2 * x * y" |
|
576 by (simp add: ring_distribs power2_eq_square) |
|
577 |
|
578 lemma real_sqrt_sum_squares_triangle_ineq: |
568 lemma real_sqrt_sum_squares_triangle_ineq: |
579 "sqrt ((a + c)\<twosuperior> + (b + d)\<twosuperior>) \<le> sqrt (a\<twosuperior> + b\<twosuperior>) + sqrt (c\<twosuperior> + d\<twosuperior>)" |
569 "sqrt ((a + c)\<twosuperior> + (b + d)\<twosuperior>) \<le> sqrt (a\<twosuperior> + b\<twosuperior>) + sqrt (c\<twosuperior> + d\<twosuperior>)" |
580 apply (rule power2_le_imp_le, simp) |
570 apply (rule power2_le_imp_le, simp) |
581 apply (simp add: power2_sum) |
571 apply (simp add: power2_sum) |
582 apply (simp only: mult_assoc right_distrib [symmetric]) |
572 apply (simp only: mult_assoc right_distrib [symmetric]) |