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