• 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

    Ext-declon-list-try-split-fn-when

    Signature
    (ext-declon-list-try-split-fn-when extdecls triggers transunits) 
      → 
    (mv er? found extdecls$)
    Arguments
    extdecls — Guard (ext-declon-listp extdecls).
    triggers — Guard (ident-setp triggers).
    transunits — Guard (transunit-ensemblep transunits).
    Returns
    er? — Type (maybe-msgp er?).
    found — Type (booleanp found).
    extdecls$ — Type (ext-declon-listp extdecls$).

    Definitions and Theorems

    Function: ext-declon-list-try-split-fn-when

    (defun ext-declon-list-try-split-fn-when
           (extdecls triggers transunits)
      (declare (xargs :guard (and (ext-declon-listp extdecls)
                                  (ident-setp triggers)
                                  (transunit-ensemblep transunits))))
      (b* (((reterr) nil nil)
           ((when (endp extdecls)) (retok nil nil))
           ((erp found extdecls1)
            (ext-declon-try-split-fn-when (first extdecls)
                                          triggers transunits))
           ((when found)
            (retok t
                   (append extdecls1
                           (ext-declon-list-fix (rest extdecls)))))
           ((erp found extdecls2)
            (ext-declon-list-try-split-fn-when (rest extdecls)
                                               triggers transunits)))
        (retok found (append extdecls1 extdecls2))))

    Theorem: maybe-msgp-of-ext-declon-list-try-split-fn-when.er?

    (defthm maybe-msgp-of-ext-declon-list-try-split-fn-when.er?
      (b* (((mv ?er? ?found ?extdecls$)
            (ext-declon-list-try-split-fn-when
                 extdecls triggers transunits)))
        (maybe-msgp er?))
      :rule-classes :rewrite)

    Theorem: booleanp-of-ext-declon-list-try-split-fn-when.found

    (defthm booleanp-of-ext-declon-list-try-split-fn-when.found
      (b* (((mv ?er? ?found ?extdecls$)
            (ext-declon-list-try-split-fn-when
                 extdecls triggers transunits)))
        (booleanp found))
      :rule-classes :type-prescription)

    Theorem: ext-declon-listp-of-ext-declon-list-try-split-fn-when.extdecls$

    (defthm
        ext-declon-listp-of-ext-declon-list-try-split-fn-when.extdecls$
      (b* (((mv ?er? ?found ?extdecls$)
            (ext-declon-list-try-split-fn-when
                 extdecls triggers transunits)))
        (ext-declon-listp extdecls$))
      :rule-classes :rewrite)

    Theorem: true-listp-of-ext-declon-list-try-split-fn-when.extdecls$

    (defthm true-listp-of-ext-declon-list-try-split-fn-when.extdecls$
      (b* (((mv ?er? ?found ?extdecls$)
            (ext-declon-list-try-split-fn-when
                 extdecls triggers transunits)))
        (true-listp extdecls$))
      :rule-classes :type-prescription)