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