For a rewrite system it is decidable whether the set of irreducible, ground terms is regognizable