added two rewrite systems; print rewrite and pre-rewrite systems
in detect_theories