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