Fixing function for vl-oddinfo structures.
(vl-oddinfo-fix x) → new-x
Function:
(defun vl-oddinfo-fix$inline (x) (declare (xargs :guard (vl-oddinfo-p x))) (let ((__function__ 'vl-oddinfo-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((type (acl2::symbol-fix (cdr (std::da-nth 0 x)))) (subexpr (vl-expr-fix (cdr (std::da-nth 1 x)))) (simple (vl-expr-fix (cdr (std::da-nth 2 x)))) (complex (vl-expr-fix (cdr (std::da-nth 3 x)))) (swidth (maybe-natp-fix (cdr (std::da-nth 4 x)))) (cwidth (maybe-natp-fix (cdr (std::da-nth 5 x))))) (list (cons 'type type) (cons 'subexpr subexpr) (cons 'simple simple) (cons 'complex complex) (cons 'swidth swidth) (cons 'cwidth cwidth))) :exec x)))
Theorem:
(defthm vl-oddinfo-p-of-vl-oddinfo-fix (b* ((new-x (vl-oddinfo-fix$inline x))) (vl-oddinfo-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-oddinfo-fix-when-vl-oddinfo-p (implies (vl-oddinfo-p x) (equal (vl-oddinfo-fix x) x)))
Function:
(defun vl-oddinfo-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-oddinfo-p acl2::x) (vl-oddinfo-p acl2::y)))) (equal (vl-oddinfo-fix acl2::x) (vl-oddinfo-fix acl2::y)))
Theorem:
(defthm vl-oddinfo-equiv-is-an-equivalence (and (booleanp (vl-oddinfo-equiv x y)) (vl-oddinfo-equiv x x) (implies (vl-oddinfo-equiv x y) (vl-oddinfo-equiv y x)) (implies (and (vl-oddinfo-equiv x y) (vl-oddinfo-equiv y z)) (vl-oddinfo-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-oddinfo-equiv-implies-equal-vl-oddinfo-fix-1 (implies (vl-oddinfo-equiv acl2::x x-equiv) (equal (vl-oddinfo-fix acl2::x) (vl-oddinfo-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-oddinfo-fix-under-vl-oddinfo-equiv (vl-oddinfo-equiv (vl-oddinfo-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-oddinfo-fix-1-forward-to-vl-oddinfo-equiv (implies (equal (vl-oddinfo-fix acl2::x) acl2::y) (vl-oddinfo-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-oddinfo-fix-2-forward-to-vl-oddinfo-equiv (implies (equal acl2::x (vl-oddinfo-fix acl2::y)) (vl-oddinfo-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-oddinfo-equiv-of-vl-oddinfo-fix-1-forward (implies (vl-oddinfo-equiv (vl-oddinfo-fix acl2::x) acl2::y) (vl-oddinfo-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-oddinfo-equiv-of-vl-oddinfo-fix-2-forward (implies (vl-oddinfo-equiv acl2::x (vl-oddinfo-fix acl2::y)) (vl-oddinfo-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)