Generate a
(evmac-generate-defthm name &key (formula ':absent) (rule-classes ':rewrite) (enable ':absent) (hints 'nil) (instructions 'nil) (otf-flg 'nil)) → (mv local-event exported-event)
Function:
(defun evmac-generate-defthm-fn (name formula rule-classes enable hints instructions otf-flg) (declare (xargs :guard (and (symbolp name) (or (booleanp enable) (eq enable :absent)) (true-listp hints) (true-listp instructions) (booleanp otf-flg)))) (declare (xargs :guard (implies (not rule-classes) (eq enable :absent)))) (let ((__function__ 'evmac-generate-defthm)) (declare (ignorable __function__)) (b* (((when (eq formula :absent)) (raise "Internal error: :FORMULA must be always supplied.") (mv '(irrelevant) '(irrelevant))) ((unless (iff (eq rule-classes nil) (eq enable :absent))) (prog2$ (if rule-classes (raise "Internal error: :ENABLE must be supplied ~ when :RULE-CLASSES is not NIL.") (raise "Internal error: :ENABLE must not be supplied ~ when :RULE-CLASSES is NIL.")) (mv '(irrelevant) '(irrelevant)))) ((when (and hints instructions)) (raise "Internal error: at most one of :HINTS and :INSTRUCTIONS ~ may be non-NIL.") (mv '(irrelevant) '(irrelevant))) (macro (if enable 'defthm 'defthmd)) (rule-classes (and rule-classes (list :rule-classes rule-classes))) (hints (and hints (list :hints hints))) (instructions (and instructions (list :instructions instructions))) (otf-flg (and otf-flg (list :otf-flg t))) (local-event (cons 'local (cons (cons macro (cons name (cons formula (append rule-classes (append hints (append instructions otf-flg)))))) 'nil))) (exported-event (cons macro (cons name (cons formula rule-classes))))) (mv local-event exported-event))))
Theorem:
(defthm pseudo-event-formp-of-evmac-generate-defthm.local-event (b* (((mv ?local-event ?exported-event) (evmac-generate-defthm-fn name formula rule-classes enable hints instructions otf-flg))) (pseudo-event-formp local-event)) :rule-classes :rewrite)
Theorem:
(defthm pseudo-event-formp-of-evmac-generate-defthm.exported-event (b* (((mv ?local-event ?exported-event) (evmac-generate-defthm-fn name formula rule-classes enable hints instructions otf-flg))) (pseudo-event-formp exported-event)) :rule-classes :rewrite)