(mod-p x) → *
Function:
(defun mod-p (x) (declare (xargs :guard t)) (let ((__function__ 'mod-p)) (declare (ignorable __function__)) (or (not x) (eq x :mem) (2bits-p x))))
Function:
(defun mod-fix (x) (declare (xargs :guard (mod-p x))) (let ((__function__ 'mod-fix)) (declare (ignorable __function__)) (mbe :logic (if (mod-p x) x 'nil) :exec x)))
Function:
(defun mod-equiv$inline (x y) (declare (xargs :guard (and (mod-p x) (mod-p y)))) (equal (mod-fix x) (mod-fix y)))
Theorem:
(defthm mod-equiv-is-an-equivalence (and (booleanp (mod-equiv x y)) (mod-equiv x x) (implies (mod-equiv x y) (mod-equiv y x)) (implies (and (mod-equiv x y) (mod-equiv y z)) (mod-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm mod-equiv-implies-equal-mod-fix-1 (implies (mod-equiv x x-equiv) (equal (mod-fix x) (mod-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm mod-fix-under-mod-equiv (mod-equiv (mod-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))