  Large reservoirs of cold (~ 10^4 K) gas exist out to and beyond the virial
radius in the circumgalactic medium (CGM) of all types of galaxies.
Photoionization modeling suggests that cold CGM gas has significantly lower
densities than expected by theoretical predictions based on thermal pressure
equilibrium with hot CGM gas. In this work, we investigate the impact of cosmic
ray physics on the formation of cold gas via thermal instability. We use
idealized three-dimensional magnetohydrodynamic simulations to follow the
evolution of thermally unstable gas in a gravitationally stratified medium. We
find that cosmic ray pressure lowers the density and increases the size of cold
gas clouds formed through thermal instability. We develop a simple model for
how the cold cloud sizes and the relative densities of cold and hot gas depend
on cosmic ray pressure. Cosmic ray pressure can help counteract gravity to keep
cold gas in the CGM for longer, thereby increasing the predicted cold mass
fraction and decreasing the predicted cold gas inflow rates. Efficient cosmic
ray transport, by streaming or diffusion, redistributes cosmic ray pressure
from the cold gas to the background medium, resulting in cold gas properties
that are in-between those predicted by simulations with inefficient transport
and simulations without cosmic rays. We show that cosmic rays can significantly
reduce galactic accretion rates and resolve the tension between theoretical
models and observational constraints on the properties of cold CGM gas.
