src/HOL/Analysis/Operator_Norm.thy
author nipkow
Fri Dec 28 18:53:19 2018 +0100 (7 months ago)
changeset 69518 bf88364c9e94
parent 68833 fde093888c16
child 69607 7cd977863194
permissions -rw-r--r--
tuned headers etc, added bib-file
hoelzl@63627
     1
(*  Title:      HOL/Analysis/Operator_Norm.thy
huffman@36581
     2
    Author:     Amine Chaieb, University of Cambridge
huffman@56223
     3
    Author:     Brian Huffman
huffman@36581
     4
*)
huffman@36581
     5
nipkow@69518
     6
section \<open>Operator Norm\<close>
huffman@36581
     7
huffman@36581
     8
theory Operator_Norm
huffman@56319
     9
imports Complex_Main
huffman@36581
    10
begin
huffman@36581
    11
wenzelm@61808
    12
text \<open>This formulation yields zero if \<open>'a\<close> is the trivial vector space.\<close>
huffman@56223
    13
nipkow@69518
    14
definition%important
nipkow@69518
    15
onorm :: "('a::real_normed_vector \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> real" where
nipkow@69518
    16
"onorm f = (SUP x. norm (f x) / norm x)"
huffman@56223
    17
nipkow@69518
    18
proposition onorm_bound:
huffman@56223
    19
  assumes "0 \<le> b" and "\<And>x. norm (f x) \<le> b * norm x"
huffman@56223
    20
  shows "onorm f \<le> b"
huffman@56223
    21
  unfolding onorm_def
nipkow@69518
    22
proof (rule cSUP_least)
huffman@56223
    23
  fix x
huffman@56223
    24
  show "norm (f x) / norm x \<le> b"
huffman@56223
    25
    using assms by (cases "x = 0") (simp_all add: pos_divide_le_eq)
huffman@56223
    26
qed simp
huffman@56223
    27
wenzelm@60420
    28
text \<open>In non-trivial vector spaces, the first assumption is redundant.\<close>
huffman@36581
    29
nipkow@69518
    30
lemma onorm_le:
huffman@56223
    31
  fixes f :: "'a::{real_normed_vector, perfect_space} \<Rightarrow> 'b::real_normed_vector"
huffman@56223
    32
  assumes "\<And>x. norm (f x) \<le> b * norm x"
huffman@56223
    33
  shows "onorm f \<le> b"
nipkow@69518
    34
proof (rule onorm_bound [OF _ assms])
huffman@56223
    35
  have "{0::'a} \<noteq> UNIV" by (metis not_open_singleton open_UNIV)
huffman@56223
    36
  then obtain a :: 'a where "a \<noteq> 0" by fast
huffman@56223
    37
  have "0 \<le> b * norm a"
huffman@56223
    38
    by (rule order_trans [OF norm_ge_zero assms])
wenzelm@60420
    39
  with \<open>a \<noteq> 0\<close> show "0 \<le> b"
huffman@56223
    40
    by (simp add: zero_le_mult_iff)
huffman@56223
    41
qed
huffman@56223
    42
nipkow@69518
    43
lemma le_onorm:
huffman@56223
    44
  assumes "bounded_linear f"
huffman@56223
    45
  shows "norm (f x) / norm x \<le> onorm f"
nipkow@69518
    46
proof -
huffman@56223
    47
  interpret f: bounded_linear f by fact
huffman@56223
    48
  obtain b where "0 \<le> b" and "\<forall>x. norm (f x) \<le> norm x * b"
huffman@56223
    49
    using f.nonneg_bounded by auto
huffman@56223
    50
  then have "\<forall>x. norm (f x) / norm x \<le> b"
huffman@56223
    51
    by (clarify, case_tac "x = 0",
haftmann@57512
    52
      simp_all add: f.zero pos_divide_le_eq mult.commute)
huffman@56223
    53
  then have "bdd_above (range (\<lambda>x. norm (f x) / norm x))"
huffman@56223
    54
    unfolding bdd_above_def by fast
huffman@56223
    55
  with UNIV_I show ?thesis
huffman@56223
    56
    unfolding onorm_def by (rule cSUP_upper)
wenzelm@53253
    57
qed
huffman@36581
    58
nipkow@69518
    59
lemma onorm:
huffman@56223
    60
  assumes "bounded_linear f"
wenzelm@53253
    61
  shows "norm (f x) \<le> onorm f * norm x"
nipkow@69518
    62
proof -
huffman@56223
    63
  interpret f: bounded_linear f by fact
huffman@56223
    64
  show ?thesis
huffman@56223
    65
  proof (cases)
