I have submitted a paper to a good journal about 3 months ago. Now I have realized that there is a mistake in the paper. Now I have completely corrected it. It is not a very serious error, but I think it could create some problems in reading the paper. In particular there is a definition that should be changed, but not in a trivial way. The main results of the paper remain essentially unchanged.
So my question is: should I write to the editors of the journal in order to inform the referee about this problem or should I wait some comments by the referee?
Thank's!