• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • 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
          • Atc
          • Language
            • Abstract-syntax
              • Tyspecseq
              • Expr
              • Binop
              • Fileset
              • Obj-declor
              • Ident
              • Iconst
              • Obj-adeclor
              • Abstract-syntax-operations
                • Stmts/blocks-nocallsp
                • Tyspec+declor-to-ident+params+tyname
                • Fundef-list-to-fun-declon-list
                • Fundef-list->name-list
                • Ident+tyname-to-tyspec+declor
                • Tyspec+declor-to-ident+tyname
                • Obj-declon-to-ident+scspec+tyname+init
                • Ident+adeclor-to-obj-declor
                • Ident+adeclor-to-fun-declor
                • Fun-adeclor-to-params+declor
                • Param-declon-list-to-ident+tyname-lists
                • Obj-declor-to-ident+adeclor
                • Fun-declor-to-ident+adeclor
                  • Expr-constp
                  • Fundef-to-fun-declon
                  • Param-declon-to-ident+tyname
                  • Ext-declon-list->fundef-list
                  • Struct-declon-to-ident+tyname
                  • Unop-nonpointerp
                  • Expr-nocallsp
                  • Expr-list-nocallsp
                  • Binop-strictp
                  • Initer-option-nocallsp
                  • Expr-list-constp
                  • Obj-declon-nocallsp
                  • Expr-option-nocallsp
                  • Binop-purep
                  • Initer-nocallsp
                  • Label-nocallsp
                  • Fundef->name
                  • Block-item-nocallsp
                  • Block-item-list-nocallsp
                  • Stmt-nocallsp
                • Const
                • Fundef
                • Unop
                • File
                • Tag-declon
                • Fun-declor
                • Obj-declon
                • Iconst-length
                • Label
                • Struct-declon
                • Initer
                • Ext-declon
                • Fun-adeclor
                • Expr-option
                • Iconst-base
                • Initer-option
                • Iconst-option
                • Tyspecseq-option
                • Stmt-option
                • Scspecseq
                • Param-declon
                • Obj-declon-option
                • File-option
                • Tyname
                • Transunit
                • Fun-declon
                • Transunit-result
                • Param-declon-list
                • Struct-declon-list
                • Expr-list
                • Tyspecseq-list
                • Ident-set
                • Ident-list
                • Ext-declon-list
                • Unop-list
                • Tyname-list
                • Fundef-list
                • Fun-declon-list
                • Binop-list
                • Stmt-fixtypes
                • Expr-fixtypes
              • Integer-ranges
              • Implementation-environments
              • Dynamic-semantics
              • Static-semantics
              • Grammar
              • Integer-formats
              • Types
              • Portable-ascii-identifiers
              • Values
              • Integer-operations
              • Computation-states
              • Object-designators
              • Operations
              • Errors
              • Tag-environments
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Bytes
              • Keywords
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • 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
    • Abstract-syntax-operations

    Fun-declor-to-ident+adeclor

    Decompose a function declarator into an identifier and an abstract function declarator.

    Signature
    (fun-declor-to-ident+adeclor declor) → (mv id adeclor)
    Arguments
    declor — Guard (fun-declorp declor).
    Returns
    id — Type (identp id).
    adeclor — Type (fun-adeclorp adeclor).

    This abstracts a function declarator to an abstract function declarator, by removing the identifier and also returning it. See fun-adeclor.

    Definitions and Theorems

    Function: fun-declor-to-ident+adeclor

    (defun fun-declor-to-ident+adeclor (declor)
     (declare (xargs :guard (fun-declorp declor)))
     (let ((__function__ 'fun-declor-to-ident+adeclor))
      (declare (ignorable __function__))
      (fun-declor-case declor :base
                       (mv declor.name
                           (fun-adeclor-base declor.params))
                       :pointer
                       (b* (((mv id sub)
                             (fun-declor-to-ident+adeclor declor.decl)))
                         (mv id (fun-adeclor-pointer sub))))))

    Theorem: identp-of-fun-declor-to-ident+adeclor.id

    (defthm identp-of-fun-declor-to-ident+adeclor.id
      (b* (((mv acl2::?id ?adeclor)
            (fun-declor-to-ident+adeclor declor)))
        (identp id))
      :rule-classes :rewrite)

    Theorem: fun-adeclorp-of-fun-declor-to-ident+adeclor.adeclor

    (defthm fun-adeclorp-of-fun-declor-to-ident+adeclor.adeclor
      (b* (((mv acl2::?id ?adeclor)
            (fun-declor-to-ident+adeclor declor)))
        (fun-adeclorp adeclor))
      :rule-classes :rewrite)

    Theorem: fun-declor-to-ident+adeclor-of-fun-declor-fix-declor

    (defthm fun-declor-to-ident+adeclor-of-fun-declor-fix-declor
      (equal (fun-declor-to-ident+adeclor (fun-declor-fix declor))
             (fun-declor-to-ident+adeclor declor)))

    Theorem: fun-declor-to-ident+adeclor-fun-declor-equiv-congruence-on-declor

    (defthm
      fun-declor-to-ident+adeclor-fun-declor-equiv-congruence-on-declor
      (implies (fun-declor-equiv declor declor-equiv)
               (equal (fun-declor-to-ident+adeclor declor)
                      (fun-declor-to-ident+adeclor declor-equiv)))
      :rule-classes :congruence)