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