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