Recognizer for sd-key structures.
(sd-key-p x) → *
Function:
(defun sd-key-p (x) (declare (xargs :guard t)) (let ((__function__ 'sd-key-p)) (declare (ignorable __function__)) (and (consp x) (eq (car x) :sd-key) (consp (cdr x)) (consp (cdr (cdr x))) (b* ((pat (car (cdr x))) (index (car (cdr (cdr x)))) (orig (cdr (cdr (cdr x))))) (and (stringp pat) (maybe-natp index) (stringp orig))))))
Theorem:
(defthm consp-when-sd-key-p (implies (sd-key-p x) (consp x)) :rule-classes :compound-recognizer)