Fixing function for vl-sequence structures.
(vl-sequence-fix x) → new-x
Function:
(defun vl-sequence-fix$inline (x) (declare (xargs :guard (vl-sequence-p x))) (let ((__function__ 'vl-sequence-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))))) (expr (vl-propexpr-fix (cdr (std::da-nth 3 (cdr x))))) (loc (vl-location-fix (cdr (std::da-nth 4 (cdr x)))))) (cons :vl-sequence (list (cons 'name name) (cons 'ports ports) (cons 'decls decls) (cons 'expr expr) (cons 'loc loc)))) :exec x)))
Theorem:
(defthm vl-sequence-p-of-vl-sequence-fix (b* ((new-x (vl-sequence-fix$inline x))) (vl-sequence-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-sequence-fix-when-vl-sequence-p (implies (vl-sequence-p x) (equal (vl-sequence-fix x) x)))
Function:
(defun vl-sequence-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-sequence-p acl2::x) (vl-sequence-p acl2::y)))) (equal (vl-sequence-fix acl2::x) (vl-sequence-fix acl2::y)))
Theorem:
(defthm vl-sequence-equiv-is-an-equivalence (and (booleanp (vl-sequence-equiv x y)) (vl-sequence-equiv x x) (implies (vl-sequence-equiv x y) (vl-sequence-equiv y x)) (implies (and (vl-sequence-equiv x y) (vl-sequence-equiv y z)) (vl-sequence-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-sequence-equiv-implies-equal-vl-sequence-fix-1 (implies (vl-sequence-equiv acl2::x x-equiv) (equal (vl-sequence-fix acl2::x) (vl-sequence-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-sequence-fix-under-vl-sequence-equiv (vl-sequence-equiv (vl-sequence-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-sequence-fix-1-forward-to-vl-sequence-equiv (implies (equal (vl-sequence-fix acl2::x) acl2::y) (vl-sequence-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-sequence-fix-2-forward-to-vl-sequence-equiv (implies (equal acl2::x (vl-sequence-fix acl2::y)) (vl-sequence-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-sequence-equiv-of-vl-sequence-fix-1-forward (implies (vl-sequence-equiv (vl-sequence-fix acl2::x) acl2::y) (vl-sequence-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-sequence-equiv-of-vl-sequence-fix-2-forward (implies (vl-sequence-equiv acl2::x (vl-sequence-fix acl2::y)) (vl-sequence-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)