src/HOL/Library/Numeral_Type.thy
changeset 46868 6c250adbe101
parent 46236 ae79f2978a67
child 47108 2a1953f0d20d
equal deleted inserted replaced
46867:0883804b67bb 46868:6c250adbe101
   133 apply (simp_all add: Rep_simps zmod_simps field_simps)
   133 apply (simp_all add: Rep_simps zmod_simps field_simps)
   134 done
   134 done
   135 
   135 
   136 end
   136 end
   137 
   137 
   138 locale mod_ring = mod_type +
   138 locale mod_ring = mod_type n Rep Abs
   139   constrains n :: int
   139   for n :: int
   140   and Rep :: "'a::{number_ring} \<Rightarrow> int"
   140   and Rep :: "'a::{number_ring} \<Rightarrow> int"
   141   and Abs :: "int \<Rightarrow> 'a::{number_ring}"
   141   and Abs :: "int \<Rightarrow> 'a::{number_ring}"
   142 begin
   142 begin
   143 
   143 
   144 lemma of_nat_eq: "of_nat k = Abs (int k mod n)"
   144 lemma of_nat_eq: "of_nat k = Abs (int k mod n)"