Recognizer for svar-split structures.
(svar-split-p x) → *
Function:
(defun svar-split-p (x) (declare (xargs :guard t)) (let ((__function__ 'svar-split-p)) (declare (ignorable __function__)) (and (consp x) (cond ((eq (car x) :segment) (and (true-listp (cdr x)) (eql (len (cdr x)) 3) (b* ((width (std::da-nth 0 (cdr x))) (var (std::da-nth 1 (cdr x))) (rest (std::da-nth 2 (cdr x)))) (and (posp width) (svar-p var) (svar-split-p rest))))) (t (and (eq (car x) :remainder) (and (true-listp (cdr x)) (eql (len (cdr x)) 1)) (b* ((var (std::da-nth 0 (cdr x)))) (svar-p var))))))))
Theorem:
(defthm consp-when-svar-split-p (implies (svar-split-p x) (consp x)) :rule-classes :compound-recognizer)