• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
          • Defbyte
          • Defresult
          • Fold
          • Defsubtype
          • Specific-types
          • Defset
          • Defflatsum
          • Deflist-of-len
          • Pos-list
          • Defbytelist
          • Defomap
          • Defbyte-standard-instances
          • Deffixtype-alias
          • Defbytelist-standard-instances
          • Defunit
          • Byte-list
          • Database
          • Byte
          • Pos-option
          • Nibble
          • Nat-option
          • String-option
          • Byte-list20
          • Byte-list32
          • Byte-list64
          • Pseudo-event-form
          • Natoption/natoptionlist
          • Nati
          • Character-list
          • Nat/natlist
          • Maybe-string
          • Nibble-list
            • Nibble-list-fix
            • Nibble-list-equiv
            • Nibble-listp
          • 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
          • Bag
          • Pos-set
          • Hex-digit-char-list
          • Dec-digit-char-list
          • Pseudo-event-form-list
          • Nat-option-list
          • Symbol-set
          • String-set
          • Nat-set
          • Oct-digit-char-list
          • Bin-digit-char-list
          • Bit-list
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • Bitcoin
        • Ethereum
        • 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
  • Fty-extensions
  • Specific-types
  • Nibble

Nibble-list

A fixtype of true lists of (unsigned 4-bit) nibbles.

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

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

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

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

(defthm nibble-listp-rewrite-unsigned-byte-listp
  (equal (nibble-listp x)
         (unsigned-byte-listp 4 x)))

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

(defthm unsigned-byte-listp-rewrite-nibble-listp
  (equal (unsigned-byte-listp 4 x)
         (nibble-listp x)))

Theorem: true-listp-when-nibble-listp-rewrite

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

Theorem: nibble-list-fix-of-take

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

Theorem: nibble-list-fix-of-rcons

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

Subtopics

Nibble-list-fix
(nibble-list-fix x) is a usual fty list fixing function.
Nibble-list-equiv
Basic equivalence relation for nibble-list structures.
Nibble-listp
(nibble-listp x) recognizes lists where every element satisfies nibblep.