Fixing function for chase-position structures.
(chase-position-fix x) → new-x
Function:
(defun chase-position-fix$inline (x) (declare (xargs :guard (chase-position-p x))) (let ((__function__ 'chase-position-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((path (path-fix (cdr (std::da-nth 0 x)))) (phase (ifix (cdr (std::da-nth 1 x)))) (rsh (nfix (cdr (std::da-nth 2 x)))) (mask (4vmask-fix (cdr (std::da-nth 3 x))))) (list (cons 'path path) (cons 'phase phase) (cons 'rsh rsh) (cons 'mask mask))) :exec x)))
Theorem:
(defthm chase-position-p-of-chase-position-fix (b* ((new-x (chase-position-fix$inline x))) (chase-position-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm chase-position-fix-when-chase-position-p (implies (chase-position-p x) (equal (chase-position-fix x) x)))
Function:
(defun chase-position-equiv$inline (x y) (declare (xargs :guard (and (chase-position-p x) (chase-position-p y)))) (equal (chase-position-fix x) (chase-position-fix y)))
Theorem:
(defthm chase-position-equiv-is-an-equivalence (and (booleanp (chase-position-equiv x y)) (chase-position-equiv x x) (implies (chase-position-equiv x y) (chase-position-equiv y x)) (implies (and (chase-position-equiv x y) (chase-position-equiv y z)) (chase-position-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm chase-position-equiv-implies-equal-chase-position-fix-1 (implies (chase-position-equiv x x-equiv) (equal (chase-position-fix x) (chase-position-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm chase-position-fix-under-chase-position-equiv (chase-position-equiv (chase-position-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-chase-position-fix-1-forward-to-chase-position-equiv (implies (equal (chase-position-fix x) y) (chase-position-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-chase-position-fix-2-forward-to-chase-position-equiv (implies (equal x (chase-position-fix y)) (chase-position-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm chase-position-equiv-of-chase-position-fix-1-forward (implies (chase-position-equiv (chase-position-fix x) y) (chase-position-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm chase-position-equiv-of-chase-position-fix-2-forward (implies (chase-position-equiv x (chase-position-fix y)) (chase-position-equiv x y)) :rule-classes :forward-chaining)