Transitivity of the discriminant of number fields
Let $M/L/K$ be a tower of number fields with discriminant of $M/K: d_M$ and of $L/K: d_L$. I would like to find a transitivity theorem for the discriminant and by letting $p_i$ and $q_i$ be integral basis for $M$ and $L$ respectively and $A =[a_{ij}]$ the transition matrix between the basis, a calculation gives:
$$[M:L]^{[L:K]}d_L = \det(A)^2d_M$$
However, these two links give different(even from each other) answers:
Divisibility of discriminants in number field extensions $([M:L]^2 d_L = \det(A)^2 d_M)$
Quadratic subfield of cyclotomic field (discriminant of $M$ is divisible by discriminant of $L$ to the power $[M:L]$
Both of these are given in the accepted answers and use different notation. Which of the three is correct?(The last one is not strictly contradictory but probably often will be...).
A couple of definitions are in order to clarify the issue.
Definition 1. Consider a field extension $L / K$ and a basis $\{\alpha_1,\dotsc,\alpha_n\} \subset \mathcal{O}_L$ of $L$ over $K$. Its discriminant is $$ d(\alpha_1,\dotsc,\alpha_n) = \det(\text{Tr}\,(\alpha_i\alpha_j)) $$
Definition 2. The discriminant $\mathfrak{d}_{L/K}$ of a field extension $L/K$ is the ideal of $\mathcal{O}_K$ generated by the discriminants $d(\alpha_1,\dotsc,\alpha_n)$, where $\{\alpha_1,\dotsc,\alpha_n\}$ ranges over all the bases of $L/K$ with elements in $\mathcal{O}_L$.
Note that if $\alpha_1,\dotsc,\alpha_n$ generate $\mathcal{O}_L$ over $\mathcal{O}_K$ as a free module, then $\mathfrak{d}_{L/K} = d(\alpha_1,\dotsc,\alpha_n)\mathcal{O}_K$, because then all other bases can be obtained transforming $\alpha_1,\dotsc,\alpha_n$ by an appropriate matrix with entries in $\mathcal{O}_K$.
Clearly $\mathfrak{d}_{L/K}$ is always principal if $\mathcal{O}_K$ is a PID, e.g. if $K = \mathbb{Q}$, but it may not be in general.
Finally, we have the following:
Theorem. If $K \subseteq L \subseteq M$ is a tower of fields, then $$ \mathfrak{d}_{M/K} = \mathfrak{d}_{L/K}^{[M:L]} N_{L/K}(\mathfrak{d}_{M/L}) $$ Proof. See Neukirch's Algebraic Number Theory, corollary 2.10, chapter III.