Fixing function for objdesign structures.
(objdesign-fix x) → new-x
Function:
(defun objdesign-fix$inline (x) (declare (xargs :guard (objdesignp x))) (let ((__function__ 'objdesign-fix)) (declare (ignorable __function__)) (mbe :logic (case (objdesign-kind x) (:static (b* ((name (ident-fix (std::da-nth 0 (cdr x))))) (cons :static (list name)))) (:auto (b* ((name (ident-fix (std::da-nth 0 (cdr x)))) (frame (nfix (std::da-nth 1 (cdr x)))) (scope (nfix (std::da-nth 2 (cdr x))))) (cons :auto (list name frame scope)))) (:alloc (b* ((get (address-fix (std::da-nth 0 (cdr x))))) (cons :alloc (list get)))) (:element (b* ((super (objdesign-fix (std::da-nth 0 (cdr x)))) (index (nfix (std::da-nth 1 (cdr x))))) (cons :element (list super index)))) (:member (b* ((super (objdesign-fix (std::da-nth 0 (cdr x)))) (name (ident-fix (std::da-nth 1 (cdr x))))) (cons :member (list super name))))) :exec x)))
Theorem:
(defthm objdesignp-of-objdesign-fix (b* ((new-x (objdesign-fix$inline x))) (objdesignp new-x)) :rule-classes :rewrite)
Theorem:
(defthm objdesign-fix-when-objdesignp (implies (objdesignp x) (equal (objdesign-fix x) x)))
Function:
(defun objdesign-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (objdesignp acl2::x) (objdesignp acl2::y)))) (equal (objdesign-fix acl2::x) (objdesign-fix acl2::y)))
Theorem:
(defthm objdesign-equiv-is-an-equivalence (and (booleanp (objdesign-equiv x y)) (objdesign-equiv x x) (implies (objdesign-equiv x y) (objdesign-equiv y x)) (implies (and (objdesign-equiv x y) (objdesign-equiv y z)) (objdesign-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm objdesign-equiv-implies-equal-objdesign-fix-1 (implies (objdesign-equiv acl2::x x-equiv) (equal (objdesign-fix acl2::x) (objdesign-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm objdesign-fix-under-objdesign-equiv (objdesign-equiv (objdesign-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-objdesign-fix-1-forward-to-objdesign-equiv (implies (equal (objdesign-fix acl2::x) acl2::y) (objdesign-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-objdesign-fix-2-forward-to-objdesign-equiv (implies (equal acl2::x (objdesign-fix acl2::y)) (objdesign-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm objdesign-equiv-of-objdesign-fix-1-forward (implies (objdesign-equiv (objdesign-fix acl2::x) acl2::y) (objdesign-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm objdesign-equiv-of-objdesign-fix-2-forward (implies (objdesign-equiv acl2::x (objdesign-fix acl2::y)) (objdesign-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm objdesign-kind$inline-of-objdesign-fix-x (equal (objdesign-kind$inline (objdesign-fix x)) (objdesign-kind$inline x)))
Theorem:
(defthm objdesign-kind$inline-objdesign-equiv-congruence-on-x (implies (objdesign-equiv x x-equiv) (equal (objdesign-kind$inline x) (objdesign-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-objdesign-fix (consp (objdesign-fix x)) :rule-classes :type-prescription)