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