The patent law applies when a person invents something and then describes it on a patent. When that patent is submitted and approved, no one else can claim invention of that item. Patents encourage competition because the first person to come up with a great idea for an invention and patent it will own the idea: people want to be the first and are motivated.