Generate the right-to-left rewrite rule.
(defequal-gen-right-to-left right-to-left right-to-left-enable name left right x1...xn left-to-right) → (mv local-event exported-event)
Function:
(defun defequal-gen-right-to-left (right-to-left right-to-left-enable name left right x1...xn left-to-right) (declare (xargs :guard (and (symbolp right-to-left) (booleanp right-to-left-enable) (symbolp name) (symbolp left) (symbolp right) (symbol-listp x1...xn) (symbolp left-to-right)))) (let ((__function__ 'defequal-gen-right-to-left)) (declare (ignorable __function__)) (b* ((macro (if right-to-left-enable 'defthm 'defthmd)) (body (cons 'implies (cons (cons name 'nil) (cons (cons 'equal (cons (cons right x1...xn) (cons (cons left x1...xn) 'nil))) 'nil)))) (hints (cons ':hints (cons (cons (cons '"Goal" (cons ':in-theory (cons (cons 'quote (cons (cons left-to-right 'nil) 'nil)) 'nil))) 'nil) 'nil))) (local-event (cons 'local (cons (cons macro (cons right-to-left (cons body hints))) 'nil))) (exported-event (cons macro (cons right-to-left (cons body 'nil))))) (mv local-event exported-event))))
Theorem:
(defthm pseudo-event-formp-of-defequal-gen-right-to-left.local-event (b* (((mv ?local-event ?exported-event) (defequal-gen-right-to-left right-to-left right-to-left-enable name left right x1...xn left-to-right))) (pseudo-event-formp local-event)) :rule-classes :rewrite)
Theorem:
(defthm pseudo-event-formp-of-defequal-gen-right-to-left.exported-event (b* (((mv ?local-event ?exported-event) (defequal-gen-right-to-left right-to-left right-to-left-enable name left right x1...xn left-to-right))) (pseudo-event-formp exported-event)) :rule-classes :rewrite)