src/HOL/Analysis/Product_Vector.thy
changeset 68617 75129a73aca3
parent 68611 4bc4b5c0ccfc
child 69064 5840724b1d71
equal deleted inserted replaced
68616:cedf3480fdad 68617:75129a73aca3
    56 end
    56 end
    57 
    57 
    58 
    58 
    59 subsection \<open>Product is a real vector space\<close>
    59 subsection \<open>Product is a real vector space\<close>
    60 
    60 
    61 instantiation%important prod :: (real_vector, real_vector) real_vector
    61 instantiation prod :: (real_vector, real_vector) real_vector
    62 begin
    62 begin
    63 
    63 
    64 definition scaleR_prod_def:
    64 definition scaleR_prod_def:
    65   "scaleR r A = (scaleR r (fst A), scaleR r (snd A))"
    65   "scaleR r A = (scaleR r (fst A), scaleR r (snd A))"
    66 
    66 
   111 
   111 
   112 subsection \<open>Product is a metric space\<close>
   112 subsection \<open>Product is a metric space\<close>
   113 
   113 
   114 (* TODO: Product of uniform spaces and compatibility with metric_spaces! *)
   114 (* TODO: Product of uniform spaces and compatibility with metric_spaces! *)
   115 
   115 
   116 instantiation%important prod :: (metric_space, metric_space) dist
   116 instantiation prod :: (metric_space, metric_space) dist
   117 begin
   117 begin
   118 
   118 
   119 definition%important dist_prod_def[code del]:
   119 definition%important dist_prod_def[code del]:
   120   "dist x y = sqrt ((dist (fst x) (fst y))\<^sup>2 + (dist (snd x) (snd y))\<^sup>2)"
   120   "dist x y = sqrt ((dist (fst x) (fst y))\<^sup>2 + (dist (snd x) (snd y))\<^sup>2)"
   121 
   121 
   133   by standard (rule uniformity_prod_def)
   133   by standard (rule uniformity_prod_def)
   134 end
   134 end
   135 
   135 
   136 declare uniformity_Abort[where 'a="'a :: metric_space \<times> 'b :: metric_space", code]
   136 declare uniformity_Abort[where 'a="'a :: metric_space \<times> 'b :: metric_space", code]
   137 
   137 
   138 instantiation%important prod :: (metric_space, metric_space) metric_space
   138 instantiation prod :: (metric_space, metric_space) metric_space
   139 begin
   139 begin
   140 
   140 
   141 lemma dist_Pair_Pair: "dist (a, b) (c, d) = sqrt ((dist a c)\<^sup>2 + (dist b d)\<^sup>2)"
   141 lemma dist_Pair_Pair: "dist (a, b) (c, d) = sqrt ((dist a c)\<^sup>2 + (dist b d)\<^sup>2)"
   142   unfolding dist_prod_def by simp
   142   unfolding dist_prod_def by simp
   143 
   143 
   268     by (rule convergentI)
   268     by (rule convergentI)
   269 qed
   269 qed
   270 
   270 
   271 subsection \<open>Product is a normed vector space\<close>
   271 subsection \<open>Product is a normed vector space\<close>
   272 
   272 
   273 instantiation%important prod :: (real_normed_vector, real_normed_vector) real_normed_vector
   273 instantiation prod :: (real_normed_vector, real_normed_vector) real_normed_vector
   274 begin
   274 begin
   275 
   275 
   276 definition norm_prod_def[code del]:
   276 definition norm_prod_def[code del]:
   277   "norm x = sqrt ((norm (fst x))\<^sup>2 + (norm (snd x))\<^sup>2)"
   277   "norm x = sqrt ((norm (fst x))\<^sup>2 + (norm (snd x))\<^sup>2)"
   278 
   278 
   396   by (auto simp: has_vector_derivative_def intro!: derivative_eq_intros)
   396   by (auto simp: has_vector_derivative_def intro!: derivative_eq_intros)
   397 
   397 
   398 
   398 
   399 subsection \<open>Product is an inner product space\<close>
   399 subsection \<open>Product is an inner product space\<close>
   400 
   400 
   401 instantiation%important prod :: (real_inner, real_inner) real_inner
   401 instantiation prod :: (real_inner, real_inner) real_inner
   402 begin
   402 begin
   403 
   403 
   404 definition inner_prod_def:
   404 definition inner_prod_def:
   405   "inner x y = inner (fst x) (fst y) + inner (snd x) (snd y)"
   405   "inner x y = inner (fst x) (fst y) + inner (snd x) (snd y)"
   406 
   406