src/HOL/Multivariate_Analysis/L2_Norm.thy
author wenzelm
Thu, 03 Mar 2016 14:03:06 +0100
changeset 62504 f14f17e656a6
parent 60974 6a6f15d8fbc4
permissions -rw-r--r--
clarified modules;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
41959
b460124855b8 tuned headers;
wenzelm
parents: 41891
diff changeset
     1
(*  Title:      HOL/Multivariate_Analysis/L2_Norm.thy
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
     2
    Author:     Brian Huffman, Portland State University
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
     3
*)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
     4
60420
884f54e01427 isabelle update_cartouches;
wenzelm
parents: 58877
diff changeset
     5
section \<open>Square root of sum of squares\<close>
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
     6
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
     7
theory L2_Norm
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
     8
imports NthRoot
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
     9
begin
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    10
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    11
definition
53015
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 49962
diff changeset
    12
  "setL2 f A = sqrt (\<Sum>i\<in>A. (f i)\<^sup>2)"
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    13
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    14
lemma setL2_cong:
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    15
  "\<lbrakk>A = B; \<And>x. x \<in> B \<Longrightarrow> f x = g x\<rbrakk> \<Longrightarrow> setL2 f A = setL2 g B"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    16
  unfolding setL2_def by simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    17
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    18
lemma strong_setL2_cong:
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    19
  "\<lbrakk>A = B; \<And>x. x \<in> B =simp=> f x = g x\<rbrakk> \<Longrightarrow> setL2 f A = setL2 g B"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    20
  unfolding setL2_def simp_implies_def by simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    21
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    22
lemma setL2_infinite [simp]: "\<not> finite A \<Longrightarrow> setL2 f A = 0"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    23
  unfolding setL2_def by simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    24
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    25
lemma setL2_empty [simp]: "setL2 f {} = 0"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    26
  unfolding setL2_def by simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    27
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    28
lemma setL2_insert [simp]:
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    29
  "\<lbrakk>finite F; a \<notin> F\<rbrakk> \<Longrightarrow>
53015
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 49962
diff changeset
    30
    setL2 f (insert a F) = sqrt ((f a)\<^sup>2 + (setL2 f F)\<^sup>2)"
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    31
  unfolding setL2_def by (simp add: setsum_nonneg)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    32
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    33
lemma setL2_nonneg [simp]: "0 \<le> setL2 f A"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    34
  unfolding setL2_def by (simp add: setsum_nonneg)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    35
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    36
lemma setL2_0': "\<forall>a\<in>A. f a = 0 \<Longrightarrow> setL2 f A = 0"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    37
  unfolding setL2_def by simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    38
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    39
lemma setL2_constant: "setL2 (\<lambda>x. y) A = sqrt (of_nat (card A)) * \<bar>y\<bar>"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    40
  unfolding setL2_def by (simp add: real_sqrt_mult)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    41
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    42
lemma setL2_mono:
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    43
  assumes "\<And>i. i \<in> K \<Longrightarrow> f i \<le> g i"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    44
  assumes "\<And>i. i \<in> K \<Longrightarrow> 0 \<le> f i"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    45
  shows "setL2 f K \<le> setL2 g K"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    46
  unfolding setL2_def
