Recognizer for transform structures.
(transformp x) → *
Function:
(defun transformp (x) (declare (xargs :guard t)) (let ((__function__ 'transformp)) (declare (ignorable __function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(new-function-name old-function-name transform-name arguments))) :exec (fty::alist-with-carsp x '(new-function-name old-function-name transform-name arguments))) (b* ((new-function-name (cdr (std::da-nth 0 x))) (old-function-name (cdr (std::da-nth 1 x))) (transform-name (cdr (std::da-nth 2 x))) (arguments (cdr (std::da-nth 3 x)))) (and (identifierp new-function-name) (identifierp old-function-name) (stringp transform-name) (transform-argument-listp arguments))))))
Theorem:
(defthm consp-when-transformp (implies (transformp x) (consp x)) :rule-classes :compound-recognizer)