Convert from type
Function:
(defun ushort-from-ulong (x) (declare (xargs :guard (ulongp x))) (let ((__function__ 'ushort-from-ulong)) (declare (ignorable __function__)) (ushort-from-integer-mod (integer-from-ulong x))))
Theorem:
(defthm ushortp-of-ushort-from-ulong (b* ((result (ushort-from-ulong x))) (ushortp result)) :rule-classes :rewrite)
Theorem:
(defthm ushort-from-ulong-of-ulong-fix-x (equal (ushort-from-ulong (ulong-fix x)) (ushort-from-ulong x)))
Theorem:
(defthm ushort-from-ulong-ulong-equiv-congruence-on-x (implies (ulong-equiv x x-equiv) (equal (ushort-from-ulong x) (ushort-from-ulong x-equiv))) :rule-classes :congruence)