• 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
        • Bitcoin
        • Ethereum
          • Mmp-trees
          • Semaphore
          • Database
          • Cryptography
          • Rlp
          • Transactions
          • Hex-prefix
          • Basics
            • Byte-arrays
            • Bytes
              • Words
              • Nibbles
              • Scalars
              • Nibble-arrays
            • Addresses
          • 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
    • Basics

    Bytes

    Bytes.

    [YP:B] describes \mathbb{O} as the set of 8-bit bytes. We use the library type byte to model \mathbb{O}.

    Definitions and Theorems

    Theorem: natp-of-byte-fix

    (defthm natp-of-byte-fix
      (natp (byte-fix x))
      :rule-classes :type-prescription)

    Theorem: byte-fix-upper-bound

    (defthm byte-fix-upper-bound
      (< (byte-fix x) 256)
      :rule-classes :linear)

    Theorem: byte-fix-rewrite-unsigned-byte-fix

    (defthm byte-fix-rewrite-unsigned-byte-fix
      (equal (byte-fix x)
             (unsigned-byte-fix 8 x)))