With the America Invents Act (in 2011), the U.S. switched its method for adjudicating disputes about simultaneous inventions from "First to Invent" to "First to File". Prior to 2011, almost every country in the world (other than the U.S.) followed a "First to File" method for prioritizing ownership of an invention.
"First to Invent" (U.S. pre-2011) meant that if someone filed a patent application and you had already invented whatever they were claiming to invent, you could file your own application and leap-frog over their application. However, you had to prove that you came up with the invention before they did. That usually required submission of signed and dated laboratory notebooks. The problem with that system was that it incentivized the creation of falsified lab notebooks to steal someone else's invention. Also, it was time consuming and expensive to litigate the disputes over priority.
"First to File" is much simpler. It doesn't matter who was the first to come up with the invention, all that matters is whoever is the first one to file their application with the U.S. Patent & Trademark Office (or any recognized patent office worldwide).
As such, under "First to File" it is imperative that you keep your invention secret until after you have filed a disclosure with the patent office. "First to File" is also a bit more fair because "First to Invent" tended to favor the side with the best-paid legal team. You don't need any lawyers to prove you were the "First to File".
@trostparadox, I had no idea of the history of this in the US. Very interesting. To me, it seems that the pre-2011 approach was intended to provide the equitable solution to patent disputes but unfortunately achieved the opposite. If people were more honest and less driven by greed to defile their morality then I believe that option 1 would have worked beautifully. I find it sad that the US was forced to adopt the first to file approach although I hear you in terms of it being much easier to manage and police and therefore make a definitive judgment on who gets the recognition. Thank you for sharing this history with your students and enabling me to therefore share in the learning opportunity.