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