Bitwise inclusive disjunction of signed integer values.
Function:
(defun int-ior (left-operand right-operand) (declare (xargs :guard (and (intp left-operand) (intp right-operand)))) (b* ((size (int->size left-operand)) (x (int->value left-operand)) (y (int->value right-operand))) (make-int :size (int->size left-operand) :value (logext size (logior x y)))))
Theorem:
(defthm intp-of-int-ior (b* ((result (int-ior left-operand right-operand))) (intp result)) :rule-classes :rewrite)
Theorem:
(defthm int-ior-of-int-fix-left-operand (equal (int-ior (int-fix left-operand) right-operand) (int-ior left-operand right-operand)))
Theorem:
(defthm int-ior-int-equiv-congruence-on-left-operand (implies (int-equiv left-operand left-operand-equiv) (equal (int-ior left-operand right-operand) (int-ior left-operand-equiv right-operand))) :rule-classes :congruence)
Theorem:
(defthm int-ior-of-int-fix-right-operand (equal (int-ior left-operand (int-fix right-operand)) (int-ior left-operand right-operand)))
Theorem:
(defthm int-ior-int-equiv-congruence-on-right-operand (implies (int-equiv right-operand right-operand-equiv) (equal (int-ior left-operand right-operand) (int-ior left-operand right-operand-equiv))) :rule-classes :congruence)