(svdecomp-symenv-fix x) is an fty alist fixing function that follows the drop-keys strategy.
(svdecomp-symenv-fix x) → fty::newx
Note that in the execution this is just an inline identity function.
Function:
(defun svdecomp-symenv-fix$inline (x) (declare (xargs :guard (svdecomp-symenv-p x))) (let ((__function__ 'svdecomp-symenv-fix)) (declare (ignorable __function__)) (mbe :logic (if (atom x) nil (let ((rest (svdecomp-symenv-fix (cdr x)))) (if (and (consp (car x)) (svar-p (caar x))) (let ((fty::first-key (caar x)) (fty::first-val (pseudo-term-fix (cdar x)))) (cons (cons fty::first-key fty::first-val) rest)) rest))) :exec x)))
Theorem:
(defthm svdecomp-symenv-p-of-svdecomp-symenv-fix (b* ((fty::newx (svdecomp-symenv-fix$inline x))) (svdecomp-symenv-p fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm svdecomp-symenv-fix-when-svdecomp-symenv-p (implies (svdecomp-symenv-p x) (equal (svdecomp-symenv-fix x) x)))
Function:
(defun svdecomp-symenv-equiv$inline (x y) (declare (xargs :guard (and (svdecomp-symenv-p x) (svdecomp-symenv-p y)))) (equal (svdecomp-symenv-fix x) (svdecomp-symenv-fix y)))
Theorem:
(defthm svdecomp-symenv-equiv-is-an-equivalence (and (booleanp (svdecomp-symenv-equiv x y)) (svdecomp-symenv-equiv x x) (implies (svdecomp-symenv-equiv x y) (svdecomp-symenv-equiv y x)) (implies (and (svdecomp-symenv-equiv x y) (svdecomp-symenv-equiv y z)) (svdecomp-symenv-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm svdecomp-symenv-equiv-implies-equal-svdecomp-symenv-fix-1 (implies (svdecomp-symenv-equiv x x-equiv) (equal (svdecomp-symenv-fix x) (svdecomp-symenv-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm svdecomp-symenv-fix-under-svdecomp-symenv-equiv (svdecomp-symenv-equiv (svdecomp-symenv-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-svdecomp-symenv-fix-1-forward-to-svdecomp-symenv-equiv (implies (equal (svdecomp-symenv-fix x) y) (svdecomp-symenv-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-svdecomp-symenv-fix-2-forward-to-svdecomp-symenv-equiv (implies (equal x (svdecomp-symenv-fix y)) (svdecomp-symenv-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm svdecomp-symenv-equiv-of-svdecomp-symenv-fix-1-forward (implies (svdecomp-symenv-equiv (svdecomp-symenv-fix x) y) (svdecomp-symenv-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm svdecomp-symenv-equiv-of-svdecomp-symenv-fix-2-forward (implies (svdecomp-symenv-equiv x (svdecomp-symenv-fix y)) (svdecomp-symenv-equiv x y)) :rule-classes :forward-chaining)
Theorem:
(defthm cons-of-pseudo-term-fix-v-under-svdecomp-symenv-equiv (svdecomp-symenv-equiv (cons (cons acl2::k (pseudo-term-fix acl2::v)) x) (cons (cons acl2::k acl2::v) x)))
Theorem:
(defthm cons-pseudo-term-equiv-congruence-on-v-under-svdecomp-symenv-equiv (implies (pseudo-term-equiv acl2::v v-equiv) (svdecomp-symenv-equiv (cons (cons acl2::k acl2::v) x) (cons (cons acl2::k v-equiv) x))) :rule-classes :congruence)
Theorem:
(defthm cons-of-svdecomp-symenv-fix-y-under-svdecomp-symenv-equiv (svdecomp-symenv-equiv (cons x (svdecomp-symenv-fix y)) (cons x y)))
Theorem:
(defthm cons-svdecomp-symenv-equiv-congruence-on-y-under-svdecomp-symenv-equiv (implies (svdecomp-symenv-equiv y y-equiv) (svdecomp-symenv-equiv (cons x y) (cons x y-equiv))) :rule-classes :congruence)
Theorem:
(defthm svdecomp-symenv-fix-of-acons (equal (svdecomp-symenv-fix (cons (cons acl2::a acl2::b) x)) (let ((rest (svdecomp-symenv-fix x))) (if (and (svar-p acl2::a)) (let ((fty::first-key acl2::a) (fty::first-val (pseudo-term-fix acl2::b))) (cons (cons fty::first-key fty::first-val) rest)) rest))))
Theorem:
(defthm hons-assoc-equal-of-svdecomp-symenv-fix (equal (hons-assoc-equal acl2::k (svdecomp-symenv-fix x)) (let ((fty::pair (hons-assoc-equal acl2::k x))) (and (svar-p acl2::k) fty::pair (cons acl2::k (pseudo-term-fix (cdr fty::pair)))))))
Theorem:
(defthm svdecomp-symenv-fix-of-append (equal (svdecomp-symenv-fix (append std::a std::b)) (append (svdecomp-symenv-fix std::a) (svdecomp-symenv-fix std::b))))
Theorem:
(defthm consp-car-of-svdecomp-symenv-fix (equal (consp (car (svdecomp-symenv-fix x))) (consp (svdecomp-symenv-fix x))))