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