src/HOL/Real_Vector_Spaces.thy
changeset 67135 1a94352812f4
parent 66793 deabce3ccf1f
child 67399 eab6ce8368fa
equal deleted inserted replaced
67134:66ce07e8dbf2 67135:1a94352812f4
   364   by (auto intro: injI)
   364   by (auto intro: injI)
   365 
   365 
   366 lemmas of_real_eq_0_iff [simp] = of_real_eq_iff [of _ 0, simplified]
   366 lemmas of_real_eq_0_iff [simp] = of_real_eq_iff [of _ 0, simplified]
   367 lemmas of_real_eq_1_iff [simp] = of_real_eq_iff [of _ 1, simplified]
   367 lemmas of_real_eq_1_iff [simp] = of_real_eq_iff [of _ 1, simplified]
   368 
   368 
       
   369 lemma minus_of_real_eq_of_real_iff [simp]: "-of_real x = of_real y \<longleftrightarrow> -x = y"
       
   370   using of_real_eq_iff[of "-x" y] by (simp only: of_real_minus)
       
   371 
       
   372 lemma of_real_eq_minus_of_real_iff [simp]: "of_real x = -of_real y \<longleftrightarrow> x = -y"
       
   373   using of_real_eq_iff[of x "-y"] by (simp only: of_real_minus)
       
   374 
   369 lemma of_real_eq_id [simp]: "of_real = (id :: real \<Rightarrow> real)"
   375 lemma of_real_eq_id [simp]: "of_real = (id :: real \<Rightarrow> real)"
   370   by (rule ext) (simp add: of_real_def)
   376   by (rule ext) (simp add: of_real_def)
   371 
   377 
   372 text \<open>Collapse nested embeddings.\<close>
   378 text \<open>Collapse nested embeddings.\<close>
   373 lemma of_real_of_nat_eq [simp]: "of_real (of_nat n) = of_nat n"
   379 lemma of_real_of_nat_eq [simp]: "of_real (of_nat n) = of_nat n"
   443   apply (rule range_eqI)
   449   apply (rule range_eqI)
   444   apply (rule of_real_add [symmetric])
   450   apply (rule of_real_add [symmetric])
   445   done
   451   done
   446 
   452 
   447 lemma Reals_minus [simp]: "a \<in> \<real> \<Longrightarrow> - a \<in> \<real>"
   453 lemma Reals_minus [simp]: "a \<in> \<real> \<Longrightarrow> - a \<in> \<real>"
   448   apply (auto simp add: Reals_def)
   454   by (auto simp add: Reals_def)
   449   apply (rule range_eqI)
       
   450   apply (rule of_real_minus [symmetric])
       
   451   done
       
   452 
   455 
   453 lemma Reals_diff [simp]: "a \<in> \<real> \<Longrightarrow> b \<in> \<real> \<Longrightarrow> a - b \<in> \<real>"
   456 lemma Reals_diff [simp]: "a \<in> \<real> \<Longrightarrow> b \<in> \<real> \<Longrightarrow> a - b \<in> \<real>"
   454   apply (auto simp add: Reals_def)
   457   apply (auto simp add: Reals_def)
   455   apply (rule range_eqI)
   458   apply (rule range_eqI)
   456   apply (rule of_real_diff [symmetric])
   459   apply (rule of_real_diff [symmetric])