Construct a group from a variable number of concatenations.
The concatenations are assembled into an alternation, which is the immediate constituent of a group.
Macro:
(defmacro !_ (&rest concatenations) (cons '!_-fn (cons (cons 'list concatenations) 'nil)))
Function:
(defun !_-fn (alternation) (declare (xargs :guard (alternationp alternation))) (element-group alternation))
Theorem:
(defthm elementp-of-!_-fn (b* ((element (!_-fn alternation))) (elementp element)) :rule-classes :rewrite)
Theorem:
(defthm !_-fn-of-alternation-fix-alternation (equal (!_-fn (alternation-fix alternation)) (!_-fn alternation)))
Theorem:
(defthm !_-fn-alternation-equiv-congruence-on-alternation (implies (alternation-equiv alternation alternation-equiv) (equal (!_-fn alternation) (!_-fn alternation-equiv))) :rule-classes :congruence)