Invariant polynomials of the Landau theory of phase transitions (crystal symmetry?) I'm convinced I'm missing something so obvious but here goes
Typically, one can define something like a "general" expansion of an order parameter, ${\boldsymbol \Gamma}$, up to 6th order as follows
$$F = \frac{1}{2} A_{ij} \Gamma_i \Gamma_j + \frac{1}{3} B_{ijk} \Gamma_i \Gamma_j \Gamma_k + \frac{1}{4} C_{ijkl} \Gamma_i \Gamma_j \Gamma_k \Gamma_l + \frac{1}{5} D_{ijklm} \Gamma_i \Gamma_j \Gamma_k \Gamma_l \Gamma_m + \frac{1}{6} E_{ijklmn} \Gamma_i \Gamma_j \Gamma_k \Gamma_l \Gamma_m \Gamma_n$$  
Then, a symmetry consideration from a lattice can be applied, to reduce the above expression to a simpler form. Usually this is done by looking at a parent phase and then lowering the symmetry through an irreducible representation of a soft mode and getting a symmetry invariant polynomial. 
For example, if the parent phase is cubic, sometimes defined as $O_h$, one can find, in three dimensions (${\boldsymbol \Gamma} = \left\{ \Gamma_x, \Gamma_y \Gamma_z \right\}$), that
$$F =  \alpha_1 \left(\Gamma_x^2 + \Gamma_y^2 + \Gamma_z^2 \right) + \alpha_{11} \left(\Gamma_x^4 + \Gamma_y^4 + \Gamma_z^4 \right) + \alpha_{12} \left(\Gamma_x^2 \Gamma_y^2 + \Gamma_y^2 \Gamma_z^2 + \Gamma_x^2 \Gamma_z^2 \right) 
+ \alpha_{111} \left(\Gamma_x^6 + \Gamma_y^6 + \Gamma_z^6 \right) + \alpha_{112} \left[\Gamma_x^4 \left(\Gamma_y^2 + \Gamma_z^2 \right) + \Gamma_y^4 \left(\Gamma_x^2 + \Gamma_z^2 \right) + \Gamma_z^4 \left(\Gamma_x^2 + \Gamma_y^2 \right) \right] + \alpha_{123} \left(\Gamma_x^2 \Gamma_y^2 \Gamma_z^2 \right) $$
is the free energy for a system whos order parameter obeys tetragonal symmetry. (I'm sure there is some Voight transformation on notation between the general expression and this example).
What are the exact operations one would have to do if say we wanted the above expression? How about a system where the order parameter obeys rhombohedral symmetry? Hexagonal symmetry? What if the parent phase is one of the above symmetries and we want to lower further?
Thanks!
 A: The brute-force method to find the symmetric polynomials of a point group is to start with the generic polynomial and perform a symmetrization over group elements. This can be done for small finite groups and does not require much knowledge about the representation theory.
Let $G$ be the point group (can be $O_h$, $T_d$, $D_{6h}$ etc) in consideration. For any element $g\in G$, first write down its three-dimensional representation $R(g)$, as a $3\times 3$ matrix acting on the vector $\Gamma=(\Gamma_x,\Gamma_y,\Gamma_z)$, s.t.
$$(g\Gamma)_i=\sum_{j}R(g)_{ij}\Gamma_j.$$
Then take a generic polynomial expansion of the free energy:
$$F = A^{(0)}_{ijk\cdots}\Gamma_{i}\Gamma_{j}\Gamma_{k}\cdots,$$
symmetrize the coefficient tensor $A^{(0)}_{ijk\cdots}$ by
$$A^{(0)}_{ijk\cdots}\to A^{(1)}_{ijk\cdots}=\frac{1}{|G|}\sum_{g\in G}A^{(0)}_{i'j'k'\cdots}R(g)_{ii'}R(g)_{jj'}R(g)_{kk'}\cdots ,$$
where $|G|$ is the order of the group $G$ (the number of elements in $G$). Then the symmetrized coefficients $A^{(1)}_{ijk\cdots}$ will produce all (and only) symmetric polynomials to the desired order.

Example: Let us consider a simple example of the tetrahedral group $T_d$, which has 24 group elements. They are generated by two generators:


*

*the two-fold reflection (denoted as $a$) about the mirror plane normal to the $(1,1,0)$ vector,

*the three-fold roation (denoted as $b$) around the $(1,1,1)$ axis by $2\pi/3$.


With these, the tetrahedral group has the presentation $T_d=\langle a, b|a^2=b^3=(ab)^4=1\rangle$. To obtain the matrix representations $R(g)$ for all group elements $g\in T_d$, we first find the representations for the generators $a$ and $b$, which can be done in Mathematica quite easily:
a = ReflectionMatrix[{1, 1, 0}];
b = RotationMatrix[2 Pi/3, {1, 1, 1}];

Then the whole $T_d$ group can be generated from $a$ and $b$ by consecutive multiplications until closure, which can be formulated as a problem of finding the fixed-point under right multiplication of the generators.
G = FixedPoint[DeleteDuplicates@Join[#, #.a, #.b] &, {IdentityMatrix[3]}];

$G$ now contains the 24 elements of $T_d$ group. Now we can use it to symmetrize the coefficient tensors $A^{(0)}_{ijk\cdots}$.  Let us start from rank-2 tensors (corresponding to quadratic polynomials). How should we initialize the tensor $A^{(0)}_{ij}$? One nice trick is to initialize $A^{(0)}_{ij}$ by random numbers!
A0 = RandomReal[{}, {3, 3}];
d = ArrayDepth[A0];

The tensor rank (depth) is kept as $d$, which will be useful later. Given the group $G$ and the tensor rank $d$, we can construct the symmetrization operator (also known as the projection operator) $P_G$ for that rank:
PG = Sum[TensorProduct @@ ConstantArray[SparseArray@g, d], {g, G}];

The final step is to apply the symmetrization operator $P_G$ to the random tensor $A^{(0)}$ by tensor contractions:
A1 = TensorContract[TensorProduct[PG, A0], {2 # - 1, 2 d + #} & /@ Range@d];

To read out the symmetric polynomials from the symmetrized tensor $A^{(1)}$, we create an order parameter $r$ to contract with the coefficient tensor.
r = {x, y, z};
Dot @@ Prepend[A1]@ConstantArray[r, d] // Expand

The result will be something like
11.6381 x^2 + 11.6381 y^2 + 11.6381 z^2

After factoring out the common coefficient (which is random), we know that $x^2+y^2+z^2$ is the only $T_d$ symmetric polynomial on the quadratic level. The above procedure can be extended to higher order polynomials by increasing the rank of the initial random tensor $A^{(0)}$. For example, to obtain symmetric quartic polynomials, we need to set
A0 = RandomReal[{}, {3, 3, 3, 3}];

and rerun the program. The result will look like
18.2274 x^4 + 66.6814 x^2 y^2 + 18.2274 y^4 + 66.6814 x^2 z^2
 + 66.6814 y^2 z^2 + 18.2274 z^4

Different symmetric polynomials can be identified by different coefficients. So we know there are two $T_d$ symmetric polynomials on the quartic level: $x^4+y^4+z^4$ and $x^2 y^2+x^2 z^2+y^2 z^2$. In this way, one can find the $T_d$ symmetric polynomials for the lowest few orders:
$$\begin{array}{cc}\text{order} & \text{symmetric polynomials}\\ 2 & x^2+y^2+z^2\\ 3 & xyz\\ 4 & x^4+y^4+z^4\\ & x^2 y^2+x^2 z^2+y^2 z^2\\ 5 & xyz(x^2+y^2+z^2)\\6 & x^6+y^6+z^6\\ & x^4(y^2+z^2)+y^4(x^2+z^2)+z^4(x^2+y^2)\\ & x^2 y^2 z^2\\ \cdots & \cdots \end{array}$$
However, it worth mention that the computation complexity grows exponentially with the polynomial order. So very quickly we will get stuck and not able to proceed to higher orders.

A more clever and more systematic construction will require some knowledge of group representation theory. The idea is to start with the polynomial representation of each irreducible representation of the group and build up higher order polynomials by tensoring the irreducible representations. The symmetric polynomials will be found as the trivial representation. Useful tables for these can be found at this website: http://www.webqc.org/symmetrypointgroup-td.html.
