  We develop a coupled model for the evolution of the global properties of the
intergalactic medium (IGM) and the formation of galaxies, in the presence of a
photoionizing background due to stars and quasars. We use this model to predict
the thermodynamic history of the IGM when photoionized by galaxies forming in a
cold dark matter (CDM) universe. The evolution of the galaxies is calculated
using a semi-analytical model, including a detailed treatment of the effects of
tidal stripping and dynamical friction on satellite galaxies orbiting inside
larger dark matter halos. We include in the model the negative feedback on
galaxy formation from the photoionizing background. Photoionization inhibits
galaxy formation in low-mass dark matter halos in two ways: (i) heating of the
IGM and inhibition of the collapse of gas into dark halos by the IGM pressure,
and (ii) reduction in the radiative cooling of gas within halos. The result of
our method is a self-consistent model of galaxy formation and the IGM. The IGM
is reheated twice (during reionization of HI and HeII), and we find that the
star formation rate per unit volume is slightly suppressed after each episode
of reheating. We find that galaxies brighter than L_* are mostly unaffected by
reionization, while the abundance of faint galaxies is significantly reduced,
leading to present-day galaxy luminosity functions with shallow faint end
slopes, in good agreement with recent observational data. Reionization also
affects other properties of these faint galaxies, in a readily understandable
way.
