4200 by (rule word_eqI) (auto simp add: word_ops_nth_size word_size) |
4200 by (rule word_eqI) (auto simp add: word_ops_nth_size word_size) |
4201 |
4201 |
4202 lemma word_or_not [simp]: "x OR NOT x = max_word" |
4202 lemma word_or_not [simp]: "x OR NOT x = max_word" |
4203 by (rule word_eqI) (auto simp add: word_ops_nth_size word_size) |
4203 by (rule word_eqI) (auto simp add: word_ops_nth_size word_size) |
4204 |
4204 |
4205 lemma word_boolean: "boolean (AND) (OR) bitNOT 0 max_word" |
4205 lemma word_boolean_algebra: "boolean_algebra (AND) (OR) bitNOT 0 max_word" |
4206 apply (rule boolean.intro) |
4206 apply (rule boolean_algebra.intro) |
4207 apply (rule word_bw_assocs) |
4207 apply (rule word_bw_assocs) |
4208 apply (rule word_bw_assocs) |
4208 apply (rule word_bw_assocs) |
4209 apply (rule word_bw_comms) |
4209 apply (rule word_bw_comms) |
4210 apply (rule word_bw_comms) |
4210 apply (rule word_bw_comms) |
4211 apply (rule word_ao_dist2) |
4211 apply (rule word_ao_dist2) |
4214 apply (rule word_log_esimps) |
4214 apply (rule word_log_esimps) |
4215 apply (rule word_and_not) |
4215 apply (rule word_and_not) |
4216 apply (rule word_or_not) |
4216 apply (rule word_or_not) |
4217 done |
4217 done |
4218 |
4218 |
4219 interpretation word_bool_alg: boolean "(AND)" "(OR)" bitNOT 0 max_word |
4219 interpretation word_bool_alg: boolean_algebra "(AND)" "(OR)" bitNOT 0 max_word |
4220 by (rule word_boolean) |
4220 by (rule word_boolean_algebra) |
4221 |
4221 |
4222 lemma word_xor_and_or: "x XOR y = x AND NOT y OR NOT x AND y" |
4222 lemma word_xor_and_or: "x XOR y = x AND NOT y OR NOT x AND y" |
4223 for x y :: "'a::len0 word" |
4223 for x y :: "'a::len0 word" |
4224 by (rule word_eqI) (auto simp add: word_ops_nth_size word_size) |
4224 by (rule word_eqI) (auto simp add: word_ops_nth_size word_size) |
4225 |
4225 |
4226 interpretation word_bool_alg: boolean_xor "(AND)" "(OR)" bitNOT 0 max_word "(XOR)" |
4226 interpretation word_bool_alg: boolean_algebra_xor "(AND)" "(OR)" bitNOT 0 max_word "(XOR)" |
4227 apply (rule boolean_xor.intro) |
4227 apply (rule boolean_algebra_xor.intro) |
4228 apply (rule word_boolean) |
4228 apply (rule word_boolean_algebra) |
4229 apply (rule boolean_xor_axioms.intro) |
4229 apply (rule boolean_algebra_xor_axioms.intro) |
4230 apply (rule word_xor_and_or) |
4230 apply (rule word_xor_and_or) |
4231 done |
4231 done |
4232 |
4232 |
4233 lemma shiftr_x_0 [iff]: "x >> 0 = x" |
4233 lemma shiftr_x_0 [iff]: "x >> 0 = x" |
4234 for x :: "'a::len0 word" |
4234 for x :: "'a::len0 word" |