Coerces a bin-digit-char-p character into a number, 0 or 1.
(bin-digit-char-value x) → bit
Function:
(defun bin-digit-char-value$inline (x) (declare (type character x)) (declare (xargs :guard (bin-digit-char-p x))) (declare (xargs :split-types t)) (let ((acl2::__function__ 'bin-digit-char-value)) (declare (ignorable acl2::__function__)) (if (eql x #\1) 1 0)))
Theorem:
(defthm bitp-of-bin-digit-char-value (b* ((bit (bin-digit-char-value$inline x))) (bitp bit)) :rule-classes :type-prescription)
Theorem:
(defthm ichareqv-implies-equal-bin-digit-char-value-1 (implies (ichareqv x x-equiv) (equal (bin-digit-char-value x) (bin-digit-char-value x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm unsigned-byte-p-of-bin-digit-char-value (unsigned-byte-p 1 (bin-digit-char-value x)))
Theorem:
(defthm equal-of-bin-digit-char-value-and-bin-digit-char-value (implies (and (bin-digit-char-p x) (bin-digit-char-p y)) (equal (equal (bin-digit-char-value x) (bin-digit-char-value y)) (equal x y))))
Theorem:
(defthm bin-digit-char-value-of-digit-to-char (implies (bitp n) (equal (bin-digit-char-value (digit-to-char n)) n)))