Fixing function for vl-clkdecl structures.
(vl-clkdecl-fix x) → new-x
Function:
(defun vl-clkdecl-fix$inline (x) (declare (xargs :guard (vl-clkdecl-p x))) (let ((__function__ 'vl-clkdecl-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((defaultp (acl2::bool-fix (std::prod-car (std::prod-car (std::prod-car (cdr x)))))) (name (maybe-string-fix (std::prod-cdr (std::prod-car (std::prod-car (cdr x)))))) (event (vl-evatomlist-fix (std::prod-car (std::prod-cdr (std::prod-car (cdr x)))))) (iskew (vl-maybe-clkskew-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x))))))) (oskew (vl-maybe-clkskew-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-car (cdr x))))))) (clkassigns (vl-clkassignlist-fix (std::prod-car (std::prod-car (std::prod-cdr (cdr x)))))) (properties (vl-propertylist-fix (std::prod-cdr (std::prod-car (std::prod-cdr (cdr x)))))) (sequences (vl-sequencelist-fix (std::prod-car (std::prod-cdr (std::prod-cdr (cdr x)))))) (loc (vl-location-fix (std::prod-car (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x))))))) (atts (vl-atts-fix (std::prod-cdr (std::prod-cdr (std::prod-cdr (std::prod-cdr (cdr x)))))))) (cons :vl-clkdecl (std::prod-cons (std::prod-cons (std::prod-cons defaultp name) (std::prod-cons event (std::prod-cons iskew oskew))) (std::prod-cons (std::prod-cons clkassigns properties) (std::prod-cons sequences (std::prod-cons loc atts)))))) :exec x)))
Theorem:
(defthm vl-clkdecl-p-of-vl-clkdecl-fix (b* ((new-x (vl-clkdecl-fix$inline x))) (vl-clkdecl-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-clkdecl-fix-when-vl-clkdecl-p (implies (vl-clkdecl-p x) (equal (vl-clkdecl-fix x) x)))
Function:
(defun vl-clkdecl-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-clkdecl-p acl2::x) (vl-clkdecl-p acl2::y)))) (equal (vl-clkdecl-fix acl2::x) (vl-clkdecl-fix acl2::y)))
Theorem:
(defthm vl-clkdecl-equiv-is-an-equivalence (and (booleanp (vl-clkdecl-equiv x y)) (vl-clkdecl-equiv x x) (implies (vl-clkdecl-equiv x y) (vl-clkdecl-equiv y x)) (implies (and (vl-clkdecl-equiv x y) (vl-clkdecl-equiv y z)) (vl-clkdecl-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-clkdecl-equiv-implies-equal-vl-clkdecl-fix-1 (implies (vl-clkdecl-equiv acl2::x x-equiv) (equal (vl-clkdecl-fix acl2::x) (vl-clkdecl-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-clkdecl-fix-under-vl-clkdecl-equiv (vl-clkdecl-equiv (vl-clkdecl-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-clkdecl-fix-1-forward-to-vl-clkdecl-equiv (implies (equal (vl-clkdecl-fix acl2::x) acl2::y) (vl-clkdecl-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-clkdecl-fix-2-forward-to-vl-clkdecl-equiv (implies (equal acl2::x (vl-clkdecl-fix acl2::y)) (vl-clkdecl-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-clkdecl-equiv-of-vl-clkdecl-fix-1-forward (implies (vl-clkdecl-equiv (vl-clkdecl-fix acl2::x) acl2::y) (vl-clkdecl-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-clkdecl-equiv-of-vl-clkdecl-fix-2-forward (implies (vl-clkdecl-equiv acl2::x (vl-clkdecl-fix acl2::y)) (vl-clkdecl-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)