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