src/HOL/Analysis/Euclidean_Space.thy
changeset 66154 bc5e6461f759
parent 64773 223b2ebdda79
child 67399 eab6ce8368fa
equal deleted inserted replaced
66153:236339f97a88 66154:bc5e6461f759
   126 
   126 
   127 lemma sum_inner_Basis_eq [simp]:
   127 lemma sum_inner_Basis_eq [simp]:
   128   assumes "b \<in> Basis" shows "(\<Sum>i\<in>Basis. (inner i b) * f i) = f b"
   128   assumes "b \<in> Basis" shows "(\<Sum>i\<in>Basis. (inner i b) * f i) = f b"
   129   by (simp add: comm_monoid_add_class.sum.remove [OF finite_Basis assms]
   129   by (simp add: comm_monoid_add_class.sum.remove [OF finite_Basis assms]
   130          assms inner_not_same_Basis comm_monoid_add_class.sum.neutral)
   130          assms inner_not_same_Basis comm_monoid_add_class.sum.neutral)
       
   131 
       
   132 lemma sum_if_inner [simp]:
       
   133   assumes "i \<in> Basis" "j \<in> Basis"
       
   134     shows "inner (\<Sum>k\<in>Basis. if k = i then f i *\<^sub>R i else g k *\<^sub>R k) j = (if j=i then f j else g j)"
       
   135 proof (cases "i=j")
       
   136   case True
       
   137   with assms show ?thesis
       
   138     by (auto simp: inner_sum_left if_distrib [of "\<lambda>x. inner x j"] inner_Basis cong: if_cong)
       
   139 next
       
   140   case False
       
   141   have "(\<Sum>k\<in>Basis. inner (if k = i then f i *\<^sub>R i else g k *\<^sub>R k) j) =
       
   142         (\<Sum>k\<in>Basis. if k = j then g k else 0)"
       
   143     apply (rule sum.cong)
       
   144     using False assms by (auto simp: inner_Basis)
       
   145   also have "... = g j"
       
   146     using assms by auto
       
   147   finally show ?thesis
       
   148     using False by (auto simp: inner_sum_left)
       
   149 qed
   131 
   150 
   132 subsection \<open>Subclass relationships\<close>
   151 subsection \<open>Subclass relationships\<close>
   133 
   152 
   134 instance euclidean_space \<subseteq> perfect_space
   153 instance euclidean_space \<subseteq> perfect_space
   135 proof
   154 proof