• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Bitcoin
      • Riscv
        • Instructions
          • Instr
          • Op-funct
            • Op-funct-fix
            • Op-funct-case
            • Op-funct-p
              • Op-funct-equiv
              • Op-funct-kind
              • Op-funct-xor
              • Op-funct-sub
              • Op-funct-srl
              • Op-funct-sra
              • Op-funct-sltu
              • Op-funct-slt
              • Op-funct-sll
              • Op-funct-remu
              • Op-funct-rem
              • Op-funct-or
              • Op-funct-mulhu
              • Op-funct-mulhsu
              • Op-funct-mulh
              • Op-funct-mul
              • Op-funct-divu
              • Op-funct-div
              • Op-funct-and
              • Op-funct-add
            • Op-32-funct
            • Op-imm-funct
            • Load-funct
            • Branch-funct
            • Op-imms-funct
            • Store-funct
            • Op-imms-32-funct
            • Instr-validp
            • Instr-option
            • Op-imm-32-funct
          • States
          • Decoding
          • Encoding
          • Features
          • Semantics
          • Execution
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Op-funct

    Op-funct-p

    Recognizer for op-funct structures.

    Signature
    (op-funct-p x) → *

    Definitions and Theorems

    Function: op-funct-p

    (defun op-funct-p (x)
      (declare (xargs :guard t))
      (let ((__function__ 'op-funct-p))
        (declare (ignorable __function__))
        (and (consp x)
             (cond ((or (atom x) (eq (car x) :add))
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :sub)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :slt)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :sltu)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :and)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :or)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :xor)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :sll)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :srl)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :sra)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :mul)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :mulh)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :mulhu)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :mulhsu)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :div)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :divu)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   ((eq (car x) :rem)
                    (and (true-listp (cdr x))
                         (eql (len (cdr x)) 0)
                         (b* nil t)))
                   (t (and (eq (car x) :remu)
                           (and (true-listp (cdr x))
                                (eql (len (cdr x)) 0))
                           (b* nil t)))))))

    Theorem: consp-when-op-funct-p

    (defthm consp-when-op-funct-p
      (implies (op-funct-p x) (consp x))
      :rule-classes :compound-recognizer)