  Tur\'an problems in extremal combinatorics ask to find asymptotic bounds on
the edge densities of graphs and hypergraphs that avoid specified subgraphs.
The theory of flag algebras proposed by Razborov provides powerful methods
based on semidefinite programming to find sums of squares that establish edge
density inequalities in Tur\'an problems. Working with polynomial analogs of
the flag algebra entities, we prove that such sums of squares created by flag
algebras can be retrieved from a restricted version of the symmetry-adapted
semidefinite program proposed by Gatermann and Parrilo. This involves using the
representation theory of the symmetric group for finding succinct sums of
squares expressions for invariant polynomials. The connection reveals several
combinatorial and structural properties of flag algebra sums of squares, and
offers new tools for Tur\'an and other related problems.
