Fixing function for vl-parsestate structures.
(vl-parsestate-fix x) → new-x
Function:
(defun vl-parsestate-fix$inline (x) (declare (xargs :guard (vl-parsestate-p x))) (let ((__function__ 'vl-parsestate-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((warnings (vl-warninglist-fix (cdr x)))) (cons :vl-parsestate warnings)) :exec x)))
Theorem:
(defthm vl-parsestate-p-of-vl-parsestate-fix (b* ((new-x (vl-parsestate-fix$inline x))) (vl-parsestate-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-parsestate-fix-when-vl-parsestate-p (implies (vl-parsestate-p x) (equal (vl-parsestate-fix x) x)))
Function:
(defun vl-parsestate-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-parsestate-p acl2::x) (vl-parsestate-p acl2::y)))) (equal (vl-parsestate-fix acl2::x) (vl-parsestate-fix acl2::y)))
Theorem:
(defthm vl-parsestate-equiv-is-an-equivalence (and (booleanp (vl-parsestate-equiv x y)) (vl-parsestate-equiv x x) (implies (vl-parsestate-equiv x y) (vl-parsestate-equiv y x)) (implies (and (vl-parsestate-equiv x y) (vl-parsestate-equiv y z)) (vl-parsestate-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-parsestate-equiv-implies-equal-vl-parsestate-fix-1 (implies (vl-parsestate-equiv acl2::x x-equiv) (equal (vl-parsestate-fix acl2::x) (vl-parsestate-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-parsestate-fix-under-vl-parsestate-equiv (vl-parsestate-equiv (vl-parsestate-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-parsestate-fix-1-forward-to-vl-parsestate-equiv (implies (equal (vl-parsestate-fix acl2::x) acl2::y) (vl-parsestate-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-parsestate-fix-2-forward-to-vl-parsestate-equiv (implies (equal acl2::x (vl-parsestate-fix acl2::y)) (vl-parsestate-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-parsestate-equiv-of-vl-parsestate-fix-1-forward (implies (vl-parsestate-equiv (vl-parsestate-fix acl2::x) acl2::y) (vl-parsestate-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-parsestate-equiv-of-vl-parsestate-fix-2-forward (implies (vl-parsestate-equiv acl2::x (vl-parsestate-fix acl2::y)) (vl-parsestate-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)