huffman@56223
    66
    assume "x = 0"
huffman@56223
    67
    then show ?thesis by (simp add: f.zero)
huffman@56223
    68
  next
huffman@56223
    69
    assume "x \<noteq> 0"
huffman@56223
    70
    have "norm (f x) / norm x \<le> onorm f"
huffman@56223
    71
      by (rule le_onorm [OF assms])
huffman@56223
    72
    then show "norm (f x) \<le> onorm f * norm x"
wenzelm@60420
    73
      by (simp add: pos_divide_le_eq \<open>x \<noteq> 0\<close>)
huffman@56223
    74
  qed
huffman@36581
    75
qed
huffman@36581
    76
nipkow@69518
    77
lemma onorm_pos_le:
huffman@56223
    78
  assumes f: "bounded_linear f"
wenzelm@53253
    79
  shows "0 \<le> onorm f"
huffman@56223
    80
  using le_onorm [OF f, where x=0] by simp
huffman@56223
    81
nipkow@69518
    82
lemma onorm_zero: "onorm (\<lambda>x. 0) = 0"
huffman@56223
    83
proof (rule order_antisym)
huffman@56223
    84
  show "onorm (\<lambda>x. 0) \<le> 0"
huffman@56223
    85
    by (simp add: onorm_bound)
huffman@56223
    86
  show "0 \<le> onorm (\<lambda>x. 0)"
huffman@56223
    87
    using bounded_linear_zero by (rule onorm_pos_le)
huffman@56223
    88
qed
huffman@36581
    89
nipkow@69518
    90
lemma onorm_eq_0:
huffman@56223
    91
  assumes f: "bounded_linear f"
huffman@36581
    92
  shows "onorm f = 0 \<longleftrightarrow> (\<forall>x. f x = 0)"
huffman@56223
    93
  using onorm [OF f] by (auto simp: fun_eq_iff [symmetric] onorm_zero)
huffman@36581
    94
nipkow@69518
    95
lemma onorm_pos_lt:
huffman@56223
    96
  assumes f: "bounded_linear f"
wenzelm@53688
    97
  shows "0 < onorm f \<longleftrightarrow> \<not> (\<forall>x. f x = 0)"
huffman@56223
    98
  by (simp add: less_le onorm_pos_le [OF f] onorm_eq_0 [OF f])
huffman@36581
    99
nipkow@69518
   100
lemma onorm_id_le: "onorm (\<lambda>x. x) \<le> 1"
immler@61915
   101
  by (rule onorm_bound) simp_all
immler@61915
   102
nipkow@69518
   103
lemma onorm_id: "onorm (\<lambda>x. x::'a::{real_normed_vector, perfect_space}) = 1"
immler@61915
   104
proof (rule antisym[OF onorm_id_le])
immler@61915
   105
  have "{0::'a} \<noteq> UNIV" by (metis not_open_singleton open_UNIV)
immler@61915
   106
  then obtain x :: 'a where "x \<noteq> 0" by fast
immler@61915
   107
  hence "1 \<le> norm x / norm x"
immler@61915
   108
    by simp
immler@61915
   109
  also have "\<dots> \<le> onorm (\<lambda>x::'a. x)"
immler@61915
   110
    by (rule le_onorm) (rule bounded_linear_ident)
immler@61915
   111
  finally show "1 \<le> onorm (\<lambda>x::'a. x)" .
immler@61915
   112
qed
immler@61915
   113
nipkow@69518
   114
lemma onorm_compose:
huffman@56223
   115
  assumes f: "bounded_linear f"
huffman@56223
   116
  assumes g: "bounded_linear g"
wenzelm@53688
   117
  shows "onorm (f \<circ> g) \<le> onorm f * onorm g"
nipkow@69518
   118
proof (rule onorm_bound)
huffman@56223
   119
  show "0 \<le> onorm f * onorm g"
huffman@56223
   120
    by (intro mult_nonneg_nonneg onorm_pos_le f g)
huffman@56223
   121
next
huffman@56223
   122
  fix x
huffman@56223
   123
  have "norm (f (g x)) \<le> onorm f * norm (g x)"
huffman@56223
   124
    by (rule onorm [OF f])
huffman@56223
   125
  also have "onorm f * norm (g x) \<le> onorm f * (onorm g * norm x)"
huffman@56223
   126
    by (rule mult_left_mono [OF onorm [OF g] onorm_pos_le [OF f]])
huffman@56223
   127
  finally show "norm ((f \<circ> g) x) \<le> onorm f * onorm g * norm x"
haftmann@57512
   128
    by (simp add: mult.assoc)
huffman@56223
   129
