In page 52 of Interest Rate Models by Brigo and Mercurio the following is stated:
Precisely, let us assume that the instantaneous spot rate evolves under the real-world measure $Q_0$ according to $dr(t) = \mu (t, r(t))dt + \sigma(t, r(t))dW_0(t)$, where $\mu$ and $\sigma$ are well-behaved functions and $W_0$ is a $Q_0$-Brownian motion. It is possible to show (they cite Björk 1997 here) the existence of a stochastic process $\lambda$ such that if $$dP(t, T) = \mu^T (t, r(t))dt + \sigma^T (t, r(t))dW_0(t),$$ then $$λ(t) = \dfrac{\mu^T (t, r(t)) − r(t)P(t, T)}{\sigma^T (t, r(t))}.$$ for each maturity T, with $\lambda$ that may depend on $r$ but not on $T$.
They then move to the risk-free measure $Q$ via definition of a Radon-Nikodym derivative, and they claim that the process $r$ evolves under $Q$ according to $$dr(t)=\Big[\mu(t, r(t)) − \lambda(t) \sigma (t, r(t)) \Big]dt + σ(t, r(t))dW(t).$$
I think I know how the Girsanov change of measure works, or at least I am able to follow it when it concerns stock underlyings. However, I am unable to see where the $P(t,T)$ in the definition is coming from, and why they claim $\lambda(t)$ depends only on $t$ and not on both $t$ and $T$. Moreover, in page 80 of Björk (Proposition 3.1) the following appears, while they discuss the locally risk-free portfolios:
$$\dfrac{\alpha_T(t) - r(t)}{\sigma_T(t)} = \lambda(t),$$ holds for all $t$ and for every choice of maturity time $T.$
So, apparently, the definition of $\lambda(t)$ does depends on the maturity.
I would appreciate if someone could help me clarify this a bit. Thanks!