In the wikipedia article about Snell's law of indexes of refraction there is a demonstration that shows the interconnection with Fermat's law of least time.
The strategy of that demonstration:
The overall travel time is a function of the variation of the path. The aspect that is to be compared is not the travel time itself, but the travel time derivative with respect to the path variation.
There is medium 1 and medium 2, and there is the interface between the two media. In the general case that interface is not at right angles to the line connecting the start point and the end point.
There is the travel time $t_1$ for the path from start point to the interface, and $t_2$ for the path from the interface to the end point.
$t_1$ has an individual minimum, and $t_2$ has an individual minimum. The respective minima do not coincide, so there is an interval in the variation space where $t_1$ is still descending whereas $t_2$ is alraady ascending again (or vice versa). The global minimum of the travel time occurs at the crossover point of one still descending and the other already ascending. At that crossover point the two derivatives match.
In physics derivations are bidirectional.
(There is a general discussion of derivation in physics by stackexchange contributor knzhou, writing: "in physics, you can often run derivations in both directions: you can use X to derive Y, and also Y to derive X. That isn't circular reasoning, because the real support for X (or Y) isn't that it can be derived from Y (or X), but that it is supported by some experimental data D. This two-way derivation then tells you that if you have data D supporting X (or Y), then it also supports Y (or X)."
The thrust of my question is the following:
Snell's law describes refraction as something that occurs locally. Light is propagating, and when it encounters an interface to a medium with a different index of refraction the direction of propagation changes right there, right at that instant in time.
Fermat's law of least time obtains the change of direction as a consequence of a global criterium; the global travel time.
So: at first sight the two approaches appear to be in some way the opposite of each other.
The derivation shows that the the two ways to obtain the angle of refraction are mathematically equivalent. So: the point is moot.
I'm very curious: when was this first recognized?
Was Fermat already aware of it?
Huygens?
I'm guessing Newton was not aware of it. Newton favored a theory of light where propagation of light is thought of as motion of particles. My understanding is that Newton's theory of refraction required light to be faster in glass than in air.
(In general, theory of refraction is about ratios. A refraction experiment finds a ratio. It wasn't until the time of Fizeau that the technology was available to measure actual speed of light.)
(It could be, I haven't verified, that Fermat's law can be restated as a law of most time, under the newtonian assumption that in glass light propagates faster. That would mean that distinction between Fermat least time and Fermat most time is moot.)
With the above context in place:
It seems to me that awareness of the mathematical connection between Snell's law and Fermat's time law makes a lot of difference. So I think it's higly relevant to know when it was first recognized.