Apply
(bitnot-value val) → resval
It is an error if the value is not integer. If it is integer, we promote it and then we flip its bits.
Function:
(defun bitnot-value (val) (declare (xargs :guard (valuep val))) (let ((__function__ 'bitnot-value)) (declare (ignorable __function__)) (if (value-integerp val) (bitnot-integer-value (promote-value val)) (error (list :bitnot-mistype :required :integer :supplied (value-fix val))))))
Theorem:
(defthm value-resultp-of-bitnot-value (b* ((resval (bitnot-value val))) (value-resultp resval)) :rule-classes :rewrite)
Theorem:
(defthm bitnot-value-of-value-fix-val (equal (bitnot-value (value-fix val)) (bitnot-value val)))
Theorem:
(defthm bitnot-value-value-equiv-congruence-on-val (implies (value-equiv val val-equiv) (equal (bitnot-value val) (bitnot-value val-equiv))) :rule-classes :congruence)