I want to have a boolean variable that test if, e.g., the third bit of a bit vector is 0. The theory of bitvector allows to extract 1 bit as a bitvector, but not a boolean t
Create an equality between the extraction of the third bit and a bit-vector with value 1 (and one bit).
E.g,
(declare-const x (_ BitVec 5)) (assert (= #b1 ((_ extract 2 2) x))) (check-sat) (get-model)
produces
sat (model (define-fun x () (_ BitVec 5) #b00100) )