Bactra Review    A Future for Socialism
The intuition behind this, of course, goes back to Adam Smith, but, surprisingly, there was no really strong proof until the work of Kenneth Arrow and Gerard Debreu in the 1950s. They showed that, subject to certain conditions, a system of markets can, left to its own devices, allocate resources in such a way that no one can be made better off without making someone worse off, and moreover the markets will be in equilibrium if and only if this happy condition applies. Unfortunately, the conditions are rather stringent, starting with everyone in the economy having perfect foresight, and getting to the equilibrium is another story. See Gerard Debreu, Theory of Value: An Axiomatic Analysis of Economic Equilibrium (Yale University Press, 1959), or (much more compactly) Stanley Reiter, "Efficient Allocation" in John Eatwell, Murray Milgate and Peter Newman (eds.), The New Palgrave: A Dictionary of Economics, (W. W. Norton, 1989), of which I happen to have a copy (PDF, 2Mb) through means I'd rather not go into.