• 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
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
          • Atj
            • Atj-implementation
              • Atj-types
              • Atj-java-primitive-array-model
              • Atj-java-abstract-syntax
                • Jbinop
                  • Jbinopp
                  • Jbinop-fix
                  • Jbinop-case
                  • Jbinop-kind
                    • Jbinop-equiv
                    • Jbinop-add
                    • Jbinop-sub
                    • Jbinop-xor
                    • Jbinop-ushr
                    • Jbinop-sshr
                    • Jbinop-shl
                    • Jbinop-rem
                    • Jbinop-ne
                    • Jbinop-mul
                    • Jbinop-lt
                    • Jbinop-le
                    • Jbinop-ior
                    • Jbinop-gt
                    • Jbinop-ge
                    • Jbinop-eq
                    • Jbinop-div
                    • Jbinop-condor
                    • Jbinop-condand
                    • Jbinop-asg-xor
                    • Jbinop-asg-ushr
                    • Jbinop-asg-sub
                    • Jbinop-asg-sshr
                    • Jbinop-asg-shl
                    • Jbinop-asg-rem
                    • Jbinop-asg-mul
                    • Jbinop-asg-ior
                    • Jbinop-asg-div
                    • Jbinop-asg-and
                    • Jbinop-asg-add
                    • Jbinop-asg
                    • Jbinop-and
                  • Jmethod
                  • Jtype
                  • Jfield
                  • Jexprs
                  • Jliteral
                  • Junop
                  • Jlocvar
                  • Jcunit
                  • Jaccess
                  • Maybe-jexpr
                  • Jparam
                  • Jimport
                  • Jcinitializer
                  • Jresult
                  • Jstatems+jblocks
                  • Jexpr-get-field
                  • Jliteral-long-dec-nouscores
                  • Nat-to-dec-chars-theorems
                  • Jmethods-to-jcbody-elements
                  • Jclasses-to-jcbody-elements
                  • Jblock-locvar-final
                  • Jblock-locvar
                  • Jliteral-int-dec-nouscores
                  • Jfields-to-jcbody-elements
                  • Jblock-for
                  • Jblock-smethod
                  • Jblock-imethod
                  • Jblock-ifelse
                  • Jblock-asg-name
                  • Jparam-list->types
                  • Jparam-list->names
                  • Jexpr-lit-long-dec-nouscores
                  • Jexpr-lit-int-dec-nouscores
                  • Jexpr-literal-string
                  • Jexpr-literal-floating
                  • Jexpr-literal-character
                  • Jblock-while
                  • Jblock-method
                  • Jblock-if
                  • Jblock-expr
                  • Jblock-do
                  • Jblock-asg
                  • Jexpr-name-list
                  • Jblock-throw
                  • Jblock-return
                  • Jparam-list
                  • Jimport-list
                  • Jexpr-literal-true
                  • Jexpr-literal-null
                  • Jexpr-literal-false
                  • Jexpr-literal-1
                  • Jexpr-literal-0
                  • Jclass-list
                  • Jblock-continue
                  • Jtype-short
                  • Jtype-long
                  • Jtype-list
                  • Jtype-int
                  • Jtype-float
                  • Jtype-double
                  • Jtype-char
                  • Jtype-byte
                  • Jtype-boolean
                  • Jmethod-list
                  • Jliteral-list
                  • Jfield-list
                  • Jblock-list
                  • Jblock-break
                  • Jclasses+jcmembers
                • Atj-input-processing
                • Atj-java-pretty-printer
                • Atj-code-generation
                • Atj-java-primitives
                • Atj-java-primitive-arrays
                • Atj-type-macros
                • Atj-java-syntax-operations
                • Atj-fn
                • Atj-library-extensions
                • Atj-java-input-types
                • Atj-test-structures
                • Aij-notions
                • Atj-macro-definition
              • Atj-tutorial
            • Aij
            • Language
          • 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
    • Jbinop

    Jbinop-kind

    Get the kind (tag) of a jbinop structure.

    Signature
    (jbinop-kind x) → kind
    Arguments
    x — Guard (jbinopp x).

    Definitions and Theorems

    Function: jbinop-kind$inline

    (defun jbinop-kind$inline (x)
      (declare (xargs :guard (jbinopp x)))
      (let ((__function__ 'jbinop-kind))
        (declare (ignorable __function__))
        (mbe :logic (cond ((or (atom x) (eq (car x) :mul)) :mul)
                          ((eq (car x) :div) :div)
                          ((eq (car x) :rem) :rem)
                          ((eq (car x) :add) :add)
                          ((eq (car x) :sub) :sub)
                          ((eq (car x) :shl) :shl)
                          ((eq (car x) :sshr) :sshr)
                          ((eq (car x) :ushr) :ushr)
                          ((eq (car x) :lt) :lt)
                          ((eq (car x) :gt) :gt)
                          ((eq (car x) :le) :le)
                          ((eq (car x) :ge) :ge)
                          ((eq (car x) :eq) :eq)
                          ((eq (car x) :ne) :ne)
                          ((eq (car x) :and) :and)
                          ((eq (car x) :xor) :xor)
                          ((eq (car x) :ior) :ior)
                          ((eq (car x) :condand) :condand)
                          ((eq (car x) :condor) :condor)
                          ((eq (car x) :asg) :asg)
                          ((eq (car x) :asg-mul) :asg-mul)
                          ((eq (car x) :asg-div) :asg-div)
                          ((eq (car x) :asg-rem) :asg-rem)
                          ((eq (car x) :asg-add) :asg-add)
                          ((eq (car x) :asg-sub) :asg-sub)
                          ((eq (car x) :asg-shl) :asg-shl)
                          ((eq (car x) :asg-sshr) :asg-sshr)
                          ((eq (car x) :asg-ushr) :asg-ushr)
                          ((eq (car x) :asg-and) :asg-and)
                          ((eq (car x) :asg-xor) :asg-xor)
                          (t :asg-ior))
             :exec (car x))))

    Theorem: jbinop-kind-possibilities

    (defthm jbinop-kind-possibilities
      (or (equal (jbinop-kind x) :mul)
          (equal (jbinop-kind x) :div)
          (equal (jbinop-kind x) :rem)
          (equal (jbinop-kind x) :add)
          (equal (jbinop-kind x) :sub)
          (equal (jbinop-kind x) :shl)
          (equal (jbinop-kind x) :sshr)
          (equal (jbinop-kind x) :ushr)
          (equal (jbinop-kind x) :lt)
          (equal (jbinop-kind x) :gt)
          (equal (jbinop-kind x) :le)
          (equal (jbinop-kind x) :ge)
          (equal (jbinop-kind x) :eq)
          (equal (jbinop-kind x) :ne)
          (equal (jbinop-kind x) :and)
          (equal (jbinop-kind x) :xor)
          (equal (jbinop-kind x) :ior)
          (equal (jbinop-kind x) :condand)
          (equal (jbinop-kind x) :condor)
          (equal (jbinop-kind x) :asg)
          (equal (jbinop-kind x) :asg-mul)
          (equal (jbinop-kind x) :asg-div)
          (equal (jbinop-kind x) :asg-rem)
          (equal (jbinop-kind x) :asg-add)
          (equal (jbinop-kind x) :asg-sub)
          (equal (jbinop-kind x) :asg-shl)
          (equal (jbinop-kind x) :asg-sshr)
          (equal (jbinop-kind x) :asg-ushr)
          (equal (jbinop-kind x) :asg-and)
          (equal (jbinop-kind x) :asg-xor)
          (equal (jbinop-kind x) :asg-ior))
      :rule-classes
      ((:forward-chaining :trigger-terms ((jbinop-kind x)))))