Recognizer for system structures.
(systemp x) → *
Function:
(defun systemp (x) (declare (xargs :guard t)) (let ((__function__ 'systemp)) (declare (ignorable __function__)) (and (consp x) (eq (car x) :system) (mbe :logic (and (alistp (cdr x)) (equal (strip-cars (cdr x)) '(definitions constraints))) :exec (fty::alist-with-carsp (cdr x) '(definitions constraints))) (b* ((definitions (cdr (std::da-nth 0 (cdr x)))) (constraints (cdr (std::da-nth 1 (cdr x))))) (and (definition-listp definitions) (constraint-listp constraints))))))
Theorem:
(defthm consp-when-systemp (implies (systemp x) (consp x)) :rule-classes :compound-recognizer)