328 fixes f:: "'a \<Rightarrow> real ^'n" |
328 fixes f:: "'a \<Rightarrow> real ^'n" |
329 assumes fP: "finite P" and fPs: "\<And>Q. Q \<subseteq> P \<Longrightarrow> norm (setsum f Q) \<le> e" |
329 assumes fP: "finite P" and fPs: "\<And>Q. Q \<subseteq> P \<Longrightarrow> norm (setsum f Q) \<le> e" |
330 shows "setsum (\<lambda>x. norm (f x)) P \<le> 2 * real CARD('n) * e" |
330 shows "setsum (\<lambda>x. norm (f x)) P \<le> 2 * real CARD('n) * e" |
331 using setsum_norm_allsubsets_bound[OF assms] |
331 using setsum_norm_allsubsets_bound[OF assms] |
332 by (simp add: DIM_cart Basis_real_def) |
332 by (simp add: DIM_cart Basis_real_def) |
333 |
|
334 instantiation vec :: (ordered_euclidean_space, finite) ordered_euclidean_space |
|
335 begin |
|
336 |
|
337 definition "inf x y = (\<chi> i. inf (x $ i) (y $ i))" |
|
338 definition "sup x y = (\<chi> i. sup (x $ i) (y $ i))" |
|
339 definition "Inf X = (\<chi> i. (INF x:X. x $ i))" |
|
340 definition "Sup X = (\<chi> i. (SUP x:X. x $ i))" |
|
341 definition "abs x = (\<chi> i. abs (x $ i))" |
|
342 |
|
343 instance |
|
344 apply default |
|
345 unfolding euclidean_representation_setsum' |
|
346 apply (auto simp: less_eq_vec_def inf_vec_def sup_vec_def Inf_vec_def Sup_vec_def inner_axis |
|
347 Basis_vec_def inner_Basis_inf_left inner_Basis_sup_left inner_Basis_INF_left |
|
348 inner_Basis_SUP_left eucl_le[where 'a='a] less_le_not_le abs_vec_def abs_inner) |
|
349 done |
|
350 |
|
351 end |
|
352 |
333 |
353 subsection {* Matrix operations *} |
334 subsection {* Matrix operations *} |
354 |
335 |
355 text{* Matrix notation. NB: an MxN matrix is of type @{typ "'a^'n^'m"}, not @{typ "'a^'m^'n"} *} |
336 text{* Matrix notation. NB: an MxN matrix is of type @{typ "'a^'n^'m"}, not @{typ "'a^'m^'n"} *} |
356 |
337 |