Get the prefix field from a dec/oct/hex-const-hex.
(dec/oct/hex-const-hex->prefix x) → prefix
This is an ordinary field accessor created by fty::defprod.
Function:
(defun dec/oct/hex-const-hex->prefix$inline (x) (declare (xargs :guard (dec/oct/hex-constp x))) (declare (xargs :guard (equal (dec/oct/hex-const-kind x) :hex))) (let ((__function__ 'dec/oct/hex-const-hex->prefix)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and (equal (dec/oct/hex-const-kind x) :hex) x))) (hprefix-fix (std::da-nth 0 (cdr x)))) :exec (std::da-nth 0 (cdr x)))))
Theorem:
(defthm hprefixp-of-dec/oct/hex-const-hex->prefix (b* ((prefix (dec/oct/hex-const-hex->prefix$inline x))) (hprefixp prefix)) :rule-classes :rewrite)
Theorem:
(defthm dec/oct/hex-const-hex->prefix$inline-of-dec/oct/hex-const-fix-x (equal (dec/oct/hex-const-hex->prefix$inline (dec/oct/hex-const-fix x)) (dec/oct/hex-const-hex->prefix$inline x)))
Theorem:
(defthm dec/oct/hex-const-hex->prefix$inline-dec/oct/hex-const-equiv-congruence-on-x (implies (dec/oct/hex-const-equiv x x-equiv) (equal (dec/oct/hex-const-hex->prefix$inline x) (dec/oct/hex-const-hex->prefix$inline x-equiv))) :rule-classes :congruence)
Theorem:
(defthm dec/oct/hex-const-hex->prefix-when-wrong-kind (implies (not (equal (dec/oct/hex-const-kind x) :hex)) (equal (dec/oct/hex-const-hex->prefix x) (hprefix-fix nil))))