How to prevent a coauthor from stealing the article? Please go through the following incidents to understand the problem.

Mr. A is a Ph.D. student of some institute who was working with Prof. B of another institute on a very interesting mathematical problem since last three years. Recently, they came across a significant solution to it. They wrote a research article to publish in a very good mathematics journal that accepts the online submission.

Prof. B wanted to submit it to the journal by himself. Mr. A agreed. 

A few days ago, Mr. A wanted to know about the submission of their article via telephone. Prof. B informed that the article is submitted. But, Mr. A received any confirmation e-mail neither from the journal nor Prof. B forwarded the submission mail to him. Prof. B did not upload it in arXiv, which is a free preprint repository.

Mathematics journals used to take a long duration to review and publish an article. Prof. B told that submitting this article to arXiv will immediately attract community attention. Many researchers will start working in the new direction. As a result, Mr. A and Prof. B may lose their opportunity to work on that problems. Also, the article may be stolen.

Mr. A did not ask Prof. B to forward the submission confirmation mail to him. Prof. might think that Mr. A is suspecting him. It may affect the relationship. Also, Prof. is a very powerful person in the administration, who may prevent an opportunity for Mr. A to gain a job. Again from some of his friends, Mr. A came to know that Prof. had distributed related research problems to his collaborators.

As a consequence, Mr. A is thinking that Prof. has submitted this work in his own name and he has lost his credit as the first author of this article.

Now the question is: How Mr. A may save his credit and his work without hampering his relationship with Prof B?
In this age, it seems highly unlikely that there is absolutely no permanent record of their communication and collaboration: how did they collaborate in writing the paper? Did they exchange drafts via e-mail, for instance?

So, if this happens, you simply show the evidence to the editors and to the direct superiors of prof. B. End of story.