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