Least significant bit of a number.
In languages like C, this might be written as
Function:
(defun logcar$inline (i) (declare (xargs :guard (integerp i))) (let ((__function__ 'logcar)) (declare (ignorable __function__)) (mbe :logic (imod i 2) :exec (the (unsigned-byte 1) (logand (the integer i) 1)))))
Theorem:
(defthm logcar-type (b* ((bit (logcar$inline i))) (bitp bit)) :rule-classes ((:type-prescription) (:generalize :corollary (or (equal (logcar i) 0) (equal (logcar i) 1)))))