  We develop a first-principles theory of phonon-assisted optical absorption in
semiconductors and insulators which incorporates the temperature dependence of
the electronic structure. We show that the Hall-Bardeen-Blatt theory of
indirect optical absorption and the Allen-Heine theory of temperature-dependent
band structures can be derived from the present formalism by retaining only
one-phonon processes. We demonstrate this method by calculating the optical
absorption coefficient of silicon using an importance sampling Monte Carlo
scheme, and we obtain temperature-dependent lineshapes and band gaps in good
agreement with experiment. The present approach opens the way to predictive
calculations of the optical properties of solids at finite temperature.
