author | wenzelm |
Wed, 28 Aug 2013 23:41:21 +0200 | |
changeset 53253 | 220f306f5c4e |
parent 51475 | ebf9d4fd00ba |
child 53688 | 63892cfef47f |
permissions | -rw-r--r-- |
41959 | 1 |
(* Title: HOL/Multivariate_Analysis/Operator_Norm.thy |
36581 | 2 |
Author: Amine Chaieb, University of Cambridge |
3 |
*) |
|
4 |
||
5 |
header {* Operator Norm *} |
|
6 |
||
7 |
theory Operator_Norm |
|
44133
691c52e900ca
split Linear_Algebra.thy from Euclidean_Space.thy
huffman
parents:
41959
diff
changeset
|
8 |
imports Linear_Algebra |
36581 | 9 |
begin |
10 |
||
11 |
definition "onorm f = Sup {norm (f x)| x. norm x = 1}" |
|
12 |
||
13 |
lemma norm_bound_generalize: |
|
53253 | 14 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
36581 | 15 |
assumes lf: "linear f" |
53253 | 16 |
shows "(\<forall>x. norm x = 1 \<longrightarrow> norm (f x) \<le> b) \<longleftrightarrow> (\<forall>x. norm (f x) \<le> b * norm x)" |
17 |
(is "?lhs \<longleftrightarrow> ?rhs") |
|
18 |
proof |
|
19 |
assume H: ?rhs |
|
20 |
{ |
|
21 |
fix x :: "'a" |
|
22 |
assume x: "norm x = 1" |
|
23 |
from H[rule_format, of x] x have "norm (f x) \<le> b" by simp |
|
24 |
} |
|
25 |
then show ?lhs by blast |
|
26 |
next |
|
27 |
assume H: ?lhs |
|
28 |
have bp: "b \<ge> 0" |
|
29 |
apply - |
|
30 |
apply (rule order_trans [OF norm_ge_zero]) |
|
31 |
apply (rule H[rule_format, of "SOME x::'a. x \<in> Basis"]) |
|
32 |
apply (auto intro: SOME_Basis norm_Basis) |
|
33 |
done |
|
34 |
{ |
|
35 |
fix x :: "'a" |
|
36 |
{ |
|
37 |
assume "x = 0" |
|
38 |
then have "norm (f x) \<le> b * norm x" |
|
39 |
by (simp add: linear_0[OF lf] bp) |
|
40 |
} |
|
41 |
moreover |
|
42 |
{ |
|
43 |
assume x0: "x \<noteq> 0" |
|
44 |
then have n0: "norm x \<noteq> 0" by (metis norm_eq_zero) |
|
45 |
let ?c = "1/ norm x" |
|
46 |
have "norm (?c *\<^sub>R x) = 1" using x0 by (simp add: n0) |
|
47 |
with H have "norm (f (?c *\<^sub>R x)) \<le> b" by blast |
|
48 |
then have "?c * norm (f x) \<le> b" |
|
49 |
by (simp add: linear_cmul[OF lf]) |
|
50 |
then have "norm (f x) \<le> b * norm x" |
|
51 |
using n0 norm_ge_zero[of x] by (auto simp add: field_simps) |
|
52 |
} |
|
53 |
ultimately have "norm (f x) \<le> b * norm x" by blast |
|
54 |
} |
|
55 |
then show ?rhs by blast |
|
56 |
qed |
|
36581 | 57 |
|
58 |
lemma onorm: |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36593
diff
changeset
|
59 |
fixes f:: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
36581 | 60 |
assumes lf: "linear f" |
53253 | 61 |
shows "norm (f x) \<le> onorm f * norm x" |
62 |
and "\<forall>x. norm (f x) \<le> b * norm x \<Longrightarrow> onorm f \<le> b" |
|
63 |
proof - |
|
64 |
let ?S = "{norm (f x) |x. norm x = 1}" |
|
65 |
have "norm (f (SOME i. i \<in> Basis)) \<in> ?S" |
|
66 |
by (auto intro!: exI[of _ "SOME i. i \<in> Basis"] norm_Basis SOME_Basis) |
|
67 |
then have Se: "?S \<noteq> {}" by auto |
|
68 |
from linear_bounded[OF lf] have b: "\<exists> b. ?S *<= b" |
|
69 |
unfolding norm_bound_generalize[OF lf, symmetric] by (auto simp add: setle_def) |
|
70 |
from isLub_cSup[OF Se b, unfolded onorm_def[symmetric]] |
|
71 |
show "norm (f x) <= onorm f * norm x" |
|
72 |
apply - |
|
73 |
apply (rule spec[where x = x]) |
|
74 |
unfolding norm_bound_generalize[OF lf, symmetric] |
|
75 |
apply (auto simp add: isLub_def isUb_def leastP_def setge_def setle_def) |
|
76 |
done |
|
77 |
show "\<forall>x. norm (f x) <= b * norm x \<Longrightarrow> onorm f <= b" |
|
78 |
using isLub_cSup[OF Se b, unfolded onorm_def[symmetric]] |
|
79 |
unfolding norm_bound_generalize[OF lf, symmetric] |
|
80 |
by (auto simp add: isLub_def isUb_def leastP_def setge_def setle_def) |
|
36581 | 81 |
qed |
82 |
||
53253 | 83 |
lemma onorm_pos_le: |
84 |
assumes lf: "linear (f::'n::euclidean_space \<Rightarrow> 'm::euclidean_space)" |
|
85 |
shows "0 \<le> onorm f" |
|
86 |
using order_trans[OF norm_ge_zero onorm(1)[OF lf, of "SOME i. i \<in> Basis"]] |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
44133
diff
changeset
|
87 |
by (simp add: SOME_Basis) |
36581 | 88 |
|
53253 | 89 |
lemma onorm_eq_0: |
90 |
assumes lf: "linear (f::'a::euclidean_space \<Rightarrow> 'b::euclidean_space)" |
|
36581 | 91 |
shows "onorm f = 0 \<longleftrightarrow> (\<forall>x. f x = 0)" |
92 |
using onorm[OF lf] |
|
93 |
apply (auto simp add: onorm_pos_le) |
|
94 |
apply atomize |
|
95 |
apply (erule allE[where x="0::real"]) |
|
96 |
using onorm_pos_le[OF lf] |
|
97 |
apply arith |
|
98 |
done |
|
99 |
||
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36593
diff
changeset
|
100 |
lemma onorm_const: "onorm(\<lambda>x::'a::euclidean_space. (y::'b::euclidean_space)) = norm y" |
53253 | 101 |
proof - |
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36593
diff
changeset
|
102 |
let ?f = "\<lambda>x::'a. (y::'b)" |
36581 | 103 |
have th: "{norm (?f x)| x. norm x = 1} = {norm y}" |
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
44133
diff
changeset
|
104 |
by (auto simp: SOME_Basis intro!: exI[of _ "SOME i. i \<in> Basis"]) |
36581 | 105 |
show ?thesis |
106 |
unfolding onorm_def th |
|
53253 | 107 |
apply (rule cSup_unique) |
108 |
apply (simp_all add: setle_def) |
|
109 |
done |
|
36581 | 110 |
qed |
111 |
||
53253 | 112 |
lemma onorm_pos_lt: |
113 |
assumes lf: "linear (f::'a::euclidean_space \<Rightarrow> 'b::euclidean_space)" |
|
36581 | 114 |
shows "0 < onorm f \<longleftrightarrow> ~(\<forall>x. f x = 0)" |
115 |
unfolding onorm_eq_0[OF lf, symmetric] |
|
116 |
using onorm_pos_le[OF lf] by arith |
|
117 |
||
118 |
lemma onorm_compose: |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36593
diff
changeset
|
119 |
assumes lf: "linear (f::'n::euclidean_space \<Rightarrow> 'm::euclidean_space)" |
53253 | 120 |
and lg: "linear (g::'k::euclidean_space \<Rightarrow> 'n::euclidean_space)" |
121 |
shows "onorm (f o g) \<le> onorm f * onorm g" |
|
122 |
apply (rule onorm(2)[OF linear_compose[OF lg lf], rule_format]) |
|
123 |
unfolding o_def |
|
124 |
apply (subst mult_assoc) |
|
125 |
apply (rule order_trans) |
|
126 |
apply (rule onorm(1)[OF lf]) |
|
127 |
apply (rule mult_left_mono) |
|
128 |
apply (rule onorm(1)[OF lg]) |
|
129 |
apply (rule onorm_pos_le[OF lf]) |
|
130 |
done |
|
36581 | 131 |
|
53253 | 132 |
lemma onorm_neg_lemma: |
133 |
assumes lf: "linear (f::'a::euclidean_space \<Rightarrow> 'b::euclidean_space)" |
|
36581 | 134 |
shows "onorm (\<lambda>x. - f x) \<le> onorm f" |
135 |
using onorm[OF linear_compose_neg[OF lf]] onorm[OF lf] |
|
136 |
unfolding norm_minus_cancel by metis |
|
137 |
||
53253 | 138 |
lemma onorm_neg: |
139 |
assumes lf: "linear (f::'a::euclidean_space \<Rightarrow> 'b::euclidean_space)" |
|
36581 | 140 |
shows "onorm (\<lambda>x. - f x) = onorm f" |
141 |
using onorm_neg_lemma[OF lf] onorm_neg_lemma[OF linear_compose_neg[OF lf]] |
|
142 |
by simp |
|
143 |
||
144 |
lemma onorm_triangle: |
|
53253 | 145 |
assumes lf: "linear (f::'n::euclidean_space \<Rightarrow> 'm::euclidean_space)" |
146 |
and lg: "linear g" |
|
147 |
shows "onorm (\<lambda>x. f x + g x) \<le> onorm f + onorm g" |
|
36581 | 148 |
apply(rule onorm(2)[OF linear_compose_add[OF lf lg], rule_format]) |
149 |
apply (rule order_trans) |
|
150 |
apply (rule norm_triangle_ineq) |
|
151 |
apply (simp add: distrib) |
|
152 |
apply (rule add_mono) |
|
153 |
apply (rule onorm(1)[OF lf]) |
|
154 |
apply (rule onorm(1)[OF lg]) |
|
155 |
done |
|
156 |
||
53253 | 157 |
lemma onorm_triangle_le: |
158 |
"linear (f::'n::euclidean_space \<Rightarrow> 'm::euclidean_space) \<Longrightarrow> |
|
159 |
linear g \<Longrightarrow> onorm f + onorm g \<le> e \<Longrightarrow> onorm (\<lambda>x. f x + g x) \<le> e" |
|
36581 | 160 |
apply (rule order_trans) |
161 |
apply (rule onorm_triangle) |
|
162 |
apply assumption+ |
|
163 |
done |
|
164 |
||
53253 | 165 |
lemma onorm_triangle_lt: |
166 |
"linear (f::'n::euclidean_space \<Rightarrow> 'm::euclidean_space) \<Longrightarrow> linear g \<Longrightarrow> |
|
167 |
onorm f + onorm g < e \<Longrightarrow> onorm(\<lambda>x. f x + g x) < e" |
|
36581 | 168 |
apply (rule order_le_less_trans) |
169 |
apply (rule onorm_triangle) |
|
53253 | 170 |
apply assumption+ |
171 |
done |
|
36581 | 172 |
|
173 |
end |