Get the index field from a address.
(address->index x) → index
This is an ordinary field accessor created by defprod.
Function:
(defun address->index$inline (x) (declare (xargs :guard (address-p x))) (declare (xargs :guard t)) (let ((__function__ 'address->index)) (declare (ignorable __function__)) (mbe :logic (b* ((x (and t x))) (acl2::maybe-natp-fix (if (or (atom x) (not (eq (car x) :address))) nil (nth 2 x)))) :exec (if (or (atom x) (not (eq (car x) :address))) nil (nth 2 x)))))
Theorem:
(defthm maybe-natp-of-address->index (b* ((index (address->index$inline x))) (maybe-natp index)) :rule-classes (:rewrite :type-prescription))
Theorem:
(defthm address->index$inline-of-address-fix-x (equal (address->index$inline (address-fix x)) (address->index$inline x)))
Theorem:
(defthm address->index$inline-address-equiv-congruence-on-x (implies (address-equiv x x-equiv) (equal (address->index$inline x) (address->index$inline x-equiv))) :rule-classes :congruence)