• 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
        • Syntax-for-tools
        • Atc
        • Language
          • Abstract-syntax
          • Integer-ranges
          • Implementation-environments
          • Dynamic-semantics
          • Static-semantics
          • Grammar
          • Integer-formats
          • Types
          • Portable-ascii-identifiers
          • Values
          • Integer-operations
          • Computation-states
          • Object-designators
          • Operations
          • Errors
          • Tag-environments
          • Function-environments
          • Character-sets
          • Flexible-array-member-removal
          • Arithmetic-operations
          • Pointer-operations
          • Bytes
            • Byte
              • Bytep
              • Byte-fix
            • Char-bit
            • Char-bit-constrp
          • Keywords
          • Real-operations
          • Array-operations
          • Scalar-operations
          • Structure-operations
        • Representation
        • Transformation-tools
        • Insertion-sort
        • Pack
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • 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
  • Bytes

Byte

Fixtype of bytes.

Definitions and Theorems

Function: byte-equiv$inline

(defun byte-equiv$inline (acl2::x acl2::y)
  (declare (xargs :guard (and (bytep acl2::x) (bytep acl2::y))))
  (equal (byte-fix acl2::x)
         (byte-fix acl2::y)))

Theorem: byte-equiv-is-an-equivalence

(defthm byte-equiv-is-an-equivalence
  (and (booleanp (byte-equiv x y))
       (byte-equiv x x)
       (implies (byte-equiv x y)
                (byte-equiv y x))
       (implies (and (byte-equiv x y) (byte-equiv y z))
                (byte-equiv x z)))
  :rule-classes (:equivalence))

Theorem: byte-equiv-implies-equal-byte-fix-1

(defthm byte-equiv-implies-equal-byte-fix-1
  (implies (byte-equiv acl2::x x-equiv)
           (equal (byte-fix acl2::x)
                  (byte-fix x-equiv)))
  :rule-classes (:congruence))

Theorem: byte-fix-under-byte-equiv

(defthm byte-fix-under-byte-equiv
  (byte-equiv (byte-fix acl2::x) acl2::x)
  :rule-classes (:rewrite :rewrite-quoted-constant))

Theorem: equal-of-byte-fix-1-forward-to-byte-equiv

(defthm equal-of-byte-fix-1-forward-to-byte-equiv
  (implies (equal (byte-fix acl2::x) acl2::y)
           (byte-equiv acl2::x acl2::y))
  :rule-classes :forward-chaining)

Theorem: equal-of-byte-fix-2-forward-to-byte-equiv

(defthm equal-of-byte-fix-2-forward-to-byte-equiv
  (implies (equal acl2::x (byte-fix acl2::y))
           (byte-equiv acl2::x acl2::y))
  :rule-classes :forward-chaining)

Theorem: byte-equiv-of-byte-fix-1-forward

(defthm byte-equiv-of-byte-fix-1-forward
  (implies (byte-equiv (byte-fix acl2::x) acl2::y)
           (byte-equiv acl2::x acl2::y))
  :rule-classes :forward-chaining)

Theorem: byte-equiv-of-byte-fix-2-forward

(defthm byte-equiv-of-byte-fix-2-forward
  (implies (byte-equiv acl2::x (byte-fix acl2::y))
           (byte-equiv acl2::x acl2::y))
  :rule-classes :forward-chaining)

Subtopics

Bytep
Recognizer for byte.
Byte-fix
Fixer for byte.