Fixing function for constraint-tuple structures.
(constraint-tuple-fix x) → new-x
Function:
(defun constraint-tuple-fix$inline (x) (declare (xargs :guard (constraint-tuple-p x))) (let ((__function__ 'constraint-tuple-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((rule (constraint-rule-fix (car (car x)))) (existing-lits (pseudo-var-set-fix (car (cdr (car x))))) (matching-lit (pseudo-var-fix (cdr (cdr (car x))))) (common-vars (pseudo-var-set-fix (car (cdr x)))) (existing-vars (pseudo-var-set-fix (car (cdr (cdr x))))) (sig-table (sig-table-fix (cdr (cdr (cdr x)))))) (cons (cons rule (cons existing-lits matching-lit)) (cons common-vars (cons existing-vars sig-table)))) :exec x)))
Theorem:
(defthm constraint-tuple-p-of-constraint-tuple-fix (b* ((new-x (constraint-tuple-fix$inline x))) (constraint-tuple-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm constraint-tuple-fix-when-constraint-tuple-p (implies (constraint-tuple-p x) (equal (constraint-tuple-fix x) x)))
Function:
(defun constraint-tuple-equiv$inline (x y) (declare (xargs :guard (and (constraint-tuple-p x) (constraint-tuple-p y)))) (equal (constraint-tuple-fix x) (constraint-tuple-fix y)))
Theorem:
(defthm constraint-tuple-equiv-is-an-equivalence (and (booleanp (constraint-tuple-equiv x y)) (constraint-tuple-equiv x x) (implies (constraint-tuple-equiv x y) (constraint-tuple-equiv y x)) (implies (and (constraint-tuple-equiv x y) (constraint-tuple-equiv y z)) (constraint-tuple-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm constraint-tuple-equiv-implies-equal-constraint-tuple-fix-1 (implies (constraint-tuple-equiv x x-equiv) (equal (constraint-tuple-fix x) (constraint-tuple-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm constraint-tuple-fix-under-constraint-tuple-equiv (constraint-tuple-equiv (constraint-tuple-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-constraint-tuple-fix-1-forward-to-constraint-tuple-equiv (implies (equal (constraint-tuple-fix x) y) (constraint-tuple-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-constraint-tuple-fix-2-forward-to-constraint-tuple-equiv (implies (equal x (constraint-tuple-fix y)) (constraint-tuple-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm constraint-tuple-equiv-of-constraint-tuple-fix-1-forward (implies (constraint-tuple-equiv (constraint-tuple-fix x) y) (constraint-tuple-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm constraint-tuple-equiv-of-constraint-tuple-fix-2-forward (implies (constraint-tuple-equiv x (constraint-tuple-fix y)) (constraint-tuple-equiv x y)) :rule-classes :forward-chaining)