Apply unary
(plus-value val) → resval
It is an error if the value is not arithmetic.
Function:
(defun plus-value (val) (declare (xargs :guard (valuep val))) (let ((__function__ 'plus-value)) (declare (ignorable __function__)) (if (value-arithmeticp val) (plus-arithmetic-value val) (error (list :plus-mistype :required :arithmetic :supplied (value-fix val))))))
Theorem:
(defthm value-resultp-of-plus-value (b* ((resval (plus-value val))) (value-resultp resval)) :rule-classes :rewrite)
Theorem:
(defthm plus-value-of-value-fix-val (equal (plus-value (value-fix val)) (plus-value val)))
Theorem:
(defthm plus-value-value-equiv-congruence-on-val (implies (value-equiv val val-equiv) (equal (plus-value val) (plus-value val-equiv))) :rule-classes :congruence)