src/HOL/Int.thy
changeset 61531 ab2e862263e7
parent 61524 f2e51e704a96
child 61552 980dd46a03fb
equal deleted inserted replaced
61524:f2e51e704a96 61531:ab2e862263e7
   222 lemma of_int_diff [simp]: "of_int (w - z) = of_int w - of_int z"
   222 lemma of_int_diff [simp]: "of_int (w - z) = of_int w - of_int z"
   223   using of_int_add [of w "- z"] by simp
   223   using of_int_add [of w "- z"] by simp
   224 
   224 
   225 lemma of_int_mult [simp]: "of_int (w*z) = of_int w * of_int z"
   225 lemma of_int_mult [simp]: "of_int (w*z) = of_int w * of_int z"
   226   by (transfer fixing: times) (clarsimp simp add: algebra_simps of_nat_mult)
   226   by (transfer fixing: times) (clarsimp simp add: algebra_simps of_nat_mult)
       
   227 
       
   228 lemma mult_of_int_commute: "of_int x * y = y * of_int x"
       
   229   by (transfer fixing: times) (auto simp: algebra_simps mult_of_nat_commute)
   227 
   230 
   228 text\<open>Collapse nested embeddings\<close>
   231 text\<open>Collapse nested embeddings\<close>
   229 lemma of_int_of_nat_eq [simp]: "of_int (int n) = of_nat n"
   232 lemma of_int_of_nat_eq [simp]: "of_int (int n) = of_nat n"
   230 by (induct n) auto
   233 by (induct n) auto
   231 
   234