Fixing function for fundef structures.
Function:
(defun fundef-fix$inline (x) (declare (xargs :guard (fundefp x))) (let ((__function__ 'fundef-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((extension (bool-fix (cdr (std::da-nth 0 x)))) (spec (decl-spec-list-fix (cdr (std::da-nth 1 x)))) (declor (declor-fix (cdr (std::da-nth 2 x)))) (asm? (asm-name-spec-option-fix (cdr (std::da-nth 3 x)))) (attribs (attrib-spec-list-fix (cdr (std::da-nth 4 x)))) (decls (decl-list-fix (cdr (std::da-nth 5 x)))) (body (stmt-fix (cdr (std::da-nth 6 x))))) (list (cons 'extension extension) (cons 'spec spec) (cons 'declor declor) (cons 'asm? asm?) (cons 'attribs attribs) (cons 'decls decls) (cons 'body body))) :exec x)))
Theorem:
(defthm fundefp-of-fundef-fix (b* ((new-x (fundef-fix$inline x))) (fundefp new-x)) :rule-classes :rewrite)
Theorem:
(defthm fundef-fix-when-fundefp (implies (fundefp x) (equal (fundef-fix x) x)))
Function:
(defun fundef-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (fundefp acl2::x) (fundefp acl2::y)))) (equal (fundef-fix acl2::x) (fundef-fix acl2::y)))
Theorem:
(defthm fundef-equiv-is-an-equivalence (and (booleanp (fundef-equiv x y)) (fundef-equiv x x) (implies (fundef-equiv x y) (fundef-equiv y x)) (implies (and (fundef-equiv x y) (fundef-equiv y z)) (fundef-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm fundef-equiv-implies-equal-fundef-fix-1 (implies (fundef-equiv acl2::x x-equiv) (equal (fundef-fix acl2::x) (fundef-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm fundef-fix-under-fundef-equiv (fundef-equiv (fundef-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-fundef-fix-1-forward-to-fundef-equiv (implies (equal (fundef-fix acl2::x) acl2::y) (fundef-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-fundef-fix-2-forward-to-fundef-equiv (implies (equal acl2::x (fundef-fix acl2::y)) (fundef-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm fundef-equiv-of-fundef-fix-1-forward (implies (fundef-equiv (fundef-fix acl2::x) acl2::y) (fundef-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm fundef-equiv-of-fundef-fix-2-forward (implies (fundef-equiv acl2::x (fundef-fix acl2::y)) (fundef-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)