Create an event form to
(install-not-normalized-event fn local names-to-avoid wrld) → (mv event name updated-names-to-avoid)
Ensure that the name of the theorem is not already in use
and is not among a list of names to avoid.
Start with the default name
(i.e. the concatenation of
the name of
Function:
(defun install-not-normalized-event (fn local names-to-avoid wrld) (declare (xargs :guard (and (symbolp fn) (booleanp local) (symbol-listp names-to-avoid) (plist-worldp wrld)))) (let ((__function__ 'install-not-normalized-event)) (declare (ignorable __function__)) (b* ((name (install-not-normalized-name fn)) ((mv name names-to-avoid) (fresh-logical-name-with-$s-suffix name nil names-to-avoid wrld)) (event (if local (cons 'local (cons (cons 'install-not-normalized (cons fn (cons ':defthm-name (cons (cons 'quote (cons name 'nil)) '(:allp nil))))) 'nil)) (cons 'install-not-normalized (cons fn (cons ':defthm-name (cons (cons 'quote (cons name 'nil)) '(:allp nil)))))))) (mv event name names-to-avoid))))
Theorem:
(defthm pseudo-event-formp-of-install-not-normalized-event.event (b* (((mv ?event ?name ?updated-names-to-avoid) (install-not-normalized-event fn local names-to-avoid wrld))) (pseudo-event-formp event)) :rule-classes :rewrite)
Theorem:
(defthm symbolp-of-install-not-normalized-event.name (b* (((mv ?event ?name ?updated-names-to-avoid) (install-not-normalized-event fn local names-to-avoid wrld))) (symbolp name)) :rule-classes :rewrite)
Theorem:
(defthm symbol-listp-of-install-not-normalized-event.updated-names-to-avoid (implies (symbol-listp names-to-avoid) (b* (((mv ?event ?name ?updated-names-to-avoid) (install-not-normalized-event fn local names-to-avoid wrld))) (symbol-listp updated-names-to-avoid))) :rule-classes :rewrite)