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