41891
d37babdf5cae tuned proofs -- eliminated prems;
wenzelm
parents: 36333
diff changeset
    47
  by (simp add: setsum_nonneg setsum_mono power_mono assms)
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    48
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    49
lemma setL2_strict_mono:
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    50
  assumes "finite K" and "K \<noteq> {}"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    51
  assumes "\<And>i. i \<in> K \<Longrightarrow> f i < g i"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    52
  assumes "\<And>i. i \<in> K \<Longrightarrow> 0 \<le> f i"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    53
  shows "setL2 f K < setL2 g K"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    54
  unfolding setL2_def
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    55
  by (simp add: setsum_strict_mono power_strict_mono assms)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    56
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    57
lemma setL2_right_distrib:
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    58
  "0 \<le> r \<Longrightarrow> r * setL2 f A = setL2 (\<lambda>x. r * f x) A"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    59
  unfolding setL2_def
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    60
  apply (simp add: power_mult_distrib)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    61
  apply (simp add: setsum_right_distrib [symmetric])
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    62
  apply (simp add: real_sqrt_mult setsum_nonneg)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    63
  done
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    64
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    65
lemma setL2_left_distrib:
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    66
  "0 \<le> r \<Longrightarrow> setL2 f A * r = setL2 (\<lambda>x. f x * r) A"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    67
  unfolding setL2_def
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    68
  apply (simp add: power_mult_distrib)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    69
  apply (simp add: setsum_left_distrib [symmetric])
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    70
  apply (simp add: real_sqrt_mult setsum_nonneg)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    71
  done
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    72
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    73
lemma setL2_eq_0_iff: "finite A \<Longrightarrow> setL2 f A = 0 \<longleftrightarrow> (\<forall>x\<in>A. f x = 0)"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    74
  unfolding setL2_def
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    75
  by (simp add: setsum_nonneg setsum_nonneg_eq_0_iff)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    76
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    77
lemma setL2_triangle_ineq:
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    78
  shows "setL2 (\<lambda>i. f i + g i) A \<le> setL2 f A + setL2 g A"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    79
proof (cases "finite A")
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    80
  case False
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    81
  thus ?thesis by simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    82
next
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    83
  case True
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    84
  thus ?thesis
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    85
  proof (induct set: finite)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    86
    case empty
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    87
    show ?case by simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    88
  next
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    89
    case (insert x F)
53015
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 49962
diff changeset
    90
    hence "sqrt ((f x + g x)\<^sup>2 + (setL2 (\<lambda>i. f i + g i) F)\<^sup>2) \<le>
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 49962
diff changeset
    91
           sqrt ((f x + g x)\<^sup>2 + (setL2 f F + setL2 g F)\<^sup>2)"
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    92
      by (intro real_sqrt_le_mono add_left_mono power_mono insert
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    93
                setL2_nonneg add_increasing zero_le_power2)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    94
    also have
53015
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 49962
diff changeset
    95
      "\<dots> \<le> sqrt ((f x)\<^sup>2 + (setL2 f F)\<^sup>2) + sqrt ((g x)\<^sup>2 + (setL2 g F)\<^sup>2)"
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    96
      by (rule real_sqrt_sum_squares_triangle_ineq)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    97
    finally show ?case
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    98
      using insert by simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
    99
  qed
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   100
qed
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   101
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   102
lemma sqrt_sum_squares_le_sum:
53015
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 49962
diff changeset
   103
  "\<lbrakk>0 \<le> x; 0 \<le> y\<rbrakk> \<Longrightarrow> sqrt (x\<^sup>2 + y\<^sup>2) \<le> x + y"
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   104
  apply (rule power2_le_imp_le)
56536
aefb4a8da31f made mult_nonneg_nonneg a simp rule
nipkow
parents: 53015
diff changeset
   105
  apply (simp add: power2_sum)
44142
8e27e0177518 avoid warnings about duplicate rules
huffman
parents: 41959
diff changeset
   106
  apply simp
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   107
  done
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   108
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   109
lemma setL2_le_setsum [rule_format]:
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   110
  "(\<forall>i\<in>A. 0 \<le> f i) \<longrightarrow> setL2 f A \<le> setsum f A"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   111
  apply (cases "finite A")
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   112
  apply (induct set: finite)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   113
  apply simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   114
  apply clarsimp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   115
  apply (erule order_trans [OF sqrt_sum_squares_le_sum])
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   116
  apply simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   117
  apply simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   118
  apply simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   119
  done
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   120
53015
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 49962
diff changeset
   121
lemma sqrt_sum_squares_le_sum_abs: "sqrt (x\<^sup>2 + y\<^sup>2) \<le> \<bar>x\<bar> + \<bar>y\<bar>"
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   122
  apply (rule power2_le_imp_le)
