• 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
          • Semantics
          • Abstract-syntax
            • Aexp
              • Aexp-case
              • Aexp-fix
              • Aexpp
              • Aexp-count
              • Aexp-equiv
              • Aexp-mul
              • Aexp-add
              • Aexp-var
              • Aexp-const
              • Aexp-kind
              • Bexp
              • Comm
              • Comm-list
              • Command-fixtypes
            • Interpreter
          • 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
    • Aexp

    Aexp-kind

    Get the kind (tag) of a aexp structure.

    Signature
    (aexp-kind x) → kind
    Arguments
    x — Guard (aexpp x).

    Definitions and Theorems

    Function: aexp-kind$inline

    (defun aexp-kind$inline (x)
      (declare (xargs :guard (aexpp x)))
      (let ((__function__ 'aexp-kind))
        (declare (ignorable __function__))
        (mbe :logic (cond ((or (atom x) (eq (car x) :const))
                           :const)
                          ((eq (car x) :var) :var)
                          ((eq (car x) :add) :add)
                          (t :mul))
             :exec (car x))))

    Theorem: aexp-kind-possibilities

    (defthm aexp-kind-possibilities
     (or (equal (aexp-kind x) :const)
         (equal (aexp-kind x) :var)
         (equal (aexp-kind x) :add)
         (equal (aexp-kind x) :mul))
     :rule-classes ((:forward-chaining :trigger-terms ((aexp-kind x)))))