4. References
Jenkins, F.A.  & H.E. White; Fundamentals of Optics; McGraw-Hill Publishing Co.  1951
1:5. Fermat's Principle.  A correct and complete statement of   this principle is seldom found in textbooks, because the tendency is to cite it in Fermat's original form, which was incomplete.  Using the concept of optical path, the principle should read:

       The path taken by a light ray in going from one point to another through any set of media is such as to render its optical path equal, in the first approximation, to other paths closely adjacent to the actual one.

     The "other paths" must be possible ones in the sense that they may only undergo deviations where there are reflecting or refracting surfaces.   Now Fermat's principle will hold for a ray whose optical path is a minimum with respect to adjacent hypothetical paths.  Fermat himself stated that the time required by the light to traverse the path is a minimum, and the optical path is a measure of this time.  But there are plenty of cases in
which the optical path is a maximum, or else neither a maximum nor a minimum but merely stationary (at a point of inflection) at the position of the true ray.
 

Max Born & Emil Wolf; Principles of Optics; Pergamon Press;Sixth (Corrected) Edition, 1980

V.I. Arnold; Singularities of Caustics and Wave Fronts; Kluwer Academic Publishers, 1990

J.D. Murray; Mathematical Biology; Springer-Verlag Berlin Heidelberg, 1989

H.S. Carslaw and J.C. Jaeger; Conduction of Heat in Solids; Oxford at the Clarendon Press; 1959