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