author | huffman |
Tue, 12 Dec 2006 00:03:42 +0100 | |
changeset 21777 | a535be528d3a |
parent 21404 | eb85850d3eb7 |
child 21809 | 4b93e949ac33 |
permissions | -rw-r--r-- |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
1 |
(* Title : RealVector.thy |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
2 |
ID: $Id$ |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
3 |
Author : Brian Huffman |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
4 |
*) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
5 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
6 |
header {* Vector Spaces and Algebras over the Reals *} |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
7 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
8 |
theory RealVector |
20684 | 9 |
imports RealPow |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
10 |
begin |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
11 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
12 |
subsection {* Locale for additive functions *} |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
13 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
14 |
locale additive = |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
15 |
fixes f :: "'a::ab_group_add \<Rightarrow> 'b::ab_group_add" |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
16 |
assumes add: "f (x + y) = f x + f y" |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
17 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
18 |
lemma (in additive) zero: "f 0 = 0" |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
19 |
proof - |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
20 |
have "f 0 = f (0 + 0)" by simp |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
21 |
also have "\<dots> = f 0 + f 0" by (rule add) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
22 |
finally show "f 0 = 0" by simp |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
23 |
qed |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
24 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
25 |
lemma (in additive) minus: "f (- x) = - f x" |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
26 |
proof - |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
27 |
have "f (- x) + f x = f (- x + x)" by (rule add [symmetric]) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
28 |
also have "\<dots> = - f x + f x" by (simp add: zero) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
29 |
finally show "f (- x) = - f x" by (rule add_right_imp_eq) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
30 |
qed |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
31 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
32 |
lemma (in additive) diff: "f (x - y) = f x - f y" |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
33 |
by (simp add: diff_def add minus) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
34 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
35 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
36 |
subsection {* Real vector spaces *} |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
37 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
38 |
axclass scaleR < type |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
39 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
40 |
consts |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
41 |
scaleR :: "real \<Rightarrow> 'a \<Rightarrow> 'a::scaleR" (infixr "*#" 75) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
42 |
|
20763 | 43 |
abbreviation |
21404
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21210
diff
changeset
|
44 |
divideR :: "'a \<Rightarrow> real \<Rightarrow> 'a::scaleR" (infixl "'/#" 70) where |
20763 | 45 |
"x /# r == inverse r *# x" |
46 |
||
21210 | 47 |
notation (xsymbols) |
21404
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21210
diff
changeset
|
48 |
scaleR (infixr "*\<^sub>R" 75) and |
20763 | 49 |
divideR (infixl "'/\<^sub>R" 70) |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
50 |
|
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
51 |
instance real :: scaleR .. |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
52 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
53 |
defs (overloaded) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
54 |
real_scaleR_def: "a *# x \<equiv> a * x" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
55 |
|
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
56 |
axclass real_vector < scaleR, ab_group_add |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
57 |
scaleR_right_distrib: "a *# (x + y) = a *# x + a *# y" |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
58 |
scaleR_left_distrib: "(a + b) *# x = a *# x + b *# x" |
20763 | 59 |
scaleR_scaleR [simp]: "a *# b *# x = (a * b) *# x" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
60 |
scaleR_one [simp]: "1 *# x = x" |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
61 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
62 |
axclass real_algebra < real_vector, ring |
20763 | 63 |
mult_scaleR_left [simp]: "a *# x * y = a *# (x * y)" |
64 |
mult_scaleR_right [simp]: "x * a *# y = a *# (x * y)" |
|
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
65 |
|
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
66 |
axclass real_algebra_1 < real_algebra, ring_1 |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
67 |
|
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
68 |
axclass real_div_algebra < real_algebra_1, division_ring |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
69 |
|
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
70 |
axclass real_field < real_div_algebra, field |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
71 |
|
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
72 |
instance real :: real_field |
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
73 |
apply (intro_classes, unfold real_scaleR_def) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
74 |
apply (rule right_distrib) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
75 |
apply (rule left_distrib) |
20763 | 76 |
apply (rule mult_assoc [symmetric]) |
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
77 |
apply (rule mult_1_left) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
78 |
apply (rule mult_assoc) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
79 |
apply (rule mult_left_commute) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
80 |
done |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
81 |
|
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
82 |
lemma scaleR_left_commute: |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
83 |
fixes x :: "'a::real_vector" |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
84 |
shows "a *# b *# x = b *# a *# x" |
20763 | 85 |
by (simp add: mult_commute) |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
86 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
87 |
lemma additive_scaleR_right: "additive (\<lambda>x. a *# x :: 'a::real_vector)" |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
88 |
by (rule additive.intro, rule scaleR_right_distrib) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
89 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
90 |
lemma additive_scaleR_left: "additive (\<lambda>a. a *# x :: 'a::real_vector)" |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
91 |
by (rule additive.intro, rule scaleR_left_distrib) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
92 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
93 |
lemmas scaleR_zero_left [simp] = |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
94 |
additive.zero [OF additive_scaleR_left, standard] |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
95 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
96 |
lemmas scaleR_zero_right [simp] = |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
97 |
additive.zero [OF additive_scaleR_right, standard] |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
98 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
99 |
lemmas scaleR_minus_left [simp] = |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
100 |
additive.minus [OF additive_scaleR_left, standard] |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
101 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
102 |
lemmas scaleR_minus_right [simp] = |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
103 |
additive.minus [OF additive_scaleR_right, standard] |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
104 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
105 |
lemmas scaleR_left_diff_distrib = |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
106 |
additive.diff [OF additive_scaleR_left, standard] |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
107 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
108 |
lemmas scaleR_right_diff_distrib = |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
109 |
additive.diff [OF additive_scaleR_right, standard] |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
110 |
|
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
111 |
lemma scaleR_eq_0_iff: |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
112 |
fixes x :: "'a::real_vector" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
113 |
shows "(a *# x = 0) = (a = 0 \<or> x = 0)" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
114 |
proof cases |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
115 |
assume "a = 0" thus ?thesis by simp |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
116 |
next |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
117 |
assume anz [simp]: "a \<noteq> 0" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
118 |
{ assume "a *# x = 0" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
119 |
hence "inverse a *# a *# x = 0" by simp |
20763 | 120 |
hence "x = 0" by simp } |
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
121 |
thus ?thesis by force |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
122 |
qed |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
123 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
124 |
lemma scaleR_left_imp_eq: |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
125 |
fixes x y :: "'a::real_vector" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
126 |
shows "\<lbrakk>a \<noteq> 0; a *# x = a *# y\<rbrakk> \<Longrightarrow> x = y" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
127 |
proof - |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
128 |
assume nonzero: "a \<noteq> 0" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
129 |
assume "a *# x = a *# y" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
130 |
hence "a *# (x - y) = 0" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
131 |
by (simp add: scaleR_right_diff_distrib) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
132 |
hence "x - y = 0" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
133 |
by (simp add: scaleR_eq_0_iff nonzero) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
134 |
thus "x = y" by simp |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
135 |
qed |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
136 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
137 |
lemma scaleR_right_imp_eq: |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
138 |
fixes x y :: "'a::real_vector" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
139 |
shows "\<lbrakk>x \<noteq> 0; a *# x = b *# x\<rbrakk> \<Longrightarrow> a = b" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
140 |
proof - |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
141 |
assume nonzero: "x \<noteq> 0" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
142 |
assume "a *# x = b *# x" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
143 |
hence "(a - b) *# x = 0" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
144 |
by (simp add: scaleR_left_diff_distrib) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
145 |
hence "a - b = 0" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
146 |
by (simp add: scaleR_eq_0_iff nonzero) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
147 |
thus "a = b" by simp |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
148 |
qed |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
149 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
150 |
lemma scaleR_cancel_left: |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
151 |
fixes x y :: "'a::real_vector" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
152 |
shows "(a *# x = a *# y) = (x = y \<or> a = 0)" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
153 |
by (auto intro: scaleR_left_imp_eq) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
154 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
155 |
lemma scaleR_cancel_right: |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
156 |
fixes x y :: "'a::real_vector" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
157 |
shows "(a *# x = b *# x) = (a = b \<or> x = 0)" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
158 |
by (auto intro: scaleR_right_imp_eq) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
159 |
|
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
160 |
lemma nonzero_inverse_scaleR_distrib: |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
161 |
fixes x :: "'a::real_div_algebra" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
162 |
shows "\<lbrakk>a \<noteq> 0; x \<noteq> 0\<rbrakk> \<Longrightarrow> inverse (a *# x) = inverse a *# inverse x" |
20763 | 163 |
by (rule inverse_unique, simp) |
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
164 |
|
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
165 |
lemma inverse_scaleR_distrib: |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
166 |
fixes x :: "'a::{real_div_algebra,division_by_zero}" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
167 |
shows "inverse (a *# x) = inverse a *# inverse x" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
168 |
apply (case_tac "a = 0", simp) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
169 |
apply (case_tac "x = 0", simp) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
170 |
apply (erule (1) nonzero_inverse_scaleR_distrib) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
171 |
done |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
172 |
|
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
173 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
174 |
subsection {* Embedding of the Reals into any @{text real_algebra_1}: |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
175 |
@{term of_real} *} |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
176 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
177 |
definition |
21404
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21210
diff
changeset
|
178 |
of_real :: "real \<Rightarrow> 'a::real_algebra_1" where |
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
179 |
"of_real r = r *# 1" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
180 |
|
20763 | 181 |
lemma scaleR_conv_of_real: "r *# x = of_real r * x" |
182 |
by (simp add: of_real_def) |
|
183 |
||
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
184 |
lemma of_real_0 [simp]: "of_real 0 = 0" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
185 |
by (simp add: of_real_def) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
186 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
187 |
lemma of_real_1 [simp]: "of_real 1 = 1" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
188 |
by (simp add: of_real_def) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
189 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
190 |
lemma of_real_add [simp]: "of_real (x + y) = of_real x + of_real y" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
191 |
by (simp add: of_real_def scaleR_left_distrib) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
192 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
193 |
lemma of_real_minus [simp]: "of_real (- x) = - of_real x" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
194 |
by (simp add: of_real_def) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
195 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
196 |
lemma of_real_diff [simp]: "of_real (x - y) = of_real x - of_real y" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
197 |
by (simp add: of_real_def scaleR_left_diff_distrib) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
198 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
199 |
lemma of_real_mult [simp]: "of_real (x * y) = of_real x * of_real y" |
20763 | 200 |
by (simp add: of_real_def mult_commute) |
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
201 |
|
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
202 |
lemma nonzero_of_real_inverse: |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
203 |
"x \<noteq> 0 \<Longrightarrow> of_real (inverse x) = |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
204 |
inverse (of_real x :: 'a::real_div_algebra)" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
205 |
by (simp add: of_real_def nonzero_inverse_scaleR_distrib) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
206 |
|
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
207 |
lemma of_real_inverse [simp]: |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
208 |
"of_real (inverse x) = |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
209 |
inverse (of_real x :: 'a::{real_div_algebra,division_by_zero})" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
210 |
by (simp add: of_real_def inverse_scaleR_distrib) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
211 |
|
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
212 |
lemma nonzero_of_real_divide: |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
213 |
"y \<noteq> 0 \<Longrightarrow> of_real (x / y) = |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
214 |
(of_real x / of_real y :: 'a::real_field)" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
215 |
by (simp add: divide_inverse nonzero_of_real_inverse) |
20722 | 216 |
|
217 |
lemma of_real_divide [simp]: |
|
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
218 |
"of_real (x / y) = |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
219 |
(of_real x / of_real y :: 'a::{real_field,division_by_zero})" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
220 |
by (simp add: divide_inverse) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
221 |
|
20722 | 222 |
lemma of_real_power [simp]: |
223 |
"of_real (x ^ n) = (of_real x :: 'a::{real_algebra_1,recpower}) ^ n" |
|
20772 | 224 |
by (induct n) (simp_all add: power_Suc) |
20722 | 225 |
|
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
226 |
lemma of_real_eq_iff [simp]: "(of_real x = of_real y) = (x = y)" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
227 |
by (simp add: of_real_def scaleR_cancel_right) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
228 |
|
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
229 |
lemmas of_real_eq_0_iff [simp] = of_real_eq_iff [of _ 0, simplified] |
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
230 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
231 |
lemma of_real_eq_id [simp]: "of_real = (id :: real \<Rightarrow> real)" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
232 |
proof |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
233 |
fix r |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
234 |
show "of_real r = id r" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
235 |
by (simp add: of_real_def real_scaleR_def) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
236 |
qed |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
237 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
238 |
text{*Collapse nested embeddings*} |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
239 |
lemma of_real_of_nat_eq [simp]: "of_real (of_nat n) = of_nat n" |
20772 | 240 |
by (induct n) auto |
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
241 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
242 |
lemma of_real_of_int_eq [simp]: "of_real (of_int z) = of_int z" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
243 |
by (cases z rule: int_diff_cases, simp) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
244 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
245 |
lemma of_real_number_of_eq: |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
246 |
"of_real (number_of w) = (number_of w :: 'a::{number_ring,real_algebra_1})" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
247 |
by (simp add: number_of_eq) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
248 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
249 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
250 |
subsection {* The Set of Real Numbers *} |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
251 |
|
20772 | 252 |
definition |
21404
eb85850d3eb7
more robust syntax for definition/abbreviation/notation;
wenzelm
parents:
21210
diff
changeset
|
253 |
Reals :: "'a::real_algebra_1 set" where |
20772 | 254 |
"Reals \<equiv> range of_real" |
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
255 |
|
21210 | 256 |
notation (xsymbols) |
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
257 |
Reals ("\<real>") |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
258 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
259 |
lemma of_real_in_Reals [simp]: "of_real r \<in> Reals" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
260 |
by (simp add: Reals_def) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
261 |
|
20718 | 262 |
lemma of_int_in_Reals [simp]: "of_int z \<in> Reals" |
263 |
by (subst of_real_of_int_eq [symmetric], rule of_real_in_Reals) |
|
264 |
||
265 |
lemma of_nat_in_Reals [simp]: "of_nat n \<in> Reals" |
|
266 |
by (subst of_real_of_nat_eq [symmetric], rule of_real_in_Reals) |
|
267 |
||
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
268 |
lemma Reals_0 [simp]: "0 \<in> Reals" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
269 |
apply (unfold Reals_def) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
270 |
apply (rule range_eqI) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
271 |
apply (rule of_real_0 [symmetric]) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
272 |
done |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
273 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
274 |
lemma Reals_1 [simp]: "1 \<in> Reals" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
275 |
apply (unfold Reals_def) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
276 |
apply (rule range_eqI) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
277 |
apply (rule of_real_1 [symmetric]) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
278 |
done |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
279 |
|
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
280 |
lemma Reals_add [simp]: "\<lbrakk>a \<in> Reals; b \<in> Reals\<rbrakk> \<Longrightarrow> a + b \<in> Reals" |
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
281 |
apply (auto simp add: Reals_def) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
282 |
apply (rule range_eqI) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
283 |
apply (rule of_real_add [symmetric]) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
284 |
done |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
285 |
|
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
286 |
lemma Reals_minus [simp]: "a \<in> Reals \<Longrightarrow> - a \<in> Reals" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
287 |
apply (auto simp add: Reals_def) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
288 |
apply (rule range_eqI) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
289 |
apply (rule of_real_minus [symmetric]) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
290 |
done |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
291 |
|
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
292 |
lemma Reals_diff [simp]: "\<lbrakk>a \<in> Reals; b \<in> Reals\<rbrakk> \<Longrightarrow> a - b \<in> Reals" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
293 |
apply (auto simp add: Reals_def) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
294 |
apply (rule range_eqI) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
295 |
apply (rule of_real_diff [symmetric]) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
296 |
done |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
297 |
|
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
298 |
lemma Reals_mult [simp]: "\<lbrakk>a \<in> Reals; b \<in> Reals\<rbrakk> \<Longrightarrow> a * b \<in> Reals" |
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
299 |
apply (auto simp add: Reals_def) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
300 |
apply (rule range_eqI) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
301 |
apply (rule of_real_mult [symmetric]) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
302 |
done |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
303 |
|
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
304 |
lemma nonzero_Reals_inverse: |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
305 |
fixes a :: "'a::real_div_algebra" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
306 |
shows "\<lbrakk>a \<in> Reals; a \<noteq> 0\<rbrakk> \<Longrightarrow> inverse a \<in> Reals" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
307 |
apply (auto simp add: Reals_def) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
308 |
apply (rule range_eqI) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
309 |
apply (erule nonzero_of_real_inverse [symmetric]) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
310 |
done |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
311 |
|
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
312 |
lemma Reals_inverse [simp]: |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
313 |
fixes a :: "'a::{real_div_algebra,division_by_zero}" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
314 |
shows "a \<in> Reals \<Longrightarrow> inverse a \<in> Reals" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
315 |
apply (auto simp add: Reals_def) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
316 |
apply (rule range_eqI) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
317 |
apply (rule of_real_inverse [symmetric]) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
318 |
done |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
319 |
|
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
320 |
lemma nonzero_Reals_divide: |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
321 |
fixes a b :: "'a::real_field" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
322 |
shows "\<lbrakk>a \<in> Reals; b \<in> Reals; b \<noteq> 0\<rbrakk> \<Longrightarrow> a / b \<in> Reals" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
323 |
apply (auto simp add: Reals_def) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
324 |
apply (rule range_eqI) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
325 |
apply (erule nonzero_of_real_divide [symmetric]) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
326 |
done |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
327 |
|
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
328 |
lemma Reals_divide [simp]: |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
329 |
fixes a b :: "'a::{real_field,division_by_zero}" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
330 |
shows "\<lbrakk>a \<in> Reals; b \<in> Reals\<rbrakk> \<Longrightarrow> a / b \<in> Reals" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
331 |
apply (auto simp add: Reals_def) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
332 |
apply (rule range_eqI) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
333 |
apply (rule of_real_divide [symmetric]) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
334 |
done |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
335 |
|
20722 | 336 |
lemma Reals_power [simp]: |
337 |
fixes a :: "'a::{real_algebra_1,recpower}" |
|
338 |
shows "a \<in> Reals \<Longrightarrow> a ^ n \<in> Reals" |
|
339 |
apply (auto simp add: Reals_def) |
|
340 |
apply (rule range_eqI) |
|
341 |
apply (rule of_real_power [symmetric]) |
|
342 |
done |
|
343 |
||
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
344 |
lemma Reals_cases [cases set: Reals]: |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
345 |
assumes "q \<in> \<real>" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
346 |
obtains (of_real) r where "q = of_real r" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
347 |
unfolding Reals_def |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
348 |
proof - |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
349 |
from `q \<in> \<real>` have "q \<in> range of_real" unfolding Reals_def . |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
350 |
then obtain r where "q = of_real r" .. |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
351 |
then show thesis .. |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
352 |
qed |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
353 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
354 |
lemma Reals_induct [case_names of_real, induct set: Reals]: |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
355 |
"q \<in> \<real> \<Longrightarrow> (\<And>r. P (of_real r)) \<Longrightarrow> P q" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
356 |
by (rule Reals_cases) auto |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
357 |
|
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
358 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
359 |
subsection {* Real normed vector spaces *} |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
360 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
361 |
axclass norm < type |
20533 | 362 |
consts norm :: "'a::norm \<Rightarrow> real" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
363 |
|
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
364 |
instance real :: norm .. |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
365 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
366 |
defs (overloaded) |
20694 | 367 |
real_norm_def [simp]: "norm r \<equiv> \<bar>r\<bar>" |
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
368 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
369 |
axclass normed < plus, zero, norm |
20533 | 370 |
norm_ge_zero [simp]: "0 \<le> norm x" |
371 |
norm_eq_zero [simp]: "(norm x = 0) = (x = 0)" |
|
372 |
norm_triangle_ineq: "norm (x + y) \<le> norm x + norm y" |
|
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
373 |
|
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
374 |
axclass real_normed_vector < real_vector, normed |
20533 | 375 |
norm_scaleR: "norm (a *# x) = \<bar>a\<bar> * norm x" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
376 |
|
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
377 |
axclass real_normed_algebra < real_algebra, real_normed_vector |
20533 | 378 |
norm_mult_ineq: "norm (x * y) \<le> norm x * norm y" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
379 |
|
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
380 |
axclass real_normed_div_algebra < real_div_algebra, normed |
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
381 |
norm_of_real: "norm (of_real r) = abs r" |
20533 | 382 |
norm_mult: "norm (x * y) = norm x * norm y" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
383 |
|
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
384 |
axclass real_normed_field < real_field, real_normed_div_algebra |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
385 |
|
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
386 |
instance real_normed_div_algebra < real_normed_algebra |
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
387 |
proof |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
388 |
fix a :: real and x :: 'a |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
389 |
have "norm (a *# x) = norm (of_real a * x)" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
390 |
by (simp add: of_real_def mult_scaleR_left) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
391 |
also have "\<dots> = abs a * norm x" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
392 |
by (simp add: norm_mult norm_of_real) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
393 |
finally show "norm (a *# x) = abs a * norm x" . |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
394 |
next |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
395 |
fix x y :: 'a |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
396 |
show "norm (x * y) \<le> norm x * norm y" |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
397 |
by (simp add: norm_mult) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
398 |
qed |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
399 |
|
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
400 |
instance real :: real_normed_field |
20554
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
401 |
apply (intro_classes, unfold real_norm_def) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
402 |
apply (rule abs_ge_zero) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
403 |
apply (rule abs_eq_0) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
404 |
apply (rule abs_triangle_ineq) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
405 |
apply simp |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
406 |
apply (rule abs_mult) |
c433e78d4203
define new constant of_real for class real_algebra_1;
huffman
parents:
20551
diff
changeset
|
407 |
done |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
408 |
|
20828 | 409 |
lemma norm_zero [simp]: "norm (0::'a::normed) = 0" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
410 |
by simp |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
411 |
|
20828 | 412 |
lemma zero_less_norm_iff [simp]: "(0 < norm x) = (x \<noteq> (0::'a::normed))" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
413 |
by (simp add: order_less_le) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
414 |
|
20828 | 415 |
lemma norm_not_less_zero [simp]: "\<not> norm (x::'a::normed) < 0" |
416 |
by (simp add: linorder_not_less) |
|
417 |
||
418 |
lemma norm_le_zero_iff [simp]: "(norm x \<le> 0) = (x = (0::'a::normed))" |
|
419 |
by (simp add: order_le_less) |
|
420 |
||
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
421 |
lemma norm_minus_cancel [simp]: |
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
422 |
fixes x :: "'a::real_normed_vector" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
423 |
shows "norm (- x) = norm x" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
424 |
proof - |
20533 | 425 |
have "norm (- x) = norm (- 1 *# x)" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
426 |
by (simp only: scaleR_minus_left scaleR_one) |
20533 | 427 |
also have "\<dots> = \<bar>- 1\<bar> * norm x" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
428 |
by (rule norm_scaleR) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
429 |
finally show ?thesis by simp |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
430 |
qed |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
431 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
432 |
lemma norm_minus_commute: |
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
433 |
fixes a b :: "'a::real_normed_vector" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
434 |
shows "norm (a - b) = norm (b - a)" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
435 |
proof - |
20533 | 436 |
have "norm (a - b) = norm (- (a - b))" |
437 |
by (simp only: norm_minus_cancel) |
|
438 |
also have "\<dots> = norm (b - a)" by simp |
|
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
439 |
finally show ?thesis . |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
440 |
qed |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
441 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
442 |
lemma norm_triangle_ineq2: |
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
443 |
fixes a b :: "'a::real_normed_vector" |
20533 | 444 |
shows "norm a - norm b \<le> norm (a - b)" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
445 |
proof - |
20533 | 446 |
have "norm (a - b + b) \<le> norm (a - b) + norm b" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
447 |
by (rule norm_triangle_ineq) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
448 |
also have "(a - b + b) = a" |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
449 |
by simp |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
450 |
finally show ?thesis |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
451 |
by (simp add: compare_rls) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
452 |
qed |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
453 |
|
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
454 |
lemma norm_triangle_ineq3: |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
455 |
fixes a b :: "'a::real_normed_vector" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
456 |
shows "\<bar>norm a - norm b\<bar> \<le> norm (a - b)" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
457 |
apply (subst abs_le_iff) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
458 |
apply auto |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
459 |
apply (rule norm_triangle_ineq2) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
460 |
apply (subst norm_minus_commute) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
461 |
apply (rule norm_triangle_ineq2) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
462 |
done |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
463 |
|
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
464 |
lemma norm_triangle_ineq4: |
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
465 |
fixes a b :: "'a::real_normed_vector" |
20533 | 466 |
shows "norm (a - b) \<le> norm a + norm b" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
467 |
proof - |
20533 | 468 |
have "norm (a - b) = norm (a + - b)" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
469 |
by (simp only: diff_minus) |
20533 | 470 |
also have "\<dots> \<le> norm a + norm (- b)" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
471 |
by (rule norm_triangle_ineq) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
472 |
finally show ?thesis |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
473 |
by simp |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
474 |
qed |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
475 |
|
20551 | 476 |
lemma norm_diff_triangle_ineq: |
477 |
fixes a b c d :: "'a::real_normed_vector" |
|
478 |
shows "norm ((a + b) - (c + d)) \<le> norm (a - c) + norm (b - d)" |
|
479 |
proof - |
|
480 |
have "norm ((a + b) - (c + d)) = norm ((a - c) + (b - d))" |
|
481 |
by (simp add: diff_minus add_ac) |
|
482 |
also have "\<dots> \<le> norm (a - c) + norm (b - d)" |
|
483 |
by (rule norm_triangle_ineq) |
|
484 |
finally show ?thesis . |
|
485 |
qed |
|
486 |
||
20560 | 487 |
lemma norm_one [simp]: "norm (1::'a::real_normed_div_algebra) = 1" |
488 |
proof - |
|
489 |
have "norm (of_real 1 :: 'a) = abs 1" |
|
490 |
by (rule norm_of_real) |
|
491 |
thus ?thesis by simp |
|
492 |
qed |
|
493 |
||
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
494 |
lemma nonzero_norm_inverse: |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
495 |
fixes a :: "'a::real_normed_div_algebra" |
20533 | 496 |
shows "a \<noteq> 0 \<Longrightarrow> norm (inverse a) = inverse (norm a)" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
497 |
apply (rule inverse_unique [symmetric]) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
498 |
apply (simp add: norm_mult [symmetric]) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
499 |
done |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
500 |
|
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
501 |
lemma norm_inverse: |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
502 |
fixes a :: "'a::{real_normed_div_algebra,division_by_zero}" |
20533 | 503 |
shows "norm (inverse a) = inverse (norm a)" |
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
504 |
apply (case_tac "a = 0", simp) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
505 |
apply (erule nonzero_norm_inverse) |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
506 |
done |
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
507 |
|
20584
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
508 |
lemma nonzero_norm_divide: |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
509 |
fixes a b :: "'a::real_normed_field" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
510 |
shows "b \<noteq> 0 \<Longrightarrow> norm (a / b) = norm a / norm b" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
511 |
by (simp add: divide_inverse norm_mult nonzero_norm_inverse) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
512 |
|
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
513 |
lemma norm_divide: |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
514 |
fixes a b :: "'a::{real_normed_field,division_by_zero}" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
515 |
shows "norm (a / b) = norm a / norm b" |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
516 |
by (simp add: divide_inverse norm_mult norm_inverse) |
60b1d52a455d
added classes real_div_algebra and real_field; added lemmas
huffman
parents:
20560
diff
changeset
|
517 |
|
20684 | 518 |
lemma norm_power: |
519 |
fixes x :: "'a::{real_normed_div_algebra,recpower}" |
|
520 |
shows "norm (x ^ n) = norm x ^ n" |
|
20772 | 521 |
by (induct n) (simp_all add: power_Suc norm_mult) |
20684 | 522 |
|
20504
6342e872e71d
formalization of vector spaces and algebras over the real numbers
huffman
parents:
diff
changeset
|
523 |
end |