• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
          • Syntax-for-tools
          • Atc
            • Atc-implementation
              • Atc-abstract-syntax
              • Atc-pretty-printer
              • Atc-event-and-code-generation
                • Atc-symbolic-computation-states
                • Atc-symbolic-execution-rules
                • Atc-gen-ext-declon-lists
                • Atc-function-and-loop-generation
                  • Atc-gen-cfun-correct-thm
                  • Atc-typed-formals
                  • Atc-gen-outer-bindings-and-hyps
                  • Atc-gen-fundef
                  • Atc-gen-exec-stmt-while-for-loop
                  • Atc-gen-context-preamble
                  • Atc-gen-pop-frame-thm
                  • Atc-gen-loop-correct-thm
                  • Atc-gen-init-scope-thms
                  • Atc-gen-fun-correct-thm
                  • Atc-gen-fn-result-thm
                    • Atc-gen-loop-body-correct-thm
                    • Atc-gen-loop
                    • Atc-gen-loop-test-correct-thm
                    • Atc-check-guard-conjunct
                    • Atc-find-affected
                    • Atc-gen-cfun-final-compustate
                    • Atc-gen-init-inscope-auto
                    • Atc-gen-init-inscope-static
                    • Atc-gen-push-init-thm
                    • Atc-gen-loop-measure-fn
                    • Atc-gen-fun-endstate
                    • Atc-gen-loop-termination-thm
                    • Atc-gen-formal-thm
                    • Atc-gen-loop-final-compustate
                    • Atc-gen-loop-measure-thm
                    • Atc-gen-object-disjoint-hyps
                    • Atc-loop-body-term-subst
                    • Atc-gen-omap-update-formals
                    • Atc-gen-loop-tthm-formula
                    • Atc-gen-init-inscope
                    • Atc-gen-fn-def*
                    • Atc-gen-param-declon-list
                    • Atc-formal-affectablep
                    • Atc-gen-cfun-fun-env-thm
                    • Atc-gen-add-var-formals
                    • Atc-gen-cfun-fun-env-thm-name
                    • Atc-gen-fn-guard
                    • Atc-filter-exec-fun-args
                    • Atc-gen-context-preamble-aux-aux
                    • Atc-typed-formals-to-extobjs
                    • Atc-formal-affectable-listp
                  • Atc-statement-generation
                  • Atc-gen-fileset
                  • Atc-gen-everything
                  • Atc-gen-obj-declon
                  • Atc-gen-fileset-event
                  • Atc-tag-tables
                  • Atc-expression-generation
                  • Atc-generation-contexts
                  • Atc-gen-wf-thm
                  • Term-checkers-atc
                  • Atc-variable-tables
                  • Term-checkers-common
                  • Atc-gen-init-fun-env-thm
                  • Atc-gen-appconds
                  • Read-write-variables
                  • Atc-gen-thm-assert-events
                  • Test*
                  • Atc-gen-prog-const
                  • Atc-gen-expr-bool
                  • Atc-theorem-generation
                  • Atc-tag-generation
                  • Atc-gen-expr-pure
                  • Atc-function-tables
                  • Atc-object-tables
                • Fty-pseudo-term-utilities
                • Atc-term-recognizers
                • Atc-input-processing
                • Atc-shallow-embedding
                • Atc-process-inputs-and-gen-everything
                • Atc-table
                • Atc-fn
                • Atc-pretty-printing-options
                • Atc-types
                • Atc-macro-definition
              • Atc-tutorial
            • Language
            • Representation
            • Transformation-tools
            • Insertion-sort
            • Pack
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Atc-function-and-loop-generation

    Atc-gen-fn-result-thm

    Generate the theorem about the result(s) of fn.

    Signature
    (atc-gen-fn-result-thm fn type? 
                           affect typed-formals prec-fns prec-tags 
                           prec-objs names-to-avoid state) 
     
      → 
    (mv events name updated-names-to-avoid)
    Arguments
    fn — Guard (symbolp fn).
    type? — Guard (type-optionp type?).
    affect — Guard (symbol-listp affect).
    typed-formals — Guard (atc-symbol-varinfo-alistp typed-formals).
    prec-fns — Guard (atc-symbol-fninfo-alistp prec-fns).
    prec-tags — Guard (atc-string-taginfo-alistp prec-tags).
    prec-objs — Guard (atc-string-objinfo-alistp prec-objs).
    names-to-avoid — Guard (symbol-listp names-to-avoid).
    Returns
    events — Type (pseudo-event-form-listp events).
    name — Type (symbolp name).
    updated-names-to-avoid — Type (symbol-listp updated-names-to-avoid), given (symbol-listp names-to-avoid).

    This is a local theorem for now.

    The restrictions on the form of the functions that ATC translates to C ensures that, under the guard, these functions always return C values. This is fairly easy to see, thinking of the different allowed forms of these functions' bodies:

    • A formal parameter is constrained to be a C value by the guard.
    • Calls of sint-dec-const, add-sint-sint, etc. are known to return C values.
    • Calls of array and structure readers and writers are known to return C values.
    • A let or mv-let variable is equal to a term that, recursively, always returns a C value.
    • A call of a preceding function returns (a) C value(s), as proved by the same theorems for the preceding functions.
    • An if returns the same as its branches, when the test is not mbt.
    • An if return the same as its `then' branch, when the test is mbt, because the guard excludes the `else' branch from consideration.
    • An mv returns C values, because either they are parameters or bound variables, or they are terms that recursively return C values (the latter case is for non-recursive functions that return a non-void result and also affect arrays and structures).

    This suggests a coarse but adequate proof strategy: We use the theory consisting of the definition of fn, the return type theorems of sint-dec-const and related functions, the return type theorems for array and structure readers and writers, and the theorems about the preceding functions. We also include the definitions of the recognizers of the external objects that precede fn, which certainly include any external object used in fn: this is needed if fn returns the external object, because the guard uses its recognizer, which implies but differs from a type predicate. We also add a :use hint for the guard theorem of fn. The theorems about structure readers and writers are taken from the alist of the preceding structure tags.

    In the absence of mbt, we would not need all of the guard as hypothesis, but only the part that constrains the formal parameters to be C values. These hypotheses are needed when the function returns them; when instead the function returns a representation of some operation, e.g. a call of sint-dec-const or add-sint-sint, these return C values unconditionally, so no hypotheses are needed. This is because ATC, when generating C code, ensures that the ACL2 terms follow the C typing rules, whether the terms are reachable under the guards or not. However, in the presence of mbt, we need the guard to exclude the `else' branches, which are otherwise unconstrained.

    As explained in the user documentation, an ACL2 function may return a combination of an optional C result and zero or more affected variables or arrays or structures. We collect all of them. The C result is determined from the optional C type of the function, which is nil for recursive functions, and may or may not be void for non-recursive functions. The affected variables are also considered as results. We concatenate zero or one types from type? with zero or more types from affect and typed-formals. More precisely, we make an alist instead of a list, whose values are the types in question and whose keys are nil for the C result (if present) and the names in affect for the other ones. Then we operate on the resulting alist, which forms all the results of the function with their names (and nil for the result, if present). The alist is never empty (an ACL2 function must always return something). If the alist is a singleton, we generate assertions about the function call. If the list has multiple elements, we generate assertions for the mv-nths of the function call.

    If fn is recursive, we generate a hint to induct on the function. Since ACL2 disallows :use and :induct hints on the goal, we make the :use hint a computed hint; we do that whether fn is recursive or not, for simplicity.

    Terms may appear during the proof of this theorem, where mv-nths are applied to lists (i.e. cons nests). So we add the rule

    Theorem: mv-nth-of-cons

    (defthm mv-nth-of-cons
      (implies (syntaxp (quotep acl2::n))
               (equal (mv-nth acl2::n (cons acl2::a acl2::b))
                      (if (zp acl2::n)
                          acl2::a
                        (mv-nth (1- acl2::n) acl2::b)))))
    to the theory, in order to simplify those terms. We also enable the executable counterpart of zp to simplify the test in the right-hand side of that rule.

    For each result of the function, we always generate an assertion about its C type.

    We also generate assertions saying that the results are not nil. Without this, some proofs fail with a subgoal saying that a function result is nil, which is false. This seems to happen only with functions returning multiple results, where the results in question have the form (mv-nth ...). So we generate these non-nil theorems only for multiple results. These theorems have to be rewrite rules: with type prescription rules, the example theorems mentioned above still fail. To prove these non-nil theorems, it seems sufficient to enable the executable counterparts of the type recognizers; the subgoals that arise without them have the form (<recognizer> nil).

    We also generate assertions saying that each array returned by the function has the same length as the corresponding input array. This is necessary for the correctness proofs of functions that call this function.

    Definitions and Theorems

    Function: atc-gen-fn-result-thm-aux1

    (defun atc-gen-fn-result-thm-aux1 (affect typed-formals)
     (declare
         (xargs :guard (and (symbol-listp affect)
                            (atc-symbol-varinfo-alistp typed-formals))))
     (let ((__function__ 'atc-gen-fn-result-thm-aux1))
      (declare (ignorable __function__))
      (cond
          ((endp affect) nil)
          (t (b* ((info (cdr (assoc-eq (car affect) typed-formals))))
               (if (atc-var-infop info)
                   (acons (car affect)
                          (atc-var-info->type info)
                          (atc-gen-fn-result-thm-aux1 (cdr affect)
                                                      typed-formals))
                 (raise "Internal error: variable ~x0 not found in ~x1."
                        (car affect)
                        typed-formals)))))))

    Theorem: symbol-type-alistp-of-atc-gen-fn-result-thm-aux1

    (defthm symbol-type-alistp-of-atc-gen-fn-result-thm-aux1
     (implies
       (symbol-listp affect)
       (b* ((results (atc-gen-fn-result-thm-aux1 affect typed-formals)))
         (symbol-type-alistp results)))
     :rule-classes :rewrite)

    Function: atc-gen-fn-result-thm-aux2

    (defun atc-gen-fn-result-thm-aux2 (results index? fn-call prec-tags)
     (declare
          (xargs :guard (and (symbol-type-alistp results)
                             (maybe-natp index?)
                             (pseudo-termp fn-call)
                             (atc-string-taginfo-alistp prec-tags))))
     (let ((__function__ 'atc-gen-fn-result-thm-aux2))
      (declare (ignorable __function__))
      (b*
       (((when (endp results)) nil)
        (theresult (if index? (cons 'mv-nth
                                    (cons index? (cons fn-call 'nil)))
                     fn-call))
        ((cons name type) (car results))
        (type-conjunct (cons (atc-type-to-recognizer type prec-tags)
                             (cons theresult 'nil)))
        (nonnil-conjunct? (and index? (list theresult)))
        (arraylength-conjunct?
         (b* (((unless (type-case type :array)) nil)
              (elemtype (type-array->of type))
              ((unless (type-nonchar-integerp elemtype))
               nil)
              (elemtype-array-length
                   (pack (integer-type-to-fixtype elemtype)
                         '-array-length)))
          (list
           (cons
               'equal
               (cons (cons elemtype-array-length
                           (cons theresult 'nil))
                     (cons (cons elemtype-array-length (cons name 'nil))
                           'nil)))))))
       (append (list type-conjunct)
               nonnil-conjunct? arraylength-conjunct?
               (atc-gen-fn-result-thm-aux2 (cdr results)
                                           (and index? (1+ index?))
                                           fn-call prec-tags)))))

    Function: atc-gen-fn-result-thm

    (defun atc-gen-fn-result-thm
           (fn type?
               affect typed-formals prec-fns prec-tags
               prec-objs names-to-avoid state)
     (declare (xargs :stobjs (state)))
     (declare
          (xargs :guard (and (symbolp fn)
                             (type-optionp type?)
                             (symbol-listp affect)
                             (atc-symbol-varinfo-alistp typed-formals)
                             (atc-symbol-fninfo-alistp prec-fns)
                             (atc-string-taginfo-alistp prec-tags)
                             (atc-string-objinfo-alistp prec-objs)
                             (symbol-listp names-to-avoid))))
     (declare (xargs :guard (not (eq fn 'quote))))
     (let ((__function__ 'atc-gen-fn-result-thm))
      (declare (ignorable __function__))
      (b*
       ((wrld (w state))
        (results1 (and type? (not (type-case type? :void))
                       (list (cons nil type?))))
        (results2 (atc-gen-fn-result-thm-aux1 affect typed-formals))
        (results (append results1 results2))
        ((unless (consp results))
         (raise "Internal error: the function ~x0 has no results."
                fn)
         (mv nil nil names-to-avoid))
        (formals (formals+ fn wrld))
        (fn-call (cons fn formals))
        (conjuncts (atc-gen-fn-result-thm-aux2
                        results (if (consp (cdr results)) 0 nil)
                        fn-call prec-tags))
        (conclusion (if (and (consp conjuncts)
                             (not (consp (cdr conjuncts))))
                        (car conjuncts)
                      (cons 'and conjuncts)))
        (name (add-suffix-to-fn fn
                                (if (consp (cdr results))
                                    "-RESULTS"
                                  "-RESULT")))
        ((mv name names-to-avoid)
         (fresh-logical-name-with-$s-suffix
              name nil names-to-avoid wrld))
        (guard (untranslate$ (uguard+ fn wrld)
                             t state))
        (formula (cons 'implies
                       (cons guard (cons conclusion 'nil))))
        (hints
         (cons
          (cons
           '"Goal"
           (append
            (and (irecursivep+ fn wrld)
                 (cons ':induct (cons fn-call 'nil)))
            (cons
             ':in-theory
             (cons
              (cons
               'append
               (cons
                '*atc-integer-ops-1-return-rewrite-rules*
                (cons
                 '*atc-integer-ops-2-return-rewrite-rules*
                 (cons
                  '*atc-integer-convs-return-rewrite-rules*
                  (cons
                   '*atc-array-read-return-rewrite-rules*
                   (cons
                    '*atc-array-write-return-rewrite-rules*
                    (cons
                     '*atc-integer-ops-1-type-prescription-rules*
                     (cons
                      '*atc-integer-ops-2-type-prescription-rules*
                      (cons
                       '*atc-integer-convs-type-prescription-rules*
                       (cons
                        '*atc-array-read-type-prescription-rules*
                        (cons
                         '*atc-array-write-type-prescription-rules*
                         (cons
                          '*atc-pointed-integers-type-prescription-rules*
                          (cons
                           '*atc-array-length-write-rules*
                           (cons
                            '*atc-wrapper-rules*
                            (cons
                             (cons
                              'quote
                              (cons
                               (cons
                                '(:e tau-system)
                                (cons
                                 fn
                                 (append
                                  (atc-symbol-fninfo-alist-to-result-thms
                                       prec-fns
                                       (all-fnnames (ubody+ fn wrld)))
                                  (append
                                   (atc-string-taginfo-alist-to-reader-return-thms
                                        prec-tags)
                                   (append
                                    (atc-string-taginfo-alist-to-writer-return-thms
                                         prec-tags)
                                    (append
                                     (atc-string-objinfo-alist-to-recognizers
                                          prec-objs)
                                     (cons
                                      'sintp-of-sint-dec-const
                                      (cons
                                       'sintp-of-sint-oct-const
                                       (cons
                                        'sintp-of-sint-hex-const
                                        (cons
                                         'uintp-of-uint-dec-const
                                         (cons
                                          'uintp-of-uint-oct-const
                                          (cons
                                           'uintp-of-uint-hex-const
                                           (cons
                                            'slongp-of-slong-dec-const
                                            (cons
                                             'slongp-of-slong-oct-const
                                             (cons
                                              'slongp-of-slong-hex-const
                                              (cons
                                               'ulongp-of-ulong-dec-const
                                               (cons
                                                'ulongp-of-ulong-oct-const
                                                (cons
                                                 'ulongp-of-ulong-hex-const
                                                 (cons
                                                  'sllongp-of-sllong-dec-const
                                                  (cons
                                                   'sllongp-of-sllong-oct-const
                                                   (cons
                                                    'sllongp-of-sllong-hex-const
                                                    (cons
                                                     'ullongp-of-ullong-dec-const
                                                     (cons
                                                      'ullongp-of-ullong-oct-const
                                                      (cons
                                                       'ullongp-of-ullong-hex-const
                                                       (cons
                                                        'scharp-of-schar-read
                                                        (cons
                                                         'ucharp-of-uchar-read
                                                         (cons
                                                          'sshortp-of-sshort-read
                                                          (cons
                                                           'ushortp-of-ushort-read
                                                           (cons
                                                            'sintp-of-sint-read
                                                            (cons
                                                             'uintp-of-uint-read
                                                             (cons
                                                              'slongp-of-slong-read
                                                              (cons
                                                               'ulongp-of-ulong-read
                                                               (cons
                                                                'sllongp-of-sllong-read
                                                                (cons
                                                                 'ullongp-of-ullong-read
                                                                 (cons
                                                                  'scharp-of-schar-write
                                                                  (cons
                                                                   'ucharp-of-uchar-write
                                                                   (cons
                                                                    'sshortp-of-sshort-write
                                                                    (cons
                                                                     'ushortp-of-ushort-write
                                                                     (cons
                                                                      'sintp-of-sint-write
                                                                      (cons
                                                                       'uintp-of-uint-write
                                                                       (cons
                                                                        'slongp-of-slong-write
                                                                        (cons
                                                                         'ulongp-of-ulong-write
                                                                         (cons
                                                                         
     'sllongp-of-sllong-write
                                                                         
     (cons
                                                                         
      'ullongp-of-ullong-write
                                                                         
      (cons
                                                                         
       '(:t
                                                                         
         sint-dec-const)
                                                                         
       (cons
                                                                         
        '(:t
                                                                         
          sint-oct-const)
                                                                         
        (cons
                                                                         
         '(:t
                                                                         
           sint-hex-const)
                                                                         
         (cons
                                                                         
          '(:t
                                                                         
            uint-dec-const)
                                                                         
          (cons
                                                                         
           '(:t
                                                                         
             uint-oct-const)
                                                                         
           (cons
                                                                         
            '(:t
                                                                         
              uint-hex-const)
                                                                         
            (cons
                                                                         
             '(:t
                                                                         
               slong-dec-const)
                                                                         
             (cons
                                                                         
              '(:t
                                                                         
                slong-oct-const)
                                                                         
              (cons
                                                                         
               '(:t
                                                                         
                 slong-hex-const)
                                                                         
               (cons
                                                                         
                '(:t
                                                                         
                  ulong-dec-const)
                                                                         
                (cons
                                                                         
                 '(:t
                                                                         
                   ulong-oct-const)
                                                                         
                 (cons
                                                                         
                  '(:t
                                                                         
                    ulong-hex-const)
                                                                         
                  (cons
                                                                         
                   '(:t
                                                                         
                     sllong-dec-const)
                                                                         
                   (cons
                                                                         
                    '(:t
                                                                         
                      sllong-oct-const)
                                                                         
                    (cons
                                                                         
                     '(:t
                                                                         
                       sllong-hex-const)
                                                                         
                     (cons
                                                                         
                      '(:t
                                                                         
                        ullong-dec-const)
                                                                         
                      (cons
                                                                         
                       '(:t
                                                                         
                         ullong-oct-const)
                                                                         
                       (cons
                                                                         
                        '(:t
                                                                         
                          ullong-hex-const)
                                                                         
                        (append
                                                                         
                         (loop$
                                                                         
                          for
                                                                         
                          reader
                                                                         
                          in
                                                                         
                          (atc-string-taginfo-alist-to-readers
                                                                         
                           prec-tags)
                                                                         
                          collect
                                                                         
                          (cons
                                                                         
                           ':t
                                                                         
                           (cons
                                                                         
                            reader
                                                                         
                            'nil)))
                                                                         
                         (append
                                                                         
                          (loop$
                                                                         
                           for
                                                                         
                           writer
                                                                         
                           in
                                                                         
                           (atc-string-taginfo-alist-to-writers
                                                                         
                            prec-tags)
                                                                         
                           collect
                                                                         
                           (cons
                                                                         
                            ':t
                                                                         
                            (cons
                                                                         
                             writer
                                                                         
                             'nil)))
                                                                         
                          (cons
                                                                         
                           'sintp-of-sint-from-boolean
                                                                         
                           (cons
                                                                         
                            'mv-nth-of-cons
                                                                         
                            (cons
                                                                         
                             '(:e
                                                                         
                               zp)
                                                                         
                             (cons
                                                                         
                              '(:e
                                                                         
                                ucharp)
                                                                         
                              (cons
                                                                         
                               '(:e
                                                                         
                                 scharp)
                                                                         
                               (cons
                                                                         
                                '(:e
                                                                         
                                  ushortp)
                                                                         
                                (cons
                                                                         
                                 '(:e
                                                                         
                                   sshortp)
                                                                         
                                 (cons
                                                                         
                                  '(:e
                                                                         
                                    uintp)
                                                                         
                                  (cons
                                                                         
                                   '(:e
                                                                         
                                     sintp)
                                                                         
                                   (cons
                                                                         
                                    '(:e
                                                                         
                                      ulongp)
                                                                         
                                    (cons
                                                                         
                                     '(:e
                                                                         
                                       slongp)
                                                                         
                                     (cons
                                                                         
                                      '(:e
                                                                         
                                        ullongp)
                                                                         
                                      (cons
                                                                         
                                       '(:e
                                                                         
                                         sllongp)
                                                                         
                                       (cons
                                                                         
                                        '(:e
                                                                         
                                          uchar-arrayp)
                                                                         
                                        (cons
                                                                         
                                         '(:e
                                                                         
                                           schar-arrayp)
                                                                         
                                         (cons
                                                                         
                                          '(:e
                                                                         
                                            ushort-arrayp)
                                                                         
                                          (cons
                                                                         
                                           '(:e
                                                                         
                                             sshort-arrayp)
                                                                         
                                           (cons
                                                                         
                                            '(:e
                                                                         
                                              uint-arrayp)
                                                                         
                                            (cons
                                                                         
                                             '(:e
                                                                         
                                               sint-arrayp)
                                                                         
                                             (cons
                                                                         
                                              '(:e
                                                                         
                                                ulong-arrayp)
                                                                         
                                              (cons
                                                                         
                                               '(:e
                                                                         
                                                 slong-arrayp)
                                                                         
                                               (cons
                                                                         
                                                '(:e
                                                                         
                                                  ullong-arrayp)
                                                                         
                                                (cons
                                                                         
                                                 '(:e
                                                                         
                                                   sllong-arrayp)
                                                                         
                                                 (loop$
                                                                         
                                                  for
                                                                         
                                                  recog
                                                                         
                                                  in
                                                                         
                                                  (atc-string-taginfo-alist-to-recognizers
                                                                         
                                                   prec-tags)
                                                                         
                                                  collect
                                                                         
                                                  (cons
                                                                         
                                                   ':e
                                                                         
                                                   (cons
                                                                         
                                                    recog
                                                                         
                                                    'nil))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
                               'nil))
                             'nil)))))))))))))))
              'nil))))
          (cons
           (cons 'quote
                 (cons (cons ':use
                             (cons (cons ':guard-theorem (cons fn 'nil))
                                   'nil))
                       'nil))
           'nil)))
        ((mv event &)
         (evmac-generate-defthm name
                                :formula formula
                                :hints hints
                                :enable nil)))
       (mv (list event) name names-to-avoid))))

    Theorem: pseudo-event-form-listp-of-atc-gen-fn-result-thm.events

    (defthm pseudo-event-form-listp-of-atc-gen-fn-result-thm.events
      (b*
        (((mv ?events ?name ?updated-names-to-avoid)
          (atc-gen-fn-result-thm fn type?
                                 affect typed-formals prec-fns prec-tags
                                 prec-objs names-to-avoid state)))
        (pseudo-event-form-listp events))
      :rule-classes :rewrite)

    Theorem: symbolp-of-atc-gen-fn-result-thm.name

    (defthm symbolp-of-atc-gen-fn-result-thm.name
      (b*
        (((mv ?events ?name ?updated-names-to-avoid)
          (atc-gen-fn-result-thm fn type?
                                 affect typed-formals prec-fns prec-tags
                                 prec-objs names-to-avoid state)))
        (symbolp name))
      :rule-classes :rewrite)

    Theorem: symbol-listp-of-atc-gen-fn-result-thm.updated-names-to-avoid

    (defthm symbol-listp-of-atc-gen-fn-result-thm.updated-names-to-avoid
     (implies
       (symbol-listp names-to-avoid)
       (b*
        (((mv ?events ?name ?updated-names-to-avoid)
          (atc-gen-fn-result-thm fn type?
                                 affect typed-formals prec-fns prec-tags
                                 prec-objs names-to-avoid state)))
        (symbol-listp updated-names-to-avoid)))
     :rule-classes :rewrite)