(vl-plainarglist-update-ifports x ports ss scopes) → (mv err final-portlist inst-ifportalist)
Function:
(defun vl-plainarglist-update-ifports (x ports ss scopes) (declare (xargs :guard (and (vl-plainarglist-p x) (vl-portlist-p ports) (vl-scopestack-p ss) (vl-elabscopes-p scopes)))) (declare (xargs :guard (eql (len x) (len ports)))) (let ((__function__ 'vl-plainarglist-update-ifports)) (declare (ignorable __function__)) (b* (((when (atom x)) (mv nil (vl-portlist-fix ports) nil)) ((mv err1 port1 ifportalist1) (vl-plainarg-update-ifports (car x) (car ports) ss scopes)) ((mv err2 rest-ports rest-ifportalist) (vl-plainarglist-update-ifports (cdr x) (cdr ports) ss scopes))) (mv (vmsg-concat err1 err2) (cons-with-hint port1 rest-ports ports) (append-without-guard ifportalist1 rest-ifportalist)))))
Theorem:
(defthm return-type-of-vl-plainarglist-update-ifports.err (b* (((mv ?err ?final-portlist ?inst-ifportalist) (vl-plainarglist-update-ifports x ports ss scopes))) (iff (vl-msg-p err) err)) :rule-classes :rewrite)
Theorem:
(defthm vl-portlist-p-of-vl-plainarglist-update-ifports.final-portlist (b* (((mv ?err ?final-portlist ?inst-ifportalist) (vl-plainarglist-update-ifports x ports ss scopes))) (vl-portlist-p final-portlist)) :rule-classes :rewrite)
Theorem:
(defthm vl-ifport-alist-p-of-vl-plainarglist-update-ifports.inst-ifportalist (b* (((mv ?err ?final-portlist ?inst-ifportalist) (vl-plainarglist-update-ifports x ports ss scopes))) (vl-ifport-alist-p inst-ifportalist)) :rule-classes :rewrite)
Theorem:
(defthm vl-plainarglistlist-update-ifports-ports-preserved-when-no-ifports (b* (((mv ?err ?final-portlist ?inst-ifportalist) (vl-plainarglist-update-ifports x ports ss scopes))) (implies (and (atom inst-ifportalist) (equal (len x) (len ports))) (equal final-portlist (vl-portlist-fix ports)))))
Theorem:
(defthm vl-plainarglist-update-ifports-of-vl-plainarglist-fix-x (equal (vl-plainarglist-update-ifports (vl-plainarglist-fix x) ports ss scopes) (vl-plainarglist-update-ifports x ports ss scopes)))
Theorem:
(defthm vl-plainarglist-update-ifports-vl-plainarglist-equiv-congruence-on-x (implies (vl-plainarglist-equiv x x-equiv) (equal (vl-plainarglist-update-ifports x ports ss scopes) (vl-plainarglist-update-ifports x-equiv ports ss scopes))) :rule-classes :congruence)
Theorem:
(defthm vl-plainarglist-update-ifports-of-vl-portlist-fix-ports (equal (vl-plainarglist-update-ifports x (vl-portlist-fix ports) ss scopes) (vl-plainarglist-update-ifports x ports ss scopes)))
Theorem:
(defthm vl-plainarglist-update-ifports-vl-portlist-equiv-congruence-on-ports (implies (vl-portlist-equiv ports ports-equiv) (equal (vl-plainarglist-update-ifports x ports ss scopes) (vl-plainarglist-update-ifports x ports-equiv ss scopes))) :rule-classes :congruence)
Theorem:
(defthm vl-plainarglist-update-ifports-of-vl-scopestack-fix-ss (equal (vl-plainarglist-update-ifports x ports (vl-scopestack-fix ss) scopes) (vl-plainarglist-update-ifports x ports ss scopes)))
Theorem:
(defthm vl-plainarglist-update-ifports-vl-scopestack-equiv-congruence-on-ss (implies (vl-scopestack-equiv ss ss-equiv) (equal (vl-plainarglist-update-ifports x ports ss scopes) (vl-plainarglist-update-ifports x ports ss-equiv scopes))) :rule-classes :congruence)
Theorem:
(defthm vl-plainarglist-update-ifports-of-vl-elabscopes-fix-scopes (equal (vl-plainarglist-update-ifports x ports ss (vl-elabscopes-fix scopes)) (vl-plainarglist-update-ifports x ports ss scopes)))
Theorem:
(defthm vl-plainarglist-update-ifports-vl-elabscopes-equiv-congruence-on-scopes (implies (vl-elabscopes-equiv scopes scopes-equiv) (equal (vl-plainarglist-update-ifports x ports ss scopes) (vl-plainarglist-update-ifports x ports ss scopes-equiv))) :rule-classes :congruence)