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