Fixing function for funinfo structures.
Function:
(defun funinfo-fix$inline (x) (declare (xargs :guard (funinfop x))) (let ((__function__ 'funinfo-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((inputs (identifier-list-fix (cdr (std::da-nth 0 (cdr x))))) (outputs (identifier-list-fix (cdr (std::da-nth 1 (cdr x))))) (body (block-fix (cdr (std::da-nth 2 (cdr x)))))) (cons :funinfo (list (cons 'inputs inputs) (cons 'outputs outputs) (cons 'body body)))) :exec x)))
Theorem:
(defthm funinfop-of-funinfo-fix (b* ((new-x (funinfo-fix$inline x))) (funinfop new-x)) :rule-classes :rewrite)
Theorem:
(defthm funinfo-fix-when-funinfop (implies (funinfop x) (equal (funinfo-fix x) x)))
Function:
(defun funinfo-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (funinfop acl2::x) (funinfop acl2::y)))) (equal (funinfo-fix acl2::x) (funinfo-fix acl2::y)))
Theorem:
(defthm funinfo-equiv-is-an-equivalence (and (booleanp (funinfo-equiv x y)) (funinfo-equiv x x) (implies (funinfo-equiv x y) (funinfo-equiv y x)) (implies (and (funinfo-equiv x y) (funinfo-equiv y z)) (funinfo-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm funinfo-equiv-implies-equal-funinfo-fix-1 (implies (funinfo-equiv acl2::x x-equiv) (equal (funinfo-fix acl2::x) (funinfo-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm funinfo-fix-under-funinfo-equiv (funinfo-equiv (funinfo-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-funinfo-fix-1-forward-to-funinfo-equiv (implies (equal (funinfo-fix acl2::x) acl2::y) (funinfo-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-funinfo-fix-2-forward-to-funinfo-equiv (implies (equal acl2::x (funinfo-fix acl2::y)) (funinfo-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm funinfo-equiv-of-funinfo-fix-1-forward (implies (funinfo-equiv (funinfo-fix acl2::x) acl2::y) (funinfo-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm funinfo-equiv-of-funinfo-fix-2-forward (implies (funinfo-equiv acl2::x (funinfo-fix acl2::y)) (funinfo-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)