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