Fixing function for obj-declor structures.
(obj-declor-fix x) → new-x
Function:
(defun obj-declor-fix$inline (x) (declare (xargs :guard (obj-declorp x))) (let ((__function__ 'obj-declor-fix)) (declare (ignorable __function__)) (mbe :logic (case (obj-declor-kind x) (:ident (b* ((get (ident-fix (std::da-nth 0 (cdr x))))) (cons :ident (list get)))) (:pointer (b* ((decl (obj-declor-fix (std::da-nth 0 (cdr x))))) (cons :pointer (list decl)))) (:array (b* ((decl (obj-declor-fix (std::da-nth 0 (cdr x)))) (size (iconst-option-fix (std::da-nth 1 (cdr x))))) (cons :array (list decl size))))) :exec x)))
Theorem:
(defthm obj-declorp-of-obj-declor-fix (b* ((new-x (obj-declor-fix$inline x))) (obj-declorp new-x)) :rule-classes :rewrite)
Theorem:
(defthm obj-declor-fix-when-obj-declorp (implies (obj-declorp x) (equal (obj-declor-fix x) x)))
Function:
(defun obj-declor-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (obj-declorp acl2::x) (obj-declorp acl2::y)))) (equal (obj-declor-fix acl2::x) (obj-declor-fix acl2::y)))
Theorem:
(defthm obj-declor-equiv-is-an-equivalence (and (booleanp (obj-declor-equiv x y)) (obj-declor-equiv x x) (implies (obj-declor-equiv x y) (obj-declor-equiv y x)) (implies (and (obj-declor-equiv x y) (obj-declor-equiv y z)) (obj-declor-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm obj-declor-equiv-implies-equal-obj-declor-fix-1 (implies (obj-declor-equiv acl2::x x-equiv) (equal (obj-declor-fix acl2::x) (obj-declor-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm obj-declor-fix-under-obj-declor-equiv (obj-declor-equiv (obj-declor-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-obj-declor-fix-1-forward-to-obj-declor-equiv (implies (equal (obj-declor-fix acl2::x) acl2::y) (obj-declor-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-obj-declor-fix-2-forward-to-obj-declor-equiv (implies (equal acl2::x (obj-declor-fix acl2::y)) (obj-declor-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm obj-declor-equiv-of-obj-declor-fix-1-forward (implies (obj-declor-equiv (obj-declor-fix acl2::x) acl2::y) (obj-declor-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm obj-declor-equiv-of-obj-declor-fix-2-forward (implies (obj-declor-equiv acl2::x (obj-declor-fix acl2::y)) (obj-declor-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm obj-declor-kind$inline-of-obj-declor-fix-x (equal (obj-declor-kind$inline (obj-declor-fix x)) (obj-declor-kind$inline x)))
Theorem:
(defthm obj-declor-kind$inline-obj-declor-equiv-congruence-on-x (implies (obj-declor-equiv x x-equiv) (equal (obj-declor-kind$inline x) (obj-declor-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-obj-declor-fix (consp (obj-declor-fix x)) :rule-classes :type-prescription)