(valid-table-global-lookup ident valid-table) → info?
Function:
(defun valid-table-global-lookup (ident valid-table) (declare (xargs :guard (and (identp ident) (c$::valid-tablep valid-table)))) (let ((__function__ 'valid-table-global-lookup)) (declare (ignorable __function__)) (b* ((scopes (c$::valid-table->scopes valid-table)) ((when (endp scopes)) (raise "Ill-formed validation table: no scope found")) ((unless (endp (rest scopes))) (raise "Ill-formed validation table: more than one scope found")) (scope (first scopes)) (ord (c$::valid-scope->ord scope)) (lookup (assoc-equal ident ord))) (if lookup (cdr lookup) nil))))
Theorem:
(defthm valid-ord-info-optionp-of-valid-table-global-lookup (b* ((info? (valid-table-global-lookup ident valid-table))) (c$::valid-ord-info-optionp info?)) :rule-classes :rewrite)