Right to a patent

The right to a patent belongs to the inventor, his heirs, or assigns.[1] When two or more persons have jointly made an invention, the right to a patent belongs to them jointly.[2]

First to file rule

If two or more persons have made the invention separately and independently of each other, the right to the patent belongs to the person who filed an application for such invention, or where two or more applications are filed for the same invention, to the applicant who has the earliest filing date or the earliest priority date.[3]

Continue reading here.