Fixing function for satlink-parser-state structures.
(satlink-parser-state-fix x) → new-x
Function:
(defun satlink-parser-state-fix$inline (x) (declare (xargs :guard (satlink-parser-state-p x))) (let ((__function__ 'satlink-parser-state-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((saw-unsat-p (acl2::bool-fix (std::prod-car (std::prod-car x)))) (saw-sat-p (acl2::bool-fix (std::prod-cdr (std::prod-car x)))) (saw-unknown-p (acl2::bool-fix (std::prod-car (std::prod-cdr x)))) (saw-zero-p (acl2::bool-fix (std::prod-cdr (std::prod-cdr x))))) (std::prod-cons (std::prod-cons saw-unsat-p saw-sat-p) (std::prod-cons saw-unknown-p saw-zero-p))) :exec x)))
Theorem:
(defthm satlink-parser-state-p-of-satlink-parser-state-fix (b* ((new-x (satlink-parser-state-fix$inline x))) (satlink-parser-state-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm satlink-parser-state-fix-when-satlink-parser-state-p (implies (satlink-parser-state-p x) (equal (satlink-parser-state-fix x) x)))
Function:
(defun satlink-parser-state-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (satlink-parser-state-p acl2::x) (satlink-parser-state-p acl2::y)))) (equal (satlink-parser-state-fix acl2::x) (satlink-parser-state-fix acl2::y)))
Theorem:
(defthm satlink-parser-state-equiv-is-an-equivalence (and (booleanp (satlink-parser-state-equiv x y)) (satlink-parser-state-equiv x x) (implies (satlink-parser-state-equiv x y) (satlink-parser-state-equiv y x)) (implies (and (satlink-parser-state-equiv x y) (satlink-parser-state-equiv y z)) (satlink-parser-state-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm satlink-parser-state-equiv-implies-equal-satlink-parser-state-fix-1 (implies (satlink-parser-state-equiv acl2::x x-equiv) (equal (satlink-parser-state-fix acl2::x) (satlink-parser-state-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm satlink-parser-state-fix-under-satlink-parser-state-equiv (satlink-parser-state-equiv (satlink-parser-state-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-satlink-parser-state-fix-1-forward-to-satlink-parser-state-equiv (implies (equal (satlink-parser-state-fix acl2::x) acl2::y) (satlink-parser-state-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-satlink-parser-state-fix-2-forward-to-satlink-parser-state-equiv (implies (equal acl2::x (satlink-parser-state-fix acl2::y)) (satlink-parser-state-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm satlink-parser-state-equiv-of-satlink-parser-state-fix-1-forward (implies (satlink-parser-state-equiv (satlink-parser-state-fix acl2::x) acl2::y) (satlink-parser-state-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm satlink-parser-state-equiv-of-satlink-parser-state-fix-2-forward (implies (satlink-parser-state-equiv acl2::x (satlink-parser-state-fix acl2::y)) (satlink-parser-state-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)