Büchi-Elgot-Trakhtenbrot theorem