• 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-try-split-fn-when

    Signature
    (ext-declon-try-split-fn-when extdecl triggers transunits) 
      → 
    (mv er? found extdecls)
    Arguments
    extdecl — Guard (ext-declonp extdecl).
    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-try-split-fn-when

    (defun ext-declon-try-split-fn-when (extdecl triggers transunits)
      (declare (xargs :guard (and (ext-declonp extdecl)
                                  (ident-setp triggers)
                                  (transunit-ensemblep transunits))))
      (b* (((reterr) nil nil))
        (ext-declon-case
             extdecl :fundef
             (b* (((erp fundef1 fundef2)
                   (fundef-try-split-fn-when
                        extdecl.fundef triggers transunits)))
               (fundef-option-case
                    fundef2
                    :some (retok t
                                 (list (ext-declon-fundef fundef1)
                                       (ext-declon-fundef fundef2.val)))
                    :none (retok nil
                                 (list (ext-declon-fundef fundef1)))))
             :otherwise (retok nil (list (ext-declon-fix extdecl))))))

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

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

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

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

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

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

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

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