Gather all top-level expressions from a vl-maybe-expr-p.
(vl-maybe-expr-allexprs x) → exprs
Function:
(defun vl-maybe-expr-allexprs (x) (declare (xargs :guard (vl-maybe-expr-p x))) (let ((__function__ 'vl-maybe-expr-allexprs)) (declare (ignorable __function__)) (mbe :logic (b* ((x (vl-maybe-expr-fix x))) (if x (list x) nil)) :exec (with-local-nrev (vl-maybe-expr-allexprs-nrev x nrev)))))
Theorem:
(defthm vl-exprlist-p-of-vl-maybe-expr-allexprs (b* ((exprs (vl-maybe-expr-allexprs x))) (vl-exprlist-p exprs)) :rule-classes :rewrite)
Theorem:
(defthm true-listp-of-vl-maybe-expr-allexprs (true-listp (vl-maybe-expr-allexprs x)) :rule-classes :type-prescription)
Theorem:
(defthm vl-maybe-expr-allexprs-nrev-removal (equal (vl-maybe-expr-allexprs-nrev x nrev) (append nrev (vl-maybe-expr-allexprs x))))
Theorem:
(defthm vl-maybe-expr-allexprs-of-vl-maybe-expr-fix-x (equal (vl-maybe-expr-allexprs (vl-maybe-expr-fix x)) (vl-maybe-expr-allexprs x)))
Theorem:
(defthm vl-maybe-expr-allexprs-vl-maybe-expr-equiv-congruence-on-x (implies (vl-maybe-expr-equiv x x-equiv) (equal (vl-maybe-expr-allexprs x) (vl-maybe-expr-allexprs x-equiv))) :rule-classes :congruence)