• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
      • B*
      • Defunc
      • Fty
      • Apt
      • Std/util
        • Defprojection
        • Deflist
        • Defaggregate
        • Define
        • Defmapping
          • Defsurj
          • Defiso
          • Defmapping-implementation
            • Defmapping-event-generation
            • Defmapping-check-redundancy
            • Defmapping-table
            • Defmapping-fn
            • Defmapping-input-processing
              • Defmapping-process-thm-names
              • Defmapping-process-inputs
              • Defmapping-process-function
              • Defmapping-process-functions
                • Defmapping-process-thm-enable
                • Defmapping-thm-keywords
                • Defmapping-process-name
              • Defmapping-macro-definition
            • Definj
          • Defenum
          • Add-io-pairs
          • Defalist
          • Defmapappend
          • Returns-specifiers
          • Defarbrec
          • Defines
          • Define-sk
          • Error-value-tuples
          • Defmax-nat
          • Defmin-int
          • Deftutorial
          • Extended-formals
          • Defrule
          • Defval
          • Defsurj
          • Defiso
          • Defconstrained-recognizer
          • Deffixer
          • Defmvtypes
          • Defconsts
          • Defthm-unsigned-byte-p
          • Support
          • Defthm-signed-byte-p
          • Defthm-natp
          • Defund-sk
          • Defmacro+
          • Defsum
          • Defthm-commutative
          • Definj
          • Defirrelevant
          • Defredundant
        • 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
      • ACL2
        • Theories
        • Rule-classes
        • Proof-builder
        • Recursion-and-induction
        • Hons-and-memoization
        • Events
        • Parallelism
        • History
        • Programming
        • Operational-semantics
        • Real
        • Start-here
        • Miscellaneous
        • Output-controls
        • Bdd
        • Macros
          • Make-event
          • Defmacro
          • Untranslate-patterns
          • Tc
          • Trans*
          • Macro-aliases-table
          • Macro-args
          • Defabbrev
          • User-defined-functions-table
          • Trans
          • Untranslate-for-execution
          • Macro-libraries
            • B*
            • Defunc
            • Fty
            • Apt
            • Std/util
              • Defprojection
              • Deflist
              • Defaggregate
              • Define
              • Defmapping
                • Defsurj
                • Defiso
                • Defmapping-implementation
                  • Defmapping-event-generation
                  • Defmapping-check-redundancy
                  • Defmapping-table
                  • Defmapping-fn
                  • Defmapping-input-processing
                    • Defmapping-process-thm-names
                    • Defmapping-process-inputs
                    • Defmapping-process-function
                    • Defmapping-process-functions
                      • Defmapping-process-thm-enable
                      • Defmapping-thm-keywords
                      • Defmapping-process-name
                    • Defmapping-macro-definition
                  • Definj
                • Defenum
                • Add-io-pairs
                • Defalist
                • Defmapappend
                • Returns-specifiers
                • Defarbrec
                • Defines
                • Define-sk
                • Error-value-tuples
                • Defmax-nat
                • Defmin-int
                • Deftutorial
                • Extended-formals
                • Defrule
                • Defval
                • Defsurj
                • Defiso
                • Defconstrained-recognizer
                • Deffixer
                • Defmvtypes
                • Defconsts
                • Defthm-unsigned-byte-p
                • Support
                • Defthm-signed-byte-p
                • Defthm-natp
                • Defund-sk
                • Defmacro+
                • Defsum
                • Defthm-commutative
                • Definj
                • Defirrelevant
                • Defredundant
              • 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
            • Add-macro-fn
            • Check-vars-not-free
            • Safe-mode
            • 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
          • Installation
          • Mailing-lists
        • Interfacing-tools
        • Hardware-verification
        • Software-verification
        • Math
        • Testing-utilities
      • Defmapping-input-processing

      Defmapping-process-functions

      Process the doma, domb, alpha, and beta inputs.

      Signature
      (defmapping-process-functions doma 
                                    domb alpha beta guard-thms$ ctx state) 
       
        → 
      (mv erp result state)
      Returns
      result — A tuple (doma$ domb$ alpha$ beta$) satisfying (typed-tuplep pseudo-termfnp pseudo-termfnp pseudo-termfnp pseudo-termfnp result).

      We call defmapping-process-function on each and then we check the constraints on the arities and numbers of results.

      Definitions and Theorems

      Function: defmapping-process-functions

      (defun defmapping-process-functions
             (doma domb alpha beta guard-thms$ ctx state)
       (declare (xargs :stobjs (state)))
       (declare (xargs :guard t))
       (let ((__function__ 'defmapping-process-functions))
        (declare (ignorable __function__))
        (b*
         (((er (list doma$ doma-arity doma-numres))
           (defmapping-process-function doma 2 guard-thms$ ctx state))
          ((er (list domb$ domb-arity domb-numres))
           (defmapping-process-function domb 3 guard-thms$ ctx state))
          ((er (list alpha$ alpha-arity alpha-numres))
           (defmapping-process-function alpha 4 guard-thms$ ctx state))
          ((er (list beta$ beta-arity beta-numres))
           (defmapping-process-function beta 5 guard-thms$ ctx state))
          ((unless (= doma-numres 1))
           (er-soft+
            ctx t nil
            "The number of results returned by the domain ~x0 ~
                         must be 1, but it is ~x1 instead."
            doma doma-numres))
          ((unless (= domb-numres 1))
           (er-soft+
            ctx t nil
            "The number of results returned by the domain ~x0 ~
                         must be 1, but it is ~x1 instead."
            domb domb-numres))
          ((unless (= alpha-arity doma-arity))
           (er-soft+
            ctx t nil
            "The arity of the conversion ~x0 ~
                         must equal the arity ~x1 of the domain ~x2, ~
                         but it is ~x3 instead."
            alpha doma-arity doma alpha-arity))
          ((unless (= alpha-numres domb-arity))
           (er-soft+
            ctx t nil
            "The number of results of the conversion ~x0 ~
                         must equal the arity ~x1 of the domain ~x2, ~
                         but it is ~x3 instead."
            alpha domb-arity domb alpha-numres))
          ((unless (= beta-arity domb-arity))
           (er-soft+
            ctx t nil
            "The arity of the conversion ~x0 ~
                         must equal the arity ~x1 of the domain ~x2, ~
                         but it is ~x3 instead."
            beta domb-arity domb beta-arity))
          ((unless (= beta-numres doma-arity))
           (er-soft+
            ctx t nil
            "The number of results of the conversion ~x0 ~
                         must equal the arity ~x1 of the domain ~x2, ~
                         but it is ~x3 instead."
            beta doma-arity doma beta-numres)))
         (value (list doma$ domb$ alpha$ beta$)))))