The process or processes which gave rise to the galaxies. In the Big Bang theory, the early Universe was predominantly smooth, so something must have caused material to assemble into galaxies filled with stars. It is thought that small irregularities in density were present at the recombination epoch. These density fluctuations were then amplified by the action of gravity, eventually leading to the formation of galaxy-sized objects. Calculations show that this process is assisted by the existence of dark matter, particularly if it is cold dark matter. There is still no complete theory of galaxy formation that includes an explanation of how stars form within them or whether the first galaxies formed before the first stars.