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