equal
deleted
inserted
replaced
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)" |