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