Fixing function for constprop-config structures.
(constprop-config-fix x) → new-x
Function:
(defun constprop-config-fix$inline (x) (declare (xargs :guard (constprop-config-p x))) (let ((__function__ 'constprop-config-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((gatesimp (gatesimp-fix (cdr (std::da-nth 0 (cdr x))))) (iterations (pos-fix (cdr (std::da-nth 1 (cdr x)))))) (cons :constprop-config (list (cons 'gatesimp gatesimp) (cons 'iterations iterations)))) :exec x)))
Theorem:
(defthm constprop-config-p-of-constprop-config-fix (b* ((new-x (constprop-config-fix$inline x))) (constprop-config-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm constprop-config-fix-when-constprop-config-p (implies (constprop-config-p x) (equal (constprop-config-fix x) x)))
Function:
(defun constprop-config-equiv$inline (x acl2::y) (declare (xargs :guard (and (constprop-config-p x) (constprop-config-p acl2::y)))) (equal (constprop-config-fix x) (constprop-config-fix acl2::y)))
Theorem:
(defthm constprop-config-equiv-is-an-equivalence (and (booleanp (constprop-config-equiv x y)) (constprop-config-equiv x x) (implies (constprop-config-equiv x y) (constprop-config-equiv y x)) (implies (and (constprop-config-equiv x y) (constprop-config-equiv y z)) (constprop-config-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm constprop-config-equiv-implies-equal-constprop-config-fix-1 (implies (constprop-config-equiv x x-equiv) (equal (constprop-config-fix x) (constprop-config-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm constprop-config-fix-under-constprop-config-equiv (constprop-config-equiv (constprop-config-fix x) x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-constprop-config-fix-1-forward-to-constprop-config-equiv (implies (equal (constprop-config-fix x) acl2::y) (constprop-config-equiv x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-constprop-config-fix-2-forward-to-constprop-config-equiv (implies (equal x (constprop-config-fix acl2::y)) (constprop-config-equiv x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm constprop-config-equiv-of-constprop-config-fix-1-forward (implies (constprop-config-equiv (constprop-config-fix x) acl2::y) (constprop-config-equiv x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm constprop-config-equiv-of-constprop-config-fix-2-forward (implies (constprop-config-equiv x (constprop-config-fix acl2::y)) (constprop-config-equiv x acl2::y)) :rule-classes :forward-chaining)