qed
huffman@36581
   130
nipkow@69518
   131
lemma onorm_scaleR_lemma:
huffman@56223
   132
  assumes f: "bounded_linear f"
huffman@56223
   133
  shows "onorm (\<lambda>x. r *\<^sub>R f x) \<le> \<bar>r\<bar> * onorm f"
huffman@56223
   134
proof (rule onorm_bound)
huffman@56223
   135
  show "0 \<le> \<bar>r\<bar> * onorm f"
huffman@56223
   136
    by (intro mult_nonneg_nonneg onorm_pos_le abs_ge_zero f)
huffman@56223
   137
next
huffman@56223
   138
  fix x
huffman@56223
   139
  have "\<bar>r\<bar> * norm (f x) \<le> \<bar>r\<bar> * (onorm f * norm x)"
huffman@56223
   140
    by (intro mult_left_mono onorm abs_ge_zero f)
huffman@56223
   141
  then show "norm (r *\<^sub>R f x) \<le> \<bar>r\<bar> * onorm f * norm x"
haftmann@57512
   142
    by (simp only: norm_scaleR mult.assoc)
huffman@56223
   143
qed
huffman@56223
   144
nipkow@69518
   145
lemma onorm_scaleR:
huffman@56223
   146
  assumes f: "bounded_linear f"
huffman@56223
   147
  shows "onorm (\<lambda>x. r *\<^sub>R f x) = \<bar>r\<bar> * onorm f"
nipkow@69518
   148
proof (cases "r = 0")
huffman@56223
   149
  assume "r \<noteq> 0"
huffman@56223
   150
  show ?thesis
huffman@56223
   151
  proof (rule order_antisym)
huffman@56223
   152
    show "onorm (\<lambda>x. r *\<^sub>R f x) \<le> \<bar>r\<bar> * onorm f"
huffman@56223
   153
      using f by (rule onorm_scaleR_lemma)
huffman@56223
   154
  next
huffman@56223
   155
    have "bounded_linear (\<lambda>x. r *\<^sub>R f x)"
huffman@56223
   156
      using bounded_linear_scaleR_right f by (rule bounded_linear_compose)
huffman@56223
   157
    then have "onorm (\<lambda>x. inverse r *\<^sub>R r *\<^sub>R f x) \<le> \<bar>inverse r\<bar> * onorm (\<lambda>x. r *\<^sub>R f x)"
huffman@56223
   158
      by (rule onorm_scaleR_lemma)
wenzelm@60420
   159
    with \<open>r \<noteq> 0\<close> show "\<bar>r\<bar> * onorm f \<le> onorm (\<lambda>x. r *\<^sub>R f x)"
haftmann@57512
   160
      by (simp add: inverse_eq_divide pos_le_divide_eq mult.commute)
huffman@56223
   161
  qed
huffman@56223
   162
qed (simp add: onorm_zero)
huffman@36581
   163
nipkow@69518
   164
lemma onorm_scaleR_left_lemma:
immler@61915
   165
  assumes r: "bounded_linear r"
immler@61915
   166
  shows "onorm (\<lambda>x. r x *\<^sub>R f) \<le> onorm r * norm f"
immler@61915
   167
proof (rule onorm_bound)
immler@61915
   168
  fix x
immler@61915
   169
  have "norm (r x *\<^sub>R f) = norm (r x) * norm f"
immler@61915
   170
    by simp
immler@61915
   171
  also have "\<dots> \<le> onorm r * norm x * norm f"
immler@61915
   172
    by (intro mult_right_mono onorm r norm_ge_zero)
immler@61915
   173
  finally show "norm (r x *\<^sub>R f) \<le> onorm r * norm f * norm x"
immler@61915
   174
    by (simp add: ac_simps)
immler@61915
   175
qed (intro mult_nonneg_nonneg norm_ge_zero onorm_pos_le r)
immler@61915
   176
nipkow@69518
   177
lemma onorm_scaleR_left:
immler@61915
   178
  assumes f: "bounded_linear r"
immler@61915
   179
  shows "onorm (\<lambda>x. r x *\<^sub>R f) = onorm r * norm f"
nipkow@69518
   180
proof (cases "f = 0")
immler@61915
   181
  assume "f \<noteq> 0"
immler@61915
   182
  show ?thesis
immler@61915
   183
  proof (rule order_antisym)
immler@61915
   184
    show "onorm (\<lambda>x. r x *\<^sub>R f) \<le> onorm r * norm f"
immler@61915
   185
      using f by (rule onorm_scaleR_left_lemma)
immler@61915
   186
  next
