*is* this high, but the bound is not reached for all $(m,t)$. Here, we can do better by bounding the expression $$\sum_{t,t',m'\neq m}
    P_{Y'|Y}\big((m',t')|(m,t)\big)\Pr\{f_K(m')=t' \,\wedge\, f_K(m)=t\}$$ instead of the individual terms. The probability $P_{Y'|Y}\big((m',t')|(m,t)\big)$ corresponds to the adversary’s attack strategy: given a message-tag pair on the input to the channel, choose what to substitute as output from the channel. If the adversary uses a deterministic attack, meaning that $(m',t')$ are functions of $(m,t)$, we immediately obtain $$\begin{split}
      \sum_{t,t',m'\neq m}
      &P_{Y'|Y}\big((m',t')|(m,t)\big)\Pr\{f_K(m')=t'\,\wedge\,f_K(m)=t\}
      \\&
      = \sum_{t}\Pr\{f_K\big(m'(m,t)\big)=t'(m,t) \,\wedge\, f_K(m)=t\}\\
      &= \Pr\Big[\bigcup_t\big\{f_K\big(m'(m,t)\big)=t'(m,t) 
      \,\wedge\, f_K(m)=t\big\}\Big]\\
      &\le|{\mathcal{T}}|\Big({\varepsilon}\frac{|{\mathcal{K}}|}{|{\mathcal{T}}|}\Big)\frac1{|{\mathcal{K}}|}+{\varepsilon}_1
      ={\varepsilon}+{\varepsilon}_1.
    \end{split}$$ The sum can be rewritten as the probability of a union because the events are disjoint, and the inequality is obtained from Lemma \[lemma:subset\]. The remaining average over $m$ has no effect on the bound.

If the adversary has a randomized attack, we can introduce an auxiliary probability space $(\Omega,{\mathcal{F}},\mu)$ for the random variable $Y'=(X',T')$, where $\Omega$ is the sample space, ${\mathcal{F}}$ is the $\sigma$-algebra of events, and $\mu$ is the probability measure. Using the indicator function $\chi$ we can write $$P_{Y'|Y}\big((m',t')|(m,t)\big)
    =\int_\Omega\chi_{\{\omega\in\Omega:Y'(m,t,\omega)=(m',t')\}}(\omega)\,d\mu.$$ We note that for each fixed sample $\omega$, the attack is deterministic. The above approach now gives $$\begin{aligned}
    \sum_{t,t',m'\neq m}&
    P_{Y'|Y}\big((m',t')|(m,t)\big)\Pr\{f_K(m')=t' \,\wedge\, f_K(m)=t\}\\
    &\,=\sum_{t,t',m'\neq m}\int_\Omega\chi_{\{\omega\in\Omega:
      