Fixing function for vl-define structures.
(vl-define-fix x) → new-x
Function:
(defun vl-define-fix$inline (x) (declare (xargs :guard (vl-define-p x))) (let ((__function__ 'vl-define-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((name (str-fix (cdr (std::da-nth 0 x)))) (formals (vl-define-formallist-fix (cdr (std::da-nth 1 x)))) (body (str-fix (cdr (std::da-nth 2 x)))) (loc (vl-location-fix (cdr (std::da-nth 3 x))))) (list (cons 'name name) (cons 'formals formals) (cons 'body body) (cons 'loc loc))) :exec x)))
Theorem:
(defthm vl-define-p-of-vl-define-fix (b* ((new-x (vl-define-fix$inline x))) (vl-define-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-define-fix-when-vl-define-p (implies (vl-define-p x) (equal (vl-define-fix x) x)))
Function:
(defun vl-define-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-define-p acl2::x) (vl-define-p acl2::y)))) (equal (vl-define-fix acl2::x) (vl-define-fix acl2::y)))
Theorem:
(defthm vl-define-equiv-is-an-equivalence (and (booleanp (vl-define-equiv x y)) (vl-define-equiv x x) (implies (vl-define-equiv x y) (vl-define-equiv y x)) (implies (and (vl-define-equiv x y) (vl-define-equiv y z)) (vl-define-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-define-equiv-implies-equal-vl-define-fix-1 (implies (vl-define-equiv acl2::x x-equiv) (equal (vl-define-fix acl2::x) (vl-define-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-define-fix-under-vl-define-equiv (vl-define-equiv (vl-define-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-define-fix-1-forward-to-vl-define-equiv (implies (equal (vl-define-fix acl2::x) acl2::y) (vl-define-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-define-fix-2-forward-to-vl-define-equiv (implies (equal acl2::x (vl-define-fix acl2::y)) (vl-define-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-define-equiv-of-vl-define-fix-1-forward (implies (vl-define-equiv (vl-define-fix acl2::x) acl2::y) (vl-define-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-define-equiv-of-vl-define-fix-2-forward (implies (vl-define-equiv acl2::x (vl-define-fix acl2::y)) (vl-define-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)