• 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
                • 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
                  • Bitsize
                    • Bitsize-case
                    • Bitsize-fix
                    • Bitsize-equiv
                    • Bitsizep
                    • Bitsize-kind
                      • Bitsize-8
                      • Bitsize-64
                      • Bitsize-32
                      • Bitsize-16
                      • Bitsize-128
                • 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
    • Bitsize

    Bitsize-kind

    Get the kind (tag) of a bitsize structure.

    Signature
    (bitsize-kind x) → kind
    Arguments
    x — Guard (bitsizep x).

    Definitions and Theorems

    Function: bitsize-kind$inline

    (defun bitsize-kind$inline (x)
      (declare (xargs :guard (bitsizep x)))
      (let ((__function__ 'bitsize-kind))
        (declare (ignorable __function__))
        (mbe :logic (cond ((or (atom x) (eq (car x) :|8|)) :|8|)
                          ((eq (car x) :|16|) :|16|)
                          ((eq (car x) :|32|) :|32|)
                          ((eq (car x) :|64|) :|64|)
                          (t :|128|))
             :exec (car x))))

    Theorem: bitsize-kind-possibilities

    (defthm bitsize-kind-possibilities
      (or (equal (bitsize-kind x) :|8|)
          (equal (bitsize-kind x) :|16|)
          (equal (bitsize-kind x) :|32|)
          (equal (bitsize-kind x) :|64|)
          (equal (bitsize-kind x) :|128|))
      :rule-classes
      ((:forward-chaining :trigger-terms ((bitsize-kind x)))))