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