Recognize lists of binary digit characters.
(bin-digit-char-listp x) → std::bool
Unlike bin-digit-char-list*p,
this requires true list (i.e.
Since there are functions in std/strings that operate on bin-digit-char-list*p, we provide a bridge theorem between the two recognizers, which we can use to satisfy the guards of those functions.
Function:
(defun bin-digit-char-listp (x) (declare (xargs :guard t)) (let ((acl2::__function__ 'bin-digit-char-listp)) (declare (ignorable acl2::__function__)) (if (consp x) (and (bin-digit-char-p (car x)) (bin-digit-char-listp (cdr x))) (null x))))
Theorem:
(defthm bin-digit-char-list*p-when-bin-digit-char-listp (implies (bin-digit-char-listp x) (bin-digit-char-list*p x)))