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