  We propose a method for analyzing two-dimensional symmetry protected
topological (SPT) wavefunctions using a correspondence with conformal field
theories (CFTs) and integrable lattice models. This method generalizes the CFT
approach for the fractional quantum Hall effect wherein the wavefunction
amplitude is written as a many-operator correlator in the CFT. Adopting a
bottom-up approach, we start from various known microscopic wavefunctions of
SPTs with discrete symmetries and show how the CFT description emerges at large
scale, thereby revealing a deep connection between group cocyles and critical,
sometimes integrable, models. We show that the CFT describing the bulk
wavefunction is often also the one describing the entanglement spectrum, but
not always. Using a plasma analogy, we also prove the existence of hidden
quasi-long-range order for a large class of SPTs. Finally, we show how response
to symmetry fluxes is easily described in terms of the CFT.
