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