• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Abnf
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Pfcs
        • Soft
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • C
        • Syntheto
        • File-io-light
        • Number-theory
        • Cryptography
        • Lists-light
        • Json
        • Axe
        • Builtins
        • Solidity
        • Std-extensions
          • Std/util-extensions
            • Defmapping
            • Defarbrec
            • Defmax-nat
            • Error-value-tuples
            • Defmin-int
            • Deftutorial
            • Defsurj
              • Defsurj-implementation
                • Defsurj-lookup
                  • Defsurj-macro-definition
              • Defiso
              • Defconstrained-recognizer
              • Deffixer
              • Defund-sk
              • Defmacro+
              • Defthm-commutative
              • Definj
              • Defirrelevant
            • Std/basic-extensions
            • Std/strings-extensions
            • Std/system-extensions
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Defsurj-implementation

    Defsurj-lookup

    Return the information for the defsurj specified by name, or nil if there is no defsurj with that name.

    Signature
    (defsurj-lookup name wrld) → info?
    Arguments
    name — Guard (symbolp name).
    wrld — Guard (plist-worldp wrld).
    Returns
    info? — A maybe-defmapping-infop.

    This is a wrapper of defmapping-lookup that makes sure that the \alpha conversion is a surjection (and also that the right inverse \beta conversion is an injection), i.e. that it has the :alpha-of-beta theorem. It causes an error if that is not the case.

    Definitions and Theorems

    Function: defsurj-lookup

    (defun defsurj-lookup (name wrld)
     (declare (xargs :guard (and (symbolp name)
                                 (plist-worldp wrld))))
     (let ((__function__ 'defsurj-lookup))
      (declare (ignorable __function__))
      (b*
       ((info (defmapping-lookup name wrld))
        ((when (not info)) nil)
        ((when (not (defmapping-info->alpha-of-beta info)))
         (raise
             "The mapping ~x0 does not have the :ALPHA-OF-BETA theorem."
             name)))
       info)))