In the original work by Braams and Bowman an extensive library of PIPs bases, written in Fortran 90, was established in terms of the so-called primary and secondary invariants, using MAGMA. That library contained 66 generic molecule types and used an efficient recursive scheme to generate the basis. Here we give the essentials of the formal theory of invariant polynomials as applied to the representation of potential energy surfaces. The independent variables are functions of the internuclear distances, typically Morse variables in our work, denoted y ij or collectively y, a vector that has N (N -1)/2 components where N is the number of atoms. The potential is expressed as