Fixing function for svex/index structures.
(svex/index-fix x) → new-x
Function:
(defun svex/index-fix$inline (x) (declare (xargs :guard (svex/index-p x))) (let ((__function__ 'svex/index-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((expr (svex-fix (std::prod-car x))) (idx (ifix (std::prod-cdr x)))) (std::prod-hons expr idx)) :exec x)))
Theorem:
(defthm svex/index-p-of-svex/index-fix (b* ((new-x (svex/index-fix$inline x))) (svex/index-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm svex/index-fix-when-svex/index-p (implies (svex/index-p x) (equal (svex/index-fix x) x)))
Function:
(defun svex/index-equiv$inline (x y) (declare (xargs :guard (and (svex/index-p x) (svex/index-p y)))) (equal (svex/index-fix x) (svex/index-fix y)))
Theorem:
(defthm svex/index-equiv-is-an-equivalence (and (booleanp (svex/index-equiv x y)) (svex/index-equiv x x) (implies (svex/index-equiv x y) (svex/index-equiv y x)) (implies (and (svex/index-equiv x y) (svex/index-equiv y z)) (svex/index-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm svex/index-equiv-implies-equal-svex/index-fix-1 (implies (svex/index-equiv x x-equiv) (equal (svex/index-fix x) (svex/index-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm svex/index-fix-under-svex/index-equiv (svex/index-equiv (svex/index-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-svex/index-fix-1-forward-to-svex/index-equiv (implies (equal (svex/index-fix x) y) (svex/index-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-svex/index-fix-2-forward-to-svex/index-equiv (implies (equal x (svex/index-fix y)) (svex/index-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm svex/index-equiv-of-svex/index-fix-1-forward (implies (svex/index-equiv (svex/index-fix x) y) (svex/index-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm svex/index-equiv-of-svex/index-fix-2-forward (implies (svex/index-equiv x (svex/index-fix y)) (svex/index-equiv x y)) :rule-classes :forward-chaining)