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