• 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
          • Atc
          • Transformation-tools
            • Simpadd0
              • Simpadd0-dirdeclor
              • Simpadd0-implementation
                • Simpadd0-event-generation
                  • Simpadd0-exprs/decls/stmts
                  • Simpadd0-expr-binary
                  • Simpadd0-fundef
                  • Simpadd0-filepath-transunit-map
                  • Simpadd0-transunit-ensemble
                  • Simpadd0-transunit
                  • Simpadd0-extdecl-list
                  • Simpadd0-extdecl
                    • Simpadd0-code-ensemble
                    • Simpadd0-gen-everything
                  • Simpadd0-process-inputs-and-gen-everything
                  • Simpadd0-fn
                  • Simpadd0-input-processing
                  • Simpadd0-macro-definition
                • Simpadd0-declor
                • Simpadd0-initdeclor
                • Simpadd0-initdeclor-list
                • Simpadd0-decl
                • Simpadd0-comp-stmt
                • Simpadd0-param-declor
                • Simpadd0-param-declon-list
                • Simpadd0-param-declon
                • Simpadd0-expr-option
                • Simpadd0-struct-declor-list
                • Simpadd0-struct-declon-list
                • Simpadd0-dirabsdeclor-option
                • Simpadd0-desiniter-list
                • Simpadd0-struni-spec
                • Simpadd0-struct-declor
                • Simpadd0-struct-declon
                • Simpadd0-statassert
                • Simpadd0-spec/qual-list
                • Simpadd0-spec/qual
                • Simpadd0-genassoc-list
                • Simpadd0-dirabsdeclor
                • Simpadd0-desiniter
                • Simpadd0-designor-list
                • Simpadd0-decl-spec-list
                • Simpadd0-const-expr-option
                • Simpadd0-align-spec
                • Simpadd0-absdeclor-option
                • Simpadd0-type-spec
                • Simpadd0-tyname
                • Simpadd0-member-designor
                • Simpadd0-initer-option
                • Simpadd0-initer
                • Simpadd0-genassoc
                • Simpadd0-expr-list
                • Simpadd0-enumer-list
                • Simpadd0-enumer
                • Simpadd0-enum-spec
                • Simpadd0-designor
                • Simpadd0-declor-option
                • Simpadd0-decl-spec
                • Simpadd0-decl-list
                • Simpadd0-const-expr
                • Simpadd0-block-item-list
                • Simpadd0-block-item
                • Simpadd0-absdeclor
                • Simpadd0-stmt
                • Simpadd0-label
                • Simpadd0-expr
              • Proof-generation
              • Split-gso
              • Wrap-fn
              • Constant-propagation
              • Specialize
              • Split-fn
              • Split-fn-when
              • Split-all-gso
              • Copy-fn
              • Variables-in-computation-states
              • Rename
              • Utilities
              • Proof-generation-theorems
              • Input-processing
            • 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
    • Simpadd0-event-generation

    Simpadd0-extdecl

    Transform an external declaration.

    Signature
    (simpadd0-extdecl extdecl gin) → (mv new-extdecl gout)
    Arguments
    extdecl — Guard (extdeclp extdecl).
    gin — Guard (ginp gin).
    Returns
    new-extdecl — Type (extdeclp new-extdecl).
    gout — Type (goutp gout).

    Definitions and Theorems

    Function: simpadd0-extdecl

    (defun simpadd0-extdecl (extdecl gin)
      (declare (xargs :guard (and (extdeclp extdecl) (ginp gin))))
      (declare (xargs :guard (and (extdecl-unambp extdecl)
                                  (extdecl-annop extdecl))))
      (let ((__function__ 'simpadd0-extdecl))
        (declare (ignorable __function__))
        (b* (((gin gin) gin))
          (extdecl-case extdecl :fundef
                        (b* (((mv new-fundef (gout gout-fundef))
                              (simpadd0-fundef extdecl.fundef gin))
                             (gin (gin-update gin gout-fundef)))
                          (mv (extdecl-fundef new-fundef)
                              (change-gout (gout-no-thm gin)
                                           :vartys gout-fundef.vartys)))
                        :decl
                        (b* (((mv new-decl (gout gout-decl))
                              (simpadd0-decl extdecl.decl gin))
                             (gin (gin-update gin gout-decl)))
                          (mv (extdecl-decl new-decl)
                              (change-gout (gout-no-thm gin)
                                           :vartys gout-decl.vartys)))
                        :empty (mv (extdecl-empty) (gout-no-thm gin))
                        :asm (mv (extdecl-fix extdecl)
                                 (gout-no-thm gin))))))

    Theorem: extdeclp-of-simpadd0-extdecl.new-extdecl

    (defthm extdeclp-of-simpadd0-extdecl.new-extdecl
      (b* (((mv ?new-extdecl ?gout)
            (simpadd0-extdecl extdecl gin)))
        (extdeclp new-extdecl))
      :rule-classes :rewrite)

    Theorem: goutp-of-simpadd0-extdecl.gout

    (defthm goutp-of-simpadd0-extdecl.gout
      (b* (((mv ?new-extdecl ?gout)
            (simpadd0-extdecl extdecl gin)))
        (goutp gout))
      :rule-classes :rewrite)

    Theorem: extdecl-unambp-of-simpadd0-extdecl

    (defthm extdecl-unambp-of-simpadd0-extdecl
      (b* (((mv ?new-extdecl ?gout)
            (simpadd0-extdecl extdecl gin)))
        (extdecl-unambp new-extdecl)))

    Theorem: extdecl-annop-of-simpadd0-extdecl

    (defthm extdecl-annop-of-simpadd0-extdecl
      (implies (and (extdecl-unambp extdecl)
                    (extdecl-annop extdecl))
               (b* (((mv ?new-extdecl ?gout)
                     (simpadd0-extdecl extdecl gin)))
                 (extdecl-annop new-extdecl))))

    Theorem: extdecl-aidentp-of-simpadd0-extdecl

    (defthm extdecl-aidentp-of-simpadd0-extdecl
      (implies (and (extdecl-unambp extdecl)
                    (extdecl-aidentp extdecl gcc))
               (b* (((mv ?new-extdecl ?gout)
                     (simpadd0-extdecl extdecl gin)))
                 (extdecl-aidentp new-extdecl gcc))))

    Theorem: simpadd0-extdecl-of-extdecl-fix-extdecl

    (defthm simpadd0-extdecl-of-extdecl-fix-extdecl
      (equal (simpadd0-extdecl (extdecl-fix extdecl)
                               gin)
             (simpadd0-extdecl extdecl gin)))

    Theorem: simpadd0-extdecl-extdecl-equiv-congruence-on-extdecl

    (defthm simpadd0-extdecl-extdecl-equiv-congruence-on-extdecl
      (implies (c$::extdecl-equiv extdecl extdecl-equiv)
               (equal (simpadd0-extdecl extdecl gin)
                      (simpadd0-extdecl extdecl-equiv gin)))
      :rule-classes :congruence)

    Theorem: simpadd0-extdecl-of-gin-fix-gin

    (defthm simpadd0-extdecl-of-gin-fix-gin
      (equal (simpadd0-extdecl extdecl (gin-fix gin))
             (simpadd0-extdecl extdecl gin)))

    Theorem: simpadd0-extdecl-gin-equiv-congruence-on-gin

    (defthm simpadd0-extdecl-gin-equiv-congruence-on-gin
      (implies (gin-equiv gin gin-equiv)
               (equal (simpadd0-extdecl extdecl gin)
                      (simpadd0-extdecl extdecl gin-equiv)))
      :rule-classes :congruence)