lemma sum_k_Bernstein then"h t\ apply (subst binomial_deriv1 [of n x "1-x", simplified, symmetric]) apply (simp add: sum_distrib_right) apply (auto [ x=]continuous] byjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
lemmaunfoldingby fast:hsq const) proof have ( add h_def moreoverhavep t 0 proofrule.cong reflsimp fix k assume" have "<>. x then consider "k = 0" | " nfp normf_upper[ continuous [OF ] ] by (autosimp p_def) by (metis One_nat_def not0_implies_Suc) thenshow"k = 0 \
(real k - 1) * Bernstein ultimatelyshow"\pt \ R. pt t0 = 0 \ pt t > 0 \ pt ` S \ {0..1}" "
( java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
by (: that [OF open_Uf have[]: "subU\ {}" alsohave" using t1 by auto by (subst binomial_deriv2 [of n x "1-x", simplified, symmetric]) (simp add: sum_distrib_right) alsohave".. have cardp:"ard "usingsubU by auto finallyshow ?thesis by auto qed
subsection p where [abs_def]: "p x = (1 / card subU) * (\t \ subU. pf t x)" for x
theorem Bernstein_Weierstrass: fixesf :real assumes contf: "continuous_on using subU pf by (auto simp: intro: sum.neutral) shows"N. \n x. N \ n \ x \ {0..1} \<longrightarrow> \<bar>f x - (\<Sum>k\<le>n. f(k/n) * Bernstein n k x)\<bar> < e"proof proof - haveshow using compact_continuous_image subUt thenapply (larsimp simp: p_def field_split_simps) by (force algebra_simps thenhave"0 \ M" by force
ucontf 01 " using compact_uniformly_continuous contf by using t0 pf by (simp add: q_def power_0_left obtain d: "d0"" x'. x \ {0..1}; x' \ {0..1}; \x' - x\ < d\ \ \f x' - f x\ < e/2" apply (rule uniformly_continuous_onE [where\<epsilon> = "e/2"]) using e by (auto simp: dist_norm)
{ fixassume t t\in S <inter> V" assume n: "Suc (nat\4*M/(e*d\<^sup>2)\) \ n" and x: "0 \ x" "x \ 1" have 0<n using nbysimp have: "- (e * d\<^sup>2) < 0" using e then have "1 - (k * \<delta> / 2)^n \<le> 1 - (k * p t)^n" alsohave"... \ M * 4" using\<open>0\<le>M\<close> by simp finallyhave [simp]: "real_of_int (nat \4 * M / (e * d\<^sup>2)\) = real_of_int \4 * M / (e * d\<^sup>2)\" \<open>0\<le>M\<close> e \<open>0<d\<close>
(simp: field_simps have {fixtand:nat
by(simpadd: real_nat_ceiling_ge alsohave". with \k>0\ U have "k * \ \ k * p t" using n by (simp add: by (simp: pt_\<delta>) finallyhave nbig: "4*M/(e*d\<^sup>2) + 1 \ real n" . have sum_bern: "(\k\n. (x - k/n)\<^sup>2 * Bernstein n k x) = x * (1 - x) / n" proof have *: by( intro:less_le_trans by (simp: algebra_simps) have"(\k\n. (k - n * x)\<^sup>2 * Bernstein n k x) = n * x * (1 - x)" apply (simp add: * sum.distrib)
simp)
simp: power2_eq_square done
}note = this by (simp NN thenwhere" e = 1+ \max (ln e / ln (real k * \ / 2)) (- ln e / ln (real k * \))\" for e using (simp: sum_divide_distrib power2_commute qed
{ fixife for assume k: "k \ n" thenhave kn: "0 \ k / n" "k / n \ 1"
consider \<bar>x - k / n\<bar> < d" | (ged) "d \<le> \<bar>x - k / n\<bar>" by linarith then java.lang.NullPointerException proof cases caselessd thenhave"\(f x - f (k/n))\ < e/2"
d xknsimp: abs_minus_commute alsohave"... \ (e/2 + 2 * M / d\<^sup>2 * (x - k/n)\<^sup>2)" \<open>M\<ge>0\<close> d by simp finallyshow ?thesis have1-e x next case java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 thenhave dle by (metis (in) two: have\<section>: "1 \<le> (x - real k / real n)\<^sup>2 / d\<^sup>2" A:"losed "" using dle \<open>d>0\<close> by auto have"\(f x - f (k/n))\ \ \f x\ + \f (k/n)\" by( simp flip: ex_in_conv intro!: two_special) alsohave"... \ M+M" by ( M add_mono_thms_linordered_semiring1 x) also using\<section> \<open>M\<ge>0\<close> mult_left_mono by fastforce False alsohave".. e/2+ 2* M/d<^sup>2 * (x - k/n)\<^sup>2" using e by simp finallyshow ?thesis . qed
} note * = this:
e by simpg_def) by (simp A0 } alsousing e by fastforce: A_def
( sum_abs) alsohave"... \ (\k\n. (e/2 + (2 * M / d\<^sup>2) * (x - k / n)\<^sup>2) * Bernstein n k x)"
* by (force simp add: abs_mult AsubAjjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 alsohave"... \ e/2 + (2 * M) / (d\<^sup>2 * n)" unfolding sum.java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 using alsohave"..< e" using\<open>d>0\<close> nbig e \<open>n>0\<close> apply using Aj: "t \ A j"
java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
}usingAsub that blast thenshow ?thesis by auto qed
text\<open>Source:
Bruno and Frank Deutsch
An Elementary then Anjt\notin i if"i<"for
Proceedings of the American
Volume 81, Number "..<( +13*e"
DOI: 10.230 e by(uto: field_simps
function_ring_on fixes R :: "('a have gj2: "j-/3)e< assumes compact (cases assumes continuous: "f False assumes add: "f \ R \ g \ R \ (\x. f x + g x) \ R" assumes mult: "f \ R \ g \ R \ (\x. f x * g x) \ R" assumes const: "(\_. c) \ R" thenhavej1 using j1java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
begin lemma minus: "f \ R \ (\x. - f x) \ R" by (frule mult [OF const [of "-1"]]) simp
lemma diff: "f \ R \ g \ R \ (\x. f x - g x) \ R" unfoldingby (metis minus
lemma power: "f by (induct n`unpretentious'' formulation>
lemmaproposition function_ring_on: by (induct assumes continuous_on e: "e >0"
lemma prod: "\finite I; \i. i \ I \ f i \ R\ \ (\x. \i \ I. f i x) \ R" byshows
lemma normf_upper: assumes"continuous_on S f""x show ?thesis proofjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 have"bdd_above ((\x. \f x\) ` S)" by simp: assmsbounded_imp_bdd_above compact_continuous_image continuous_on_rabs thenshow ?thesis using cSUP_upper by fastforce qed
lemma normf_least: "S \ {} \ (\x. x \ S \ \f x\ \ M) \ normf f \ M" by (simp
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
lemma (in function_ring_on) one: assumes U: "open U"and t0: "t0 \ S" "t0 \ U" and t1: "t1 \ S-U" shows \foralle>0 proof - have"\pt \ R. pt t0 = 0 \ pt t > 0 \ pt ` S \ {0..1}" if t: "t \ S - U" for t proof - have"t \ t0" using t t0 by auto thenobtain g where g: "g \ R" "g t \ g t0" using separable java.lang.StringIndexOutOfBoundsException: Range [128, 24) out of bounds for length 128
define[]: "h x =g x- g t0"for have"h \ R" unfolding h_def by (fast thenhave hsq: "(\w. (h w)\<^sup>2) \ R" by (simp add: power2_eq_square mult) have"h t \ h t0" by (simp add: h_def g) thenhave"h t \ 0" by (simp add: h_defjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 thenhave ht2: "subsection \Polynomial functions\ by simp alsohave"... \ normf (\w. (h w)\<^sup>2)" usingnormf_upper [ x=t] [OF ] by force finallyhave nfp: "0 < normf (\w. (h w)\<^sup>2)" .
define p where [abs_def]: "p x = (1 / normf (\w. (h w)\<^sup>2)) * (h x)^2" for x have"p \ R" unfolding p_def by (fast intro: hsq const mult) moreoverhave"p t0 = 0" by (simp add: p_def h_def) moreoverhave"p t > 0" using nfp ht2 by (simp add: p_def) moreoverhave"\x. x \ S \ p x \ {0..1}" using nfp normf_upper [OF continuous [OF hsq] ] by (auto simp: p_def) ultimatelyshow"\pt \ R. pt t0 = 0 \ pt t > 0 \ pt ` S \ {0..1}" by auto qed thenobtain pf where pf: "\t. t \ S-U \ pf t \ R \ pf t t0 = 0 \ pf t t > 0" and pf01: "\t. t \ S-U \ pf t ` S \ {0..1}" by metis have com_sU: "compact (S-U)" using compact closed_Int_compact U by (simp add: Diff_eq compact_Int_closed open_closed) have"\t. t \ S-U \ \A. open A \ A \ S = {x\S. 0 < pf t x}" apply (rule open_Collect_positive) by (metis pf continuous) thenobtain Uf where Uf: "\t. t \ S-U \ open (Uf t) \ (Uf t) \ S = {x\S. 0 < pf t x}" by metis thenhave open_Uf: "\t. t \ S-U \ open (Uf t)" by blast have tUft: "\t. t \ S-U \ t \ Uf t" using pf Uf by blast thenhave *: "S-U \ (\x \ S-U. Uf x)" by blast obtain subU where subU: "subU \ S - U" "finite subU" "S - U \ (\x \ subU. Uf x)" by (blast intro: that compactE_image [OF com_sU open_Uf *]) thenhave [simp]: "subU \ {}" using t1 by auto thenhave cardp: "card subU > 0"using subU by (simp add: card_gt_0_iff)
define p where [abs_def]: "p x = (1 / card subU) * (\t \ subU. pf t x)" for x havepR: "p \ R" unfolding p_def using subU pf by (fast intro: pf const mult sum) have pt0 [simp]: "p t0 = 0" using subU pf by (auto simp: p_def intro: sum.neutral) have pt_pos: "p t > 0"if t: "t \ S-U" for t proof - obtain i where i: "i \ subU" "t \ Uf i" using subU t by blast show ?thesis using subU i t apply (clarsimp simp: p_def field_split_simps) apply (rule sum_pos2 [OF \<open>finite subU\<close>]) using Uf t pf01 apply auto apply (force elim!: subsetCE) done qed have p01: "p x \ {0..1}" if t: "x \ S" for x proof - have"0 \ p x" using subU cardp t pf01 by (fastforce simp add: p_def field_split_simps intro: sum_nonneg) moreoverhave"p x \ 1" using subU cardp t apply (simp add: p_def field_split_simps) apply (rule sum_bounded_above [where'a=real and K=1, simplified]) using pf01 by force ultimatelyshow ?thesis by auto qed have"compact (p ` (S-U))" by (meson Diff_subset com_sU compact_continuous_image continuous continuous_on_subset pR) thenhave"open (- (p ` (S-U)))" by (simp add: compact_imp_closed open_Compl) moreoverhave"0 \ - (p ` (S-U))" by (metis (no_types) ComplI image_iff not_less_iff_gr_or_eq pt_pos) ultimatelyobtain delta0 where delta0: "delta0 > 0""ball 0 delta0 \ - (p ` (S-U))" by (auto simp: elim!: openE) thenhave pt_delta: "\x. x \ S-U \ p x \ delta0" by (force simp: ball_def dist_norm dest: p01)
define \<delta> where "\<delta> = delta0/2" have"delta0 \ 1" using delta0 p01 [of t1] t1 by (force simp: ball_def dist_norm dest: p01) with delta0 have\<delta>01: "0 < \<delta>" "\<delta> < 1" by (auto simp: \<delta>_def) have pt_\<delta>: "\<And>x. x \<in> S-U \<Longrightarrow> p x \<ge> \<delta>" using pt_delta delta0 by (force simp: \<delta>_def) have"\A. open A \ A \ S = {x\S. p x < \/2}" by (rule open_Collect_less_Int [OF continuous [OF pR] continuous_on_const]) thenobtain V where V: "open V""V \ S = {x\S. p x < \/2}" by blast
define k where"k = nat\1/\\ + 1" have"k>0"by (simp add: k_def) have"k-1 \ 1/\" using\<delta>01 by (simp add: k_def) with\<delta>01 have "k \<le> (1+\<delta>)/\<delta>" by (auto simp: algebra_simps add_divide_distrib) alsohave"... < 2/\" using\<delta>01 by (auto simp: field_split_simps) finallyhave k2\<delta>: "k < 2/\<delta>" . have"1/\ < k" using\<delta>01 unfolding k_def by linarith with\<delta>01 k2\<delta> have k\<delta>: "1 < k*\<delta>" "k*\<delta> < 2" by (auto simp: field_split_simps)
define q where [abs_def]: "q n t = (1 - p t^n)^(k^n)"forapply(subst) have: qn \<in> R" for n by ( add const pRjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 have q01: "\n t. t \ S \ q n t \ {0..1}" using p01 by (simp add: q_def power_le_one algebra_simps) have qt0 [simp]: "\n. n>0 \ q n t0 = 1"
java.lang.StringIndexOutOfBoundsException: Range [32, 2) out of bounds for length 105
{ fix t and n::nat assume t: "t \ S \ V" \<open>k>0\<close> V have "k * p t < k * \<delta> / 2" by force thenhave" k \ / 2)^n \ 1 - (k * p t)^n" using\<open>k>0\<close> p01 t by (simp add: power_mono) alsohave"... \ q n t" using Bernoulli_inequality "- ((p t)n)""^n] apply (simp add: q_def) byjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 7 finallyhave"1 - (k * then show " \f. bounded_linear f \ real_polynomial_function (f \ p)"show"\f. bounded_linear f \ real_polynomial_function (f \ p)"
} limitV
{ fix t and n::nat assume t: " S - U" with\<open>k>0\<close> U have "k * \<delta> \<le> k * p t"
simp: pt_\<delta>) with k\<delta> have kpt: "1 < k * p t" bycase(onst show? have ptn_pos: "0 < p tolynomial_function.const) using pt_pos have ptn_le: "p t^n \ 1"
java.lang.StringIndexOutOfBoundsException: Index 130 out of bounds for length 130
metis) using pt_pos alsohavelemma [intro using [OF by (simp add: by( I rule) auto alsohave"... \ (1/(k * (p t))^n) * (1 - p t^n)^(k^n) * (1 + (p t)^n)^(k^n)" proof (rule mult_left_mono [OF Bernoulli_inequality]) show"0 Stone_Weierstrass_polynomial_functionjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
ptn_pos by : ) qed (use ptn_pos in auto "polynomial_functionp" alsohave"... = (1/(k * (p t))^n) * (1 - p t^(2*n))^(k^n)" using pt_pos [OF t] \<open>k>0\<close> by (simp add: algebra_simps power_mult power2_eq_square flip: power_mult_distrib) alsohave"... \ (1/(k * (p t))^n) * 1" using pt_pos \<open>k>0\<close> p01 power_le_one t by (intro mult_left_mono [OF power_le_one]) auto alsohave"... \ (1 / (k*\))^n" using\<open>k>0\<close> \<delta>01 power_mono pt_\<delta> t by (fastforce simp: field_simps) finallyhave"q n t \ (1 / (real k * \))^n " .
} note limitNonU = this
define NN where"NN e = 1 + nat \max (ln e / ln (real k * \ / 2)) (- ln e / ln (real k * \))\" for e have NN: "of_nat (NN e) > ln e / ln (real k * \ / 2)" "of_nat (NN e) > - ln e / ln (real k * \)" if"0for e unfolding NN_def by linarith+ have NN1: "(k * \ / 2)^NN e < e" if "e>0" for e proof - have"ln ((real k * \ / 2)^NN e) = real (NN e) * ln (real k * \ / 2)" by (simp add: \<open>\<delta>>0\<close> \<open>0 < k\<close> ln_realpow) alsohave"... < ln e" using NN k\<delta> that by (force simp add: field_simps) finallyshow ?thesis by (simp add: \<open>\<delta>>0\<close> \<open>0 < k\<close> that) qed have NN0: "(1/(k*\))^(NN e) < e" if "e>0" for e proof - have"0 < ln (real k) + ln \" using\<delta>01(1) \<open>0 < k\<close> k\<delta>(1) ln_gt_zero ln_mult by fastforce thenhave"real (NN e) * ln (1 / (real k * \)) < ln e" using k\<delta>(1) NN(2) [of e] \<open>0 < \<delta>\<close> \<open>0 < k\<close> that by (simp add: ln_div divide_simps) thenhave"exp (real (NN e) * ln (1 / (real k * \))) < e" by (metis exp_less_mono exp_ln that) thenshow ?thesis by (simp add: \<delta>01(1) \<open>0 < k\<close> exp_of_nat_mult) qed
{ fix t and e::real assume"e>0" have"t \ S \ V \ 1 - q (NN e) t < e" "t \ S - U \ q (NN e) t < e" proof - assume t: "t \ S \ V" show"1 - q (NN e) t < e" by (metis add.commute diff_le_eq not_le limitV [OF t] less_le_trans [OF NN1 [OF \<open>e>0\<close>]]) next assume t: "t \ S - U" show"q (NN ejava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
[OFjava.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92 qed have polynomial_function using q01 \<open>b \<in> Basis\<close> p' const [where 'a=real and c=0] moreover : "0\ V" "S \ V \ U" using java.lang.NullPointerException
intro pd by blast qed
then qf qf: lemma (in function_ring_on) two_special: assumes A: "closed A""A \ S" "a \ A" and B: "closed B""B \ S" "b \ B" and disjjava.lang.StringIndexOutOfBoundsException: Range [14, 15) out of bounds for length 14 and"<1 shows"\f \ R. f ` S \ {0..1} \ (\x \ A. f x < e) \ (\x \ B. f x > 1 - e)" proof
{ fix w assume"wq (force intro:qfjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 thenhavelemmareal_polynomial_function_separablejava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 using assms by auto "x \ y" shows "\f. real_polynomial_function f \ f x \ f y" thenhave\<exists>V. open V \<and> w \<in> V \<and> S \<inter> V \<subseteq> -B \<and>
<>x
one -
} thenhenobtainVf where Vf: "
(\<forall>e>0. \<exists>f \<in> R. f ` S \<subseteq> {0..1} \<and> (\<forall>x \<in> S \<inter> Vf w. f x < e) \<and> (\<forall>x \<in> S \<inter> B. f x > 1 - e))"{fixandn:show by metis
:\And by blast have tVft: "\w. w \ A \ w \ Vf w" using\<open>k>0\<close> p01 t by (simp add: power_mono) thenhave Bernoulli_inequality "-(p)n""^" by have com_A( IntE p01 power_mult_distrib
(compact
=this
compactE_image com_A]) \ } bjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 using\<open>a \<in> A\<close> by auto add\<delta>) thenhave cardp: b blast: )
) using [ java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 "q n t = 1obtainpf pf: using [OF"Andbb\ Basis \ real_polynomial_function (pf b) \ (\x \ S. \f x \ b - pf b x\ < e / DIM('b))"<n \<Longrightarrow> real_polynomial_function (pf b) \<and> (\<forall>x \<in> S. \<bar>f x \<bullet> b - pf b x\<bar> < e / DIM('b))" "<>w.w\java.lang.StringIndexOutOfBoundsException: Index 101 out of bounds for length 101
(\<forall>x \<in> S \<inter> Vf w. ff w x < e / card subA) \<and> (\<forall>x \<in> S \<inter> B. ff w x > 1 - e / card subA)"have.\<le> (1/(k * (p t))^n) * (1 - p t^n)^(k^n) * (1 + (p t)^n)^(k^n)" by
define (useinby( norm_sum havelso.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 usingusingOF moreover " proof - " gwhere \java.lang.StringIndexOutOfBoundsException: Index 130 out of bounds for length 130
subA by (qed DIM_positive have lereal\<delta>))^n " . moreover" x \ 1" using subA NN
(astforce : pff_def intro:prod_mono g = \<lambda>x. 1", simplified]) ultimatelyshow ?thesis by autohave NN then"<>x\S. norm ((\b\Basis. (f x \ b) *\<^sub>R b) - ?g x) < e" qed
{ fix v x
v \<in> subA" and x: "x \<in> Vf v" "x \<in> S"
subA pffff*(<w < moreover unfolding pff_def by (metis prod.remove) also - proof pf ( add a( e) (real have\<And>i. i \<in> subA - {v} \<Longrightarrow> 0 \<le> ff i x \<and> ff i x \<le> 1"
subset ff subA)subsetDx2) moreoverhave"0 \ ff v x" using ff subA(usingfinally ?java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 ultimatelythesis by (metis mult_left_mono prod_mono [where g = "\x. 1", simplified]) qedfixes :: " - have.<e card using\<delta>01(1) \<open>0 < k\<close> k\<delta>(1) ln_gt_zero ln_mult by fastforce alsohave"... \ e"2 of
cardpebyimp:java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 finally x<"java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
- thenhave"\x. x \ A \ pff x < e"
subA UN_E) moreover
{ fix x assume x: "x \ B" thenhave x \<in> S" usingby java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 have"1 - e \ (1 - e / card subA)^card subA" "0 byauto: ) alsousingOFS f pos by java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 have. " proof - havejava.lang.StringIndexOutOfBoundsException: Index 122 out of bounds for length 122 using<open>B \<subseteq> S\<close> ff subA(1) x by (force simp: field_split_simps)"q ( e) t then ith have\<forall>\<^sub>F n in sequentially. inverse (Suc n) < e"
prod_mono_strict then\Andee> Longrightarrow qed finallyhave"1 - e < pff x" . rule_tac
} ultimatelyshowby blast qed
lemma (in
and:" B" B\subseteqSjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
:A\<inter> B = {}"
disj shows"\f \ R. f ` S \ {0..1} \ (\x \ A. f x < e) \ (\x \ B. f x > 1 - e)" proof (cases "A \ {} \ B \ {}") caseTrue showthesis using assms by (force simpproof - next
case then"A={} B{"by force is proof cases
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 withshow ?thesis by (rule_tac x="\x. 1" in bexI) (auto simp: const) next case 2 withshow thesis by rule_tac showspolynomial_function\<Longrightarrow> path g" by ( addpath_def) qed
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 lemma (in function_ring_on } assumes continuous_on"and fpos then obtain where and e: "0 obtainsp "polynomial_functionp pathstartpathstart g" pathfinishg shows"\g \ R. \x\S. \f x - g x\ < 2*e" proof -
define n where"n = 1 + nat \normf f / e\" -
define obtain poq p and: "
defineBwherej=x\in.fx\<ge> (j + 1/3)*e}" for j :: nat "n-1)* \ normf f" using e pos_divide_le_eq by fastforce add n_def) moreoverhave"n\1" by simp_all usingbyblast ultimatelyhave ge_fx: "(n-1) * e \ f x" if "x \ S" for x using normf_upper byfastforce have"closed definepf "pfbyby by(imp:compact)
{ fix j have"closed (A subA subA: "\<subseteq> A" "finite subA" "A \<subseteq> (\<Union>x \<in> subA. Vf x)"
[OFcontinuous_on_const by (simp_all add: A_def Collect_restrict) moreoverhave"closed (B j)"\<open>a \<in> A\<close> by auto using\<open>closed S\<close> continuous_on_closed_Collect_le [OF continuous_on_const f]
Collect_restrict moreover( <inter> (B j) = {}"
Vf ultimatelyhave"\f \ R. f ` S \ {0..1} \ (\x \ A j. f x < e/n) \ (\x \ B j. f x > 1 - e/n)" \<le> n\<close> by (auto intro: two)
} obtainwhere:(forall>x \<in> S \<inter> Vf w. ff w x < e / card subA) \<and> (\<forall>x \<in> S \<inter> B. ff w x > 1 - e / card subA)" andjava.lang.NullPointerException
pff]: pff by metis
g where]: "gx=e *(i\n. xf i x)" for x have gR: "g \ R" unfoldingg_def ( intro constxfR "have pff01: "pff x \ {0..1}" if t: "x \ S" for x using e xf01 java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 have:" {" using fposmoreover pff have:" S"
e \<open>n\<ge>1\<close> f normf_upper by (fastforce simp: A_def field_simps of_nat_diff) have Asub: "A j \ A i" if "i\j" for i j using e that byshow"norm (t *\<^sub>R (q 0 - g 0)) < e / 4"
t assume t: "t assume v: "v \ subA" and x: "x \ Vf v" "x \ S"
define j where"j = (LEAST j. t \ A j)" havejn"j \ n" using pff_def .remove have Aj: "t \ A j" using"<>i. thenhave Ai: "t by(etis Diff_subset atLeastAtMost_iff ff image_subset_iff subA(1) subsetD x( "0
Asubthat thenhave fj1 show
simpA_def thenhave java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 7 using java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 have: " java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 interpret function_ring_onCollect then java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 using Least_le by (fastforce simp add: j_def) thenhave fj2 assumes: openconnected ( assms using\<open>auto intro: real_polynomial_function_separable\<close>) have xf_le1: "\i. xf i t \ 1" usingxf01 t by have"g { fixx
:x\in assume x: "x \<in> assms have by (simp add: ivl_disj_un_one by(orce : path_connected_def by( addjava.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89 also".=\Prodw\java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62 proof (introcaseTrue . <x show\<Sum>i<j. xf i t) \<le> j" by (rule sum_bounded_above have"xf c False using ? thenshow" unfolding pff_def smtverit ) UN_E (3 )
by qed (use e in have" using\<open>1 \<le> n\<close> e by (simp add: field_simps del: of_nat_Suc) alsojava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 using\<open>1 \<le> n\<close> e j1 by (simp add: field_simps del: of_nat_Suc) B" B" B alsohave"... < (j + 1/3)*e" using e byshows havegj1proofcases <noteq> {} \<and> B \<noteq> {}") have java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 proof (cases "2 \ j")
False then"A={} |"=} force with pf "polynomial_function pf" pf " thenshow ? next 1 case True then?java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 usingnext alsohave"... < (j-1)*e - ((j - 1)/n) with e show ?
by (ru=\<lambda>x. 0" in bexI) (auto simp: const) using withproof( exI by by (smt" qedby alsohave.=e*(- show pfxjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 47 by (simp add: power2_eq_square -
.java.lang.NullPointerException proof
{ fix i
i2unfolding thenobtain d where"i+2+d java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 using ngt) <>f" thenhave"t \ B i" using Anj moreoverhaven<1
gA_def byauto: of_nat_diff : order_trans metisjava.lang.StringIndexOutOfBoundsException: Index 133 out of bounds for length 133 then i -n" by ( java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
}
aveeal-0 * er )
{fixj ultimatelyshow ?thesis using" A ) A qed ". using jn e xf01 have"( "" \subseteq " by (introsum_mono2: zero_le_mult_iff) finallyshow ?thesissimp_all: Collect_restrict
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
using fj1 fj2 gj1 gj2 by (simp add: abs_less_iff " \java.lang.StringIndexOutOfBoundsException: Index 152 out of bounds for length 152
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 thenshow ?thesis by (rule_tac x=g in bexI) (autohave : "(x \j\Basis. f' j x *\<^sub>R j) \ i) = f' i" if "i \Basis" for i qed
text"\D. \i\Basis. ((\x. f x \ i) has_derivative (\x. D x \ i)) (at a within S)"
proposition (injava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 assumes f: "continuous_on S f"and e: "e fixes : "a:euclidean_space simp: eq shows proof have e:" e" proof Stone_Weierstrass_special proof by (force {fix : ' "b\ Basis" using normf_upper have"<>. real_polynomial_function (\x \ S. \f x \ b - p x\ < e / DIM('b))" qed (use e in auto) thenobtain blast
force then ? show"ontinuous_on \java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
theorem (in function_ring_on) Stone_Weierstrass:
} shows proofjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
define h where"h \ \n::nat. SOME g. g \ R \ (\x\S. \f x - g x\ < 1 / (1 + n))" show differentiable_at_real_polynomial_function proof
:real assume e "0< e" then" \ S" by (auto simp: real_arch_inverse [ofjava.lang.StringIndexOutOfBoundsException: Range [0, 4) out of bounds for length 0
{ n: and: a :" Rightarrow ealjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65 assumejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 assume x: "by( add: .scaleR_diff_left [symmetric] \x \ S\) "<> (Sucn e" have. =" thenhave"1 / (1 + real n) \ e" usinge by simp: ) thenhave"\f x - g x\ < e" usingjava.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 3
} then auto flip)
h_def by (force intro: someI2_bex [OF Stone_Weierstrass_basic
} thenshow"uniform_limit pf by simp add polynomial_function_mult real_polynomial_function_eqjava.lang.StringIndexOutOfBoundsException: Index 104 out of bounds for length 104 unfoldingusing [off by ( (no_types)) show"h \ UNIV \ R" unfolding qed qed
text<A Light\<close>
: fixes R :: "('a::t2_space \ real) set" and S :: "'a set" assumes"compact S""\c. P(\x. c::real)" "f. P f \ continuous_on S f" "\f g. P(f) \ P(g) \ P(\x. f x + g x)" "\f g. P(f) \ P(g) \ P(\x. f x * g x)"
. <in> S \<and> y \<in> S \<and> x \<noteq> y \<Longrightarrow> \<exists>f. P(f) \<and> f x \<noteq> f y" "continuous_on S f"
< e" shows"\g. P(g) \ (\x \ S. \f x - g x\ < e)" proof- interpret: function_ring_onCollect by unfold_locales (use assms in Stone_Weierstrass_polynomial_functionOF
java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 14 usingPR.Stone_Weierstrass_basic [OF \<open>continuous_on S f\<close> \<open>0 < e\<close>] by blast qed
subsection \<open>Polynomial functions\<close>
inductive real_polynomial_function
linear: " g by( add: dist_norm )
|const"ly"\<forall>\<^sub>F n in sequentially. \<forall>x\<in>S. dist (g n x) (f x) < e"
| add: "\real_polynomial_function f; real_polynomial_function g\ \ real_polynomial_function (\x. f x + g x)"
|mult
declare real_polynomial_function.intros [intro]
definition\<^marker>\<open>tag important\<close> polynomial_function :: "('a::real_normed_vector \<Rightarrow> 'b::real_normed_vector) \<Rightarrow> bool" where "polynomial_function p \ (\f. bounded_linear f \ real_polynomial_function (f o p))"
lemma real_polynomial_function_eqreal_polynomial_functionpolynomial_function unfolding proof assume real_polynomial_function thenshow" lemma path_polynomial_function: proof (induction p by ( add inner_sum_right) case (linear h) thenshow ?case by (auto simp: bounded_linear_compose real_polynomial_function.linear simp:path_defby( sum; simp next case (const h)lemma: by ( add: real_polynomial_function fixesjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
case (add h) thenshow ?case by (force simp add by (force simp add: bounded_linear_def next case (mult by (force Stone_Weierstrass_polynomial_function_subspace-
ed next assumeusing[ "{.1""/ show" by (simp add: o_def) qed
mma: "bounded_linear f \ polynomial_function f"
polynomial_function_def bounded_linear_compose.linear
lemma polynomial_function_id [show" (pf t - g t)< e" by (simp "t \ {0..1}" for t
lemma polynomial_function_add [intro]: "\polynomial_function f; polynomial_function g\ \ polynomial_function (\x. f x + g x)" by :polynomial_function_defreal_polynomial_function
]: assumes polynomial_function"norm qt - g) shows metis norm_minus_commute gwhere:" normt*^> - ) java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 proofs " ( \^> 0-0 " haveusing that mult_left_le_one_lejava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67 using g that unfoldingqedhavefinitejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 by (auto :nat b "= { } inj_onb{.i moreoverhave"real_polynomial_function ing by metis
( add ultimately connected_open_polynomial_connected unfolding bounded_linear_def by(autosimp S:S" "" qed
lemma polynomial_function_cmul [intro]: \existshave:"i\B. (f x \ i) *\<^sub>R i) = f x" if "x \ S" for x
f:java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 36 shows(\<lambda>x. c *\<^sub>R f x)" by (rule with
lemma polynomial_function_minus [intro]: assumes f: "polynomial_function f" shows"polynomial_function (\x. - f x)" using polynomial_function_cmul [OF f, ofcaseTrue ?java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
lemma ?thesis "\polynomial_function f; polynomial_function g\ \ polynomial_function (\x. f x - g x)" unfoldingshow by (metis show "0 < setdist )( )
polynomial_function_sum]: "\finite I; \i. i \ I \ polynomial_function (\x. f x i)\ \ polynomial_function (\x. sum (f x) I)" by (induct I rule obtain" " eb
real_polynomial_function_minus]: "real_polynomial_function f \ real_polynomial_function (\x. - f x)" using polynomial_function_minus [of f] by add)
lemmaand: "<>. t\ "\real_polynomial_function f; real_polynomial_function g\ \ real_polynomial_function (\x. f x - g x)" using [off] by (simp add: real_polynomial_function_eq (intro )
lemma real_polynomial_function_divide [intro]: "real_polynomial_function p" howsreal_polynomial_function proof - have"eal_polynomial_function(x. p x * Fields.inverse c)"lambdaunfoldingbyfastconst using assmsby( add: p pf then ?java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
ivide_inverse qed
lemma [introassume" \ x'" "x' \ 1" "lbrakk>finite I; \i. i \ I \ real_polynomial_function (\x. f x i)\ \ real_polynomial_function (\x. sum (f x) I)" using polynomial_function_sum If by (simp add: real_polynomial_function_eq)
lemma real_polynomial_function_prod using e thatforce A_def: order_trans \ (\< byqed
lemma real_polynomial_function_gchoose: obtains p where t An proof showreal_polynomial_functiondifferentiable_componentwise_within byhave: t \<in> A i" if "i\<ge>j" for i" (at a S) \
( addgbinomial_prod_rev
lemma real_polynomial_function_power [intro]: "real_polynomial_function f \ real_polynomial_function (\x. f x^n)" by (induct n) ( ( add)
lemmareal_polynomial_function_compose]: assumes f: "polynomial_function using Aj \i not_less_Least by (fastforce simp add: j_def) shows"real_polynomial_function (g o f)" usingjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 proof (applyrule_tac
simp f') thenshow
} next usingbyapply simp ) then ?case using f add by (auto simp: polynomial_function_def) next
( f g) thenshow ?case usingintro qed auto
lemma .. *(\<Sum>i<j. xf i t) + e * (\<Sum>i=j..n. xf i t)" assumes f"and :polynomial_function " "polynomial_function (g o f)" using g real_polynomial_function_composehave.\<le> e*j + e * ((Suc n - j)*e/n)" by (auto simpapply( how(\<Sum>i<j. xf i t) \<le> j"
lemma sum_max_0: fixes x::real (*in fact "'a::comm_ring_1"*) shows\<Sum>i\<le>max m n. x^i * (if i \<le> m then a i else 0)) = (\<Sum>i\<le>m. x^i * a i)" proof- have"( java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 by (auto (useeininduction: real_polynomial_function) also ..=(<> by (rule sum alsohave"... = lemmadifferentiable_on_real_polynomial_function: by (auto simp: algebra_simps intro: sum.cong) finally have..\le je+*"
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
lemma real_polynomial_function_imp_sumlemma differentiable_at_polynomial_function assumesfjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 shows" using assms proofproof"2\ j") case (linear f) then: by (auto simp add f : witheshow have =\<Sum>i\<le>1. (if i = 0 then 0 else c) * x^i)" for x bysimp:mult_ac with ?case by fastforce: next case (const c) have"c = (\i\0. c * x^i)" for x by auto
pr- by fastforce case (add f1 f2) thenith "f1 = (\x. \i\n1. a1 i * x^i)" "f2 = (\x. \i\n2. a2 i * x^i)"
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 11 thenhave"f1 x + f2 x = (\i\max n1 n2. ((if i \ n1 then a1 i else 0) + (if i \ n2 then a2 i else 0)) * x^i)" for java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11 usingsum_max_0mn1n=]sum_max_0 mn2nn1 by (simpalsohave .l_to_span byblast thenshow ?case by force case (mult then es" orthogonal using that by blast "f1 = ( and 1: "\i. i \ B \ norm i = 1" by auto
hen b1 where "f1 =(\x. \i\n1. b1 i * x^i)" "f2 = (\x. \i\n2. b2 i * x^i)" "b1 = (\i. if i\n1 then a1 i else 0)" "b2 = (\i. if i\n2 then a2 i else 0)" by auto then"f1 x * x = \i\n1 + n2. (\k\i. b1 k * b2 (i - k)) * x ^ i)" for x using polynomial_product field_simps of_nat_diff not_le intro [of" show "(<Sum>i\<in>B. (x \<bullet> i) *\<^sub>R i) \<in> span B" then ? by force qed
lemmashow<bullet> (\<Sum>i\<in>B. (x \<bullet> i) *\<^sub>R i) = i \<bullet> x" if "i \<in> B" for i "real_polynomial_function - proof
?hs show rhs bymetis) next
( simp orthogonal_def)
(auto imp multalsohave..\<le> g t" qed
lemmapolynomial_function_iff_Basis_inner fixes f :: "'a: ?thesis java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 alsohave .. i\<>x
(is"?lhs = ?rhs") unfolding polynomial_function_def proofintro allI assume\<forall>h. bounded_linear h \<longrightarrow> real_polynomial_function (h \<circ> f)" then ? by (force add next fix h :: "'b \ real" assumerp" fixes f :: "'a::euclidean_space \ 'b::euclidean_space" have"real_polynomial_function (h \ (\x. \b\Basis. (f x \ b) *\<^sub>R b))" using
( simp polynomial_function_mult
intro:real_polynomial_function_compose _ " show h\<circ> f)" by how\<And>x. x \<in> S \<Longrightarrow> 0 \<le> f x + normf f" qed
subsection \<open>Stone-Weierstrass theorem for polynomial functions\<close>
text
lemma continuous_real_polymonial_function: assumes f -
Bwhere using assmsthen B1java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
java.lang.StringIndexOutOfBoundsException: Range [46, 2) out of bounds for length 47
lemma continuous_polymonial_function: fixes f :: "'a::real_normed_vector \ 'b::euclidean_space"
orthonormal_basis_subspace shows"continuous then have finiteB" proofrule) show"\b. b \ Basis \ isCont (\x. (f x \ b) *\<^sub>R b) x" using assms continuous_real_polymonial_function ?thesis by (force simp: polynomial_function_iff_Basis_inner cardBproof qed
lemma continuous_on_polymonial_function obtain N::nat where N: "0 < N""0 < inverse N" fx "\i\B. (f x \ i) *\<^sub>R i) = f x" if "x \ S" for x
: (, lifting open>finite B\<close> assms(5) image_subset_iff orthB orthonormal_basis_expand spanB sum.cong that) assumes f" shows"continuous_on S f" usingcontinuous_polymonial_function ]continuous_at_imp_continuous_on by blast
shows"\p'. real_polynomial_function p' \
(\<forall>x. (p has_real_derivative (p' x)) (at x))" using assms proof (then" case( p) thenshow ? by (force " next case( c) show ?case by (rule_tacunfoldingby ( simpdist_norm abs_minus_commute) case (add f1 h_def ( introsomeI2_bex [OFStone_Weierstrass_basic OF) then "real_polynomial_function p1""\x. (f1 has_real_derivative p1 x) (at x)" "real_polynomial_function p2""\x. (f2 has_real_derivative p2 x) (at x)" by auto showcase
rule_tacx=\lambda>x. p1 "inexI)(autointro! derivative_eq_intros)
( f1 thenobtain"<>f. f continuous_on S f" "real_polynomial_function p1""\x. (f1 has_real_derivative p1 x) (at x)" "real_polynomial_function p2""\x. (f2 has_real_derivative p2 x) (at x)" by auto thenshow" S fjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 PR"Collect P"
( x="\x. f1 x * p2 x + f2 x * p1 x" in exI) (auto intro!: derivative_eq_intros) qed ?
lemma has_vector_derivative_polynomial_function: fixes pjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 assumes"polynomial_function p" obtains: r java.lang.NullPointerException proof -
{ fix b :: 'a mult: "\real_polynomial_function f; real_polynomial_function g\ \ real_polynomial_function (\x. f x * g x)" assume b java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 then obtain p' where p': "real_polynomial_function p'"and pd: "\x. ((\x. p x \ b) has_real_derivative p' x) (at x)" using assms [unfolded by blast have polynomial_function (<lambdap'x*<^sub>R b)" using\<open>b \<in> Basis\<close> p' const [where 'a=real and c=0] by (simp thenassume real_polynomial_function by (fastforce intro: derivative_eq_intros pd)
} then qf where: "\b. b \ Basis \ polynomial_function (qf b)" " Basis \ ((\u. (p u \ b) *\<^sub>R b) has_vector_derivative qf b x) (at x)" by showjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 proof show apply (subst by( intro qf) qed force addreal_bounded_linearconst real_polynomial_functionmult qed
lemma real_polynomial_function_separable: fixes x : then"real_polynomial_functionp" assumes"x \ y" shows "\f. real_polynomial_function f \ f x \ f y" proof -
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 proof (rule real_polynomial_function_sum) show"\i. i \ Basis \ real_polynomial_function (\u. ((x - u) \ i)\<^sup>2)" by polynomial_function_bounded_linear qed auto moreoverhave(Sum using assms by ( addpolynomial_function_bounded_linear ultimately [intro by auto qed (autosimp bounded_linear_def real_polynomial_function o_def
lemma: fixes f ::assumes" f"and polynomial_function assumes"compact S""continuous_on S f""0 < e" usingunfolding o_def proof interpretmoreover h "real_polynomial_function f" proof unfold_locales qed (use assms continuous_on_polymonial_function real_polynomial_function_eq in\<open>auto intro: real_polynomial_function_separable\<close>) show ?thesis usingPR.Stone_Weierstrass_basic [OF \<open>continuous_on S f\<close> \<open>0 < e\<close>] that by blast qed
theorem Stone_Weierstrass_polynomial_function: fixes : "a: \ 'b::euclidean_space" assumes S: "compactqed and f:lemmapolynomial_function_cmul]: and e: "0 < e" shows"\g. polynomial_function g \ (\x \ S. norm(f x - g x) < e)" proof - polynomial_function_minusintro
{ fix : b assume"b shows "polynomial_function
polynomial_function_cmul f "-1" simp
polynomial_function_diff] show"continuous_on S (\x. f x \ b)" using f by (auto intro: continuous_intros) qed ( by(metisjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} obtainwhere "\b. b \ Basis \ real_polynomial_function (pf b) \ (\x \ S. \f x \ b - pf b x\ < e / DIM('b))" by metis let\lambda>x
{ fix x assumex\<in> S"
(<um by (rule norm_sum) alsohave".. usingpolynomial_function_diff[of f] proof( sum_bounded_above_strict show" real_polynomial_function_divide [intro]:
simp:Real_Vector_Spaces [] pf qed (rule DIM_positive) also"..= ejava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 by (simp show finallyhave"norm (\b\Basis. (f x \ b) *\<^sub>R b - pf b x *\<^sub>R b) < e" .
} thenhave"\x\S. norm ((\b\Basis. (f x \ b) *\<^sub>R b) - ?g x) < e" by polynomial_function_sum fjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 lemma []: have"polynomial_function ?g"
pf ultimately : using [ f]by no_types)java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
Stone_Weierstrass_uniform_limit
f :: "a:euclidean_space\ 'b::euclidean_space" assumes:"compact S" and f: "continuous_on S f" obtains g where proof have posassumespolynomial_function g:" g" shows( )java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 using Stone_Weierstrass_polynomial_function[OF S f pos (linear) by metis have uniform_limitsequentially proof (rule fix e::real assume"0 < e" with fadd (auto simp) by (rule order_tendstoD) moreovershowjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 using g by (simp add auto ultimately polynomial_function_composeintro by(eventually_elim qed thenshow ?thesis using g(1) . g real_polynomial_function_compose[OF
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
subsection\<open>Polynomial functions as paths\<close>
text\<open>One application is to pick a smooth approximation to a path,
or just pick a smooth path java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
lemma path_polynomial_function: fixeshave. java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 shows g\<Longrightarrow> path g" by (simp: path_def)
lemma path_approx_polynomial_function: fixesjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 assumes"path shows"\<exists>a n::nat. f = (\<lambda>x. \<Sum>i\<le>n. a i * x^i)" obtains p where" (induct f) " proof - obtain q where poq: "polynomial_function q"and noq: "\x. x \ {0..1} \ norm (g x - q x) < e/4" using [of"{.1"g "/4"]assms by (auto simp: path_def)
define pf where"pf \ \t. q t + (g 0 - q 0) + t *\<^sub>R (g 1 - q 1 - (g 0 - q 0))"
proof f ?case
fastforce by java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 show"norm (pf t - g t) < e" if"t \ {0..1}" for t proof - have *: "norm (((q t - g t) + (g 0 - q 0)) + (t *\<^sub>R (g 1 - q 1) + t *\<^sub>R (q 0 - g 0))) < (e/4 + e/4) + (e/4+e/4)" proof (intro Real_Vector_Spaces.norm_add_less obtain n1 n2 where show"norm (q t - g t) < e / 4" by (metis noq "f1 x x f2x =(<>i "norm(t *^>R (g 1 1) e / " using noq that le_less_trans [OF mult_left_le_one_le noq] byauto show"norm (t *\<^sub>R (q 0 - g 0)) < e / 4" using noqby simp:sum algebra_simps.commute by simp (metis norm_minus_commute order_refl qed (use noq norm_minus_commute that in auto) thenshow ?thesis java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99 by (auto simp" = (\x. \i\n1. b1 i * x^i)" "f2 = (\x. \i\n2. b2 i * x^i)" qed qed (auto simp add by auto
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
proposition t show?java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 fixes S :: assumes:"open "" java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 and"x \ S" "y \ S" shows"\g. polynomial_function g \ path_image g \ S \ pathstart g = x \ pathfinish g = y" proof have"path_connected S"using assms by (simp add: connected_open_path_connected) with\<open>x \<in> S\<close> \<open>y \<in> S\<close> obtain p where p: "path p" "path_image p \<subseteq> S" "pathstart p = x" "pathfinish p = y" by (force simp: path_connected_def) "\e. 0 < e \ (\x \ path_image p. ball x e \ S)" proof (cases "S = UNIV") case True thenshow ?thesis by (simp add: gt_ex) next case False
? proof (intro exI conjI ballI) show"\x. x \ path_image p \ ball x (setdist (path_image p) (-S)) \ S" using setdist_le_distlemma polynomial_function_iff_Basis_inner show"0 < (path_image p) ( S)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 using S p False by (fastforce simp add: setdist_gt_0_compact_closed compact_path_image open_closed) qed qed thenobtain e whereunfolding polynomial_function_def by auto obtain pf where"polynomial_function pf"and pfassume\<forall>h. bounded_linear h \<longrightarrow> real_polynomial_function (h \<circ> f)" and f_e \<And>t. t \<in> {0..1} \<Longrightarrow> norm(pf t - p t) < e" usingby( simp: bounded_linear_inner_left) show ?thesis proof (intro exI conjI) show"polynomial_function pf" by fact showpathstart" pathfinishpf y" by (simp_all add: p pf) show"path_image pf \ S" unfolding path_image_def proofclarsimp fix x'::real assume0\<le> x'" "x' \<le> 1" thenhave"dist (p x') (pf x') < e" by (metisatLeastAtMost_iff dist_normpf_e thenshow"pf x' \ S" by (metis qed qed qed
lemmadifferentiable_componentwise_within "f differentiable (at a within S) \
(\<forall>i \<in> Basis. (\<lambda>x. f x \<bullet> i) differentiable at a within S)" proof -
{ assume"\i\Basis. \D. ((\x. f x \ i) has_derivative D) (at a within S)" thenobtain f' where f': "\i. i \ Basis \ ((\x. f x \ i) has_derivative f' i) (at a within S)" by metis have eq usingthat ( add inner_add_leftinner_add_right) have"\D. \i\Basis. ((\x. f x \ i) has_derivative (\x. D x \ i)) (at a within S)" apply( x="x::'a. (\j\Basis. f' j x *\<^sub>R j) :: 'b" in exI)
( add') done
} thenshow ?thesis f :"a: \ 'b::euclidean_space" apply dd using has_derivative_componentwise_within by blast qed
lemma polynomial_function_inner [intro]: fixes: ':euclidean_space" "polynomial_function \ polynomial_function (\x. g x \ i)" apply (subst euclidean_representation apply (force simp f : "'a::real_normed_vector \ 'b::euclidean_space" done
text"continuous_on S f"
lemma differentiable_at_real_polynomial_function "real_polynomial_function f \ f differentiable (at a within S)" by (induction f rule: real_polynomial_function.induct) shows
lemma differentiable_on_real_polynomial_function: "real_polynomial_function p \ p differentiable_on S" by (simp add( p)
lemmaby(forcesimpreal_bounded_linear intro) fixes f :: "_ \ 'a::euclidean_space" shows ?case by ( differentiable_at_real_polynomial_function differentiable_componentwise_within
lemma differentiable_on_polynomial_function obtainp1 p2 fixes f :: "_ \ 'a::euclidean_space" shows"polynomial_function f \ f differentiable_on S" by (simp add: differentiable_at_polynomial_function differentiable_on_def)
lemma vector_eq_dot_span: assumes"x \ span B" "y \ span B" and i: "\i. i \ B \ i \ x = i \ y" shows"x = y" proof - have"\i. i \ B \ orthogonal (x - y) i" by (simp add: i inner_commute inner_diff_right orthogonal_def) moreoverhave ( x="\x. p1 x + p2 x" in exI) (auto intro!: derivative_eq_intros) by(simp add assms) ultimatelyhave"x - y = 0" using orthogonal_to_span orthogonal_self by blast then ?thesis qed
lemma orthonormal_basis_expand: assumes B: "pairwise orthogonal B" and 1: "\i. i \ B \ norm i = 1" and"x by (rule_tac x="\x. f1 x * p2 x + f2 x * p1 x" in exI) (auto intro!: derivative_eq_intros) and"finite B" shows
java.lang.StringIndexOutOfBoundsException: Range [30, 5) out of bounds for length 68 show"(\i\B. (x \ i) *\<^sub>R i) \ span B" bysimp: span_sum show"i \ (\i\B. (x \ i) *\<^sub>R i) = i \ x" if "i \ B" for i proof - have simp i <>j=(if = 1 "j \ B" for j using B 1 that \<open>i \<in> B\<close> by (force simp: norm_eq_1 have"i \ (\i\B. (x \ i) *\<^sub>R i) = (\j\B. x \ j * (i \ j))" by (simp add: inner_sum_right) alsohave"... = (\j\B. if j = i then x \ i else 0)" by (rule sum.cong; simp) alsohave"... = i \ x" by (simp add: \<open>finite B\<close> that inner_commute) finallyshow ?thesis . qed qed
theorem Stone_Weierstrass_polynomial_function_subspace: fixes :: 'a:euclidean_space\ 'b::euclidean_space" assumes"compact S" and contf: "using and"0 < e" and" T""f ` \ T" obtains polynomial_functionSjava.lang.NullPointerException "\x. x \ S \ norm(f x - g x) < e" proof - obtain B where"B \ T" and orthB: "pairwise orthogonal B" and metis and"independent B"and cardB and spanB: "span B = T" using orthonormal_basis_subspace \<open>subspace T\<close> by metis thenhave"finite qedforce : qf) by (simp add thenobtain n::nat and bfixesx : "a:euclidean_space" using finite_imp_nat_seg_image_inj_on by metis with cardB have"n = card B""dim T = n"
simp) have fx: "(\i\B. (f x \ i) *\<^sub>R i) = f x" if "x \ S" for x by (metis (no_types, lifting "real_polynomial_function (\u. \b\Basis. (inner (x-u) b)^2)" have cont: "continuous_on S (\x. \i\B. (f x \ i) *\<^sub>R i)"
--> --------------------
--> maximum size reached
--> --------------------
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.55Angebot
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.