(vl-patternkey-update-subexprs x subexprs) → new-x
Function:
(defun vl-patternkey-update-subexprs (x subexprs) (declare (xargs :guard (and (vl-patternkey-p x) (vl-exprlist-p subexprs)))) (declare (xargs :guard (equal (len subexprs) (len (vl-patternkey->subexprs x))))) (let ((__function__ 'vl-patternkey-update-subexprs)) (declare (ignorable __function__)) (vl-patternkey-case x :expr (change-vl-patternkey-expr x :key (car subexprs)) :otherwise (vl-patternkey-fix x))))
Theorem:
(defthm vl-patternkey-p-of-vl-patternkey-update-subexprs (b* ((new-x (vl-patternkey-update-subexprs x subexprs))) (vl-patternkey-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm vl-patternkey-update-subexprs-identity (equal (vl-patternkey-update-subexprs x (vl-patternkey->subexprs x)) (vl-patternkey-fix x)))
Theorem:
(defthm vl-patternkey-update-subexprs-identity2 (implies (equal (len y) (len (vl-patternkey->subexprs x))) (equal (vl-patternkey->subexprs (vl-patternkey-update-subexprs x y)) (vl-exprlist-fix y))))
Theorem:
(defthm vl-patternkey-update-subexprs-of-vl-patternkey-fix-x (equal (vl-patternkey-update-subexprs (vl-patternkey-fix x) subexprs) (vl-patternkey-update-subexprs x subexprs)))
Theorem:
(defthm vl-patternkey-update-subexprs-vl-patternkey-equiv-congruence-on-x (implies (vl-patternkey-equiv x x-equiv) (equal (vl-patternkey-update-subexprs x subexprs) (vl-patternkey-update-subexprs x-equiv subexprs))) :rule-classes :congruence)
Theorem:
(defthm vl-patternkey-update-subexprs-of-vl-exprlist-fix-subexprs (equal (vl-patternkey-update-subexprs x (vl-exprlist-fix subexprs)) (vl-patternkey-update-subexprs x subexprs)))
Theorem:
(defthm vl-patternkey-update-subexprs-vl-exprlist-equiv-congruence-on-subexprs (implies (vl-exprlist-equiv subexprs subexprs-equiv) (equal (vl-patternkey-update-subexprs x subexprs) (vl-patternkey-update-subexprs x subexprs-equiv))) :rule-classes :congruence)