Transitivity of discriminant for flat algebras Sorry if the question doesn't feed this site, I'm reposting it from MSE. Nobody answered it there and I couldn't find the proof in general case(whenever it was mentioned the proof was referred to as a known fact), all I found was the case of Dedekind domains.
Let $A$ be an finite flat $R$-algebra and $A'$ be an finite flat $A$-algebra such that it is also finite flat as an $R$-algebra. Then we have a notion of discriminant ideals $\delta_{A''/R},\delta_{A'/R},\delta_{A''/A'}$. Brian Conrad in his lecture notes stated that there is a formula 
$$
\delta_{A''/R}=\delta_{A'/R}^{\operatorname{rk}(A''/A')} \operatorname{Nm}_{A'/R}(\delta_{A''/A'})
$$ and proved it in the case of inclusion of Dedekind domains. I'm looking for reference to a prove of this fact in the case I described above. Also I'm not sure what the definition of norm map is in the case of not Dedekind ring $R$.
 A: The question has some minor misstatements. You didn't really want to mention $R$ anywhere: the base ring is $A$, over which $A'$ should be assumed to be "finite locally free" (equivalently, "finite flat and finitely presented"); this is the same as finite flat if $A$ is noetherian. Likewise for $A' \rightarrow A''$ (which was accidentally not stated  in the question). And in the displayed identity replace $R$ with $A$ everywhere.
Also, one should assume that $A''$ has constant rank as a locally free $A'$-module (automatic when $A'$ is a domain).  
[It is puzzling why the non-triviality of this discriminant identity does not appear to be as widely recognized as it should be. One cannot reduce such a ring-theoretic identity to any kind of "universal case", in contrast with module-theoretic identities like Cayley-Hamilton; I suspect that most people who cite this identity without reference fall into the trap of incorrectly thinking it is somehow easily reduced to a version with fields. It is also tempting to think that certain similar-looking module-theoetic results for vector bundles relative to ring extensions, such as the canonical module isomorphism in Ch. II  4.2 in Oesterle's amazing 1984 Inventiones paper on Tamagawa numbers and its counterpart in Bourbaki, recover this discriminant identity as a special case. But I don't see how to make a clean direct link via trace pairings.]
Since a vector bundle of constant rank over a semi-local ring is free, if we localize throughout at a prime of $A$ then not only does $A'$ become free over $A$ but also $A''$ becomes free over $A'$.  Hence, Zariski-locally on $A$ we can make $A'$ become $A$-free and $A''$ become $A'$-free. In particular, $\delta_{A''/A'}$ admits its usual generator (not necessarily a nonzero-divisor!) well-defined up to unit square even Zariski-locally on $A$. Hence, that norm is defined Zariski-locally on the $A$ by applying ${\rm{N}}_{A'/A}$ to the usual  generating element of the ideal in $A'$ Zariski-locally on $A$ (not just locally on $A'$!) and gluing to get a global norm ideal. (This is not a special case of norm of line bundles as in EGA II, 6.5.5 since these discriminant ideals need not have local generator that is not a zero-divisor.) 
That being said, the handout you link to does give a completely general proof (with arbitrary $A$) upon noting that each ring extension becomes module-free upon localizing at a prime of $A$ and then inputting the transitivity of trace for such ring extensions (which is handled in that handout by appeal to the more well-known case of fields). Indeed, the core of that handout is specifically written in the generality of arbitrary $A$ (no Dedekind condition) and module-free ring extensions if one looks at what is written in the proof itself. If you did read the entire proof given there then look at it again.
So it seems the only issue is to prove ${\rm{Tr}}_{A''/A} = {\rm{Tr}}_{A'/A} \circ {\rm{Tr}}_{A''/A'}$ as $A$-linear maps $A'' \rightarrow A$. We may assume for the proof of such an identity that $A$ is local, so $A'$ is semi-local and $A$-free with some rank $r$. But then $A''$ is $A'$-free by the constant-rank hypothesis, say with rank $n$. Now we argue exactly as in the case of field extensions (where one uses bases too).  Namely, upon choosing an $A'$-basis of $A''$ and forming the matrix over $A'$ for a multipler on $A''$ this becomes the assertion that if $M'$ is an $n \times n$ matrix over $A'$ and we let $M$ be the corresponding $nr \times nr$ matrix 
over $A$ by multiplying elements of an $A$-basis of $A'$ against the chosen $A'$-basis of $A''$ (to get an $A$-basis of $A''$) then 
$${\rm{Tr}}_{A'/A}({\rm{Tr}}(M')) = {\rm{Tr}}(M).$$ But this
is an elementary exercise with staring at the "diagonal" in block matrices. 
A: This is a restatement of the beautiful answer by grghxy above in terms of dualizing modules. Namely, let $\omega_{A''/A}$ be the relative dualizing module, which in this case is just $Hom_A(A'', A)$. The trace gives a canonical section $\tau_{A''/A} \in \omega_{A''/A}$. There is a canonical isomorphism
$$
\omega_{A''/A} = \omega_{A''/A'} \otimes_{A'} \omega_{A'/A}
$$
which is easy to construct in this particular case
and under this isomorphism $\tau_{A''/A}$ corresponds to $\tau_{A''/A'} \otimes \tau_{A'/A}$. This is what transitivity of traces gives you. The discriminant of $A''/A$ is the determinant of the map
$$
\tau_{A''/A} : A'' \longrightarrow \omega_{A''/A}
$$
viewed as a map of $A$-modules (locally free of the same rank). The map above is isomorphic to the map
$$
\tau_{A''/A'} \otimes \tau_{A'/A} :
A'' \otimes_{A'} A' \longrightarrow  \omega_{A''/A'} \otimes_{A'} \omega_{A'/A}
$$
Having said this the formula is a consquence of the fact that the determinant of this last map (viewed as a map of $A$-modules) is equal to the norm of the determinant of the map $\tau_{A''/A'}$ (viewed as a map of $A'$-modules) times the $[A'' : A']$th power of the determinant of $\tau_{A'/A}$ (viewed as a map of $A$-modules). This final statement can be deduced from the canonical isomorphism $\wedge^{rr'}_A(N) = \wedge_A^{r'}(\wedge_B^r(N))$ with $B = A'$ stated in Brian Conrad's notes. As Brian mentions, the key in the last step is that the norm is defined as a determinant.
