• 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
        • Soft
        • C
          • Syntax-for-tools
          • Atc
          • Language
          • Transformation-tools
            • Simpadd0
              • Simpadd0-implementation
                • Simpadd0-event-generation
                  • Simpadd0-exprs/decls/stmts
                  • Simpadd0-fundef
                  • Simpadd0-expr-cond
                  • Simpadd0-expr-binary
                  • Simpadd0-block-item-list-cons
                  • Simpadd0-gen-expr-pure-thm
                  • Simpadd0-expr-cast
                  • Simpadd0-block-item-list-one
                  • Simpadd0-block-item-stmt
                  • Simpadd0-stmt-return
                  • Simpadd0-gen-expr-asg-thm
                  • Simpadd0-gen-stmt-thm
                  • Simpadd0-gen-from-params
                  • Simpadd0-expr-unary
                  • Simpadd0-stmt-expr
                  • Simpadd0-gout
                  • Simpadd0-gen-block-item-list-thm
                  • Simpadd0-expr-const
                  • Simpadd0-expr-ident
                  • Simpadd0-gen-param-thms
                  • Simpadd0-gen-block-item-thm
                  • Simpadd0-gen-init-scope-thm
                  • Simpadd0-gin
                  • Simpadd0-expr-paren
                  • Simpadd0-filepath-transunit-map
                  • Simpadd0-extdecl-list
                  • Simpadd0-extdecl
                  • Simpadd0-transunit-ensemble
                  • Simpadd0-code-ensemble
                    • Simpadd0-transunit
                    • Simpadd0-gen-var-hyps
                    • Simpadd0-block-item-list-empty
                    • 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-struni-spec
                • 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
              • Specialize
              • Split-fn
              • Split-fn-when
              • Copy-fn
              • Split-all-gso
              • Rename
              • Utilities
            • Representation
            • Insertion-sort
            • Pack
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Riscv
          • 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
    • Simpadd0-event-generation

    Simpadd0-code-ensemble

    Transform a code ensemble.

    Signature
    (simpadd0-code-ensemble code gin state) → (mv new-code gout)
    Arguments
    code — Guard (code-ensemblep code).
    gin — Guard (simpadd0-ginp gin).
    Returns
    new-code — Type (code-ensemblep new-code).
    gout — Type (simpadd0-goutp gout).

    Definitions and Theorems

    Function: simpadd0-code-ensemble

    (defun simpadd0-code-ensemble (code gin state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (code-ensemblep code)
                                 (simpadd0-ginp gin))))
     (declare
      (xargs
          :guard
          (transunit-ensemble-unambp (code-ensemble->transunits code))))
     (let ((__function__ 'simpadd0-code-ensemble))
       (declare (ignorable __function__))
       (b* (((code-ensemble code) code)
            ((mv tunits-new (simpadd0-gout gout))
             (simpadd0-transunit-ensemble code.transunits gin state)))
         (mv (change-code-ensemble code
                                   :transunits tunits-new)
             gout))))

    Theorem: code-ensemblep-of-simpadd0-code-ensemble.new-code

    (defthm code-ensemblep-of-simpadd0-code-ensemble.new-code
      (b* (((mv ?new-code ?gout)
            (simpadd0-code-ensemble code gin state)))
        (code-ensemblep new-code))
      :rule-classes :rewrite)

    Theorem: simpadd0-goutp-of-simpadd0-code-ensemble.gout

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

    Theorem: transunit-ensemble-unambp-of-simpadd0-code-ensemble

    (defthm transunit-ensemble-unambp-of-simpadd0-code-ensemble
     (b* (((mv ?new-code ?gout)
           (simpadd0-code-ensemble code gin state)))
      (transunit-ensemble-unambp (code-ensemble->transunits new-code))))

    Theorem: simpadd0-code-ensemble-of-code-ensemble-fix-code

    (defthm simpadd0-code-ensemble-of-code-ensemble-fix-code
      (equal (simpadd0-code-ensemble (c$::code-ensemble-fix code)
                                     gin state)
             (simpadd0-code-ensemble code gin state)))

    Theorem: simpadd0-code-ensemble-code-ensemble-equiv-congruence-on-code

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

    Theorem: simpadd0-code-ensemble-of-simpadd0-gin-fix-gin

    (defthm simpadd0-code-ensemble-of-simpadd0-gin-fix-gin
      (equal (simpadd0-code-ensemble code (simpadd0-gin-fix gin)
                                     state)
             (simpadd0-code-ensemble code gin state)))

    Theorem: simpadd0-code-ensemble-simpadd0-gin-equiv-congruence-on-gin

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