• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • 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
          • Define-sk
          • Defines
          • 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
        • Std/strings
        • Std/osets
        • Std/io
        • Std/basic
        • Std/system
        • Std/typed-lists
        • Std/bitsets
        • Std/testing
        • Std/typed-alists
        • Std/stobjs
      • Proof-automation
      • Macro-libraries
      • ACL2
      • 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$)))))