An 16-bit unsigned bitstruct type.
This is a bitstruct type introduced by fty::defbitstruct, represented as a unsigned 16-bit integer.
This is an atomic/empty structure; it has no fields.
Function:
(defun elf_bits16-p (x) (declare (xargs :guard t)) (let ((__function__ 'elf_bits16-p)) (declare (ignorable __function__)) (mbe :logic (unsigned-byte-p 16 x) :exec (and (natp x) (< x 65536)))))
Theorem:
(defthm elf_bits16-p-when-unsigned-byte-p (implies (unsigned-byte-p 16 x) (elf_bits16-p x)))
Theorem:
(defthm unsigned-byte-p-when-elf_bits16-p (implies (elf_bits16-p x) (unsigned-byte-p 16 x)))
Theorem:
(defthm elf_bits16-p-compound-recognizer (implies (elf_bits16-p x) (natp x)) :rule-classes :compound-recognizer)
Function:
(defun elf_bits16-fix (x) (declare (xargs :guard (elf_bits16-p x))) (let ((__function__ 'elf_bits16-fix)) (declare (ignorable __function__)) (mbe :logic (loghead 16 x) :exec x)))
Theorem:
(defthm elf_bits16-p-of-elf_bits16-fix (b* ((fty::fixed (elf_bits16-fix x))) (elf_bits16-p fty::fixed)) :rule-classes :rewrite)
Theorem:
(defthm elf_bits16-fix-when-elf_bits16-p (implies (elf_bits16-p x) (equal (elf_bits16-fix x) x)))
Function:
(defun elf_bits16-equiv$inline (x y) (declare (xargs :guard (and (elf_bits16-p x) (elf_bits16-p y)))) (equal (elf_bits16-fix x) (elf_bits16-fix y)))
Theorem:
(defthm elf_bits16-equiv-is-an-equivalence (and (booleanp (elf_bits16-equiv x y)) (elf_bits16-equiv x x) (implies (elf_bits16-equiv x y) (elf_bits16-equiv y x)) (implies (and (elf_bits16-equiv x y) (elf_bits16-equiv y z)) (elf_bits16-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm elf_bits16-equiv-implies-equal-elf_bits16-fix-1 (implies (elf_bits16-equiv x x-equiv) (equal (elf_bits16-fix x) (elf_bits16-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm elf_bits16-fix-under-elf_bits16-equiv (elf_bits16-equiv (elf_bits16-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))