rewriting of Logic