The following is a question from book First Order Mathematical Logic by Angelo Margaris. Please help me prove this.
Prove that a formula $Q$ of $T$ (where $T$ is a first order theory) is a theorem of $T$ if and only if $Q$ is a theorem of every consistent and complete extension of $T$.
Thanks in advance.
The left to right direction is trivial, so we prove the right to left direction. In the comments you propose the tactic to assume that $T \not \models Q$, and try to find a consistent complete extension $T'$ of $T$ such that $T' \not \models Q$. This does indeed work. Let $M$ be a model of $T$ such that $M \models \neg Q$, this must exist since $T \not \models Q$. Let $T'$ be $\operatorname{Th}(M)$, the set of all sentences true in $M$. Then $T'$ is a consistent complete extension of $T$, and $\neg Q \in T'$, so in particular $T' \not \models Q$.