src/HOL/Library/Inner_Product.thy
changeset 31446 2d91b2416de8
parent 31417 c12b25b7f015
child 31492 5400beeddb55
     1.1 --- a/src/HOL/Library/Inner_Product.thy	Thu Jun 04 14:32:00 2009 -0700
     1.2 +++ b/src/HOL/Library/Inner_Product.thy	Thu Jun 04 16:11:36 2009 -0700
     1.3 @@ -10,6 +10,14 @@
     1.4  
     1.5  subsection {* Real inner product spaces *}
     1.6  
     1.7 +text {* Temporarily relax constraints for @{term dist} and @{term norm}. *}
     1.8 +
     1.9 +setup {* Sign.add_const_constraint
    1.10 +  (@{const_name dist}, SOME @{typ "'a::dist \<Rightarrow> 'a \<Rightarrow> real"}) *}
    1.11 +
    1.12 +setup {* Sign.add_const_constraint
    1.13 +  (@{const_name norm}, SOME @{typ "'a::norm \<Rightarrow> real"}) *}
    1.14 +
    1.15  class real_inner = real_vector + sgn_div_norm + dist_norm + topo_dist +
    1.16    fixes inner :: "'a \<Rightarrow> 'a \<Rightarrow> real"
    1.17    assumes inner_commute: "inner x y = inner y x"
    1.18 @@ -116,6 +124,14 @@
    1.19  
    1.20  end
    1.21  
    1.22 +text {* Re-enable constraints for @{term dist} and @{term norm}. *}
    1.23 +
    1.24 +setup {* Sign.add_const_constraint
    1.25 +  (@{const_name dist}, SOME @{typ "'a::metric_space \<Rightarrow> 'a \<Rightarrow> real"}) *}
    1.26 +
    1.27 +setup {* Sign.add_const_constraint
    1.28 +  (@{const_name norm}, SOME @{typ "'a::real_normed_vector \<Rightarrow> real"}) *}
    1.29 +
    1.30  interpretation inner:
    1.31    bounded_bilinear "inner::'a::real_inner \<Rightarrow> 'a \<Rightarrow> real"
    1.32  proof