Get the int field from a tyspecseq-sint.
(tyspecseq-sint->int x) → int
This is an ordinary field accessor created by fty::defprod.
Function:
(defun tyspecseq-sint->int$inline (x) (declare (xargs :guard (tyspecseqp x))) (declare (xargs :guard (equal (tyspecseq-kind x) :sint))) (let ((__function__ 'tyspecseq-sint->int)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and (equal (tyspecseq-kind x) :sint) x)) (signed (acl2::bool-fix (std::da-nth 0 (cdr x)))) (int (acl2::bool-fix (std::da-nth 1 (cdr x))))) (if (not signed) t int)) :exec (std::da-nth 1 (cdr x)))))
Theorem:
(defthm booleanp-of-tyspecseq-sint->int (b* ((int (tyspecseq-sint->int$inline x))) (booleanp int)) :rule-classes :rewrite)
Theorem:
(defthm tyspecseq-sint->int$inline-of-tyspecseq-fix-x (equal (tyspecseq-sint->int$inline (tyspecseq-fix x)) (tyspecseq-sint->int$inline x)))
Theorem:
(defthm tyspecseq-sint->int$inline-tyspecseq-equiv-congruence-on-x (implies (tyspecseq-equiv x x-equiv) (equal (tyspecseq-sint->int$inline x) (tyspecseq-sint->int$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm tyspecseq-sint->int-when-wrong-kind (implies (not (equal (tyspecseq-kind x) :sint)) (equal (tyspecseq-sint->int x) (b* ((x nil) (signed (acl2::bool-fix (std::da-nth 0 (cdr x)))) (int (acl2::bool-fix (std::da-nth 1 (cdr x))))) (if (not signed) t int)))))