• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
          • Soft-future-work
          • Soft-macros
            • Defun-inst
            • Defequal
              • Defequal-implementation
                • Defequal-fn
                  • Defequal-event-generation
                  • Defequal-input-processing
                  • Defequal-table
                  • Defequal-macro-definition
              • Defsoft
              • Defthm-inst
              • Defun2
              • Defunvar
              • Defun-sk2
              • Defchoose2
              • Defthm-2nd-order
              • Define-sk2
              • Defund-sk2
              • Define2
              • Defund2
            • Updates-to-workshop-material
            • Soft-implementation
            • Soft-notions
          • 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
    • Defequal-implementation

    Defequal-fn

    Check redundancy, process the inputs, generated the events.

    Signature
    (defequal-fn name left left-present right 
                 right-present vars enable verify-guards 
                 left-to-right-name left-to-right-enable 
                 right-to-left-name right-to-left-enable 
                 print show-only call ctx state) 
     
      → 
    (mv erp event state)
    Arguments
    left-present — Guard (booleanp left-present).
    right-present — Guard (booleanp right-present).
    call — Guard (pseudo-event-formp call).
    Returns
    event — A pseudo-event-formp.

    Definitions and Theorems

    Function: defequal-fn

    (defun defequal-fn (name left left-present right
                             right-present vars enable verify-guards
                             left-to-right-name left-to-right-enable
                             right-to-left-name right-to-left-enable
                             print show-only call ctx state)
      (declare (xargs :stobjs (state)))
      (declare (xargs :guard (and (booleanp left-present)
                                  (booleanp right-present)
                                  (pseudo-event-formp call))))
      (let ((__function__ 'defequal-fn))
        (declare (ignorable __function__))
        (b* ((expansion? (defequal-redundant? call (w state)))
             ((when expansion?)
              (b* (((run-when show-only)
                    (cw "~x0~|" expansion?)))
                (cw "~%The call ~x0 is redundant.~%" call)
                (value '(value-triple :invisible))))
             ((er (list x1...xn left-to-right right-to-left))
              (defequal-process-inputs
                   name left left-present right
                   right-present vars enable verify-guards
                   left-to-right-name left-to-right-enable
                   right-to-left-name right-to-left-enable
                   print show-only ctx state))
             (event (defequal-gen-everything
                         name
                         left right x1...xn enable verify-guards
                         left-to-right left-to-right-enable
                         right-to-left right-to-left-enable
                         print show-only call)))
          (value event))))