Relationship between Ramification and Minimum Polynomial Factorisation Consider the following set-up:
Let $d \neq 0,1$ be a square-free integer and $p$ a prime. Let $K=\mathbb{Q}(\sqrt{d})$ and denote $\Delta^2=\Delta^2(K)$, the discriminant of $K$.
I want to prove the following claim:
Claim 1: $(p)$ ramifies in $K$ iff $p$ divides $\Delta^2$
In class we were issued a solution which was very understandable, but rested on the following initial 'obvious observation':

Obs. 2: $(p)$ ramifies iff minimum polynomial of $\sqrt{d}$ (mod $p$) has repeated roots

I am wondering where the justification for this come from. My understanding of what it is to ramify is roughly as follows:

$p$ ramifies in $K$ if the exponent of one of the prime ideals lying below $(p)$ is greater than one. 

I see a link here between the power of a linear factor in the factorisation of the minimum polynomial mod $p$ and the power of a prime ideal in the prime ideal factorisation of $(p)$, but it seems to rely on this lemma:

The power of a prime ideal in the prime ideal factorisation of (p) is equal to the power of the 'corresponding' linear factor in the factorisation of the minimum polynomial of $\sqrt{d}$ (mod $p$)

I have parenthesised 'corresponding' since I'm only guessing that this is where the justification for Claim 1 comes from, but I do not know what the link is between the prime ideal factorisation and the factorisation of the minimum polynomial (mod $p$).
So my question is as follows:
How is Obs. 2 'obvious'?
 A: We are interested in the decomposition of $(p)$ in the ring of integers $\mathcal O_K$. As a general idea we can describe the decomposition of $(p)$ in $K$ in terms of the ring $\mathcal O_K / p \mathcal O_K$. More precisely, let's first consider the ring $B = \Bbb Z[\sqrt{d}]$. Then the minimal polynomial $f$ of $\sqrt{d}$ induces an isomorphism $$(\Bbb Z/p\Bbb Z)[X]/(\overline{f}) \cong B/p B.$$ Using CRT, this relates the factorization of $\overline{f}:=f \bmod p$ to the decomposition of $(p)$ in $B=\Bbb Z[\sqrt{d}]$.
Now in the case of quadratic extension, we can easily relate $O_K$ and $Z[\sqrt{d}]$: For $d \not \equiv 1 \bmod 4$, $O_K = Z[\sqrt{d}]$. Otherwise, we can translate the whole argumentation to $\frac{\sqrt{d}-1}{2}$ whose minimal polynomial is just a linear transformation of the minimal polynomial of $\sqrt{d}$ for $p>2$. This gives the desired "observation".
In general, there is a similar result which requires a little more work:  

Proposition
  Let $L|K$ be a finite separable extension with ring of integers $B|A$. Let $\theta \in B$ be a primitive element. Let $\mathfrak p \subset A$ be a prime ideal which is relatively prime to the conductor $F_\theta = \{b \in B | bB \subset A[\theta] \}$. $F_\theta$ is a nontrivial ideal of $B$. Let $$\bar{p} = \bar{p_1}^{e_1}\cdots \bar{p_g}^{e_g}$$ be the factorization of the minimal polynomial of $\theta$ in $A/pA$. Let $p_i$ be preimages of the $\bar{p_i}$ in $A[X]$. Then the prime ideals over $\mathfrak p$ in $B$ are exactly the ideals $\mathfrak P_i = \mathfrak pB+p_i(\theta)B$. They have ramification index $e_i$ and degree of inertia $\deg\, p_i$ respectively.

