Apply
We perform the usual arithmetic conversions and then we apply the operation on the integers. In our current formalization, integers are the only real values. This ACL2 function will be extended with more cases if/when we extend our model with non-integer real values.
Function:
(defun gt-real-values (val1 val2) (declare (xargs :guard (and (valuep val1) (valuep val2)))) (declare (xargs :guard (and (value-realp val1) (value-realp val2)))) (let ((__function__ 'gt-real-values)) (declare (ignorable __function__)) (b* (((mv val1 val2) (uaconvert-values val1 val2))) (gt-integer-values val1 val2))))
Theorem:
(defthm valuep-of-gt-real-values (b* ((resval (gt-real-values val1 val2))) (valuep resval)) :rule-classes :rewrite)
Theorem:
(defthm gt-real-values-of-value-fix-val1 (equal (gt-real-values (value-fix val1) val2) (gt-real-values val1 val2)))
Theorem:
(defthm gt-real-values-value-equiv-congruence-on-val1 (implies (value-equiv val1 val1-equiv) (equal (gt-real-values val1 val2) (gt-real-values val1-equiv val2))) :rule-classes :congruence)
Theorem:
(defthm gt-real-values-of-value-fix-val2 (equal (gt-real-values val1 (value-fix val2)) (gt-real-values val1 val2)))
Theorem:
(defthm gt-real-values-value-equiv-congruence-on-val2 (implies (value-equiv val2 val2-equiv) (equal (gt-real-values val1 val2) (gt-real-values val1 val2-equiv))) :rule-classes :congruence)