Resolve arguments in a vl-modinst-p, if the flag is true.
(vl-modinst-maybe-argresolve flag x ss warnings) → (mv warnings new-x)
Function:
(defun vl-modinst-maybe-argresolve (flag x ss warnings) (declare (xargs :guard (and (booleanp flag) (vl-modinst-p x) (vl-scopestack-p ss) (vl-warninglist-p warnings)))) (let ((__function__ 'vl-modinst-maybe-argresolve)) (declare (ignorable __function__)) (if flag (vl-modinst-argresolve x ss warnings) (mv (vl-warninglist-fix warnings) (vl-modinst-fix x)))))
Theorem:
(defthm vl-warninglist-p-of-vl-modinst-maybe-argresolve.warnings (b* (((mv ?warnings ?new-x) (vl-modinst-maybe-argresolve flag x ss warnings))) (vl-warninglist-p warnings)) :rule-classes :rewrite)
Theorem:
(defthm vl-modinst-p-of-vl-modinst-maybe-argresolve.new-x (b* (((mv ?warnings ?new-x) (vl-modinst-maybe-argresolve flag x ss warnings))) (vl-modinst-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-modinst-maybe-argresolve-of-bool-fix-flag (equal (vl-modinst-maybe-argresolve (acl2::bool-fix flag) x ss warnings) (vl-modinst-maybe-argresolve flag x ss warnings)))
Theorem:
(defthm vl-modinst-maybe-argresolve-iff-congruence-on-flag (implies (iff flag flag-equiv) (equal (vl-modinst-maybe-argresolve flag x ss warnings) (vl-modinst-maybe-argresolve flag-equiv x ss warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-modinst-maybe-argresolve-of-vl-modinst-fix-x (equal (vl-modinst-maybe-argresolve flag (vl-modinst-fix x) ss warnings) (vl-modinst-maybe-argresolve flag x ss warnings)))
Theorem:
(defthm vl-modinst-maybe-argresolve-vl-modinst-equiv-congruence-on-x (implies (vl-modinst-equiv x x-equiv) (equal (vl-modinst-maybe-argresolve flag x ss warnings) (vl-modinst-maybe-argresolve flag x-equiv ss warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-modinst-maybe-argresolve-of-vl-scopestack-fix-ss (equal (vl-modinst-maybe-argresolve flag x (vl-scopestack-fix ss) warnings) (vl-modinst-maybe-argresolve flag x ss warnings)))
Theorem:
(defthm vl-modinst-maybe-argresolve-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-modinst-maybe-argresolve flag x ss warnings) (vl-modinst-maybe-argresolve flag x ss-equiv warnings))) :rule-classes :congruence)
Theorem:
(defthm vl-modinst-maybe-argresolve-of-vl-warninglist-fix-warnings (equal (vl-modinst-maybe-argresolve flag x ss (vl-warninglist-fix warnings)) (vl-modinst-maybe-argresolve flag x ss warnings)))
Theorem:
(defthm vl-modinst-maybe-argresolve-vl-warninglist-equiv-congruence-on-warnings (implies (vl-warninglist-equiv warnings warnings-equiv) (equal (vl-modinst-maybe-argresolve flag x ss warnings) (vl-modinst-maybe-argresolve flag x ss warnings-equiv))) :rule-classes :congruence)