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