Introduce additional return type theorems for the conversions from natural numbers to digits.
Given an equality theorem of the form
The name of the equality theorem
is the first argument of this macro.
The name of each generated return type theorem is
The theorems are generated inside a defsection
whose topic (name),
This macro does not thoroughly validates its inputs. However, its implementation is quite simple, and understanding failures due to incorrect inputs should be easy. Regardless, this macro may be extended to more thoroughly validate its inputs in the future.
Macro:
(defmacro defthm-dab-return-types (eq-thm-name prefix &key (topic 'nil topicp) (parents 'nil parentsp) (short '"" shortp) (long '"" longp)) (declare (xargs :guard (and (symbolp eq-thm-name) (symbolp prefix) (symbolp topic) (symbol-listp parents) (stringp short) (stringp long)))) (cons 'make-event (cons (cons 'defthm-dab-return-types-fn (cons (cons 'quote (cons eq-thm-name 'nil)) (cons (cons 'quote (cons prefix 'nil)) (cons (cons 'quote (cons topic 'nil)) (cons (cons 'quote (cons topicp 'nil)) (cons (cons 'quote (cons parents 'nil)) (cons (cons 'quote (cons parentsp 'nil)) (cons (cons 'quote (cons short 'nil)) (cons (cons 'quote (cons shortp 'nil)) (cons (cons 'quote (cons long 'nil)) (cons (cons 'quote (cons longp 'nil)) '((w state))))))))))))) 'nil)))