I am reading section for 7.4 in elements of statistical learning, and I have some questions about some definitions and results in this section, and I would like to check if my understanding is correct.
In the definition for generalization error $Err_T=\mathbb{E}_{X^0,Y^0}[L(Y^0,\hat{f}(X^0)|T]$, why do we condition on training set $T$ if $X^0,Y^0$ are simply drawn from the true joint distribution? Is it just because the fit model $\hat{f}$ is dependent on the training set $T$?
They define in-sample error as $Err_{in}=\frac{1}{N}\sum_{i=1}^N E_{Y^0}[L(Y_i^0,\hat{f}(x_i))|T]$. Here, I assume $Y_i^0~p_{Y|X}(\cdot|x_i)$ What is the difference between $\mathbb{E}_\mathbf{y}[Err_{in}]$ and $Err_{in}$, as the latter already has an expectation over $Y$?
Finally, in the derived result $\omega=\frac{2}{N}\sum_{i=1}^N Cov(\hat{y}_i,y_i)$, how does this covariance even make sense as I am assuming $y_i$ is the training label for data point $i$ in the train set $T$, so it should just be deterministic, no? Unless we are treating the train set as a random variable here?