205 fixes x :: "'a::real_div_algebra" shows |
205 fixes x :: "'a::real_div_algebra" shows |
206 "\<lbrakk>a \<noteq> 0; x \<noteq> 0\<rbrakk> \<Longrightarrow> inverse (scaleR a x) = scaleR (inverse a) (inverse x)" |
206 "\<lbrakk>a \<noteq> 0; x \<noteq> 0\<rbrakk> \<Longrightarrow> inverse (scaleR a x) = scaleR (inverse a) (inverse x)" |
207 by (rule inverse_unique, simp) |
207 by (rule inverse_unique, simp) |
208 |
208 |
209 lemma inverse_scaleR_distrib: |
209 lemma inverse_scaleR_distrib: |
210 fixes x :: "'a::{real_div_algebra,division_ring_inverse_zero}" |
210 fixes x :: "'a::{real_div_algebra, division_ring_inverse_zero}" |
211 shows "inverse (scaleR a x) = scaleR (inverse a) (inverse x)" |
211 shows "inverse (scaleR a x) = scaleR (inverse a) (inverse x)" |
212 apply (case_tac "a = 0", simp) |
212 apply (case_tac "a = 0", simp) |
213 apply (case_tac "x = 0", simp) |
213 apply (case_tac "x = 0", simp) |
214 apply (erule (1) nonzero_inverse_scaleR_distrib) |
214 apply (erule (1) nonzero_inverse_scaleR_distrib) |
215 done |
215 done |
248 inverse (of_real x :: 'a::real_div_algebra)" |
248 inverse (of_real x :: 'a::real_div_algebra)" |
249 by (simp add: of_real_def nonzero_inverse_scaleR_distrib) |
249 by (simp add: of_real_def nonzero_inverse_scaleR_distrib) |
250 |
250 |
251 lemma of_real_inverse [simp]: |
251 lemma of_real_inverse [simp]: |
252 "of_real (inverse x) = |
252 "of_real (inverse x) = |
253 inverse (of_real x :: 'a::{real_div_algebra,division_ring_inverse_zero})" |
253 inverse (of_real x :: 'a::{real_div_algebra, division_ring_inverse_zero})" |
254 by (simp add: of_real_def inverse_scaleR_distrib) |
254 by (simp add: of_real_def inverse_scaleR_distrib) |
255 |
255 |
256 lemma nonzero_of_real_divide: |
256 lemma nonzero_of_real_divide: |
257 "y \<noteq> 0 \<Longrightarrow> of_real (x / y) = |
257 "y \<noteq> 0 \<Longrightarrow> of_real (x / y) = |
258 (of_real x / of_real y :: 'a::real_field)" |
258 (of_real x / of_real y :: 'a::real_field)" |
259 by (simp add: divide_inverse nonzero_of_real_inverse) |
259 by (simp add: divide_inverse nonzero_of_real_inverse) |
260 |
260 |
261 lemma of_real_divide [simp]: |
261 lemma of_real_divide [simp]: |
262 "of_real (x / y) = |
262 "of_real (x / y) = |
263 (of_real x / of_real y :: 'a::{real_field,division_ring_inverse_zero})" |
263 (of_real x / of_real y :: 'a::{real_field, field_inverse_zero})" |
264 by (simp add: divide_inverse) |
264 by (simp add: divide_inverse) |
265 |
265 |
266 lemma of_real_power [simp]: |
266 lemma of_real_power [simp]: |
267 "of_real (x ^ n) = (of_real x :: 'a::{real_algebra_1}) ^ n" |
267 "of_real (x ^ n) = (of_real x :: 'a::{real_algebra_1}) ^ n" |
268 by (induct n) simp_all |
268 by (induct n) simp_all |
368 apply (rule range_eqI) |
368 apply (rule range_eqI) |
369 apply (erule nonzero_of_real_inverse [symmetric]) |
369 apply (erule nonzero_of_real_inverse [symmetric]) |
370 done |
370 done |
371 |
371 |
372 lemma Reals_inverse [simp]: |
372 lemma Reals_inverse [simp]: |
373 fixes a :: "'a::{real_div_algebra,division_ring_inverse_zero}" |
373 fixes a :: "'a::{real_div_algebra, division_ring_inverse_zero}" |
374 shows "a \<in> Reals \<Longrightarrow> inverse a \<in> Reals" |
374 shows "a \<in> Reals \<Longrightarrow> inverse a \<in> Reals" |
375 apply (auto simp add: Reals_def) |
375 apply (auto simp add: Reals_def) |
376 apply (rule range_eqI) |
376 apply (rule range_eqI) |
377 apply (rule of_real_inverse [symmetric]) |
377 apply (rule of_real_inverse [symmetric]) |
378 done |
378 done |
384 apply (rule range_eqI) |
384 apply (rule range_eqI) |
385 apply (erule nonzero_of_real_divide [symmetric]) |
385 apply (erule nonzero_of_real_divide [symmetric]) |
386 done |
386 done |
387 |
387 |
388 lemma Reals_divide [simp]: |
388 lemma Reals_divide [simp]: |
389 fixes a b :: "'a::{real_field,division_ring_inverse_zero}" |
389 fixes a b :: "'a::{real_field, field_inverse_zero}" |
390 shows "\<lbrakk>a \<in> Reals; b \<in> Reals\<rbrakk> \<Longrightarrow> a / b \<in> Reals" |
390 shows "\<lbrakk>a \<in> Reals; b \<in> Reals\<rbrakk> \<Longrightarrow> a / b \<in> Reals" |
391 apply (auto simp add: Reals_def) |
391 apply (auto simp add: Reals_def) |
392 apply (rule range_eqI) |
392 apply (rule range_eqI) |
393 apply (rule of_real_divide [symmetric]) |
393 apply (rule of_real_divide [symmetric]) |
394 done |
394 done |
724 apply (rule inverse_unique [symmetric]) |
724 apply (rule inverse_unique [symmetric]) |
725 apply (simp add: norm_mult [symmetric]) |
725 apply (simp add: norm_mult [symmetric]) |
726 done |
726 done |
727 |
727 |
728 lemma norm_inverse: |
728 lemma norm_inverse: |
729 fixes a :: "'a::{real_normed_div_algebra,division_ring_inverse_zero}" |
729 fixes a :: "'a::{real_normed_div_algebra, division_ring_inverse_zero}" |
730 shows "norm (inverse a) = inverse (norm a)" |
730 shows "norm (inverse a) = inverse (norm a)" |
731 apply (case_tac "a = 0", simp) |
731 apply (case_tac "a = 0", simp) |
732 apply (erule nonzero_norm_inverse) |
732 apply (erule nonzero_norm_inverse) |
733 done |
733 done |
734 |
734 |
736 fixes a b :: "'a::real_normed_field" |
736 fixes a b :: "'a::real_normed_field" |
737 shows "b \<noteq> 0 \<Longrightarrow> norm (a / b) = norm a / norm b" |
737 shows "b \<noteq> 0 \<Longrightarrow> norm (a / b) = norm a / norm b" |
738 by (simp add: divide_inverse norm_mult nonzero_norm_inverse) |
738 by (simp add: divide_inverse norm_mult nonzero_norm_inverse) |
739 |
739 |
740 lemma norm_divide: |
740 lemma norm_divide: |
741 fixes a b :: "'a::{real_normed_field,division_ring_inverse_zero}" |
741 fixes a b :: "'a::{real_normed_field, field_inverse_zero}" |
742 shows "norm (a / b) = norm a / norm b" |
742 shows "norm (a / b) = norm a / norm b" |
743 by (simp add: divide_inverse norm_mult norm_inverse) |
743 by (simp add: divide_inverse norm_mult norm_inverse) |
744 |
744 |
745 lemma norm_power_ineq: |
745 lemma norm_power_ineq: |
746 fixes x :: "'a::{real_normed_algebra_1}" |
746 fixes x :: "'a::{real_normed_algebra_1}" |