src/HOL/Library/Inner_Product.thy
changeset 49962 a8cc904a6820
parent 44902 9ba11d41cd1f
child 51002 496013a6eb38
equal deleted inserted replaced
49961:d3d2b78b1c19 49962:a8cc904a6820
   199 instance proof
   199 instance proof
   200   fix x y z r :: real
   200   fix x y z r :: real
   201   show "inner x y = inner y x"
   201   show "inner x y = inner y x"
   202     unfolding inner_real_def by (rule mult_commute)
   202     unfolding inner_real_def by (rule mult_commute)
   203   show "inner (x + y) z = inner x z + inner y z"
   203   show "inner (x + y) z = inner x z + inner y z"
   204     unfolding inner_real_def by (rule left_distrib)
   204     unfolding inner_real_def by (rule distrib_right)
   205   show "inner (scaleR r x) y = r * inner x y"
   205   show "inner (scaleR r x) y = r * inner x y"
   206     unfolding inner_real_def real_scaleR_def by (rule mult_assoc)
   206     unfolding inner_real_def real_scaleR_def by (rule mult_assoc)
   207   show "0 \<le> inner x x"
   207   show "0 \<le> inner x x"
   208     unfolding inner_real_def by simp
   208     unfolding inner_real_def by simp
   209   show "inner x x = 0 \<longleftrightarrow> x = 0"
   209   show "inner x x = 0 \<longleftrightarrow> x = 0"
   223 instance proof
   223 instance proof
   224   fix x y z :: complex and r :: real
   224   fix x y z :: complex and r :: real
   225   show "inner x y = inner y x"
   225   show "inner x y = inner y x"
   226     unfolding inner_complex_def by (simp add: mult_commute)
   226     unfolding inner_complex_def by (simp add: mult_commute)
   227   show "inner (x + y) z = inner x z + inner y z"
   227   show "inner (x + y) z = inner x z + inner y z"
   228     unfolding inner_complex_def by (simp add: left_distrib)
   228     unfolding inner_complex_def by (simp add: distrib_right)
   229   show "inner (scaleR r x) y = r * inner x y"
   229   show "inner (scaleR r x) y = r * inner x y"
   230     unfolding inner_complex_def by (simp add: right_distrib)
   230     unfolding inner_complex_def by (simp add: distrib_left)
   231   show "0 \<le> inner x x"
   231   show "0 \<le> inner x x"
   232     unfolding inner_complex_def by simp
   232     unfolding inner_complex_def by simp
   233   show "inner x x = 0 \<longleftrightarrow> x = 0"
   233   show "inner x x = 0 \<longleftrightarrow> x = 0"
   234     unfolding inner_complex_def
   234     unfolding inner_complex_def
   235     by (simp add: add_nonneg_eq_0_iff complex_Re_Im_cancel_iff)
   235     by (simp add: add_nonneg_eq_0_iff complex_Re_Im_cancel_iff)