Authorship disagreement I'm in physics where the order of authors is meaningful. The first author is the lead author and the last author is the principal investigator. I am an undergraduate who has collaborated on a topic with two post docs and a professor. We are nearly ready to submit the paper to a top journal (Nature physics).

I proposed the topic after I discovered a huge idea in the field. I proved a variety of theorems and generated the supporting data independently. I used post doc 1s previous work in the paper - but it has already been published. Post doc 2 made a very small contribution, the other has contributed significantly more. I wrote the "main results", "applications" and "technical discussion" section. Post doc 1 wrote the intro, conclusion, abstract and a minor background section. The appendix is very long and I wrote 90% of it. The proof techniques and methods are my own creation with no input from any one else. Post doc 1 has helped greatly in improving my presentation since he has far more experience than me in writing papers (I have never written one). Post doc 1 made a lot of edits and helped restructure some arguments for clarity of presentation.

The paper has just been posted online to Arxiv. I am second to last author. Post doc 1 made himself first author. I have read a number of articles on the topic and since I contributed the most I believe I should be first author. What is the best way for me to approach the situation? I really feel like I am being ripped off. 3rd author could be given to any undergrad and I imagine the difference for grad school/future career could be substantial.
Thanks!
You should openly discuss your concern with the co-authors. As a matter of fact, all co-authors have to agree on the author order before submission. Nature Physics requires a statement of authors's contributions and this the ground you can use to initiate the conversation. According to what you wrote, you deserve to be the first author and the postdoc should be the corresponding author, which is often regarded as equally important as the first author. Your PI should be the one who makes the final decision. Also, he does not neccessarily have to be the last author, if he did not make substantial contributions to the project. For your situation, the reasonable author order that would make everyone happy is: you, everyone else, the postdoc. There might be political game involved. In that case, be prepared to fight for your rights.