2103 "NOT number_of a = (number_of (NOT a) :: 'a::len0 word)" |
2103 "NOT number_of a = (number_of (NOT a) :: 'a::len0 word)" |
2104 "number_of a AND number_of b = (number_of (a AND b) :: 'a word)" |
2104 "number_of a AND number_of b = (number_of (a AND b) :: 'a word)" |
2105 "number_of a OR number_of b = (number_of (a OR b) :: 'a word)" |
2105 "number_of a OR number_of b = (number_of (a OR b) :: 'a word)" |
2106 "number_of a XOR number_of b = (number_of (a XOR b) :: 'a word)" |
2106 "number_of a XOR number_of b = (number_of (a XOR b) :: 'a word)" |
2107 unfolding word_no_wi word_wi_log_defs by simp_all |
2107 unfolding word_no_wi word_wi_log_defs by simp_all |
|
2108 |
|
2109 text {* Special cases for when one of the arguments equals 1. *} |
|
2110 |
|
2111 lemma word_bitwise_1_simps [simp]: |
|
2112 "NOT (1::'a::len0 word) = -2" |
|
2113 "(1::'a word) AND number_of b = number_of (Int.Bit1 Int.Pls AND b)" |
|
2114 "number_of a AND (1::'a word) = number_of (a AND Int.Bit1 Int.Pls)" |
|
2115 "(1::'a word) OR number_of b = number_of (Int.Bit1 Int.Pls OR b)" |
|
2116 "number_of a OR (1::'a word) = number_of (a OR Int.Bit1 Int.Pls)" |
|
2117 "(1::'a word) XOR number_of b = number_of (Int.Bit1 Int.Pls XOR b)" |
|
2118 "number_of a XOR (1::'a word) = number_of (a XOR Int.Bit1 Int.Pls)" |
|
2119 unfolding word_1_no word_no_log_defs by simp_all |
2108 |
2120 |
2109 lemma uint_or: "uint (x OR y) = (uint x) OR (uint y)" |
2121 lemma uint_or: "uint (x OR y) = (uint x) OR (uint y)" |
2110 by (simp add: word_or_def word_wi_log_defs word_ubin.eq_norm |
2122 by (simp add: word_or_def word_wi_log_defs word_ubin.eq_norm |
2111 bin_trunc_ao(2) [symmetric]) |
2123 bin_trunc_ao(2) [symmetric]) |
2112 |
2124 |