Rankings of vl-arithclass-ps used in vl-arithclass-max.
(vl-arithclass-rank x) → rank
Function:
(defun vl-arithclass-rank$inline (x) (declare (xargs :guard (vl-arithclass-p x))) (let ((__function__ 'vl-arithclass-rank)) (declare (ignorable __function__)) (case (vl-arithclass-fix x) (:vl-signed-int-class 1) (:vl-unsigned-int-class 2) (:vl-shortreal-class 3) (:vl-real-class 4) (:vl-other-class 5) (:vl-error-class 6) (otherwise (nfix (impossible))))))
Theorem:
(defthm natp-of-vl-arithclass-rank (b* ((rank (vl-arithclass-rank$inline x))) (natp rank)) :rule-classes :type-prescription)
Theorem:
(defthm vl-arithclass-rank$inline-of-vl-arithclass-fix-x (equal (vl-arithclass-rank$inline (vl-arithclass-fix x)) (vl-arithclass-rank$inline x)))
Theorem:
(defthm vl-arithclass-rank$inline-vl-arithclass-equiv-congruence-on-x (implies (vl-arithclass-equiv x x-equiv) (equal (vl-arithclass-rank$inline x) (vl-arithclass-rank$inline x-equiv))) :rule-classes :congruence)