The theory of modular forms, in particular theta functions, and coding theory are in a remarkable way connected. The connection is established by defining a suitable lattice corresponding to the given code, and considering its theta function. First we define some special theta functions, and determine transformation formulas. Then it is proved that the theta function of the lattice corresponding to the code can be expressed in terms of the Lee weight enumerator. In particular if the code is self-dual and the length is a multiple of this theta function is a modular form for some subgroup of the modular group. Using the known structure of this space of modular forms we can derive linear relations between the coefficients of the Lee weight enumerator. And from these relations we can get an upper bound for the minimal Lee distance of self-dual -ary codes.
Asch, van, A. G., & Martens, F. J. L. (2008). Lee weight enumerators of self-dual codes and theta functions. Advances in Mathematics of Communications, 2(4), 393-402. https://doi.org/10.3934/amc.2008.2.393