src/HOL/Multivariate_Analysis/Linear_Algebra.thy
changeset 44750 5b11f36fcacb
parent 44749 5b1e1432c320
child 44890 22f665a2e91c
equal deleted inserted replaced
44749:5b1e1432c320 44750:5b11f36fcacb
   412   have "y^2 + z^2 \<le> y^2 + 2*y*z + z^2" using z y by (simp add: mult_nonneg_nonneg)
   412   have "y^2 + z^2 \<le> y^2 + 2*y*z + z^2" using z y by (simp add: mult_nonneg_nonneg)
   413   with xy have th: "x ^2 \<le> (y+z)^2" by (simp add: power2_eq_square field_simps)
   413   with xy have th: "x ^2 \<le> (y+z)^2" by (simp add: power2_eq_square field_simps)
   414   from y z have yz: "y + z \<ge> 0" by arith
   414   from y z have yz: "y + z \<ge> 0" by arith
   415   from power2_le_imp_le[OF th yz] show ?thesis .
   415   from power2_le_imp_le[OF th yz] show ?thesis .
   416 qed
   416 qed
   417 
       
   418 text {* TODO: move to NthRoot *}
       
   419 lemma sqrt_add_le_add_sqrt:
       
   420   assumes x: "0 \<le> x" and y: "0 \<le> y"
       
   421   shows "sqrt (x + y) \<le> sqrt x + sqrt y"
       
   422 apply (rule power2_le_imp_le)
       
   423 apply (simp add: power2_sum x y)
       
   424 apply (simp add: mult_nonneg_nonneg x y)
       
   425 apply (simp add: x y)
       
   426 done
       
   427 
   417 
   428 subsection {* A generic notion of "hull" (convex, affine, conic hull and closure). *}
   418 subsection {* A generic notion of "hull" (convex, affine, conic hull and closure). *}
   429 
   419 
   430 definition hull :: "('a set \<Rightarrow> bool) \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "hull" 75) where
   420 definition hull :: "('a set \<Rightarrow> bool) \<Rightarrow> 'a set \<Rightarrow> 'a set" (infixl "hull" 75) where
   431   "S hull s = Inter {t. S t \<and> s \<subseteq> t}"
   421   "S hull s = Inter {t. S t \<and> s \<subseteq> t}"