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