• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
        • Syntax-for-tools
        • Atc
        • Language
        • Representation
        • Transformation-tools
          • Simpadd0
            • Simpadd0-implementation
              • Simpadd0-event-generation
                • Simpadd0-exprs/decls/stmts
                • Simpadd0-fundef
                • Simpadd0-expr-cond
                • Simpadd0-expr-binary
                • Simpadd0-gen-expr-pure-thm
                • Simpadd0-expr-cast
                • Simpadd0-gen-block-item-list-thm
                • Simpadd0-gen-block-item-thm
                • Simpadd0-gen-stmt-thm
                • Simpadd0-gen-from-params
                • Simpadd0-expr-unary
                • Simpadd0-gout
                • Simpadd0-expr-const
                • Simpadd0-block-item-list-one
                • Simpadd0-block-item-stmt
                • Simpadd0-gen-param-thms
                • Simpadd0-expr-ident
                • Simpadd0-stmt-return
                • Simpadd0-gen-init-scope-thm
                • Simpadd0-gin
                • Simpadd0-expr-paren
                • Simpadd0-filepath-transunit-map
                • Simpadd0-extdecl-list
                • Simpadd0-extdecl
                  • Simpadd0-transunit-ensemble
                  • Simpadd0-transunit
                  • Simpadd0-gen-var-hyps
                  • Simpadd0-tyspecseq-to-type
                  • Simpadd0-gin-update
                  • Simpadd0-gen-everything
                  • Irr-simpadd0-gout
                • Simpadd0-process-inputs-and-gen-everything
                • Simpadd0-fn
                • Simpadd0-input-processing
                • Simpadd0-macro-definition
              • Simpadd0-expr-option
              • Simpadd0-structdeclor-list
              • Simpadd0-structdecl-list
              • Simpadd0-spec/qual-list
              • Simpadd0-param-declon-list
              • Simpadd0-initdeclor-list
              • Simpadd0-dirabsdeclor-option
              • Simpadd0-dirabsdeclor
              • Simpadd0-desiniter-list
              • Simpadd0-absdeclor-option
              • Simpadd0-strunispec
              • Simpadd0-structdeclor
              • Simpadd0-structdecl
              • Simpadd0-statassert
              • Simpadd0-spec/qual
              • Simpadd0-param-declor
              • Simpadd0-param-declon
              • Simpadd0-member-designor
              • Simpadd0-initer-option
              • Simpadd0-initdeclor
              • Simpadd0-genassoc-list
              • Simpadd0-genassoc
              • Simpadd0-expr
              • Simpadd0-enumspec
              • Simpadd0-enumer-list
              • Simpadd0-dirdeclor
              • Simpadd0-desiniter
              • Simpadd0-designor-list
              • Simpadd0-designor
              • Simpadd0-declor-option
              • Simpadd0-decl-spec-list
              • Simpadd0-decl-spec
              • Simpadd0-decl-list
              • Simpadd0-const-expr-option
              • Simpadd0-const-expr
              • Simpadd0-block-item-list
              • Simpadd0-align-spec
              • Simpadd0-absdeclor
              • Simpadd0-type-spec
              • Simpadd0-tyname
              • Simpadd0-stmt
              • Simpadd0-label
              • Simpadd0-initer
              • Simpadd0-expr-list
              • Simpadd0-enumer
              • Simpadd0-declor
              • Simpadd0-decl
              • Simpadd0-block-item
            • Splitgso
            • Constant-propagation
            • Split-fn
            • Specialize
            • Split-all-gso
            • Copy-fn
            • Rename
            • Utilities
          • Insertion-sort
          • Pack
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Riscv
        • Bitcoin
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Simpadd0-event-generation

    Simpadd0-extdecl

    Transform an external declaration.

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

    Definitions and Theorems

    Function: simpadd0-extdecl

    (defun simpadd0-extdecl (extdecl gin state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (extdeclp extdecl)
                                 (simpadd0-ginp gin))))
     (declare (xargs :guard (extdecl-unambp extdecl)))
     (let ((__function__ 'simpadd0-extdecl))
      (declare (ignorable __function__))
      (b* (((simpadd0-gin gin) gin))
       (extdecl-case
        extdecl :fundef
        (b* (((mv new-fundef (simpadd0-gout gout-fundef))
              (simpadd0-fundef extdecl.unwrap gin state)))
         (mv
          (extdecl-fundef new-fundef)
          (make-simpadd0-gout :events gout-fundef.events
                              :thm-name nil
                              :thm-index gout-fundef.thm-index
                              :names-to-avoid gout-fundef.names-to-avoid
                              :vartys gout-fundef.vartys
                              :diffp gout-fundef.diffp)))
        :decl
        (b* (((mv new-decl (simpadd0-gout gout-decl))
              (simpadd0-decl extdecl.unwrap gin state)))
         (mv
            (extdecl-decl new-decl)
            (make-simpadd0-gout :events gout-decl.events
                                :thm-name nil
                                :thm-index gout-decl.thm-index
                                :names-to-avoid gout-decl.names-to-avoid
                                :vartys gout-decl.vartys
                                :diffp gout-decl.diffp)))
        :empty
        (mv (extdecl-empty)
            (make-simpadd0-gout :events nil
                                :thm-name nil
                                :thm-index gin.thm-index
                                :names-to-avoid gin.names-to-avoid
                                :vartys nil
                                :diffp nil))
        :asm (mv (extdecl-fix extdecl)
                 (make-simpadd0-gout :events nil
                                     :thm-name nil
                                     :thm-index gin.thm-index
                                     :names-to-avoid gin.names-to-avoid
                                     :vartys nil
                                     :diffp nil))))))

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

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

    Theorem: simpadd0-goutp-of-simpadd0-extdecl.gout

    (defthm simpadd0-goutp-of-simpadd0-extdecl.gout
      (b* (((mv ?new-extdecl ?gout)
            (simpadd0-extdecl extdecl gin state)))
        (simpadd0-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 state)))
        (extdecl-unambp new-extdecl)))

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

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

    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 state)
                      (simpadd0-extdecl extdecl-equiv gin state)))
      :rule-classes :congruence)

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

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

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

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