Introduce some theorems about a defbyte instance and functions in the IHS library.
Since unsigned-byte-p and signed-byte-p have certain formal relations with functions in the IHS library, similar relations can be proved for instances of defbyte.
This macro automates this process, by including the IHS basic definitions and by generating theorems.
The reason for not having defbyte itself generate these theorems is to avoid always including IHS when using defbyte. Having a separate macro promotes greater modularity.
(defbyte-ihs-theorems type)
A symbol that names a fixtype previously introduced via defbyte. This specifies the defbyte instance for which the theorems are generated.
One of the following:
One of the following:
- If the defbyte instance is unsigned, a rewrite rule saying that
(loghead size x) , wheresize is the byte size, simplifies tox , whenx satisfies the recognizer of the bytes.- If the defbyte instance is signed, a rewrite rule saying that
(logext size x) , wheresize is the byte size, simplifies tox , whenx satisfies the recognizer of the bytes.
One of the following:
- If the defbyte instance is unsigned, a rewrite rule saying that
(logtail size x) , wheresize is the byte size, simplifies to0 , whenx satisfies the recognizer of the bytes.- If the defbyte instance is signed, a rewrite rule saying that
(logtail size x) , wheresize is the byte size, simplifies to-1 ifx is negative and to0 otherwise, whenx satisfies the recognizer of the bytes.