Patent Law Origins
All the in's and out's of patent laws and rules are explicitly written and described in the Manual of Patent Examining Procedure (MPEP). The MPEP is several thousand pages long and it references many of the official rules and laws established by the Patent and Trademark Office (PTO).
There are two sources for the laws and rules covered in the MPEP. The first is described in "United States Code Title 35 - Patents". The second source includes the rules described in the "Code of Federal Regulations - Patents, Trademarks and Copyrights". As far as patent law is concerned, you only need to worry about the Regulations covered in the Patent section of the code.
The MPEP includes all the relevant laws and rules you need to know in order to gain a patent. Within it, every angle of each law and rule is covered, in addition to the forms used to file a patent application. The MPEP also references important court case citations used over the years to help establish the laws and rules of the Patent Office.