Referee says the proof is wrong, but it is not, what to do? About 3 months ago, my co-author and I submitted a mathematical paper to a journal. Yesterday, we got the editor's response and the paper has been rejected. The reason is that the referee thinks that our results are wrong or trivial.

However, we carefully read the referee's report and we conclude that the "errors" pointed out by the referee are not errors at all and that our proofs are correct. In all modesty, we think that the referee understood very poorly even the statements of our theorems.

Personally, this is the first time that such a situation occurs to me.
I already have four papers published in such journal and the reports I got from the referees have been always really accurate.

What do you think is the best thing to do?
Forget about and try another journal? Write an e-mail to the editor explaining why we disagree with the decision? Other ideas?

EDIT: Thank you very much for all your answers. At the end, we submitted our paper to another journal with only some slight edits we have already planned to do independently by the referee's report.
While you might be able to appeal to the editor, once you've been rejected, you're probably not going to get a change in decision.  I would instead recommend focusing on a new submission to another journal.

Before you do so, however, I would strongly advise performing a major revision on your presentation of the proofs.  Assuming that your proofs are in fact correct, you clearly did not convey them in such a way that their correctness and significance were obvious to the reviewer.  The reviewer may have been a sloppy or shallow reader, but so in fact will be many of your other readers after publication.  

In short, take the feedback as an indicator of how your paper needs to be improved before you submit it to another journal.