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