Check if a value is a rational.
The name of this function is analogous to
the notation
Function:
(defun value-case-rational (x) (declare (xargs :guard (valuep x))) (let ((__function__ 'value-case-rational)) (declare (ignorable __function__)) (and (value-case x :number) (rationalp (value-number->get x)))))
Theorem:
(defthm booleanp-of-value-case-rational (b* ((yes/no (value-case-rational x))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm value-case-rational-of-value-fix-x (equal (value-case-rational (value-fix x)) (value-case-rational x)))
Theorem:
(defthm value-case-rational-value-equiv-congruence-on-x (implies (value-equiv x x-equiv) (equal (value-case-rational x) (value-case-rational x-equiv))) :rule-classes :congruence)