Fixing function for omaps.
This is similar to sfix for osets.
Function:
(defun mfix (x) (declare (xargs :guard (mapp x))) (let ((__function__ 'mfix)) (declare (ignorable __function__)) (mbe :logic (if (mapp x) x nil) :exec x)))
Theorem:
(defthm mapp-of-mfix (b* ((fixed-x (mfix x))) (mapp fixed-x)) :rule-classes :rewrite)
Theorem:
(defthm mfix-when-mapp (implies (mapp x) (equal (mfix x) x)))
Theorem:
(defthm mfix-implies-mapp (implies (mfix x) (mapp x)))