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