Fixing function for vl-warning structures.
(vl-warning-fix x) → new-x
Function:
(defun vl-warning-fix$inline (x) (declare (xargs :guard (vl-warning-p x))) (let ((__function__ 'vl-warning-fix)) (declare (ignorable __function__)) (mbe :logic (b* ((type (acl2::symbol-fix (cdr (std::da-nth 0 (cdr x))))) (msg (str-fix (cdr (std::da-nth 1 (cdr x))))) (args (list-fix (cdr (std::da-nth 2 (cdr x))))) (fn (acl2::symbol-fix (cdr (std::da-nth 3 (cdr x))))) (fatalp (acl2::bool-fix (cdr (std::da-nth 4 (cdr x))))) (suppressedp (acl2::bool-fix (cdr (std::da-nth 5 (cdr x))))) (context (cdr (std::da-nth 6 (cdr x))))) (cons :vl-warning (list (cons 'type type) (cons 'msg msg) (cons 'args args) (cons 'fn fn) (cons 'fatalp fatalp) (cons 'suppressedp suppressedp) (cons 'context context)))) :exec x)))
Theorem:
(defthm vl-warning-p-of-vl-warning-fix (b* ((new-x (vl-warning-fix$inline x))) (vl-warning-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-warning-fix-when-vl-warning-p (implies (vl-warning-p x) (equal (vl-warning-fix x) x)))
Function:
(defun vl-warning-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-warning-p acl2::x) (vl-warning-p acl2::y)))) (equal (vl-warning-fix acl2::x) (vl-warning-fix acl2::y)))
Theorem:
(defthm vl-warning-equiv-is-an-equivalence (and (booleanp (vl-warning-equiv x y)) (vl-warning-equiv x x) (implies (vl-warning-equiv x y) (vl-warning-equiv y x)) (implies (and (vl-warning-equiv x y) (vl-warning-equiv y z)) (vl-warning-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-warning-equiv-implies-equal-vl-warning-fix-1 (implies (vl-warning-equiv acl2::x x-equiv) (equal (vl-warning-fix acl2::x) (vl-warning-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-warning-fix-under-vl-warning-equiv (vl-warning-equiv (vl-warning-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-warning-fix-1-forward-to-vl-warning-equiv (implies (equal (vl-warning-fix acl2::x) acl2::y) (vl-warning-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-warning-fix-2-forward-to-vl-warning-equiv (implies (equal acl2::x (vl-warning-fix acl2::y)) (vl-warning-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-warning-equiv-of-vl-warning-fix-1-forward (implies (vl-warning-equiv (vl-warning-fix acl2::x) acl2::y) (vl-warning-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-warning-equiv-of-vl-warning-fix-2-forward (implies (vl-warning-equiv acl2::x (vl-warning-fix acl2::y)) (vl-warning-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)