WORD_SHIFT_ss : ssfrag
- SIMP_CONV (std_ss++WORD_SHIFT_ss) [] ``a << 2 << 3 + a >> 3 >> 2 + a >>> 1 >>> 2 + a #<< 1 #<< 2`` <<HOL message: inventing new type variable names: 'a>> > val it = |- a << 2 << 3 + a >> 3 >> 2 + a >>> 1 >>> 2 + a #<< 1 #<< 2 = a << 5 + a >> 5 + a >>> 3 + a #<< 3 : thm - SIMP_CONV (std_ss++WORD_SHIFT_ss) [] ``a >> 0 + 0w << n + a #<< 2 #>> 2`` <<HOL message: inventing new type variable names: 'a>> > val it = |- a >> 0 + 0w << n + a #<< 2 #>> 2 = a + 0w + a : thm
More simplification is possible when the word length is known.
- SIMP_CONV (std_ss++SIZES_ss++WORD_SHIFT_ss) [] ``a << 4 + (a #<< 6) : word4`` > val it = |- a << 4 = 0w + a #<< 2 : thm