We develop a general mathematical theory of diversity, with a special focus (in this paper) on the problem of measuring and valuing bio-diversity. Mathematically, we study set functions v (non-negative functions from the power set of a finite universe X) that are “totally alternating” in the sense of Choquet (i.e. monotone, submodular, and a bit more). Such functions have a multi-attribute representation of the form v(S): = σ{λA ⫫ A Ψ 2X: A ∩ S ≠ o}, with λA ≥ = 0 denoting the weight of “attribute” A. Attributes are understood extensionally, e.g. the attribute “mammal” is identified with the set of all mammal species. Diversity of a set S is thus conceptualized as the total value (additive measure) of all the attributes realized by some object in S. Attribute weights are uniquely determined by the diversity function via Conjugate Moebius Inversion (CMI), which has been used before (in non-conjugate form) in combinatorics (especially by Rota) and non-additive probability theory (Dempster/Shafer). CMI is the work-horse throughout. Two types of issues are addressed in particular: 1. How can one endow the general model with additional structure? 2. How is diversity related to similarity? Our primary strategy of imposing additional structure is via restrictions on the set of attributes, i.e. the support of λ. In Section 3, we study three special structures on detail: taxonomic hierarchies, linearly ordered sets, and n-dimensional hyper-cubes. In the first two cases, the diversity of any set S is a function of the dissimilarities d(x,y): = v(x) - v(y) among its elements; for hyper-cubes, the relationship between diversity and similarity turns out to be more complex. The mathehematical core of the paper is Section 4, where we show how intersection-closed families of attributes can be characterized in terms of conditional independence properties of the diversity function. This is shown with the means of abstract convexity theory, which is used in particular to define a ternary comparative similarity relation that can be viewed as describing the conceptual geometry of the space. This methodology yields also definitions of the qualitative and quantitative product of diversity functions that promise to be applicable in many situations. A theory of diversity can be viewed as a generalized theory of similarity; indeed, marginal diversity can be viewed as point-set dissimilarity. The theory both as developed in the paper and as projected in future work has many implications for the classical subject of point-point dissimilarities/distances. The basic contribution here is the link established between a qualitative description of the geometry in terms of a ternary betweenness relation and a class of adapted (generalized) metrics. A typical feature of these metrics is their failure to be additive with respect to the underlying betweenness geometry, in contrast to the majority of the literature.