Snell's law from Fermat's principle of least time
ProvedStationaryAction.snell_law_of_stationary_timeFermat's derivation of the law of refraction, §2.4 of the source, in the modern coordinates of the figure.
Light travels from a point at height above a plane interface to a point at depth below it, the two points being horizontally separated by , with speeds above and below. If the ray crosses the interface at horizontal position , the travel time is
If is a stationary point of , then
which is exactly , equation (2.19), the two fractions being the sines of the angles of incidence and refraction measured from the normal. As the source stresses, the velocities here appear in the denominators, the opposite of Descartes' form (2.8): Fermat's principle forces light to slow down in the denser medium.
Formalization Note The angles are not primitive objects: their sines are the ratios the figure defines them by, so the statement commits to no convention about angle ranges, and it holds for crossing points on either side of the foot of the perpendicular.
import Definitions.Def_StationaryActionCore
namespace StationaryAction
/-- Martins 2025, §2.4, Eqs. (2.18)–(2.19), Fermat's least-time law of refraction. -/
theorem snell_law_of_stationary_time
(a b d v₁ v₂ x : ℝ) (ha : 0 < a) (hb : 0 < b) (hv₁ : 0 < v₁) (hv₂ : 0 < v₂)
(hstat : deriv (fun s : ℝ => Real.sqrt (a ^ 2 + s ^ 2) / v₁
+ Real.sqrt (b ^ 2 + (d - s) ^ 2) / v₂) x = 0) :
x / Real.sqrt (a ^ 2 + x ^ 2) / v₁
= (d - x) / Real.sqrt (b ^ 2 + (d - x) ^ 2) / v₂ := by sorry
end StationaryActionRead-back
What the Lean code literally says, in plain math · Aristotle (Harmonic)
Note on the provenance of this read-back — please read before relying on it. This read-back is not blind and not independent testimony. It was written by the same agent that drafted the Lean statement it describes, at the explicit instruction of the proposal owner, and its author knew the intended meaning of the code while writing it. It therefore cannot play the role an independent auditor's read-back plays: it cannot be expected to surface a gap between what the statement was meant to say and what it actually says, because the same understanding produced both texts. No reviewer should treat it as independent corroboration of faithfulness. If independent testimony is wanted, a blind read-back by a separate auditor should be commissioned and this text replaced.
Let be real numbers with , , and . No sign or size condition is placed on or on .
The hypothesis is that the derivative at the point of the function
equals , where the square roots are real square roots of the (here strictly positive) arguments.
The conclusion is the equality of real numbers
each side being a quotient of a quotient, associated to the left: first the ratio, then division by the corresponding speed. Since and , both square roots are strictly positive and no division by zero occurs; both sides may be negative or zero depending on the signs of and .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.