equal
deleted
inserted
replaced
256 lemma real_vector_eq_affinity: |
256 lemma real_vector_eq_affinity: |
257 fixes x :: "'a :: real_vector" |
257 fixes x :: "'a :: real_vector" |
258 shows "m \<noteq> 0 ==> (y = m *\<^sub>R x + c \<longleftrightarrow> inverse m *\<^sub>R y - (inverse m *\<^sub>R c) = x)" |
258 shows "m \<noteq> 0 ==> (y = m *\<^sub>R x + c \<longleftrightarrow> inverse m *\<^sub>R y - (inverse m *\<^sub>R c) = x)" |
259 using real_vector_affinity_eq[where m=m and x=x and y=y and c=c] |
259 using real_vector_affinity_eq[where m=m and x=x and y=y and c=c] |
260 by metis |
260 by metis |
|
261 |
|
262 lemma scaleR_eq_iff [simp]: |
|
263 fixes a :: "'a :: real_vector" |
|
264 shows "b + u *\<^sub>R a = a + u *\<^sub>R b \<longleftrightarrow> a=b \<or> u=1" |
|
265 proof (cases "u=1") |
|
266 case True then show ?thesis by auto |
|
267 next |
|
268 case False |
|
269 { assume "b + u *\<^sub>R a = a + u *\<^sub>R b" |
|
270 then have "(u - 1) *\<^sub>R a = (u - 1) *\<^sub>R b" |
|
271 by (simp add: algebra_simps) |
|
272 with False have "a=b" |
|
273 by auto |
|
274 } |
|
275 then show ?thesis by auto |
|
276 qed |
|
277 |
|
278 lemma scaleR_collapse [simp]: |
|
279 fixes a :: "'a :: real_vector" |
|
280 shows "(1 - u) *\<^sub>R a + u *\<^sub>R a = a" |
|
281 by (simp add: algebra_simps) |
261 |
282 |
262 |
283 |
263 subsection \<open>Embedding of the Reals into any \<open>real_algebra_1\<close>: |
284 subsection \<open>Embedding of the Reals into any \<open>real_algebra_1\<close>: |
264 @{term of_real}\<close> |
285 @{term of_real}\<close> |
265 |
286 |
918 finally show "norm (x ^ Suc n) \<le> norm x ^ Suc n" |
939 finally show "norm (x ^ Suc n) \<le> norm x ^ Suc n" |
919 by simp |
940 by simp |
920 qed |
941 qed |
921 |
942 |
922 lemma norm_power: |
943 lemma norm_power: |
923 fixes x :: "'a::{real_normed_div_algebra}" |
944 fixes x :: "'a::real_normed_div_algebra" |
924 shows "norm (x ^ n) = norm x ^ n" |
945 shows "norm (x ^ n) = norm x ^ n" |
925 by (induct n) (simp_all add: norm_mult) |
946 by (induct n) (simp_all add: norm_mult) |
|
947 |
|
948 lemma power_eq_imp_eq_norm: |
|
949 fixes w :: "'a::real_normed_div_algebra" |
|
950 assumes eq: "w ^ n = z ^ n" and "n > 0" |
|
951 shows "norm w = norm z" |
|
952 proof - |
|
953 have "norm w ^ n = norm z ^ n" |
|
954 by (metis (no_types) eq norm_power) |
|
955 then show ?thesis |
|
956 using assms by (force intro: power_eq_imp_eq_base) |
|
957 qed |
926 |
958 |
927 lemma norm_mult_numeral1 [simp]: |
959 lemma norm_mult_numeral1 [simp]: |
928 fixes a b :: "'a::{real_normed_field, field}" |
960 fixes a b :: "'a::{real_normed_field, field}" |
929 shows "norm (numeral w * a) = numeral w * norm a" |
961 shows "norm (numeral w * a) = numeral w * norm a" |
930 by (simp add: norm_mult) |
962 by (simp add: norm_mult) |
1074 by (rule order_trans [OF dist_triangle2]) |
1106 by (rule order_trans [OF dist_triangle2]) |
1075 |
1107 |
1076 lemma dist_triangle_lt: |
1108 lemma dist_triangle_lt: |
1077 shows "dist x z + dist y z < e ==> dist x y < e" |
1109 shows "dist x z + dist y z < e ==> dist x y < e" |
1078 by (rule le_less_trans [OF dist_triangle2]) |
1110 by (rule le_less_trans [OF dist_triangle2]) |
|
1111 |
|
1112 lemma dist_triangle_less_add: |
|
1113 "\<lbrakk>dist x1 y < e1; dist x2 y < e2\<rbrakk> \<Longrightarrow> dist x1 x2 < e1 + e2" |
|
1114 by (rule dist_triangle_lt [where z=y], simp) |
1079 |
1115 |
1080 lemma dist_triangle_half_l: |
1116 lemma dist_triangle_half_l: |
1081 shows "dist x1 y < e / 2 \<Longrightarrow> dist x2 y < e / 2 \<Longrightarrow> dist x1 x2 < e" |
1117 shows "dist x1 y < e / 2 \<Longrightarrow> dist x2 y < e / 2 \<Longrightarrow> dist x1 x2 < e" |
1082 by (rule dist_triangle_lt [where z=y], simp) |
1118 by (rule dist_triangle_lt [where z=y], simp) |
1083 |
1119 |