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