Check if a symbol consists of three parts separated by dash.
If the symbol has the form
Function:
(defun atc-check-symbol-3part (sym) (declare (xargs :guard (symbolp sym))) (let ((__function__ 'atc-check-symbol-3part)) (declare (ignorable __function__)) (b* ((parts (str::strtok! (symbol-name sym) (list #\-))) ((unless (= (len parts) 3)) (mv nil nil nil nil)) (part1 (intern-in-package-of-symbol (first parts) sym)) (part2 (intern-in-package-of-symbol (second parts) sym)) (part3 (intern-in-package-of-symbol (third parts) sym))) (mv t part1 part2 part3))))
Theorem:
(defthm booleanp-of-atc-check-symbol-3part.yes/no (b* (((mv ?yes/no ?part1 ?part2 ?part3) (atc-check-symbol-3part sym))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm symbolp-of-atc-check-symbol-3part.part1 (b* (((mv ?yes/no ?part1 ?part2 ?part3) (atc-check-symbol-3part sym))) (symbolp part1)) :rule-classes :rewrite)
Theorem:
(defthm symbolp-of-atc-check-symbol-3part.part2 (b* (((mv ?yes/no ?part1 ?part2 ?part3) (atc-check-symbol-3part sym))) (symbolp part2)) :rule-classes :rewrite)
Theorem:
(defthm symbolp-of-atc-check-symbol-3part.part3 (b* (((mv ?yes/no ?part1 ?part2 ?part3) (atc-check-symbol-3part sym))) (symbolp part3)) :rule-classes :rewrite)