Assuming (everyone in) the electorate knows the probability distribution of votes for the candidates and votes strategically, and assuming this distribution has no ties (whatsoever), Duverger's law can be derived formally as a limit when the electorate is infinite, i.e. there being only a two-party equilibrium in such case; see Palfrey (1989):
we show that when the number of voters in the electorate is large, the equilibrium share of the "third-party vote" must necessarily be small. Moreover, this equilibrium share of the vote declines to zero in the limit as the size of the electorate grows.
- Palfrey, T. (1989) ‘A mathematical proof of Duverger’s law’, in P. Ordeshook (ed.) Models of Strategic Choice in Politics, Ann Arbor: University of Michigan Press, 69–91.
The formalization of the assumptions is a bit long/complicated to reproduce here alas (a couple of pages). A key assumption is that voters receive a [von Neumann Morgenstern] utility between 0 and 1 for their candidates in the outcome, with the extremes getting 0 and 1 respectively (and the middle candidates somewhere in between). Anther key assumption is that voters vote strategically to maximize their [own] post-election utility. Also (in the limit case) the electorate knows (by virtue of knowing the distribution) that the electorate is infinite. Basically (under these assumptions):
in large electorates, equilibrium voting behavior implies that a voter
will always vote for the most preferred candidate of the two frontrunners.
An extension of this result from FPTP to SNTV is provided by Cox (1994): in M-seat districts, only M+1 candidates get votes (under similar assumptions as those of Palfrey).
Note however that these results require no ties in the distribution and an exact perception of the distribution function by the whole electorate; if there is a "pre-election polling dead heat" situation e.g. candidates in positions 2 and 3 are perceived as having a different relative order by some part of the electorate, then a non-Duvergerian equilibrium is possible (meaning all 3 can get votes), as shown by Myerson and Weber (1993)--in fact in this case the winner of the contest can be even a Condorcet loser. Fey (1997) constructs a model of iterated polling showing that if an infinite number of polls is conducted (over time), then such a process essentially produces enough information to eliminate such an "epsilon" tie (i.e. not a true tie, but one that is very close to one). So it's basically in this sense that there needs to be both a large electorate and enough iterations of the game for Duverger's law to hold when pre-election information is less precise.