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