Reduce modularly ACL2 integers to values of type
Function:
(defun uint-from-integer-mod (x) (declare (xargs :guard (integerp x))) (let ((__function__ 'uint-from-integer-mod)) (declare (ignorable __function__)) (uint-from-integer (mod (ifix x) (1+ (uint-max))))))
Theorem:
(defthm uintp-of-uint-from-integer-mod (b* ((result (uint-from-integer-mod x))) (uintp result)) :rule-classes :rewrite)
Theorem:
(defthm uint-from-integer-mod-of-ifix-x (equal (uint-from-integer-mod (ifix x)) (uint-from-integer-mod x)))
Theorem:
(defthm uint-from-integer-mod-int-equiv-congruence-on-x (implies (acl2::int-equiv x x-equiv) (equal (uint-from-integer-mod x) (uint-from-integer-mod x-equiv))) :rule-classes :congruence)