Basic equivalence relation for vl-rhs structures.
Function:
(defun vl-rhs-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-rhs-p acl2::x) (vl-rhs-p acl2::y)))) (equal (vl-rhs-fix acl2::x) (vl-rhs-fix acl2::y)))
Theorem:
(defthm vl-rhs-equiv-is-an-equivalence (and (booleanp (vl-rhs-equiv x y)) (vl-rhs-equiv x x) (implies (vl-rhs-equiv x y) (vl-rhs-equiv y x)) (implies (and (vl-rhs-equiv x y) (vl-rhs-equiv y z)) (vl-rhs-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-rhs-equiv-implies-equal-vl-rhs-fix-1 (implies (vl-rhs-equiv acl2::x x-equiv) (equal (vl-rhs-fix acl2::x) (vl-rhs-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-rhs-fix-under-vl-rhs-equiv (vl-rhs-equiv (vl-rhs-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-rhs-fix-1-forward-to-vl-rhs-equiv (implies (equal (vl-rhs-fix acl2::x) acl2::y) (vl-rhs-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-rhs-fix-2-forward-to-vl-rhs-equiv (implies (equal acl2::x (vl-rhs-fix acl2::y)) (vl-rhs-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-rhs-equiv-of-vl-rhs-fix-1-forward (implies (vl-rhs-equiv (vl-rhs-fix acl2::x) acl2::y) (vl-rhs-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-rhs-equiv-of-vl-rhs-fix-2-forward (implies (vl-rhs-equiv acl2::x (vl-rhs-fix acl2::y)) (vl-rhs-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)