• 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
          • Isodata
          • Simplify-defun
          • Tailrec
          • Schemalg
            • Schemalg-implementation
              • Schemalg-event-generation
                • Schemalg-gen-everything
                • Schemalg-gen-x-z1...zm
                • Schemalg-gen-old-if-new
                • Schemalg-gen-equal-algo
                  • Schemalg-gen-algo-divconq-list-0-1-2
                  • Schemalg-gen-algo-correct-divconq-list-0-1-2
                  • Schemalg-gen-algo-correct-divconq-list-0-1
                  • Schemalg-gen-spec-2
                  • Schemalg-gen-algo-correct-divconq-oset-0-1
                  • Schemalg-gen-algo-correct
                  • Schemalg-gen-algo-divconq-oset-0-1
                  • Schemalg-gen-spec-1-divconq-oset-0-1
                  • Schemalg-gen-spec-1-divconq-list-0-1
                  • Schemalg-gen-algo-divconq-list-0-1
                  • Schemalg-gen-algo
                  • Schemalg-gen-spec-1
                  • Schemalg-gen-spec-1-divconq-list-0-1-2
                  • Schemalg-gen-spec-0
                  • Schemalg-gen-spec-0-divconq-oset-0-1
                  • Schemalg-gen-spec-0-divconq-list-0-1-2
                  • Schemalg-gen-spec-0-divconq-list-0-1
                  • Schemalg-gen-new
                  • Schemalg-gen-?f1...?fp
                  • Schemalg-gen-x-z1...zm-aux
                • Schemalg-fn
                • Schemalg-macro-definition
                • Schemalg-input-processing
              • Schemalg-divconq-oset-0-1
              • Schemalg-divconq-list-0-1
            • Restrict
            • Expdata
            • Casesplit
            • 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
          • Riscv
          • 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
    • Schemalg-event-generation

    Schemalg-gen-equal-algo

    Generate the function equal[?f][algo[?f1]...[?fp]].

    Signature
    (schemalg-gen-equal-algo equal-algo 
                             equal-algo-enable vars ?f algo print) 
     
      → 
    event
    Arguments
    equal-algo — Guard (symbolp equal-algo).
    equal-algo-enable — Guard (booleanp equal-algo-enable).
    vars — Guard (symbol-listp vars).
    ?f — Guard (symbolp ?f).
    algo — Guard (symbolp algo).
    print — Guard (evmac-input-print-p print).
    Returns
    event — Type (pseudo-event-formp event).

    Unless the :print input of schemalg is :all, we pass :print nil to soft::defequal, to avoid showing its expansion on the screen (see soft::defequal). Instead, the code in schemalg-gen-everything shows the soft::defequal form itself (if schemalg's :print is at least :result).

    We do not expect this soft::defequal event to fail (it would be an internal/implementation error if it did). So there is no need to pass :print :error. If the event actually fails, then it can be debugged by passing :all to schemalg, which in this cases also passes it to equal, or by passing :show-only t to schemalg and examining/trying the resulting expansion.

    Definitions and Theorems

    Function: schemalg-gen-equal-algo

    (defun schemalg-gen-equal-algo
           (equal-algo equal-algo-enable vars ?f algo print)
     (declare (xargs :guard (and (symbolp equal-algo)
                                 (booleanp equal-algo-enable)
                                 (symbol-listp vars)
                                 (symbolp ?f)
                                 (symbolp algo)
                                 (evmac-input-print-p print))))
     (let ((__function__ 'schemalg-gen-equal-algo))
      (declare (ignorable __function__))
      (cons
       'soft::defequal
       (cons
        equal-algo
        (cons
         ':left
         (cons
          ?f
          (cons
           ':right
           (cons
            algo
            (cons
             ':vars
             (cons
              vars
              (cons
               ':enable
               (cons
                equal-algo-enable
                (cons
                 ':left-to-right-enable
                 (cons
                      equal-algo-enable
                      (cons ':right-to-left-enable
                            (cons equal-algo-enable
                                  (cons ':print
                                        (cons (and (eq print :all) :all)
                                              'nil))))))))))))))))))

    Theorem: pseudo-event-formp-of-schemalg-gen-equal-algo

    (defthm pseudo-event-formp-of-schemalg-gen-equal-algo
     (b*
      ((event
        (schemalg-gen-equal-algo equal-algo
                                 equal-algo-enable vars ?f algo print)))
      (pseudo-event-formp event))
     :rule-classes :rewrite)