• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
        • Soft
        • C
          • Syntax-for-tools
            • Disambiguator
            • Abstract-syntax
            • Parser
            • Validator
            • Printer
            • Formalized-subset
            • Mapping-to-language-definition
              • Ldm-type-spec-list
              • Ldm-stmts/blocks
              • Ldm-exprs
              • Ldm-declor-obj
              • Ldm-absdeclor-obj
              • Ldm-dirdeclor-obj
              • Ldm-declor-fun
              • Ldm-dirdeclor-fun
              • Ldm-decl-tag
              • Ldm-decl-obj
              • Ldm-transunit-ensemble
              • Ldm-structdecl
              • Ldm-dirabsdeclor-obj
              • Ldm-decl-fun
              • Ldm-extdecl
              • Ldm-fundef
              • Ldm-param-declor
              • Ldm-param-declon
              • Ldm-structdecl-list
              • Ldm-stor-spec-list
              • Ldm-param-declon-list
              • Ldm-transunit
              • Ldm-desiniter
              • Ldm-tyname
                • Ldm-isuffix-option
                • Ldm-expr-option
                • Ldm-desiniter-list
                • Ldm-dec/oct/hex-const
                • Ldm-isuffix
                • Ldm-ident
                • Ldm-extdecl-list
                • Ldm-binop
                • Ldm-initer
                • Ldm-const
                • Ldm-enumer-list
                • Ldm-enumer
                • Ldm-label
                • Ldm-lsuffix
                • Ldm-iconst
                • Ldm-expr
                • Ldm-expr-list
                • Ldm-block-item-list
                • Ldm-stmt
                • Ldm-block-item
              • Input-files
              • Defpred
              • Output-files
              • Abstract-syntax-operations
              • Validation-information
              • Implementation-environments
              • Concrete-syntax
              • Unambiguity
              • Ascii-identifiers
              • Preprocessing
              • Abstraction-mapping
            • Atc
            • 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
    • Mapping-to-language-definition

    Ldm-tyname

    Map a type name to a type name in the language definition.

    Signature
    (ldm-tyname tyname) → (mv erp tyname1)
    Arguments
    tyname — Guard (tynamep tyname).
    Returns
    tyname1 — Type (c::tynamep tyname1).

    The specifiers and qualifiers must be all type specifiers, and must form a supported sequence.

    Definitions and Theorems

    Function: ldm-tyname

    (defun ldm-tyname (tyname)
     (declare (xargs :guard (tynamep tyname)))
     (declare (xargs :guard (tyname-unambp tyname)))
     (let ((__function__ 'ldm-tyname))
      (declare (ignorable __function__))
      (b*
       (((reterr)
         (c::tyname (c::tyspecseq-void)
                    (c::obj-adeclor-none)))
        ((tyname tyname) tyname)
        ((mv okp tyspecs)
         (check-spec/qual-list-all-typespec tyname.specqual))
        ((when (not okp))
         (reterr
          (msg
           "Unsupported specifiers and qualifiers ~
                          in type name ~x0."
           (tyname-fix tyname))))
        ((erp tyspecseq)
         (ldm-type-spec-list tyspecs))
        ((when (not tyname.decl?))
         (retok (c::make-tyname :tyspec tyspecseq
                                :declor (c::obj-adeclor-none))))
        ((erp adeclor1)
         (ldm-absdeclor-obj tyname.decl?)))
       (retok (c::make-tyname :tyspec tyspecseq
                              :declor adeclor1)))))

    Theorem: tynamep-of-ldm-tyname.tyname1

    (defthm tynamep-of-ldm-tyname.tyname1
      (b* (((mv acl2::?erp ?tyname1)
            (ldm-tyname tyname)))
        (c::tynamep tyname1))
      :rule-classes :rewrite)

    Theorem: ldm-tyname-ok-when-tyname-formalp

    (defthm ldm-tyname-ok-when-tyname-formalp
      (implies (tyname-formalp tyname)
               (b* (((mv acl2::?erp ?tyname1)
                     (ldm-tyname tyname)))
                 (not erp))))

    Theorem: ldm-tyname-of-tyname-fix-tyname

    (defthm ldm-tyname-of-tyname-fix-tyname
      (equal (ldm-tyname (tyname-fix tyname))
             (ldm-tyname tyname)))

    Theorem: ldm-tyname-tyname-equiv-congruence-on-tyname

    (defthm ldm-tyname-tyname-equiv-congruence-on-tyname
      (implies (tyname-equiv tyname tyname-equiv)
               (equal (ldm-tyname tyname)
                      (ldm-tyname tyname-equiv)))
      :rule-classes :congruence)