In quantum mechanics, there is an uncertainty principle between conjugate variables, giving rise to complementary descriptions of a quantum system. But the variables are conjugates in two different mathematical senses.
One sense in which they are conjugates are with respect to the Legendre transform of a Lagrangian into a Hamiltonian (where generalized momentum coordinates are introduced).
And in another sense they are conjugates with respect to a Fourier transform. It seems obvious why being conjugates in this second sense would result in an uncertainty principle, and give rise to two dual descriptions of the system. The same thing happens with any kind of waves. In digital signal processing these are referred to as the frequency domain and the time domain. In solid state physics, k-space is referred to as the "reciprocal lattice" or the "dual lattice", as it's a dual description of position space using the Fourier conjugate wave-number k as a basis instead. Indeed, Fourier transforms are just a special case of Pontryagin duality.
What's not obvious to me is why or how these two different senses of conjugacy are connected. Is there an actual mathematical connection? Or is it just an ad hoc assumption of quantum mechanics that when you see Legendre conjugates you should automatically make them Fourier conjugates by imposing canonical commutation relations? Is there any other way, besides simply accepting this as a postulate, to understand this connection? If not, couldn't there be a consistent version of quantum mechanics where other kinds of pairs of variables were made Fourier conjugates in the Hilbert space, instead of using Legendre conjugates?