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