TITLE: What's a magical theorem in logic?
QUESTION [32 upvotes]: Some theorems are magical: their hypotheses are easy to meet, and when invoked (as lemmas) in the midst of an otherwise routine proof, they deliver the desired conclusion more or less straightaway—like pulling a rabbit from a hat. Here are five examples. Some are from outside of logic, but each is often useful within logic.
Baire Category Theorem. In any completely metrizable topological space, each nonempty open set is nonmeager.
Gödel's Diagonal Lemma. If a theory $T$ relatively interprets Robinson's arithmetic, then for each first order formula $\varphi(x,v_1,\dots,v_n)$ in the language of $T$, there is a $\psi(v_1,\dots,v_n)$ such that $T$ proves the sentence $\forall v_1 \dots \forall v_n[\psi(v_1,\dots,v_n) \leftrightarrow \varphi(\overline\psi,v_1,\dots,v_n)]$, where $\overline\psi$ is the code of $\psi$.
König's Tree Lemma. Every finitely splitting tree of infinite height has an infinite branch.
Knaster–Tarski Theorem. Every monotone nondecreasing operator on the powerset of a set has a fixed point.
Mostowski Collapsing Lemma. If $E$ is a well founded, set like, and extensional binary class relation on a class $M$, then there is a unique transitive class $N$ such that $(M, E)$ is isomorphic to $(N, \in)$.
Let's list other magical theorems that every logician can wield. Students among us will thereby learn of useful results that might otherwise escape their attention until much later. (There is related question here. But it and most of its answers don't focus on theorems useful in logic.) Please treat only one theorem per answer, and write as many answers as you like. Don't just link to Wikipedia or whatever; give a pithy statement. If possible, keep it informal. Bonus if the theorem isn't well known, or if you show it in action.

REPLY [4 votes]: The Feferman-Vaught theorem is a fairly magical result in logic since it allows one to figure out the truth value of a first order formula in a product of structures in terms of the individual structures and the type of product used. More generally, the Feferman-Vaught technique can be used to analyze complex structures based on their components. There are different versions of the Feferman-Vaught theorem, so I should say that the Feferman-Vaught theorem is a class of theorems or a technique rather than an individual result. This technique was developed by Feferman and Vaught in the well-known paper The first Order Properties of Products of Algebraic Systems. The following result is a version of the Feferman-Vaught theorem for reduced products. For this result, we will need the following definition. If $\psi(x_1,...,x_n)$ is a formula and $\prod_{i\in I}\mathcal{A}_{i}/Z$ is a reduced product, then for $[f]_{1},...,[f]_{n}\in\prod_{i\in I}\mathcal{A}_{i}/Z$, let $\|\psi([f]_{1},...,[f]_{n})\|=\{i\in I|\mathcal{A}_{i}\models\psi(f_{1}(i),...,f_{n}(i))\}/Z$. In other words, $\|\psi([f]_{1},...,[f]_{n})\|\in I/Z$ is the Boolean value of $\psi([f]_{1},...,[f]_{n})$.

For each formula
  $\phi(x_{1},...,x_{n})$ there is a
  sequence of formulas
  $(\theta;\psi_{1},...,\psi_{m})$ such
  that 

the formulas $\psi_{i}$ have at most the variables $x_{1},...,x_{n}$ free
$\theta=\theta(y_{1},...,y_{m})$ is a formula in the language of Boolean
  algebras and
If $I$ is a set and $Z$ is a filter on $I$ and $\mathcal{A}_{i}$ is a
  first order structure for $i\in I$,
  then for
  $[f_{1}],...,[f_{n}]\in\prod_{i\in
> I}\mathcal{A}_{i}/Z$, we have
  $$\prod_{i\in
> I}\mathcal{A}_{i}/Z\models\phi([f_{1}],...,[f_{n}])$$
  if and only if
  $$P(I)/Z\models\theta(\|\psi_{1}([f_{1}],...,[f_{n}])\|,...,\|\psi_{m}([f_{1}],...,[f_{n}])\|).$$


The above result also holds for the limit reduced power and the Boolean product (see the paper Sheaf Constructions and Their Elementary Properties for more details on this result). An immediate consequence of this result is that reduced products preserve elementary equivalence. In particular, direct products, direct powers, and reduced powers all preserve elementary equivalence and elementary embeddings. I posted this result since I recently used an application of a version of the Feferman-Vaught theorem to produce a result about ultrapowers and limit reduced powers.