Fixing function for stat32i structures.
Function:
(defun stat32i-fix$inline (x) (declare (xargs :guard (stat32ip x))) (let ((__function__ 'stat32i-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((xregs (xregs32i-fix (cdr (std::da-nth 0 x)))) (pc (ubyte32-fix (cdr (std::da-nth 1 x)))) (memory (memory32i-fix (cdr (std::da-nth 2 x)))) (error (acl2::bool-fix (cdr (std::da-nth 3 x))))) (list (cons 'xregs xregs) (cons 'pc pc) (cons 'memory memory) (cons 'error error))) :exec x)))
Theorem:
(defthm stat32ip-of-stat32i-fix (b* ((new-x (stat32i-fix$inline x))) (stat32ip new-x)) :rule-classes :rewrite)
Theorem:
(defthm stat32i-fix-when-stat32ip (implies (stat32ip x) (equal (stat32i-fix x) x)))
Function:
(defun stat32i-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (stat32ip acl2::x) (stat32ip acl2::y)))) (equal (stat32i-fix acl2::x) (stat32i-fix acl2::y)))
Theorem:
(defthm stat32i-equiv-is-an-equivalence (and (booleanp (stat32i-equiv x y)) (stat32i-equiv x x) (implies (stat32i-equiv x y) (stat32i-equiv y x)) (implies (and (stat32i-equiv x y) (stat32i-equiv y z)) (stat32i-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm stat32i-equiv-implies-equal-stat32i-fix-1 (implies (stat32i-equiv acl2::x x-equiv) (equal (stat32i-fix acl2::x) (stat32i-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm stat32i-fix-under-stat32i-equiv (stat32i-equiv (stat32i-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-stat32i-fix-1-forward-to-stat32i-equiv (implies (equal (stat32i-fix acl2::x) acl2::y) (stat32i-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-stat32i-fix-2-forward-to-stat32i-equiv (implies (equal acl2::x (stat32i-fix acl2::y)) (stat32i-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm stat32i-equiv-of-stat32i-fix-1-forward (implies (stat32i-equiv (stat32i-fix acl2::x) acl2::y) (stat32i-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm stat32i-equiv-of-stat32i-fix-2-forward (implies (stat32i-equiv acl2::x (stat32i-fix acl2::y)) (stat32i-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)