• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
      • Output-controls
      • Macros
        • Make-event
        • Defmacro
        • Untranslate-patterns
        • Tc
        • Trans*
        • Macro-aliases-table
        • Macro-args
        • Defabbrev
        • User-defined-functions-table
        • Trans
        • Untranslate-for-execution
        • Add-macro-fn
        • Check-vars-not-free
        • Safe-mode
        • Macro-libraries
          • B*
          • Defunc
          • Fty
          • 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
            • Std/util
            • Defdata
            • Defrstobj
            • Seq
            • Match-tree
            • Defrstobj
            • With-supporters
            • Def-partial-measure
            • Template-subst
            • Soft
            • Defthm-domain
            • Event-macros
            • Def-universal-equiv
            • Def-saved-obligs
            • With-supporters-after
            • Definec
            • Sig
            • Outer-local
            • Data-structures
          • Trans1
          • Defmacro-untouchable
          • Set-duplicate-keys-action
          • Add-macro-alias
          • Magic-macroexpand
          • Defmacroq
          • Trans!
          • Remove-macro-fn
          • Remove-macro-alias
          • Add-binop
          • Untrans-table
          • Trans*-
          • Remove-binop
          • Tcp
          • Tca
        • Mailing-lists
        • Interfacing-tools
      • Macro-libraries
        • B*
        • Defunc
        • Fty
        • 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
          • Std/util
          • Defdata
          • Defrstobj
          • Seq
          • Match-tree
          • Defrstobj
          • With-supporters
          • Def-partial-measure
          • Template-subst
          • Soft
          • Defthm-domain
          • Event-macros
          • Def-universal-equiv
          • Def-saved-obligs
          • With-supporters-after
          • Definec
          • Sig
          • Outer-local
          • Data-structures
        • Interfacing-tools
        • Hardware-verification
        • Software-verification
        • 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))))