I am currently following an introductory class on statistical mechanics. This course starts with general notions of statistics (as a reminder), goes over explaining why one would want a statistical description of the world by taking a look into the classical and quantum cases. Based on these various examples, the course starts rather classically by introducing the micro-canonical ensemble. There, one defines entropy as
$S = -k_BT\log\Omega$
Further down the book students are introduced with the canonical ensemble. Entropy is defined in this new ensemble as
$S = -k_B \Sigma_{n,j} P_{n,j}\log P_{nj}$
The author kickstarts the proof of this statement with the following line:
$S = k_B\log Z + \frac{k_BT}{Z}\left(\frac{\partial Z}{\partial T}\right)_{V,N_1,...,N_C}$
where $c$ is the number of different particle species in the system.
The proof goes on from there as follows:
$S = k_B\log Z + \frac{k_BT}{Z}\Sigma_{n,j}\frac{E_n}{k_BT^2}e^{-\frac{E_n}{k_BT}} = k_B\log Z - k_B\Sigma_{n,j}P_{n,j}\log\left(P_{n,j}Z\right)$
My question lies on the first line of the proof. Why is it valid that the author can kickstart the proof with the line hereabove?
Let me conclude this question by wishing a wonderful 2024 to whomever is reading this. Cheers!