Get the size field from a parstate.
This is an ordinary field accessor created by fty::defprod.
Function:
(defun parstate->size$inline (x) (declare (xargs :guard (parstatep x))) (declare (xargs :guard t)) (let ((__function__ 'parstate->size)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and t x)) (bytes (acl2::byte-list-fix (cdr (std::da-nth 0 x)))) (position (position-fix (cdr (std::da-nth 1 x)))) (chars-read (char+position-list-fix (cdr (std::da-nth 2 x)))) (chars-unread (char+position-list-fix (cdr (std::da-nth 3 x)))) (tokens-read (token+span-list-fix (cdr (std::da-nth 4 x)))) (tokens-unread (token+span-list-fix (cdr (std::da-nth 5 x)))) (checkpoints (acl2::nat-list-fix (cdr (std::da-nth 6 x)))) (gcc (acl2::bool-fix (cdr (std::da-nth 7 x)))) (size (nfix (cdr (std::da-nth 8 x))))) (+ (len bytes) (len chars-unread) (len tokens-unread))) :exec (cdr (std::da-nth 8 x)))))
Theorem:
(defthm natp-of-parstate->size (b* ((size (parstate->size$inline x))) (natp size)) :rule-classes :rewrite)
Theorem:
(defthm parstate->size$inline-of-parstate-fix-x (equal (parstate->size$inline (parstate-fix x)) (parstate->size$inline x)))
Theorem:
(defthm parstate->size$inline-parstate-equiv-congruence-on-x (implies (parstate-equiv x x-equiv) (equal (parstate->size$inline x) (parstate->size$inline x-equiv))) :rule-classes :congruence)