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