Greater-than comparison of signed integer values.
Function:
(defun int-gt (left right) (declare (xargs :guard (and (intp left) (intp right)))) (declare (xargs :guard (= (int->size left) (int->size right)))) (b* ((x (int->value left)) (y (int->value right))) (bool (> x y))))
Theorem:
(defthm boolp-of-int-gt (b* ((result (int-gt left right))) (boolp result)) :rule-classes :rewrite)
Theorem:
(defthm int-gt-of-int-fix-left (equal (int-gt (int-fix left) right) (int-gt left right)))
Theorem:
(defthm int-gt-int-equiv-congruence-on-left (implies (int-equiv left left-equiv) (equal (int-gt left right) (int-gt left-equiv right))) :rule-classes :congruence)
Theorem:
(defthm int-gt-of-int-fix-right (equal (int-gt left (int-fix right)) (int-gt left right)))
Theorem:
(defthm int-gt-int-equiv-congruence-on-right (implies (int-equiv right right-equiv) (equal (int-gt left right) (int-gt left right-equiv))) :rule-classes :congruence)