Gather all of the atoms throughout an expression.
(vl-expr-atoms x) → atoms
We simply gather all of the vl-atom-ps in the expression, with repetition. The resulting list may contain any vl-atom-p, including even odd things like hid pieces and function names, which you might not usually think of as atoms.
Theorem:
(defthm return-type-of-vl-expr-atoms.atoms (b* ((?atoms (vl-expr-atoms x))) (and (vl-exprlist-p atoms) (vl-atomlist-p atoms))) :rule-classes :rewrite)
Theorem:
(defthm return-type-of-vl-exprlist-atoms.atoms (b* ((?atoms (vl-exprlist-atoms x))) (and (vl-exprlist-p atoms) (vl-atomlist-p atoms))) :rule-classes :rewrite)
Theorem:
(defthm true-listp-of-vl-expr-atoms (true-listp (vl-expr-atoms x)) :rule-classes :type-prescription)
Theorem:
(defthm true-listp-of-vl-exprlist-atoms (true-listp (vl-exprlist-atoms x)) :rule-classes :type-prescription)
Theorem:
(defthm vl-expr-atoms-nrev-removal (equal (vl-expr-atoms-nrev x nrev) (append nrev (vl-expr-atoms x))))
Theorem:
(defthm vl-exprlist-atoms-nrev-removal (equal (vl-exprlist-atoms-nrev x nrev) (append nrev (vl-exprlist-atoms x))))
Theorem:
(defthm vl-expr-atoms-of-vl-expr-fix-x (equal (vl-expr-atoms (vl-expr-fix x)) (vl-expr-atoms x)))
Theorem:
(defthm vl-exprlist-atoms-of-vl-exprlist-fix-x (equal (vl-exprlist-atoms (vl-exprlist-fix x)) (vl-exprlist-atoms x)))
Theorem:
(defthm vl-expr-atoms-vl-expr-equiv-congruence-on-x (implies (vl-expr-equiv x x-equiv) (equal (vl-expr-atoms x) (vl-expr-atoms x-equiv))) :rule-classes :congruence)
Theorem:
(defthm vl-exprlist-atoms-vl-exprlist-equiv-congruence-on-x (implies (vl-exprlist-equiv x x-equiv) (equal (vl-exprlist-atoms x) (vl-exprlist-atoms x-equiv))) :rule-classes :congruence)