• 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
        • 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
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • 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
    • 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)))))