Get the origwidth field from a vl-constint.
(vl-constint->origwidth x) → origwidth
This is an ordinary field accessor created by defprod.
Function:
(defun vl-constint->origwidth$inline (x) (declare (xargs :guard (vl-value-p x))) (declare (xargs :guard (equal (vl-value-kind x) :vl-constint))) (let ((__function__ 'vl-constint->origwidth)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and (equal (vl-value-kind x) :vl-constint) x))) (pos-fix (std::prod-car (std::prod-car (cdr x))))) :exec (std::prod-car (std::prod-car (cdr x))))))
Theorem:
(defthm posp-of-vl-constint->origwidth (b* ((origwidth (vl-constint->origwidth$inline x))) (posp origwidth)) :rule-classes :type-prescription)
Theorem:
(defthm vl-constint->origwidth$inline-of-vl-value-fix-x (equal (vl-constint->origwidth$inline (vl-value-fix x)) (vl-constint->origwidth$inline x)))
Theorem:
(defthm vl-constint->origwidth$inline-vl-value-equiv-congruence-on-x (implies (vl-value-equiv x x-equiv) (equal (vl-constint->origwidth$inline x) (vl-constint->origwidth$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm vl-constint->origwidth-when-wrong-kind (implies (not (equal (vl-value-kind x) :vl-constint)) (equal (vl-constint->origwidth x) (pos-fix nil))))