• 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
      • Riscv
      • Taspi
      • Bitcoin
      • 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
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
                • Expression
                • Syntax-abstraction
                • Statement
                • Files
                • Input-files
                • Identifiers
                • Types
                • Struct-init
                • Branch
                • Statements
                • Format-strings
                • Input-syntax-abstraction
                • Expressions
                  • Binop
                  • Unop
                    • Unop-case
                    • Unop-fix
                    • Unopp
                    • Unop-equiv
                    • Unop-not
                    • Unop-kind
                      • Unop-square-root
                      • Unop-square
                      • Unop-neg
                      • Unop-inv
                      • Unop-double
                      • Unop-abs-wrapped
                      • Unop-abs
                    • Expression-option
                    • Struct-init-list-result
                    • Expression-option-result
                    • Unop-result
                    • Struct-init-result
                    • Expression-result
                    • Expression-list-result
                    • Binop-result
                    • Expression-fixtypes
                  • Output-files
                  • Addresses
                  • Literals
                  • Characters
                  • Expression-list
                  • Statement-list
                  • Output-syntax-abstraction
                  • Struct-init-list
                  • Branch-list
                  • Annotations
                  • Abstract-syntax-trees
                  • Symbols
                  • Keywords
                  • Programs
                  • Packages
                  • Bit-sizes
                • Dynamic-semantics
                • Compilation
                • Static-semantics
                • Concrete-syntax
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Unop

    Unop-kind

    Get the kind (tag) of a unop structure.

    Signature
    (unop-kind x) → kind
    Arguments
    x — Guard (unopp x).

    Definitions and Theorems

    Function: unop-kind$inline

    (defun unop-kind$inline (x)
      (declare (xargs :guard (unopp x)))
      (let ((__function__ 'unop-kind))
        (declare (ignorable __function__))
        (mbe :logic (cond ((or (atom x) (eq (car x) :neg)) :neg)
                          ((eq (car x) :not) :not)
                          ((eq (car x) :abs) :abs)
                          ((eq (car x) :abs-wrapped) :abs-wrapped)
                          ((eq (car x) :double) :double)
                          ((eq (car x) :inv) :inv)
                          ((eq (car x) :square-root) :square-root)
                          (t :square))
             :exec (car x))))

    Theorem: unop-kind-possibilities

    (defthm unop-kind-possibilities
     (or (equal (unop-kind x) :neg)
         (equal (unop-kind x) :not)
         (equal (unop-kind x) :abs)
         (equal (unop-kind x) :abs-wrapped)
         (equal (unop-kind x) :double)
         (equal (unop-kind x) :inv)
         (equal (unop-kind x) :square-root)
         (equal (unop-kind x) :square))
     :rule-classes ((:forward-chaining :trigger-terms ((unop-kind x)))))