(constraint-tuplelist-fix x) is a usual ACL2::fty list fixing function.
(constraint-tuplelist-fix x) → fty::newx
In the logic, we apply constraint-tuple-fix to each member of the x. In the execution, none of that is actually necessary and this is just an inlined identity function.
Function:
(defun constraint-tuplelist-fix$inline (x) (declare (xargs :guard (constraint-tuplelist-p x))) (let ((__function__ 'constraint-tuplelist-fix)) (declare (ignorable __function__)) (mbe :logic (if (atom x) nil (cons (constraint-tuple-fix (car x)) (constraint-tuplelist-fix (cdr x)))) :exec x)))
Theorem:
(defthm constraint-tuplelist-p-of-constraint-tuplelist-fix (b* ((fty::newx (constraint-tuplelist-fix$inline x))) (constraint-tuplelist-p fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm constraint-tuplelist-fix-when-constraint-tuplelist-p (implies (constraint-tuplelist-p x) (equal (constraint-tuplelist-fix x) x)))
Function:
(defun constraint-tuplelist-equiv$inline (x y) (declare (xargs :guard (and (constraint-tuplelist-p x) (constraint-tuplelist-p y)))) (equal (constraint-tuplelist-fix x) (constraint-tuplelist-fix y)))
Theorem:
(defthm constraint-tuplelist-equiv-is-an-equivalence (and (booleanp (constraint-tuplelist-equiv x y)) (constraint-tuplelist-equiv x x) (implies (constraint-tuplelist-equiv x y) (constraint-tuplelist-equiv y x)) (implies (and (constraint-tuplelist-equiv x y) (constraint-tuplelist-equiv y z)) (constraint-tuplelist-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm constraint-tuplelist-equiv-implies-equal-constraint-tuplelist-fix-1 (implies (constraint-tuplelist-equiv x x-equiv) (equal (constraint-tuplelist-fix x) (constraint-tuplelist-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm constraint-tuplelist-fix-under-constraint-tuplelist-equiv (constraint-tuplelist-equiv (constraint-tuplelist-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-constraint-tuplelist-fix-1-forward-to-constraint-tuplelist-equiv (implies (equal (constraint-tuplelist-fix x) y) (constraint-tuplelist-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-constraint-tuplelist-fix-2-forward-to-constraint-tuplelist-equiv (implies (equal x (constraint-tuplelist-fix y)) (constraint-tuplelist-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm constraint-tuplelist-equiv-of-constraint-tuplelist-fix-1-forward (implies (constraint-tuplelist-equiv (constraint-tuplelist-fix x) y) (constraint-tuplelist-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm constraint-tuplelist-equiv-of-constraint-tuplelist-fix-2-forward (implies (constraint-tuplelist-equiv x (constraint-tuplelist-fix y)) (constraint-tuplelist-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm car-of-constraint-tuplelist-fix-x-under-constraint-tuple-equiv (constraint-tuple-equiv (car (constraint-tuplelist-fix x)) (car x)))
Theorem:
(defthm car-constraint-tuplelist-equiv-congruence-on-x-under-constraint-tuple-equiv (implies (constraint-tuplelist-equiv x x-equiv) (constraint-tuple-equiv (car x) (car x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cdr-of-constraint-tuplelist-fix-x-under-constraint-tuplelist-equiv (constraint-tuplelist-equiv (cdr (constraint-tuplelist-fix x)) (cdr x)))
Theorem:
(defthm cdr-constraint-tuplelist-equiv-congruence-on-x-under-constraint-tuplelist-equiv (implies (constraint-tuplelist-equiv x x-equiv) (constraint-tuplelist-equiv (cdr x) (cdr x-equiv))) :rule-classes :congruence)
Theorem:
(defthm cons-of-constraint-tuple-fix-x-under-constraint-tuplelist-equiv (constraint-tuplelist-equiv (cons (constraint-tuple-fix x) y) (cons x y)))
Theorem:
(defthm cons-constraint-tuple-equiv-congruence-on-x-under-constraint-tuplelist-equiv (implies (constraint-tuple-equiv x x-equiv) (constraint-tuplelist-equiv (cons x y) (cons x-equiv y))) :rule-classes :congruence)
Theorem:
(defthm cons-of-constraint-tuplelist-fix-y-under-constraint-tuplelist-equiv (constraint-tuplelist-equiv (cons x (constraint-tuplelist-fix y)) (cons x y)))
Theorem:
(defthm cons-constraint-tuplelist-equiv-congruence-on-y-under-constraint-tuplelist-equiv (implies (constraint-tuplelist-equiv y y-equiv) (constraint-tuplelist-equiv (cons x y) (cons x y-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-constraint-tuplelist-fix (equal (consp (constraint-tuplelist-fix x)) (consp x)))
Theorem:
(defthm constraint-tuplelist-fix-under-iff (iff (constraint-tuplelist-fix x) (consp x)))
Theorem:
(defthm constraint-tuplelist-fix-of-cons (equal (constraint-tuplelist-fix (cons a x)) (cons (constraint-tuple-fix a) (constraint-tuplelist-fix x))))
Theorem:
(defthm len-of-constraint-tuplelist-fix (equal (len (constraint-tuplelist-fix x)) (len x)))
Theorem:
(defthm constraint-tuplelist-fix-of-append (equal (constraint-tuplelist-fix (append std::a std::b)) (append (constraint-tuplelist-fix std::a) (constraint-tuplelist-fix std::b))))
Theorem:
(defthm constraint-tuplelist-fix-of-repeat (equal (constraint-tuplelist-fix (acl2::repeat n x)) (acl2::repeat n (constraint-tuple-fix x))))
Theorem:
(defthm list-equiv-refines-constraint-tuplelist-equiv (implies (acl2::list-equiv x y) (constraint-tuplelist-equiv x y)) :rule-classes :refinement)
Theorem:
(defthm nth-of-constraint-tuplelist-fix (equal (nth n (constraint-tuplelist-fix x)) (if (< (nfix n) (len x)) (constraint-tuple-fix (nth n x)) nil)))
Theorem:
(defthm constraint-tuplelist-equiv-implies-constraint-tuplelist-equiv-append-1 (implies (constraint-tuplelist-equiv x fty::x-equiv) (constraint-tuplelist-equiv (append x y) (append fty::x-equiv y))) :rule-classes (:congruence))
Theorem:
(defthm constraint-tuplelist-equiv-implies-constraint-tuplelist-equiv-append-2 (implies (constraint-tuplelist-equiv y fty::y-equiv) (constraint-tuplelist-equiv (append x y) (append x fty::y-equiv))) :rule-classes (:congruence))
Theorem:
(defthm constraint-tuplelist-equiv-implies-constraint-tuplelist-equiv-nthcdr-2 (implies (constraint-tuplelist-equiv l l-equiv) (constraint-tuplelist-equiv (nthcdr n l) (nthcdr n l-equiv))) :rule-classes (:congruence))
Theorem:
(defthm constraint-tuplelist-equiv-implies-constraint-tuplelist-equiv-take-2 (implies (constraint-tuplelist-equiv l l-equiv) (constraint-tuplelist-equiv (take n l) (take n l-equiv))) :rule-classes (:congruence))