• 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
            • Proof-generation
            • Split-gso
            • Wrap-fn
            • Constant-propagation
            • Specialize
            • Split-fn
            • Split-fn-when
              • Split-fn-when-implementation
                • Ext-declon-list-try-split-fn-when
                • Transunit-ensemble-split-fn-when
                • Ext-declon-try-split-fn-when
                • Filepath-transunit-map-try-split-fn-when
                • Fundef-try-split-fn-when
                • Transunit-try-split-fn-when
                • Transunit-ensemble-try-split-fn-when
                • Transunit-ensemble-split-fn-when-loop
                  • Code-ensemble-split-fn-when
                  • Split-fn-when-fn
                  • Block-item-list-try-split-fn-when-loop
                  • Block-item-list-try-split-fn-when
                  • Block-item-triggerp
                  • Split-fn-when-event-generation
                  • Split-fn-when-input-processing
              • 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
    • Split-fn-when-implementation

    Transunit-ensemble-split-fn-when-loop

    Signature
    (transunit-ensemble-split-fn-when-loop tunits triggers steps) 
      → 
    (mv er? tunits$)
    Arguments
    tunits — Guard (transunit-ensemblep tunits).
    triggers — Guard (ident-setp triggers).
    Returns
    er? — Type (maybe-msgp er?).
    tunits$ — Type (transunit-ensemblep tunits$).

    Definitions and Theorems

    Function: transunit-ensemble-split-fn-when-loop

    (defun transunit-ensemble-split-fn-when-loop (tunits triggers steps)
      (declare (type (unsigned-byte 60) steps))
      (declare (xargs :guard (and (transunit-ensemblep tunits)
                                  (ident-setp triggers))))
      (b* (((reterr) (irr-transunit-ensemble))
           ((when (= 0
                     (mbe :logic (nfix steps)
                          :exec (acl2::the-fixnat steps))))
            (retmsg$ "Out of steps."))
           ((erp found tunits$)
            (transunit-ensemble-try-split-fn-when tunits triggers))
           ((unless found) (retok tunits$)))
        (transunit-ensemble-split-fn-when-loop
             tunits$ triggers (- steps 1))))

    Theorem: maybe-msgp-of-transunit-ensemble-split-fn-when-loop.er?

    (defthm maybe-msgp-of-transunit-ensemble-split-fn-when-loop.er?
      (b*
       (((mv ?er? ?tunits$)
         (transunit-ensemble-split-fn-when-loop tunits triggers steps)))
       (maybe-msgp er?))
      :rule-classes :rewrite)

    Theorem: transunit-ensemblep-of-transunit-ensemble-split-fn-when-loop.tunits$

    (defthm
     transunit-ensemblep-of-transunit-ensemble-split-fn-when-loop.tunits$
     (b*
      (((mv ?er? ?tunits$)
        (transunit-ensemble-split-fn-when-loop tunits triggers steps)))
      (transunit-ensemblep tunits$))
     :rule-classes :rewrite)