• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
          • Simplify-defun
          • Isodata
          • Tailrec
          • Schemalg
          • Restrict
          • Expdata
          • Casesplit
            • Casesplit-implementation
              • Casesplit-event-generation
              • Casesplit-fn
              • Casesplit-input-processing
                • Casesplit-process-inputs
                • Casesplit-process-theorem
                • Casesplit-process-theorems
                  • Casesplit-process-condition
                  • Casesplit-process-conditions
                  • Casesplit-process-thm-name
                  • Casesplit-process-old
                • Casesplit-macro-definition
                • Casesplit-library-extensions
            • Simplify-term
            • Simplify-defun-sk
            • Parteval
            • Solve
            • Wrap-output
            • Propagate-iso
            • Simplify
            • Finite-difference
            • Drop-irrelevant-params
            • Copy-function
            • Lift-iso
            • Rename-params
            • Utilities
            • Simplify-term-programmatic
            • Simplify-defun-sk-programmatic
            • Simplify-defun-programmatic
            • Simplify-defun+
            • Common-options
            • Common-concepts
          • Error-checking
          • Fty-extensions
          • Isar
          • Kestrel-utilities
          • Set
          • Soft
          • C
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • 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
    • Casesplit-input-processing

    Casesplit-process-theorems

    Process the theorems input.

    Signature
    (casesplit-process-theorems theorems old$ conditions$ ctx state) 
      → 
    (mv erp hyps-news state)
    Arguments
    old$ — Guard (symbolp old$).
    conditions$ — Guard (pseudo-term-listp conditions$).
    Returns
    hyps-news — A tuple (hyps news) satisfying (typed-tuple pseudo-term-listp pseudo-term-listp hyps-news).

    Definitions and Theorems

    Function: casesplit-process-theorems-aux

    (defun casesplit-process-theorems-aux (theorems pos old$ ctx state)
      (declare (xargs :stobjs (state)))
      (declare (xargs :guard (and (posp pos) (symbolp old$))))
      (let ((__function__ 'casesplit-process-theorems-aux))
        (declare (ignorable __function__))
        (cond ((endp theorems) (value (list nil nil)))
              (t (b* (((er (list hyp new))
                       (casesplit-process-theorem (car theorems)
                                                  pos old$ ctx state))
                      ((er (list hyps news))
                       (casesplit-process-theorems-aux (cdr theorems)
                                                       (1+ pos)
                                                       old$ ctx state)))
                   (value (list (cons hyp hyps)
                                (cons new news))))))))

    Function: casesplit-process-theorems

    (defun casesplit-process-theorems
           (theorems old$ conditions$ ctx state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (symbolp old$)
                                 (pseudo-term-listp conditions$))))
     (let ((__function__ 'casesplit-process-theorems))
      (declare (ignorable __function__))
      (b*
       (((unless (true-listp theorems))
         (er-soft+
          ctx t nil
          "The third input must be a true list, ~
                       but it is ~x0 instead."
          theorems))
        ((unless (= (len theorems)
                    (1+ (len conditions$))))
         (er-soft+
          ctx t nil
          "The length of the third input must be ~
                       one plus the length ~x0 of the second input, ~
                       but it is ~x1 instead."
          (len conditions$)
          (len theorems)))
        (pos 1))
       (casesplit-process-theorems-aux theorems pos old$ ctx state))))