(vl-consteval-concat x val-acc width-acc) → ans
Function:
(defun vl-consteval-concat (x val-acc width-acc) (declare (xargs :guard (and (vl-exprlist-p x) (natp val-acc) (natp width-acc)))) (declare (xargs :guard (and (vl-exprlist-resolved-p x) (consp x) (unsigned-byte-p width-acc val-acc)))) (let ((__function__ 'vl-consteval-concat)) (declare (ignorable __function__)) (b* (((vl-constint x1) (vl-atom->guts (car x))) (val-acc (acl2::logapp x1.origwidth x1.value (lnfix val-acc))) (width-acc (+ x1.origwidth (lnfix width-acc))) ((when (atom (cdr x))) (vl-consteval-ans :value val-acc :width width-acc :type :vl-unsigned))) (vl-consteval-concat (cdr x) val-acc width-acc))))
Theorem:
(defthm vl-expr-p-of-vl-consteval-concat (b* ((ans (vl-consteval-concat x val-acc width-acc))) (vl-expr-p ans)) :rule-classes :rewrite)
Theorem:
(defthm vl-expr-welltyped-p-of-vl-consteval-concat (b* ((ans (vl-consteval-concat x val-acc width-acc))) (vl-expr-welltyped-p ans)) :rule-classes :rewrite)
Theorem:
(defthm vl-expr->finalwidth-of-vl-consteval-concat (b* ((ans (vl-consteval-concat x val-acc width-acc))) (implies (and (vl-exprlist-welltyped-p x) (vl-exprlist-resolved-p x) (consp x)) (equal (vl-expr->finalwidth ans) (+ (nfix width-acc) (sum-nats (vl-exprlist->finalwidths x)))))) :rule-classes :rewrite)
Theorem:
(defthm vl-expr->finaltype-of-vl-consteval-concat (b* ((ans (vl-consteval-concat x val-acc width-acc))) (equal (vl-expr->finaltype ans) :vl-unsigned)) :rule-classes :rewrite)
Theorem:
(defthm vl-expr-resolved-p-of-vl-consteval-concat (b* ((ans (vl-consteval-concat x val-acc width-acc))) (vl-expr-resolved-p ans)) :rule-classes :rewrite)
Theorem:
(defthm vl-consteval-concat-of-vl-exprlist-fix-x (equal (vl-consteval-concat (vl-exprlist-fix x) val-acc width-acc) (vl-consteval-concat x val-acc width-acc)))
Theorem:
(defthm vl-consteval-concat-vl-exprlist-equiv-congruence-on-x (implies (vl-exprlist-equiv x x-equiv) (equal (vl-consteval-concat x val-acc width-acc) (vl-consteval-concat x-equiv val-acc width-acc))) :rule-classes :congruence)
Theorem:
(defthm vl-consteval-concat-of-nfix-val-acc (equal (vl-consteval-concat x (nfix val-acc) width-acc) (vl-consteval-concat x val-acc width-acc)))
Theorem:
(defthm vl-consteval-concat-nat-equiv-congruence-on-val-acc (implies (acl2::nat-equiv val-acc val-acc-equiv) (equal (vl-consteval-concat x val-acc width-acc) (vl-consteval-concat x val-acc-equiv width-acc))) :rule-classes :congruence)
Theorem:
(defthm vl-consteval-concat-of-nfix-width-acc (equal (vl-consteval-concat x val-acc (nfix width-acc)) (vl-consteval-concat x val-acc width-acc)))
Theorem:
(defthm vl-consteval-concat-nat-equiv-congruence-on-width-acc (implies (acl2::nat-equiv width-acc width-acc-equiv) (equal (vl-consteval-concat x val-acc width-acc) (vl-consteval-concat x val-acc width-acc-equiv))) :rule-classes :congruence)