The formula σ_{n}says the following.

(1) There exist n vertices.

(2) They are distinct.

(3) Every vertex is one of those n.

(4) The n vertices are connected in a cycle.

Compactness theorem is not used in this particular problem. It is probably used to show that there is no single formula σ saying that the graph is Hamiltonian that works for graphs of all sizes.