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