Computing a Galois Group by Reducing Mod P On page 274 of Lang's Algebra, he states the following theorem (paraphrasing):

Let $f(x) \in \mathbb{Z}[x]$ be a monic polynomial. Let $p$ be a
  prime. Let $\bar{f} = f \bmod p$ be the polynomial obtained by
  reducing the coefficients mod $p$. Assume that $\bar f$ has no
  multiple roots in an algebraic closure of $\mathbb{F}_p$. Then there
  is an embedding of the Galois group of $\bar f$ into the Galois group
  of $f$.

I'm confused about what this means; in particular, I don't know how exactly to interpret the phrase "Galois group of $\bar f$." Does it just mean the Galois group of $\bar f$ over $\mathbb{Q}$ where we forget that we ever reduced the coefficients mod $p$?
Example: I think I can apply this theorem to compute the Galois group of $x^4 + 3x^2 - 3x - 2$ over $\mathbb{Q}$. Here's my argument. Please let me know if I'm applying the theorem correctly.
Reducing $f$ mod 3 we get $x^4 - 2$, which has no multiple roots (since it is coprime with its derivative). The Galois group of $x^4 - 2$ over $\mathbb{Q}$ is the dihedral group with 8 elements. Reducing $f$ mod 2 we get $x^4 + x^3 - x = x(x^3 + x^2 - 1)$ which also has no multiple roots. The cubic has discriminant $-23$, which is not a square in $\mathbb{Q}$, so it has Galois group $S_3$. 
Let $G$ be the Galois group of $f$. We know $G$ embeds into $S_4$ since $f$ has degree 4. Now applying the theorem, both $S_3$ and $D_8$ embed into $G$, so $G$ has elements of order 3 and 4. They generate a subgroup of order at least 12, so $G$ must be $A_4$ or $S_4$. Since $D_8$ has order 8, it cannot embed into $A_4$, which has order 12, so $G = S_4$.
Am I applying the theorem correctly?
 A: Note that  $\overline{f}$ is an element of $\mathbb{F}_p[X]$ (otherwise, there would be multiple choices for $\overline{f}$) and the galois group of $\overline{f}$ is actually the automorphism group of the field extension $K/\mathbb{F}_p$ where $K$ is a splitting field of $\overline{f}$, so it is a priori difficult to relate this galois group to the galois group of $f$ (which are automorphisms of some finite extension $L$ of $\mathbb{Q}$). 
If we assume (as in the theorem) that $\overline{f}$ has $n$ distinct roots in an algebraic closure of $\mathbb{F}_p$ (or equivalent, in $K$) the theorem as stated implies that there is an injective homomorphism $\text{Gal}(K/\mathbb{F}_p) \hookrightarrow \text{Gal}(L/\mathbb{Q})$, so it can be realized as a subgroup of the galois group of $f$. The exact homomorphism is not necessarily known, but often we can still gain a lot of information. For example, if the galois group of $\overline{f}$ contains an element of order $k$ (for some $k\geq 1$) then so does the galois group of $f$. 
Building on your example: $x^4 + 3x^2 - 3x - 2$ is indeed reduced to $x^4-2$ modulo $3$ but you have to see it as a polynomial with coefficients in $\mathbb{F}_3$. Factoring this polynomial, we can see that this polynomial decomposes in two irreducibles in $\mathbb{F}_3[X]$:
$$x^4 - 2 = (x^2+x+2)(x^2+2x+2)$$
Now what is the Galois group of this polynomial? Over finite fields you have to remember one very important property: the galois group of a finite extension of finite fields is always cyclic! So in this case, $\mathbb{F}_9$ is easily seen to be a splitting field of $x^4-2$ and the galois group is isomorphic to $\mathbb{Z}/2\mathbb{Z}$ and thus the galois group of $f$ will contain a subgroup of order $2$, i.e. an element of order $2$. 
Likewise, our polynomial reduces and factors over $\mathbb{F}_2[X]$ as 
$$x^4+x^2+x = x(x^3+x+1) $$
where $x^3+x+1$ is irreducible since it has no roots in $\mathbb{F}_2$. The galois group of this polynomial is clearly $\mathbb{Z}/3\mathbb{Z}$ so the galois group of $f$ has an element of order $3$. 
Let now $G$ be the galois group of $f$, considered as a subgroup of $S_4$. We know since $f$ is irreducible that $G$ acts transitively on the roots and has thus order divisible by $4$ (by the orbit-stabilizer formula). Also, it contains an element of order 2 (but this we knew already..) and contains an element of order 3, a 3-cycle, by the previous paragraphs. Its order is thus divisible by $12$. Since it is a subgroup of $S_4$ which has order $24$, we're almost there. There are (at least) two ways to finish the argument:


*

*If $G$ would have order $12$ then it would be a normal subgroup of $S_4$, which implies that it equals $A_4$ (this is a fun group theory exercise). But we can "verify" (cfr. wolfram alpha) that the discriminant is -20183, which is not a square. Therefore $G$ is not contained in $A_4$ and $G = S_4$

*If we reduce $f$ modulo $7$ it stays irreducible so has distinct roots in $\mathbb{F}_7$ and has galois group $\mathbb{Z}/4\mathbb{Z}$ which embeds in $G$ as a $4$-cycle. Since a $4$-cycle is not in $A_4$, we conclude as in the previous argument that $G = S_4$


For a very clear and well-written exposition on this, I recommend this paper by Keith Conrad.
