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