typechecked term rewrite systems (that does not work)