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