Pure Yang-Mills theory (YM) can be easily defined on $\mathbb{T}^4$ on a periodic lattice, using the Wilson lattice gauge theory approach. In reality, we know some of these mathematical results on $\mathbb{T}^4$, e.g. See T. Bałaban works in Comm Math Physics and also the descriptions and citations given in the claymath.org note.
So what makes the difference to define a lattice Yang-Mills theory on $\mathbb{T}^4$ v.s. $\mathbb{R}^4$?
Define a lattice Yang-Mills theory on $\mathbb{T}^4$ is easily doable since a $\mathbb{T}^4$ can have a finite length $L$, given the lattice constant $a$, there are about $(L/a)^4$ lattice links. In some sense, define a lattice Yang-Mills theory on $\mathbb{T}^4$ then taking the continuum limit (view the lattice constant $a$ to be small), also define a continuum Yang-Mills theory on $\mathbb{T}^4$. Most people believe that all the properties will carry over from the discrete to the continuum limit.
Define a lattice Yang-Mills theory on $\mathbb{R}^4$ seems harder, since the length of $\mathbb{R}$ is infinite $L_\mathbb{R}=\infty$, so there are about $(L_\mathbb{R}/a)^4\to \infty$ infinite lattice links.
However, the pure Yang-Mills theory should have the same property and the same mass gap for a large size $\mathbb{T}^4$ as good as $\mathbb{R}^4$ (is it correct?). If so, what makes the big deal difference to define lattice Yang-Mills theory on $\mathbb{T}^4$ v.s. $\mathbb{R}^4$? (It shall be a trivially gapped TQFT with a mass gap.)
- Add: The topology of $\mathbb{T}^4$ and $\mathbb{R}^4$ is obviously different from each other. I am asking that why not just defines YM on $\mathbb{T}^4$ (at least on the lattice), which seems to be much tractable but captures every property we wanted for YM on $\mathbb{R}^4$.