Cooling lines as probes of the formation and buildup of galaxies and
  black holes
  We discuss the use of SPICA to study the cosmic history of star formation and
accretion by supermassive black holes. The cooling lines, in particular the
high-J rotational lines of CO, provide a clear-cut and unique diagnostic for
separating the contributions of star formation and AGN accretion to the total
infrared luminosity of active, gas-rich galaxies. We briefly review existing
efforts for studying high-J CO emission from galaxies at low and high redshift.
We finally comment on the detectability of cooling radiation from primordial
(very low metallicity) galaxies containing an accreting supermassive black hole
with SPICA/SAFARI.
