From: Florian Märkl <isabelle-users@florianmaerkl.de>
Hello,
I noticed the Word Library has lemmas to give a list representation for both bit shifts (<<) and (>>) in Reversed_Bit_Lists.thy, which I made use of in my current project, e.g.:
lemma shiftr_bl: "x >> n ≡ of_bl (take (LENGTH('a) - n) (to_bl x))“
…
I also needed a similar equation for signed right shift (>>>), but could not find it, so I formalized it myself (see the attachment).
Should something like this be added to the library? Or did I maybe not search hard enough?
Florian Märkl
Sshiftr.thy
From: Gerwin Klein <kleing@unsw.edu.au>
Nice! Thanks for the contribution, I'll add it to Word_Lib in the afp.
Cheers,
Gerwin
Last updated: Jan 04 2025 at 20:18 UTC