• 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-kind

    Get the kind (tag) of a op-funct structure.

    Signature
    (op-funct-kind x) → kind
    Arguments
    x — Guard (op-funct-p x).

    Definitions and Theorems

    Function: op-funct-kind$inline

    (defun op-funct-kind$inline (x)
      (declare (xargs :guard (op-funct-p x)))
      (let ((__function__ 'op-funct-kind))
        (declare (ignorable __function__))
        (mbe :logic (cond ((or (atom x) (eq (car x) :add)) :add)
                          ((eq (car x) :sub) :sub)
                          ((eq (car x) :slt) :slt)
                          ((eq (car x) :sltu) :sltu)
                          ((eq (car x) :and) :and)
                          ((eq (car x) :or) :or)
                          ((eq (car x) :xor) :xor)
                          ((eq (car x) :sll) :sll)
                          ((eq (car x) :srl) :srl)
                          ((eq (car x) :sra) :sra)
                          ((eq (car x) :mul) :mul)
                          ((eq (car x) :mulh) :mulh)
                          ((eq (car x) :mulhu) :mulhu)
                          ((eq (car x) :mulhsu) :mulhsu)
                          ((eq (car x) :div) :div)
                          ((eq (car x) :divu) :divu)
                          ((eq (car x) :rem) :rem)
                          (t :remu))
             :exec (car x))))

    Theorem: op-funct-kind-possibilities

    (defthm op-funct-kind-possibilities
      (or (equal (op-funct-kind x) :add)
          (equal (op-funct-kind x) :sub)
          (equal (op-funct-kind x) :slt)
          (equal (op-funct-kind x) :sltu)
          (equal (op-funct-kind x) :and)
          (equal (op-funct-kind x) :or)
          (equal (op-funct-kind x) :xor)
          (equal (op-funct-kind x) :sll)
          (equal (op-funct-kind x) :srl)
          (equal (op-funct-kind x) :sra)
          (equal (op-funct-kind x) :mul)
          (equal (op-funct-kind x) :mulh)
          (equal (op-funct-kind x) :mulhu)
          (equal (op-funct-kind x) :mulhsu)
          (equal (op-funct-kind x) :div)
          (equal (op-funct-kind x) :divu)
          (equal (op-funct-kind x) :rem)
          (equal (op-funct-kind x) :remu))
      :rule-classes
      ((:forward-chaining :trigger-terms ((op-funct-kind x)))))