Apply
(eq-values val1 val2) → resval
For now we only support arithmetic types.
Function:
(defun eq-values (val1 val2) (declare (xargs :guard (and (valuep val1) (valuep val2)))) (let ((__function__ 'eq-values)) (declare (ignorable __function__)) (if (and (value-arithmeticp val1) (value-arithmeticp val2)) (eq-arithmetic-values val1 val2) (error (list :eq-mistype :required :arithmetic :arithmetic :supplied (value-fix val1) (value-fix val2))))))
Theorem:
(defthm value-resultp-of-eq-values (b* ((resval (eq-values val1 val2))) (value-resultp resval)) :rule-classes :rewrite)
Theorem:
(defthm eq-values-of-value-fix-val1 (equal (eq-values (value-fix val1) val2) (eq-values val1 val2)))
Theorem:
(defthm eq-values-value-equiv-congruence-on-val1 (implies (value-equiv val1 val1-equiv) (equal (eq-values val1 val2) (eq-values val1-equiv val2))) :rule-classes :congruence)
Theorem:
(defthm eq-values-of-value-fix-val2 (equal (eq-values val1 (value-fix val2)) (eq-values val1 val2)))
Theorem:
(defthm eq-values-value-equiv-congruence-on-val2 (implies (value-equiv val2 val2-equiv) (equal (eq-values val1 val2) (eq-values val1 val2-equiv))) :rule-classes :congruence)