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.