Check if a
(bool-format-wfp bool-format uchar-format) → yes/no
The index of the value bit must be within
the range of indices of the bits that form the
Function:
(defun bool-format-wfp (bool-format uchar-format) (declare (xargs :guard (and (bool-formatp bool-format) (uchar-formatp uchar-format)))) (< (bool-format->value-index bool-format) (* (bool-format->byte-size bool-format) (uchar-format->size uchar-format))))
Theorem:
(defthm booleanp-of-bool-format-wfp (b* ((yes/no (bool-format-wfp bool-format uchar-format))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm bool-format-wfp-of-bool-format-fix-bool-format (equal (bool-format-wfp (bool-format-fix bool-format) uchar-format) (bool-format-wfp bool-format uchar-format)))
Theorem:
(defthm bool-format-wfp-bool-format-equiv-congruence-on-bool-format (implies (bool-format-equiv bool-format bool-format-equiv) (equal (bool-format-wfp bool-format uchar-format) (bool-format-wfp bool-format-equiv uchar-format))) :rule-classes :congruence)
Theorem:
(defthm bool-format-wfp-of-uchar-format-fix-uchar-format (equal (bool-format-wfp bool-format (uchar-format-fix uchar-format)) (bool-format-wfp bool-format uchar-format)))
Theorem:
(defthm bool-format-wfp-uchar-format-equiv-congruence-on-uchar-format (implies (uchar-format-equiv uchar-format uchar-format-equiv) (equal (bool-format-wfp bool-format uchar-format) (bool-format-wfp bool-format uchar-format-equiv))) :rule-classes :congruence)