I submitted a short paper and received a positive review and a negative review. The editor (he) briefly wrote the following things:

1. He thinks my original result could be mistaken because of XYZ
2. He presents an alternative theorem (not entirely in mathematical language but with a combination of math and English), which gives a finer result than mine
3. He presents a sketch of proof
4. He presents an example
5. He adds that, if I think he is wrong, and I was right, please revise my manuscript addressing concerns of reviewers and submit again.

I thought I was right, but after working on this topic for a few more months, I find that he is actually correct. So I wrote down his theorem, proofs, and example in details. I am about to submit, but an idea jumps into my head: he should own the copyright, not me. What should I do here?

*Background*: he is a very smart and cutting-edge researcher in my field, but he does not work on the problems in my direction, so I won't be plagiarizing his papers.