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