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