I have seen several math papers which end with a statement like "After completing the research in this paper, we learned that all the results are already known." I wonder what are the situations in which such a comment is appropriate.
Such statements usually sound lazy to me, as though the author opted not to do a literature search at the outset, and after learning of previous work the author opted not to edit the paper (or withdraw it from submission for publication) beyond adding one sentence. Putting the comment at the end of the paper seems especially questionable, in that the beginning of the paper gives the reader the impression that the results are new. But I realize that mine is an extreme perspective which does not apply to all situations, and I would be interested to hear other perspectives.