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