Hi Eckard,
If you put a quantum particle in a compact box then its momentum and energy is necessarily discrete. If you put the same particle in an infinite line, then its momentum can be anything at all.
The same argument works in reverse. If the momentum of a particle is restricted in its range (i.e. a Brillouin zone) then the space it lives on is dicrete (i.e. a lattice).
The maths that underlies this is simply the Fourier transform. Your cosine transform is just the real part of the Fourier transform.
Best, David