What are the legal requirements to obtain a patent?