Fixing function for vl-warningtree structures.
(vl-warningtree-fix x) → new-x
Function:
(defun vl-warningtree-fix$inline (x) (declare (xargs :guard (vl-warningtree-p x))) (let ((__function__ 'vl-warningtree-fix)) (declare (ignorable __function__)) (mbe :logic (common-lisp::case (vl-warningtree-kind x) (:null nil) (:warning (b* ((warning (vl-warning-fix x))) warning)) (:context (b* ((context (cadr x)) (subtree (vl-warningtree-fix (cddr x)))) (cons :vl-warningtree-context (cons context subtree)))) (:pair (b* ((left (vl-warningtree-fix (car x))) (right (vl-warningtree-fix (cdr x)))) (cons left right)))) :exec x)))
Theorem:
(defthm vl-warningtree-p-of-vl-warningtree-fix (b* ((new-x (vl-warningtree-fix$inline x))) (vl-warningtree-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-warningtree-fix-when-vl-warningtree-p (implies (vl-warningtree-p x) (equal (vl-warningtree-fix x) x)))
Function:
(defun vl-warningtree-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (vl-warningtree-p acl2::x) (vl-warningtree-p acl2::y)))) (equal (vl-warningtree-fix acl2::x) (vl-warningtree-fix acl2::y)))
Theorem:
(defthm vl-warningtree-equiv-is-an-equivalence (and (booleanp (vl-warningtree-equiv x y)) (vl-warningtree-equiv x x) (implies (vl-warningtree-equiv x y) (vl-warningtree-equiv y x)) (implies (and (vl-warningtree-equiv x y) (vl-warningtree-equiv y z)) (vl-warningtree-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm vl-warningtree-equiv-implies-equal-vl-warningtree-fix-1 (implies (vl-warningtree-equiv acl2::x x-equiv) (equal (vl-warningtree-fix acl2::x) (vl-warningtree-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm vl-warningtree-fix-under-vl-warningtree-equiv (vl-warningtree-equiv (vl-warningtree-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-vl-warningtree-fix-1-forward-to-vl-warningtree-equiv (implies (equal (vl-warningtree-fix acl2::x) acl2::y) (vl-warningtree-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-vl-warningtree-fix-2-forward-to-vl-warningtree-equiv (implies (equal acl2::x (vl-warningtree-fix acl2::y)) (vl-warningtree-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-warningtree-equiv-of-vl-warningtree-fix-1-forward (implies (vl-warningtree-equiv (vl-warningtree-fix acl2::x) acl2::y) (vl-warningtree-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-warningtree-equiv-of-vl-warningtree-fix-2-forward (implies (vl-warningtree-equiv acl2::x (vl-warningtree-fix acl2::y)) (vl-warningtree-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm vl-warningtree-kind$inline-of-vl-warningtree-fix-x (equal (vl-warningtree-kind$inline (vl-warningtree-fix x)) (vl-warningtree-kind$inline x)))
Theorem:
(defthm vl-warningtree-kind$inline-vl-warningtree-equiv-congruence-on-x (implies (vl-warningtree-equiv x x-equiv) (equal (vl-warningtree-kind$inline x) (vl-warningtree-kind$inline x-equiv))) :rule-classes :congruence)