• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
      • B*
      • Defunc
      • Fty
        • Deftagsum
        • Defprod
        • Defflexsum
        • Defbitstruct
        • Deflist
        • Defalist
        • Defbyte
        • Defresult
        • Deffixequiv
        • Deffixtype
        • Defoption
        • Fty-discipline
        • Fold
        • Specific-types
        • Fty-extensions
          • Defbyte
          • Defresult
          • Fold
          • Specific-types
          • Defsubtype
          • Defset
          • Defflatsum
          • Deflist-of-len
          • Pos-list
          • Defomap
          • Defbytelist
          • Defbyte-standard-instances
          • Deffixtype-alias
          • Defbytelist-standard-instances
          • Defunit
          • Byte-list
            • Byte-listp
            • Byte-list-fix
            • Byte-list20
            • Byte-list32
            • Byte-list64
            • Byte-list-equiv
          • Database
          • Byte
          • String-option
          • Pos-option
          • Nibble
          • Nat-option
          • Ubyte32-option
          • Byte-list20
          • Byte-list32
          • Byte-list64
          • Pseudo-event-form
          • Natoption/natoptionlist
          • Nati
          • Character-list
          • Nat/natlist
          • Maybe-string
          • Nibble-list
          • Natoption/natoptionlist-result
          • Nat/natlist-result
          • Nat-option-list-result
          • Set
          • String-result
          • String-list-result
          • Nat-result
          • Nat-option-result
          • Nat-list-result
          • Maybe-string-result
          • Integer-result
          • Character-result
          • Character-list-result
          • Boolean-result
          • Map
          • Dependencies
          • Bag
          • Pos-set
          • Hex-digit-char-list
          • Dec-digit-char-list
          • Pseudo-event-form-list
          • Nat-option-list
          • Character-any-map
          • Any-nat-map
          • Symbol-set
          • String-set
          • Nat-set
          • Character-set
          • Oct-digit-char-list
          • Bin-digit-char-list
          • Bit-list
        • Defsubtype
        • Deftypes
        • Defset
        • Defflatsum
        • Deflist-of-len
        • Defomap
        • Defbytelist
        • Fty::basetypes
        • Defvisitors
        • Deffixtype-alias
        • Deffixequiv-sk
        • Defunit
        • Multicase
        • Deffixequiv-mutual
        • Fty::baselists
        • Def-enumcase
        • Defmap
      • Apt
      • Std/util
      • Defdata
      • Defrstobj
      • Seq
      • Match-tree
      • Defrstobj
      • With-supporters
      • Def-partial-measure
      • Template-subst
      • Soft
      • Defthm-domain
      • Event-macros
      • Def-universal-equiv
      • Def-saved-obligs
      • With-supporters-after
      • Definec
      • Sig
      • Outer-local
      • Data-structures
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Fty-extensions
  • Specific-types
  • Byte

Byte-list

A fixtype of true lists of (unsigned 8-bit) bytes.

We use fty::defbytelist to generate this fixtype, along with the recognizer, fixer, and equivalence.

Theorem: byte-listp-forward-unsigned-byte-listp

(defthm byte-listp-forward-unsigned-byte-listp
  (implies (byte-listp x)
           (unsigned-byte-listp 8 x))
  :rule-classes :forward-chaining)

Theorem: byte-listp-rewrite-unsigned-byte-listp

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

Theorem: unsigned-byte-listp-rewrite-byte-listp

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

Theorem: true-listp-when-byte-listp-rewrite

(defthm true-listp-when-byte-listp-rewrite
  (implies (byte-listp x) (true-listp x)))

Theorem: byte-list-fix-of-take

(defthm byte-list-fix-of-take
  (implies (<= (nfix n) (len x))
           (equal (byte-list-fix (take n x))
                  (take n (byte-list-fix x)))))

Theorem: byte-list-fix-of-rcons

(defthm byte-list-fix-of-rcons
  (equal (byte-list-fix (rcons a x))
         (rcons (byte-fix a) (byte-list-fix x))))

Subtopics

Byte-listp
(byte-listp x) recognizes lists where every element satisfies bytep.
Byte-list-fix
(byte-list-fix x) is a usual fty list fixing function.
Byte-list20
A fixtype of true lists of (unsigned 8-bit) bytes of length 20.
Byte-list32
A fixtype of true lists of (unsigned 8-bit) bytes of length 32.
Byte-list64
A fixtype of true lists of (unsigned 8-bit) bytes of length 64.
Byte-list-equiv
Basic equivalence relation for byte-list structures.