Evaluation semantics of <.
Function:
(defun eval-< (x y) (declare (xargs :guard (and (valuep x) (valuep y)))) (let ((__function__ 'eval-<)) (declare (ignorable __function__)) (lift-value (if (and (value-case-rational x) (value-case-rational y)) (< (value-rational->get x) (value-rational->get y)) (let ((x1 (if (value-case x :number) (value-number->get x) 0)) (y1 (if (value-case y :number) (value-number->get y) 0))) (or (< (realpart x1) (realpart y1)) (and (equal (realpart x1) (realpart y1)) (< (imagpart x1) (imagpart y1)))))))))
Theorem:
(defthm valuep-of-eval-< (b* ((result (eval-< x y))) (valuep result)) :rule-classes :rewrite)
Theorem:
(defthm eval-<-of-value-fix-x (equal (eval-< (value-fix x) y) (eval-< x y)))
Theorem:
(defthm eval-<-value-equiv-congruence-on-x (implies (value-equiv x x-equiv) (equal (eval-< x y) (eval-< x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm eval-<-of-value-fix-y (equal (eval-< x (value-fix y)) (eval-< x y)))
Theorem:
(defthm eval-<-value-equiv-congruence-on-y (implies (value-equiv y y-equiv) (equal (eval-< x y) (eval-< x y-equiv))) :rule-classes :congruence)