src/HOL/Real_Vector_Spaces.thy
changeset 54489 03ff4d1e6784
parent 54263 c4159fe6fa46
child 54703 499f92dc6e45
equal deleted inserted replaced
54488:b60f1fab408c 54489:03ff4d1e6784
   305 by (cases z rule: int_diff_cases, simp)
   305 by (cases z rule: int_diff_cases, simp)
   306 
   306 
   307 lemma of_real_numeral: "of_real (numeral w) = numeral w"
   307 lemma of_real_numeral: "of_real (numeral w) = numeral w"
   308 using of_real_of_int_eq [of "numeral w"] by simp
   308 using of_real_of_int_eq [of "numeral w"] by simp
   309 
   309 
   310 lemma of_real_neg_numeral: "of_real (neg_numeral w) = neg_numeral w"
   310 lemma of_real_neg_numeral: "of_real (- numeral w) = - numeral w"
   311 using of_real_of_int_eq [of "neg_numeral w"] by simp
   311 using of_real_of_int_eq [of "- numeral w"] by simp
   312 
   312 
   313 text{*Every real algebra has characteristic zero*}
   313 text{*Every real algebra has characteristic zero*}
   314 
   314 
   315 instance real_algebra_1 < ring_char_0
   315 instance real_algebra_1 < ring_char_0
   316 proof
   316 proof
   338 lemma Reals_of_nat [simp]: "of_nat n \<in> Reals"
   338 lemma Reals_of_nat [simp]: "of_nat n \<in> Reals"
   339 by (subst of_real_of_nat_eq [symmetric], rule Reals_of_real)
   339 by (subst of_real_of_nat_eq [symmetric], rule Reals_of_real)
   340 
   340 
   341 lemma Reals_numeral [simp]: "numeral w \<in> Reals"
   341 lemma Reals_numeral [simp]: "numeral w \<in> Reals"
   342 by (subst of_real_numeral [symmetric], rule Reals_of_real)
   342 by (subst of_real_numeral [symmetric], rule Reals_of_real)
   343 
       
   344 lemma Reals_neg_numeral [simp]: "neg_numeral w \<in> Reals"
       
   345 by (subst of_real_neg_numeral [symmetric], rule Reals_of_real)
       
   346 
   343 
   347 lemma Reals_0 [simp]: "0 \<in> Reals"
   344 lemma Reals_0 [simp]: "0 \<in> Reals"
   348 apply (unfold Reals_def)
   345 apply (unfold Reals_def)
   349 apply (rule range_eqI)
   346 apply (rule range_eqI)
   350 apply (rule of_real_0 [symmetric])
   347 apply (rule of_real_0 [symmetric])
   600 lemma norm_numeral [simp]:
   597 lemma norm_numeral [simp]:
   601   "norm (numeral w::'a::real_normed_algebra_1) = numeral w"
   598   "norm (numeral w::'a::real_normed_algebra_1) = numeral w"
   602 by (subst of_real_numeral [symmetric], subst norm_of_real, simp)
   599 by (subst of_real_numeral [symmetric], subst norm_of_real, simp)
   603 
   600 
   604 lemma norm_neg_numeral [simp]:
   601 lemma norm_neg_numeral [simp]:
   605   "norm (neg_numeral w::'a::real_normed_algebra_1) = numeral w"
   602   "norm (- numeral w::'a::real_normed_algebra_1) = numeral w"
   606 by (subst of_real_neg_numeral [symmetric], subst norm_of_real, simp)
   603 by (subst of_real_neg_numeral [symmetric], subst norm_of_real, simp)
   607 
   604 
   608 lemma norm_of_int [simp]:
   605 lemma norm_of_int [simp]:
   609   "norm (of_int z::'a::real_normed_algebra_1) = \<bar>of_int z\<bar>"
   606   "norm (of_int z::'a::real_normed_algebra_1) = \<bar>of_int z\<bar>"
   610 by (subst of_real_of_int_eq [symmetric], rule norm_of_real)
   607 by (subst of_real_of_int_eq [symmetric], rule norm_of_real)