

We explain what subsets of the lattice \mathbb{Z}n and what functions on the lattice \mathbb{Z}n could be called convex. The basis of the theory is the following three main postulates of classical convex analysis: concave functions are closed under sums; they are also closed under convolutions; and the superdifferential of a concave function is nonempty at each point of the domain. Interesting (and even dual) classes of discrete concave functions arise if we require either the existence of superdifferentials and closeness under convolutions or the existence of superdifferentials and closeness under sums. The corresponding classes of convex sets are obtained as the affinity domains of such discretely concave functions. The classes of the first type are closed under (Minkowski) sums, and the classes of the second type are closed under intersections. In both classes, the separation theorem holds true. Unimodular sets play an important role in the classification of such classes. The so-called polymatroidal discretely concave functions, most interesting for applications, are related to the unimodular system An := {±ei, ei − ej}. We demonstrate that such functions naturally appear in mathematical economics, in combinatorics, play an important role for solution of the Horn problem, for describing submodule invariants over discrete valuation rings, etc.