Fixing function for function-definer structures.
(function-definer-fix x) → new-x
Function:
(defun function-definer-fix$inline (x) (declare (xargs :guard (function-definerp x))) (let ((__function__ 'function-definer-fix)) (declare (ignorable __function__)) (mbe :logic (case (function-definer-kind x) (:regular (b* ((body (expression-fix (std::da-nth 0 (cdr x)))) (measure (maybe-expression-fix (std::da-nth 1 (cdr x))))) (cons :regular (list body measure)))) (:quantified (b* ((quantifier (quantifier-fix (std::da-nth 0 (cdr x)))) (variables (typed-variable-list-fix (std::da-nth 1 (cdr x)))) (matrix (expression-fix (std::da-nth 2 (cdr x))))) (cons :quantified (list quantifier variables matrix))))) :exec x)))
Theorem:
(defthm function-definerp-of-function-definer-fix (b* ((new-x (function-definer-fix$inline x))) (function-definerp new-x)) :rule-classes :rewrite)
Theorem:
(defthm function-definer-fix-when-function-definerp (implies (function-definerp x) (equal (function-definer-fix x) x)))
Function:
(defun function-definer-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (function-definerp acl2::x) (function-definerp acl2::y)))) (equal (function-definer-fix acl2::x) (function-definer-fix acl2::y)))
Theorem:
(defthm function-definer-equiv-is-an-equivalence (and (booleanp (function-definer-equiv x y)) (function-definer-equiv x x) (implies (function-definer-equiv x y) (function-definer-equiv y x)) (implies (and (function-definer-equiv x y) (function-definer-equiv y z)) (function-definer-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm function-definer-equiv-implies-equal-function-definer-fix-1 (implies (function-definer-equiv acl2::x x-equiv) (equal (function-definer-fix acl2::x) (function-definer-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm function-definer-fix-under-function-definer-equiv (function-definer-equiv (function-definer-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-function-definer-fix-1-forward-to-function-definer-equiv (implies (equal (function-definer-fix acl2::x) acl2::y) (function-definer-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-function-definer-fix-2-forward-to-function-definer-equiv (implies (equal acl2::x (function-definer-fix acl2::y)) (function-definer-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm function-definer-equiv-of-function-definer-fix-1-forward (implies (function-definer-equiv (function-definer-fix acl2::x) acl2::y) (function-definer-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm function-definer-equiv-of-function-definer-fix-2-forward (implies (function-definer-equiv acl2::x (function-definer-fix acl2::y)) (function-definer-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm function-definer-kind$inline-of-function-definer-fix-x (equal (function-definer-kind$inline (function-definer-fix x)) (function-definer-kind$inline x)))
Theorem:
(defthm function-definer-kind$inline-function-definer-equiv-congruence-on-x (implies (function-definer-equiv x x-equiv) (equal (function-definer-kind$inline x) (function-definer-kind$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm consp-of-function-definer-fix (consp (function-definer-fix x)) :rule-classes :type-prescription)