# HG changeset patch # User huffman # Date 1158197117 -7200 # Node ID 49442b3024bb012c1b59efd052a3e01e985e7b7f # Parent 64181717e37ce1c0e7b4f97e0cf198a128f49345 remove conflicting norm syntax diff -r 64181717e37c -r 49442b3024bb src/HOL/Real/RealVector.thy --- a/src/HOL/Real/RealVector.thy Thu Sep 14 00:23:02 2006 +0200 +++ b/src/HOL/Real/RealVector.thy Thu Sep 14 03:25:17 2006 +0200 @@ -88,54 +88,56 @@ subsection {* Real normed vector spaces *} axclass norm < type -consts norm :: "'a::norm \ real" ("\_\") +consts norm :: "'a::norm \ real" axclass real_normed_vector < real_vector, norm - norm_ge_zero [simp]: "0 \ \x\" - norm_eq_zero [simp]: "(\x\ = 0) = (x = 0)" - norm_triangle_ineq: "\x + y\ \ \x\ + \y\" - norm_scaleR: "\a *# x\ = \a\ * \x\" + norm_ge_zero [simp]: "0 \ norm x" + norm_eq_zero [simp]: "(norm x = 0) = (x = 0)" + norm_triangle_ineq: "norm (x + y) \ norm x + norm y" + norm_scaleR: "norm (a *# x) = \a\ * norm x" axclass real_normed_algebra < real_normed_vector, real_algebra - norm_mult_ineq: "\x * y\ \ \x\ * \y\" + norm_mult_ineq: "norm (x * y) \ norm x * norm y" axclass real_normed_div_algebra < real_normed_vector, real_algebra, division_ring - norm_mult: "\x * y\ = \x\ * \y\" - norm_one [simp]: "\1\ = 1" + norm_mult: "norm (x * y) = norm x * norm y" + norm_one [simp]: "norm 1 = 1" instance real_normed_div_algebra < real_normed_algebra by (intro_classes, simp add: norm_mult) -lemma norm_zero [simp]: "\0::'a::real_normed_vector\ = 0" +lemma norm_zero [simp]: "norm (0::'a::real_normed_vector) = 0" by simp lemma zero_less_norm_iff [simp]: - fixes x :: "'a::real_normed_vector" shows "(0 < \x\) = (x \ 0)" + fixes x :: "'a::real_normed_vector" shows "(0 < norm x) = (x \ 0)" by (simp add: order_less_le) lemma norm_minus_cancel [simp]: - fixes x :: "'a::real_normed_vector" shows "\- x\ = \x\" + fixes x :: "'a::real_normed_vector" shows "norm (- x) = norm x" proof - - have "\- x\ = \- 1 *# x\" + have "norm (- x) = norm (- 1 *# x)" by (simp only: scaleR_minus_left scaleR_one) - also have "\ = \- 1\ * \x\" + also have "\ = \- 1\ * norm x" by (rule norm_scaleR) finally show ?thesis by simp qed lemma norm_minus_commute: - fixes a b :: "'a::real_normed_vector" shows "\a - b\ = \b - a\" + fixes a b :: "'a::real_normed_vector" shows "norm (a - b) = norm (b - a)" proof - - have "\a - b\ = \-(a - b)\" by (simp only: norm_minus_cancel) - also have "\ = \b - a\" by simp + have "norm (a - b) = norm (- (a - b))" + by (simp only: norm_minus_cancel) + also have "\ = norm (b - a)" by simp finally show ?thesis . qed lemma norm_triangle_ineq2: - fixes a :: "'a::real_normed_vector" shows "\a\ - \b\ \ \a - b\" + fixes a :: "'a::real_normed_vector" + shows "norm a - norm b \ norm (a - b)" proof - - have "\a - b + b\ \ \a - b\ + \b\" + have "norm (a - b + b) \ norm (a - b) + norm b" by (rule norm_triangle_ineq) also have "(a - b + b) = a" by simp @@ -144,11 +146,12 @@ qed lemma norm_triangle_ineq4: - fixes a :: "'a::real_normed_vector" shows "\a - b\ \ \a\ + \b\" + fixes a :: "'a::real_normed_vector" + shows "norm (a - b) \ norm a + norm b" proof - - have "\a - b\ = \a + - b\" + have "norm (a - b) = norm (a + - b)" by (simp only: diff_minus) - also have "\ \ \a\ + \- b\" + also have "\ \ norm a + norm (- b)" by (rule norm_triangle_ineq) finally show ?thesis by simp @@ -156,14 +159,14 @@ lemma nonzero_norm_inverse: fixes a :: "'a::real_normed_div_algebra" - shows "a \ 0 \ \inverse a\ = inverse \a\" + shows "a \ 0 \ norm (inverse a) = inverse (norm a)" apply (rule inverse_unique [symmetric]) apply (simp add: norm_mult [symmetric]) done lemma norm_inverse: fixes a :: "'a::{real_normed_div_algebra,division_by_zero}" - shows "\inverse a\ = inverse \a\" + shows "norm (inverse a) = inverse (norm a)" apply (case_tac "a = 0", simp) apply (erule nonzero_norm_inverse) done @@ -189,7 +192,7 @@ instance real :: norm .. defs (overloaded) - real_norm_def: "\r\ \ \r\" + real_norm_def: "norm r \ \r\" instance real :: real_normed_div_algebra apply (intro_classes, unfold real_norm_def real_scaleR_def)