• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
      • Std/lists
      • Omaps
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
        • Pretty-printing
        • Printtree
        • Base64
        • Charset-p
        • Strtok!
        • Cases
        • Concatenation
        • Character-kinds
        • Html-encoding
        • Substrings
        • Strtok
        • Equivalences
        • Url-encoding
        • Lines
        • Explode-implode-equalities
        • Ordering
        • Numbers
          • Decimal
          • Hex
            • Parse-hex-from-string
            • Hex-digit-char-p
            • Nat-to-hex-chars
            • Parse-hex-from-charlist
            • Hex-digit-chars-value
            • Hex-digit-char-value
            • Take-leading-hex-digit-chars
            • Hexify
            • Hex-digit-char-listp
              • Hex-digit-char-listp-basics
              • Hex-digit-char-listp-results
            • Hex-digit-char-list*p
            • Hex-digit-string-p
            • Strval16
            • Skip-leading-hex-digits
            • Nat-to-hex-string
            • Hexify-width
            • Nonzero-hex-digit-char-p
            • Nat-to-hex-string-list
            • Revappend-nat-to-hex-chars
            • Hex-digit-to-char
            • Nat-to-hex-string-size
          • Octal
          • Binary
        • Pad-trim
        • Coercion
        • Std/strings/digit-to-char
        • Substitution
        • Symbols
      • Std/osets
      • Std/io
      • Std/basic
      • Std/system
      • Std/typed-lists
      • Std/bitsets
      • Std/testing
      • Std/typed-alists
      • Std/stobjs
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Hex

Hex-digit-char-listp

Recognize lists of hexadecimal digit characters.

Signature
(hex-digit-char-listp x) → std::bool

Unlike hex-digit-char-list*p, this requires true list (i.e. nil-terminated.

Since there are functions in std/strings that operate on hex-digit-char-list*p, we provide a bridge theorem between the two recognizers, which we can use to satisfy the guards of those functions.

Definitions and Theorems

Function: hex-digit-char-listp

(defun hex-digit-char-listp (x)
  (declare (xargs :guard t))
  (let ((acl2::__function__ 'hex-digit-char-listp))
    (declare (ignorable acl2::__function__))
    (if (consp x)
        (and (hex-digit-char-p (car x))
             (hex-digit-char-listp (cdr x)))
      (null x))))

Theorem: hex-digit-char-list*p-when-hex-digit-char-listp

(defthm hex-digit-char-list*p-when-hex-digit-char-listp
  (implies (hex-digit-char-listp x)
           (hex-digit-char-list*p x)))

Subtopics

Hex-digit-char-listp-basics
Basic theorems about hex-digit-char-listp, generated by std::deflist.
Hex-digit-char-listp-results
Theorems about results of std/strings functions that return lists of hexadecimal digit characters.