• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
        • Defun
        • Declare
        • System-utilities
          • Saving-event-data
          • Trans-eval
          • System-utilities-non-built-in
            • Pseudo-event-formp
            • Pseudo-event-form-listp
            • Directed-untranslate
            • Irrelevant-formals-info
            • Numbered-names
              • Check-numbered-name
              • Next-numbered-name
              • Resolve-numbered-name-wildcard
              • Set-numbered-name-index
              • Next-fresh-numbered-names
              • Global-numbered-name-index
                • Get-global-numbered-name-index
                  • Increment-global-numbered-name-index
                  • Reset-global-numbered-name-index
                • Make-numbered-name
                • Make-numbered-name-list
                • Set-numbered-name-index-to-global
                • Numbered-names-in-use
                • Next-fresh-numbered-name
                • Numbered-name-index-wildcard
                • Numbered-name-index-start
                • Numbered-name-index-end
              • Context-message-pair
              • Prove$
              • Minimize-ruler-extenders
              • Paired-names
              • Orelse
              • Fresh-name-in-world-with-$s
              • Encapsulate-report-errors
              • On-failure
              • Chk-irrelevant-formals-ok
              • Named-formulas
              • Pseudo-event-landmarkp
              • All-program-fns
              • All-logic-fns
              • Trans-eval-error-triple
              • Trans-eval-state
              • Pseudo-tests-and-callsp
              • User-interface
              • Pseudo-command-landmarkp
              • Pseudo-tests-and-calls-listp
              • Pseudo-command-formp
              • Orelse*
              • Identity-macro
            • Get-event-data
            • Untranslate
            • Constraint-info
          • Stobj
          • State
          • Mutual-recursion
          • Memoize
          • Mbe
          • Io
          • Defpkg
          • Apply$
          • Loop$
          • Programming-with-state
          • Arrays
          • Characters
          • Time$
          • Defconst
          • Fast-alists
          • Defmacro
          • Loop$-primer
          • Evaluation
          • Guard
          • Equality-variants
          • Compilation
          • Hons
          • ACL2-built-ins
          • Developers-guide
          • System-attachments
          • Advanced-features
          • Set-check-invariant-risk
          • Numbers
          • Efficiency
          • Irrelevant-formals
          • Introduction-to-programming-in-ACL2-for-those-who-know-lisp
          • Redefining-programs
          • Lists
          • Invariant-risk
          • Errors
          • Defabbrev
          • Conses
          • Alists
          • Set-register-invariant-risk
          • Strings
          • Program-wrapper
          • Get-internal-time
          • Basics
          • Packages
          • Oracle-eval
          • Defmacro-untouchable
          • <<
          • Primitive
          • Revert-world
          • Unmemoize
          • Set-duplicate-keys-action
          • Symbols
          • Def-list-constructor
          • Easy-simplify-term
          • Defiteration
          • Fake-oracle-eval
          • Defopen
          • Sleep
        • Operational-semantics
        • Real
        • Start-here
        • Miscellaneous
        • Output-controls
        • Bdd
        • Macros
        • Installation
        • Mailing-lists
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Global-numbered-name-index

    Get-global-numbered-name-index

    Retrieve the global index for numbered names.

    Signature
    (get-global-numbered-name-index wrld) → global-index
    Arguments
    wrld — Guard (plist-worldp wrld).
    Returns
    global-index — A posp.
        Type (posp global-index).

    If the global index is not set yet, 1 is returned.

    Definitions and Theorems

    Function: get-global-numbered-name-index

    (defun get-global-numbered-name-index (wrld)
     (declare (xargs :guard (plist-worldp wrld)))
     (let ((__function__ 'get-global-numbered-name-index))
      (declare (ignorable __function__))
      (let ((pair (assoc-eq 'index
                            (table-alist+ 'global-numbered-name-index
                                          wrld))))
       (cond
          ((not pair) 1)
          ((posp (cdr pair)) (cdr pair))
          (t (prog2$ (raise "Internal error: ~x0 does not satisfy POSP."
                            (cdr pair))
                     1))))))

    Theorem: posp-of-get-global-numbered-name-index

    (defthm posp-of-get-global-numbered-name-index
      (b* ((global-index (get-global-numbered-name-index wrld)))
        (posp global-index))
      :rule-classes :rewrite)