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