The Equilibrium of the Firm