Maximum mathematical integer value of type
This depends on the implementation environment.
Function:
(defun sshort-max (ienv) (declare (xargs :guard (ienvp ienv))) (let ((__function__ 'sshort-max)) (declare (ignorable __function__)) (1- (expt 2 (1- (* 8 (ienv->short-bytes ienv)))))))
Theorem:
(defthm natp-of-sshort-max (b* ((val (sshort-max ienv))) (natp val)) :rule-classes (:rewrite :type-prescription))
Theorem:
(defthm sshort-max-of-ienv-fix-ienv (equal (sshort-max (ienv-fix ienv)) (sshort-max ienv)))
Theorem:
(defthm sshort-max-ienv-equiv-congruence-on-ienv (implies (ienv-equiv ienv ienv-equiv) (equal (sshort-max ienv) (sshort-max ienv-equiv))) :rule-classes :congruence)