56536
aefb4a8da31f made mult_nonneg_nonneg a simp rule
nipkow
parents: 53015
diff changeset
   123
  apply (simp add: power2_sum)
44142
8e27e0177518 avoid warnings about duplicate rules
huffman
parents: 41959
diff changeset
   124
  apply simp
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   125
  done
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   126
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   127
lemma setL2_le_setsum_abs: "setL2 f A \<le> (\<Sum>i\<in>A. \<bar>f i\<bar>)"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   128
  apply (cases "finite A")
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   129
  apply (induct set: finite)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   130
  apply simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   131
  apply simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   132
  apply (rule order_trans [OF sqrt_sum_squares_le_sum_abs])
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   133
  apply simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   134
  apply simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   135
  done
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   136
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   137
lemma setL2_mult_ineq_lemma:
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   138
  fixes a b c d :: real
53015
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 49962
diff changeset
   139
  shows "2 * (a * c) * (b * d) \<le> a\<^sup>2 * d\<^sup>2 + b\<^sup>2 * c\<^sup>2"
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   140
proof -
53015
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 49962
diff changeset
   141
  have "0 \<le> (a * d - b * c)\<^sup>2" by simp
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 49962
diff changeset
   142
  also have "\<dots> = a\<^sup>2 * d\<^sup>2 + b\<^sup>2 * c\<^sup>2 - 2 * (a * d) * (b * c)"
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   143
    by (simp only: power2_diff power_mult_distrib)
53015
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 49962
diff changeset
   144
  also have "\<dots> = a\<^sup>2 * d\<^sup>2 + b\<^sup>2 * c\<^sup>2 - 2 * (a * c) * (b * d)"
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   145
    by simp
53015
a1119cf551e8 standardized symbols via "isabelle update_sub_sup", excluding src/Pure and src/Tools/WWW_Find;
wenzelm
parents: 49962
diff changeset
   146
  finally show "2 * (a * c) * (b * d) \<le> a\<^sup>2 * d\<^sup>2 + b\<^sup>2 * c\<^sup>2"
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   147
    by simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   148
qed
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   149
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   150
lemma setL2_mult_ineq: "(\<Sum>i\<in>A. \<bar>f i\<bar> * \<bar>g i\<bar>) \<le> setL2 f A * setL2 g A"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   151
  apply (cases "finite A")
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   152
  apply (induct set: finite)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   153
  apply simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   154
  apply (rule power2_le_imp_le, simp)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   155
  apply (rule order_trans)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   156
  apply (rule power_mono)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   157
  apply (erule add_left_mono)
56536
aefb4a8da31f made mult_nonneg_nonneg a simp rule
nipkow
parents: 53015
diff changeset
   158
  apply (simp add: setsum_nonneg)
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   159
  apply (simp add: power2_sum)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   160
  apply (simp add: power_mult_distrib)
49962
a8cc904a6820 Renamed {left,right}_distrib to distrib_{right,left}.
webertj
parents: 44142
diff changeset
   161
  apply (simp add: distrib_left distrib_right)
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   162
  apply (rule ord_le_eq_trans)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   163
  apply (rule setL2_mult_ineq_lemma)
56536
aefb4a8da31f made mult_nonneg_nonneg a simp rule
nipkow
parents: 53015
diff changeset
   164
  apply simp_all
36333
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   165
  done
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   166
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   167
lemma member_le_setL2: "\<lbrakk>finite A; i \<in> A\<rbrakk> \<Longrightarrow> f i \<le> setL2 f A"
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   168
  apply (rule_tac s="insert i (A - {i})" and t="A" in subst)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   169
  apply fast
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   170
  apply (subst setL2_insert)
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   171
  apply simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   172
  apply simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   173
  apply simp
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   174
  done
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   175
82356c9e218a move l2-norm stuff into separate theory file
huffman
parents:
diff changeset
   176
end