immler@61915
   187
    have bl1: "bounded_linear (\<lambda>x. r x *\<^sub>R f)"
immler@61915
   188
      by (metis bounded_linear_scaleR_const f)
immler@61915
   189
    have "bounded_linear (\<lambda>x. r x * norm f)"
immler@61915
   190
      by (metis bounded_linear_mult_const f)
immler@61915
   191
    from onorm_scaleR_left_lemma[OF this, of "inverse (norm f)"]
immler@61915
   192
    have "onorm r \<le> onorm (\<lambda>x. r x * norm f) * inverse (norm f)"
wenzelm@61975
   193
      using \<open>f \<noteq> 0\<close>
immler@61915
   194
      by (simp add: inverse_eq_divide)
immler@61915
   195
    also have "onorm (\<lambda>x. r x * norm f) \<le> onorm (\<lambda>x. r x *\<^sub>R f)"
immler@61915
   196
      by (rule onorm_bound)
immler@61915
   197
        (auto simp: abs_mult bl1 onorm_pos_le intro!: order_trans[OF _ onorm])
immler@61915
   198
    finally show "onorm r * norm f \<le> onorm (\<lambda>x. r x *\<^sub>R f)"
wenzelm@61975
   199
      using \<open>f \<noteq> 0\<close>
immler@61915
   200
      by (simp add: inverse_eq_divide pos_le_divide_eq mult.commute)
immler@61915
   201
  qed
immler@61915
   202
qed (simp add: onorm_zero)
immler@61915
   203
nipkow@69518
   204
lemma onorm_neg:
huffman@36581
   205
  shows "onorm (\<lambda>x. - f x) = onorm f"
huffman@56223
   206
  unfolding onorm_def by simp
huffman@36581
   207
nipkow@69518
   208
lemma onorm_triangle:
huffman@56223
   209
  assumes f: "bounded_linear f"
huffman@56223
   210
  assumes g: "bounded_linear g"
wenzelm@53253
   211
  shows "onorm (\<lambda>x. f x + g x) \<le> onorm f + onorm g"
nipkow@69518
   212
proof (rule onorm_bound)
huffman@56223
   213
  show "0 \<le> onorm f + onorm g"
huffman@56223
   214
    by (intro add_nonneg_nonneg onorm_pos_le f g)
huffman@56223
   215
next
huffman@56223
   216
  fix x
huffman@56223
   217
  have "norm (f x + g x) \<le> norm (f x) + norm (g x)"
huffman@56223
   218
    by (rule norm_triangle_ineq)
huffman@56223
   219
  also have "norm (f x) + norm (g x) \<le> onorm f * norm x + onorm g * norm x"
huffman@56223
   220
    by (intro add_mono onorm f g)
huffman@56223
   221
  finally show "norm (f x + g x) \<le> (onorm f + onorm g) * norm x"
huffman@56223
   222
    by (simp only: distrib_right)
huffman@56223
   223
qed
huffman@36581
   224
nipkow@69518
   225
lemma onorm_triangle_le:
huffman@56223
   226
  assumes "bounded_linear f"
huffman@56223
   227
  assumes "bounded_linear g"
huffman@56223
   228
  assumes "onorm f + onorm g \<le> e"
wenzelm@53688
   229
  shows "onorm (\<lambda>x. f x + g x) \<le> e"
nipkow@69518
   230
  using assms by (rule onorm_triangle [THEN order_trans])
huffman@36581
   231
nipkow@69518
   232
lemma onorm_triangle_lt:
huffman@56223
   233
  assumes "bounded_linear f"
huffman@56223
   234
  assumes "bounded_linear g"
huffman@56223
   235
  assumes "onorm f + onorm g < e"
wenzelm@53688
   236
  shows "onorm (\<lambda>x. f x + g x) < e"
huffman@56223
   237
  using assms by (rule onorm_triangle [THEN order_le_less_trans])
huffman@36581
   238
nipkow@69518
   239
lemma onorm_sum:
immler@67685
   240
  assumes "finite S"
immler@67685
   241
  assumes "\<And>s. s \<in> S \<Longrightarrow> bounded_linear (f s)"
immler@67685
   242
  shows "onorm (\<lambda>x. sum (\<lambda>s. f s x) S) \<le> sum (\<lambda>s. onorm (f s)) S"
nipkow@69518
   243
  using assms
nipkow@69518
   244
  by (induction) (auto simp: onorm_zero intro!: onorm_triangle_le bounded_linear_sum)
immler@67685
   245
immler@67685
   246
lemmas onorm_sum_le = onorm_sum[THEN order_trans]
immler@67685
   247
huffman@36581
   248
end