Get the val field from a sparseint$-leaf.
(sparseint$-leaf->val x) → val
This is an ordinary field accessor created by fty::defprod.
Function:
(defun sparseint$-leaf->val$inline (x) (declare (xargs :guard (sparseint$-p x))) (declare (xargs :guard (equal (sparseint$-kind x) :leaf))) (let ((__function__ 'sparseint$-leaf->val)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and (equal (sparseint$-kind x) :leaf) x))) (ifix x)) :exec x)))
Theorem:
(defthm integerp-of-sparseint$-leaf->val (b* ((val (sparseint$-leaf->val$inline x))) (integerp val)) :rule-classes :type-prescription)
Theorem:
(defthm sparseint$-leaf->val$inline-of-sparseint$-fix-x (equal (sparseint$-leaf->val$inline (sparseint$-fix x)) (sparseint$-leaf->val$inline x)))
Theorem:
(defthm sparseint$-leaf->val$inline-sparseint$-equiv-congruence-on-x (implies (sparseint$-equiv x x-equiv) (equal (sparseint$-leaf->val$inline x) (sparseint$-leaf->val$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm sparseint$-leaf->val-when-wrong-kind (implies (not (equal (sparseint$-kind x) :leaf)) (equal (sparseint$-leaf->val x) (ifix nil))))