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