Check if all the specifiers and qualifiers in a list are type specifiers.
(check-spec/qual-list-all-tyspec specquals) → (mv yes/no tyspecs)
If the check succeeds, also return the list of type specifiers, in the same order.
Function:
(defun check-spec/qual-list-all-tyspec (specquals) (declare (xargs :guard (spec/qual-listp specquals))) (let ((__function__ 'check-spec/qual-list-all-tyspec)) (declare (ignorable __function__)) (b* (((when (endp specquals)) (mv t nil)) (specqual (car specquals)) ((unless (spec/qual-case specqual :tyspec)) (mv nil nil)) ((mv yes/no tyspecs) (check-spec/qual-list-all-tyspec (cdr specquals)))) (if yes/no (mv t (cons (spec/qual-tyspec->unwrap specqual) tyspecs)) (mv nil nil)))))
Theorem:
(defthm booleanp-of-check-spec/qual-list-all-tyspec.yes/no (b* (((mv ?yes/no ?tyspecs) (check-spec/qual-list-all-tyspec specquals))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm type-spec-listp-of-check-spec/qual-list-all-tyspec.tyspecs (b* (((mv ?yes/no ?tyspecs) (check-spec/qual-list-all-tyspec specquals))) (type-spec-listp tyspecs)) :rule-classes :rewrite)
Theorem:
(defthm check-spec/qual-list-all-tyspec-of-spec/qual-list-fix-specquals (equal (check-spec/qual-list-all-tyspec (spec/qual-list-fix specquals)) (check-spec/qual-list-all-tyspec specquals)))
Theorem:
(defthm check-spec/qual-list-all-tyspec-spec/qual-list-equiv-congruence-on-specquals (implies (spec/qual-list-equiv specquals specquals-equiv) (equal (check-spec/qual-list-all-tyspec specquals) (check-spec/qual-list-all-tyspec specquals-equiv))) :rule-classes :congruence)