• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
        • Pretty-printing
        • Printtree
        • Base64
        • Charset-p
        • Strtok!
        • Cases
        • Concatenation
        • Html-encoding
        • Character-kinds
        • Substrings
        • Strtok
        • Equivalences
        • Url-encoding
        • Lines
        • Explode-implode-equalities
        • Ordering
        • Numbers
          • Decimal
          • Hex
          • Octal
          • Binary
            • Parse-bits-from-string
            • Parse-bits-from-charlist
            • Nat-to-bin-chars
            • Bin-digit-chars-value
            • Take-leading-bin-digit-chars
            • Bin-digit-char-listp
            • Skip-leading-bit-digits
            • Bin-digit-char-list*p
            • Bin-digit-string-p
            • Bin-digit-char-value
            • Strval2
            • Nat-to-bin-string
            • Bin-digit-char-p
              • Bin-digit-char
            • Nat-to-bin-string-list
            • Nat-to-bin-string-size
            • Revappend-nat-to-bin-chars
            • Binify-width
            • Binify
        • 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
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Binary

Bin-digit-char-p

Recognizer for characters #\0 and #\1.

Signature
(bin-digit-char-p x) → bool

(bin-digit-char-p x) is the binary alternative to dec-digit-char-p.

Definitions and Theorems

Function: bin-digit-char-p$inline

(defun bin-digit-char-p$inline (x)
  (declare (xargs :guard t))
  (let ((acl2::__function__ 'bin-digit-char-p))
    (declare (ignorable acl2::__function__))
    (or (eql x #\0) (eql x #\1))))

Theorem: ichareqv-implies-equal-bin-digit-char-p-1

(defthm ichareqv-implies-equal-bin-digit-char-p-1
  (implies (ichareqv x x-equiv)
           (equal (bin-digit-char-p x)
                  (bin-digit-char-p x-equiv)))
  :rule-classes (:congruence))

Theorem: characterp-when-bin-digit-char-p

(defthm characterp-when-bin-digit-char-p
  (implies (bin-digit-char-p char)
           (characterp char))
  :rule-classes :compound-recognizer)

Subtopics

Bin-digit-char
Fixtype of binary digit characters.