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