I am having trouble answering a question on compactness theorem an cycles in graphs.
the problem is as follows:
Let $L$ be the first order language of graphs, where variables $ x,y,z $ represent vertices and $E(x, y)$ represents ‘there is an edge incident to $x, y$’. (It then asks to express in $L$ some statements such as the graph being simple and having a maximum degree which I have done.)
The next part: for each natural number $n$, the first order statement $σ_n$ of L expresses the statement that the graph has no cycles of length n or less. For each $n > 3$ give a finite graph $G_n$ that satisfies $σ_n$ which contains a cycle.
For this part I said for $n=3$: a graph on $w,x,y,z$ with only edges $E(w,x)∧E(x,y)∧E(y,z)∧E(z,w)$ satisfies this, and you can then extend this for any $n$: $G_n$ on vertices $x_1,x_2,....,x_{n+1}$ with only edges $E(x_1,x_2)∧E(x_2,x_3)∧....∧E(x_{n+1},x_1)$ satisfies $σ_n$.
The next part is where i get stuck: A statement $γ$ is true in all finite graphs containing a cycle. Use the Compactness Theorem and the graphs $G_n$ to show there is a graph satisfying $γ$ that has no finite cycle.
I know the compactness theorem states $Σ⊨σ→$ there is a finite $Σ_0⊆Σ$ such that $Σ_0⊨σ$ and we can use this the following way:
if for every finite $Σ_0⊆Σ$ there is a model $M_0⊨Σ_0$ then there is some $M⊨Σ$
but I'm not sure how to apply it here. Is it sufficient to say that if $G_c⊨$ means that for all finite graphs with cycles $γ$ is true, then taking the union of $G_c$ with one of $σ_n$ still keeps $γ$ true and this holds for all $n$, so taking $G_c$ with all $n$ means that $γ$ is true by compactness and therefore a graph in this union has no finite cycle but $γ$ is still true?
HINT: Let $\Sigma=\{\gamma\land\sigma_n:n\in\Bbb Z^+\}$. If $\Sigma_0$ is a finite subset of $\Sigma$, there is a maximum $n$ such that $\gamma\land\sigma_n\in\Sigma_0$; show that $G_{n+3}\vDash\Sigma_0$, and then apply the compactness theorem.