Set X[n] := 0
Function:
(defun clearbit (n x) (declare (xargs :guard (and (natp n) (integerp x)))) (let ((__function__ 'clearbit)) (declare (ignorable __function__)) (let ((n (lnfix n)) (x (lifix x))) (logand (lognot (ash 1 n)) x))))
Theorem:
(defthm acl2::integerp-of-clearbit (b* ((ans (clearbit n x))) (integerp ans)) :rule-classes :type-prescription)
Theorem:
(defthm nat-equiv-implies-equal-clearbit-1 (implies (nat-equiv n n-equiv) (equal (clearbit n x) (clearbit n-equiv x))) :rule-classes (:congruence))
Theorem:
(defthm int-equiv-implies-equal-clearbit-2 (implies (int-equiv x x-equiv) (equal (clearbit n x) (clearbit n x-equiv))) :rule-classes (:congruence))