• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • C
          • Syntax-for-tools
            • Formalized-subset
            • Mapping-to-language-definition
              • Ldm-stmts
              • Ldm-type-spec-list
              • Ldm-exprs
              • Ldm-absdeclor-obj
              • Ldm-declor-fun
              • Ldm-declors/dirdeclors-obj
              • Ldm-dirdeclor-fun
              • Ldm-decl-tag
              • Ldm-struct-declon
              • Ldm-decl-obj
              • Ldm-transunit-ensemble
              • Ldm-dirabsdeclor-obj
              • Ldm-decl-fun
              • Ldm-extdecl
              • Ldm-param-declon
              • Ldm-fundef
              • Ldm-param-declor
              • Ldm-dirdeclor-obj
              • Ldm-struct-declon-list
              • Ldm-stor-spec-list
              • Ldm-param-declon-list
              • Ldm-transunit
              • Ldm-desiniter
              • Ldm-tyname
              • Ldm-isuffix-option
              • Ldm-desiniter-list
              • Ldm-dec/oct/hex-const
              • Ldm-isuffix
              • Ldm-ident
              • Ldm-extdecl-list
              • Ldm-expr-option
              • Ldm-binop
              • Ldm-initer
              • Ldm-const
              • Ldm-enumer-list
                • Ldm-enumer
                • Ldm-label
                • Ldm-lsuffix
                • Ldm-iconst
                • Ldm-declor-obj
                • Ldm-comp-stmt
                • Ldm-expr-list
                • Ldm-expr
                • Ldm-block-item-list
                • Ldm-stmt
                • Ldm-block-item
              • Input-files
              • Compilation-database
              • Printer
              • Output-files
              • Abstract-syntax-operations
              • Implementation-environments
              • Abstract-syntax
              • Concrete-syntax
              • Disambiguation
              • Validation
              • Gcc-builtins
              • Preprocessing
              • Parsing
            • Atc
            • Transformation-tools
            • Language
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Mapping-to-language-definition

    Ldm-enumer-list

    Map a list of enumerators to a list of identifiers in the language definition.

    Signature
    (ldm-enumer-list enumers) → (mv erp idents)
    Arguments
    enumers — Guard (enumer-listp enumers).
    Returns
    idents — Type (c::ident-listp idents).

    Definitions and Theorems

    Function: ldm-enumer-list

    (defun ldm-enumer-list (enumers)
      (declare (xargs :guard (enumer-listp enumers)))
      (declare (xargs :guard (enumer-list-unambp enumers)))
      (let ((__function__ 'ldm-enumer-list))
        (declare (ignorable __function__))
        (b* (((reterr) nil)
             ((when (endp enumers)) (retok nil))
             ((erp ident) (ldm-enumer (car enumers)))
             ((erp idents)
              (ldm-enumer-list (cdr enumers))))
          (retok (cons ident idents)))))

    Theorem: ident-listp-of-ldm-enumer-list.idents

    (defthm ident-listp-of-ldm-enumer-list.idents
      (b* (((mv acl2::?erp ?idents)
            (ldm-enumer-list enumers)))
        (c::ident-listp idents))
      :rule-classes :rewrite)

    Theorem: ldm-enumer-list-of-enumer-list-fix-enumers

    (defthm ldm-enumer-list-of-enumer-list-fix-enumers
      (equal (ldm-enumer-list (enumer-list-fix enumers))
             (ldm-enumer-list enumers)))

    Theorem: ldm-enumer-list-enumer-list-equiv-congruence-on-enumers

    (defthm ldm-enumer-list-enumer-list-equiv-congruence-on-enumers
      (implies (enumer-list-equiv enumers enumers-equiv)
               (equal (ldm-enumer-list enumers)
                      (ldm-enumer-list enumers-equiv)))
      :rule-classes :congruence)