We have decided to discontinue the publication of preprints on our preprint server as of 1 March 2024. The publication culture within mathematics has changed so much due to the rise of repositories such as ArXiV (www.arxiv.org) that we are encouraging all institute members to make their preprints available there. An institute's repository in its previous form is, therefore, unnecessary. The preprints published to date will remain available here, but we will not add any new preprints here.
In this paper, we give a generalization of subspace codes by means of codes of modules over finite commutative chain rings. We define the new class of Sperner codes and use results from extremal combinatorics to prove the optimality of such codes in different cases. Moreover, we explain the connection with Bruhat-Tits buildings and show how our codes are the buildings' analogue of spherical codes in the Euclidean sense.