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