Contingency Tables with Variable Margins ( with an Appendix by Pavel Etingof )

Motivated by applications to perverse sheaves, we study combinatorics of two cell decompositions of the symmetric product of the complex line, refining the complex stratification by multiplicities. Contingency matrices, appearing in classical statistics, parametrize the cells of one such decomposition, which has the property of being quasi-regular. The other, more economical, decomposition, goes back to the work of Fox–Neuwirth and Fuchs on the cohomology of braid groups. We give a criterion for a sheaf constructible with respect to the “contingency decomposition” to be constructible with respect to the complex stratification. We also study a polyhedral ball which we call the stochastihedron and whose boundary is dual to the two-sided Coxeter complex (for the root system An) introduced by T.K. Petersen. The Appendix by P. Etingof studies enumerative aspects of contingency matrices. In particular, it is proved that the “meta-matrix” formed by the numbers of contingency matrices of various sizes, is totally positive.


Introduction
The nth symmetric product Sym n (C) can be seen as the space of monic polynomials f (x) = x n + a 1 x n−1 + · · · + a n , a i ∈ C.
It has a natural stratification S C by the multiplicities of the roots of f . The topology of the stratified spaces Sym n (C), S C is of great importance in many areas, ranging from algebraic functions, braid groups, and Galois theory [5,6,7]), to representation theory and Kac-Moody algebras [1]. In particular, we showed in [12] that factorizing systems of perverse sheaves on the Sym n (C), S C correspond to braided Hopf algebras of a certain kind. However, despite apparent simplicity of the stratification S C , direct study of perverse sheaves on it is not easy and one has to "break the symmetry" by using various finer stratifications.
In this note we study the combinatorics of two such refinements, which are both cell decompositions. The finest one, S cont , which we call the contingency cell decomposition, has cells parametrized by contingency tables figuring in the title. It is obtained by taking into account possible coincidences of both the real and imaginary parts of the roots. The notion of a contingency table has been introduced by the great statistician Karl Pearson in 1904, see [16]. The advantage of S cont is that it is a quasi-regular cell decomposition (a higher-dimensional cell can approach a lower dimensional one "from one side only"), so a constructible sheaf on it is essentially the same as a representation of the poset of cells.
The other cell decomposition S FNF , intermediate between S C and S cont , consists of what we call Fox-Neuwirth-Fuchs (FNF) cells which generalize the cells decomposing the open stratum in S C (the configuration space, i.e., the classifying space of the braid group) used by Fox-Neuwirth [6] and Fuchs [7]. It is more economical than S cont but it is not quasi-regular. It is defined in a non-symmetric way, by looking at coincidences of the imaginary parts first and then looking at the positions of the real parts. So proceeding in the other order, we get a different cell decompostion iS FNF . We prove (Theorem 5.4) that The first of these equalities means that S cont is the coarsest common refinement of S FNF and iS FNF that has connected strata. The second one means that uniting cells of S cont which lie in the same cells of S FNF and iS FNF gives the strata of S C . In other words, it means that a sheaf (or complex) constructible with respect to S cont is constructible w.r.t. S C if and only if it is constructible w.r.t. both S FNF and iS FNF . This criterion will be important for our study (in progress) of perverse sheaves on Sym n (C), S C . Contingency tables (or contingency matrices, as we call them in the main body of the paper) give rise to a lot of interesting combinatorics [3,17]. We study a cellular ball called the stochastihedron St n whose cells are labelled by contingency matrices with entries summing up to n. Its boundary is dual to the two-sided Coxeter complex of T.K. Petersen [17] for the root system A n . The stochastihedron has an interesting structure of a "Hodge cell complex", so that m-cells are subdivided into cells of type (r, s), r + s = m and the face inclusions are subdivided into horizintal and vertical ones, much like the de Rham differential d on a Kähler manifold is decomposed into the sum of the Dolbeault differentials ∂ and ∂. In a paper in preparation we use this structure for the study of perverse sheaves, which give "mixed sheaves" on such complexes, that is, sheaves in the horizontal direction and cosheaves in the vertical one.
An interesting combinatorial object is the contingency metamatrix M(n). It is the n × n matrix with M(n) pq = # contingency matrices of size p × q and sum of elements equal to n , so it describes the statistics of the ensemble of contingency matrices themselves. This matrix has a number of remarkable properties established by P. Etingof in the appendix to this paper. Probably the most striking among them is total positivity: all minors of M(n) of all sizes are positive. It seems likely that analogs of our results hold for the quotient W \C n for any finite real reflection group W . The case considered here corresponds to W = S n being the symmetric group.
The set of all ordered partitions of n will be denoted by OP n and the subset of ordered partitions of length p by OP n (p). We note that OP n is in bijection with 2 n−1 : given α, we write n = (1 + · · · + 1) + · · · + (1 + · · · + 1) the first parentheses contain α 1 ones, etc. The plus signs between parentheses form a subset Semisimplicial sets. Recall, for future reference, that an augmented semisimplicial set is a diagram

1)
A semisimplicial set is a similar diagram but consisting only of Y r , r ≥ 0 (i.e., Y −1 not present). Elements of Y r are referred to as r-simplices of Y . We make the following notations: • ∆ + inj : the category of finite, possibly empty ordinals (i.e., well ordered sets) and monotone injective maps.
A semisimplicial set (resp. augmented semisimplicial set) is the same as a contravariant functor Y : ∆ inj → Set (resp. Y : ∆ + inj → Set). The set Y r is found as the value of Y on the ordinal [0, r] (understood as ∅ for r = −1). See, e.g., [4, Section 1.2] for discussion and further references.
Returning to ordered partitions, we have the contraction maps These maps satisfy the simplicial identities (2.1) and so give an augmented semisimplicial set , whose set of r-simplices is OP n (r + 2). This is nothing but the set of all geometric faces of the (n − 2)-dimensional simplex, including the empty face. A more standard concept is that of a simplicial set, see, e.g., [8,10], where we have both face maps ∂ i : Y r → Y r−1 and degeneracy maps s i : Y r → Y r+1 . In this paper we assume familiarity with this concept. It is easy to realize OP n (• + 2) as the set of nondegenerate simplices of an appropriate augmented simplicial set (by allowing (α 1 , . . . , α p ) with some of the intermediate α i being 0). The same holds for more complicated examples below, and we wil not mention it explicitly.
Contingency matrices and their bi-semisimplicial structure. We now introduce the "two-dimensional analog" of the trivial considerations above. Let us call a contingency matrix a rectangular matrix M = m ij j=1,...,q i=1,...,p of non-negative integers such that each row and each column contain at least one non-zero entry. The weight of M is defined as The horizontal and vertical margins of M are ordered partitions σ hor (M ), σ ver (M ) of n = ΣM defined by We make the following notations: • CM n : the set of all contingency matrices of weight n.
• CM(p, q): the set of all contingency matrices of size p × q.
• CM(α, β): the set of all contingency matrices with horizontal margin α and vertical margin β. Here α, β ∈ OP n for some n.
• S n : the symmetric group of order n.
Remark 2.1. The original setting for contingency tables given by Pearson [16] was (in modern terminology) this. We have two random variables x, y taking values in abstract sets I, J of cardinalities p, q respectively. Pearson emphasizes that in many cases fixing an embedding of I or J into R or even choosing an order on them, is unnatural. The contingency matrix M = m ij j∈J i∈I is the (un-normalized) approximation to the joint probability distribution of x and y, taken from a sample of n trials. Thus, independence of x and y means that M is close to the product matrix: m ij ≈ x i y j . In general, various invariants of M measure deviation from independence ("contingency").
Example 2.2. The set CM n (n, n) consists of n! permutation matrices By a bi-semisimplicial set (resp, an augmented bi-semisimplicial set we will mean a contravariant functor Y : The datum of such a functor is equivalent to the datum of the sets Y r,s for r, s ≥ 0 (resp. r, s ≥ −1) and two kinds of face maps: the horizontal ones ∂ i : Y r,a −→ Y r−1,s , i = 0, . . . , r, and the vertical ones ∂ j : Y r,s −→ Y r,s−1 , j = 0, . . . , s, so that each group (the ∂ i as well as the ∂ j ) satisfies the relations (2.1) and the horizontal maps commute with the vertical ones. Elements of Y r,a are called the (r, s)-bisimplices of Y .
Similarly to the case of simplicial sets, one has the concept of the geometric realization of a bi-semisimplicial set, see Remarks 4.2 below.
Contingency matrices as a (bi-)poset. We make CM n into a poset by putting M ≤ N , if N can be obtained from M by a series of contractions (of both kinds). Thus, the 1 × 1 matrix (n) is the maximal element of CM n , while the minimal elements are precisely the monomial matrices M σ , σ ∈ S n . It is convenient to arrange the poset CM n into a "contingency square" to indicate the order and the contractions. This square is itself an n × n "matrix" M n where, in the position (p, q), we put all the elements of the set CM n (p, q).
In fact, the partial order ≤ can be split into two partial orders: the horizontal one ≤ and and the vertical one ≤ . That is, M ≤ N , if N can be obtained from M by a series of horizontal contractions ∂ i and M ≤ N , if N can be obtained from M by a series of horizontal contractions ∂ j . So (CM n , ≤ , ≤ ) becomes a bi-poset (a set with two partial orders), and ≤ is the order generated by (≤ , ≤ ).
It is convenient to arrange the bi-poset CM n into a "contingency meta-square" to indicate the orders and the contractions. This square is itself an n × n "matrix" M(n) where, in the position (p, q), we put all the elements of the set CM n (p, q).
Example 2.4. The 2 × 2 contingency meta-square M(2) has the form The arrows denote the contraction operations. Relation to the symmetric groups. Higher-dimensional analogs. The considerations of this subsection are close to [17,Section 6].
Let α = (α 1 , . . . , α p ) ∈ OP n . We have then the parabolic subgroup in the symmetric group Proposition 2.6. For any α, β ∈ OP n we have a bijection This is shown in [3,Lemma 3.3]. For convenience of the reader we give a proof in the form that will be used later.
First of all, recall that for any group G and subgroups H, K ⊂ G we have an identification So we will construct a bijection . The number p is called the length of A and denoted (A).
which make a disjoint decomposition of [n] and are such that each row and each column contains at least one nonempty subset.
A colored ordered partition A (resp. colored contingency matrix K) gives a usual ordered partition α (resp. a usual contingency matrix M ) with α i = |A i | (resp. m ij = |K ij |). We denote CM n (α, β) the set of colored contingency matrices K for weight n for which the corresponding M lies in CM n (α, β). The identification (2.2) would follow from the next claim.

(a) We have an identification
Proof . (a) Note that S n /S α can be seen as the set of colored ordered partitions (A 1 , . . . , A p ) of [n] such that |A i | = α i . Similarly, if β = (β 1 , . . . , β q ), then S n /S β can be seen as the set of colored ordered partitions (B 1 , . . . , B q ) such that |B j | = β j . Now, the bijection as claimed in (a), is obtained by sending (b) This is obvious: to lift a given contingency matrix M = m ij to a colored one K, we need to replace each entry m ij by a set of m ij elements of [n], in a disjoint way. The group S n acts on the set of such lifts simply transitively. Remark 2.9. One can continue the pattern ordered partitions, contingency matrices, . . . by considering, for any d ≥ 1, d-valent contingency tensors M = m i 1 ,...,i d of some format p 1 × · · · × p d . Such an M has a weight n = i 1 ,...,ip m i 1 ,...,ip and d margins σ ν (M ) ∈ OP n , ν = 1, . . . , d, obtained by summation in all directions other than some given ν. The set of contingency tensors with given margins α (1) , . . . , α (d) is identifed with As in Remark 2.1, d-valent contingency tensors describe joint distributions of d-tuples of discrete random variables. In this paper we focus on the case d = 2 which presents special nice features absent for d > 2.

The stochastihedron
The stochastihedron and its properties. Let (T, ≤) be a poset. For t ∈ T we denote the strict and non-strict lower intervals bounded by t.
We also denote by Nerv • (S) the nerve of T , i.e., the simplicial set whose r-simplices correspond to chains t 0 ≤ t 1 ≤ · · · ≤ t r of inequalities in T . Nondegenerate simplices correspond to chains of strict inequalities. We denote by N(S) the geometric realization of the simplicial set Nerv • (T ), i.e., the topological space obtained by gluing the above simplices together, see [8,10]. The dimension of N(T ), if finite, is equal to the maximal length of a chain of strict inequalities. Sometimes we will, by abuse of terminology, refer to N (T ) as the nerve of T .
We apply this to T = (CM n , ≤). The space N (CM n ) will be called the nth stochastihedron and denote St n . We have dim St n = 2n − 2.
We next show that St n has a cellular structure of a particular kind, similar to the decomposition of a convex polytope given by its faces. Let us fix the following terminology.
• An m-cell is a topological space homeomorphic to the open m-ball by closed subspaces such that each X m \ X m−1 is a disjoint union of m-cells.
• A cell decomposition is called regular, if for each cell (connected component) σ ⊂ X m \ X m−1 the closure σ is a closed m-cell whose boundary is a union of cells.
• A (regular) cellular space is a space with a (regular) cell decomposition.
• For future use, a cell decomposition of X is called quasi-regular, if X can be represented as Y \ Z, where Y is a regular cellular space and Z ⊂ Y a closed cellular subspace.
• For a quasi-regular cellular space X we denote (C X , ≤) the poset formed by its cells with the order given by inclusion of the closures.
Proposition 3.1. Let X be a regular cellular space. Then N(C X ) is homeomorphic to X, being the barycentric subdivision of X. Further, for each m-cell σ ∈ C X the nerve N C ≤σ X is homeomorphic to σ, i.e., is a closed m-cell, and N C <σ X is homeomorphic to the boundary of σ, i.e., is, topologically, S m−1 .
We return to the poset CM n and show that it can be realized as C X for an appropriate regular cellular space X. By the above X must be homeomorphic to St n , so the question is to construct an appropriate cell decomposition of St n or, rather, to prove that certain simplicial subcomplexes in St n are closed cells.  The proof will be given in the next paragraph.  The stochastihedron and the permutohedron. Here we prove Theorem 3.2. We recall that the nth permutohedron P n is the convex polytope in R n defined as the convex hull of the n! points By construction, the symmetric group S n acts by automorphisms of P n . The following is well known.
Proof . First of all, P n is a zonotope and so the poset of its faces is anti-isomorphic to the poset of faces of H, the associated hyperplane arrangement, see [19,Example 7.15 and Theorem 7.16].
Next, H is the root arrangement for the root system of type A n−1 (cf. also Remark 5.1 below). In particular, the poset of faces of H is the Coxeter complex of A n−1 , which is identified with the poset of colored ordered partitions, see, e.g., [2, pp. 40-44].
Consider now the product P n × P n with the diagonal action of S n . Theorem 3.2 will follow (in virtue of Proposition 3.1) from the next claim.
Further, let us denote, for a finite set I and write R n 0 = R a translation, moreover, by a vector invariant with respect to S [A|B] . So to prove that each [A|B] is a closed cell (and each [A|B] • is an open cell), it suffices to establish the following. Lemma 3.6. For each A, B as above, the quotient Proof of the lemma. Denote the quotient in question by Q. Consider first the bigger space which contains Q as a closed subset. We note that Now, for any finite set I, the quotient S I \ R 2 I = S I \C I = Sym |I| (C) C |I| is the |I|th symmetric product of C and so is identified (as an algebraic variety and hence as a topological space) with C |I| . The coordinates in this new C |I| are the elementary symmetric functions of the coordinates x k , i ∈ I, in the original C I . In particular, one of these coordinates is σ 1,I = k∈I x k , the sum of the original coordinates.
Applying this remark to I = A i ∩ B j for all i, j, we see, first of all, that Second, to identify Q inside Q , we need to express the effect, on the quotient, of replacing each R A i by R A i 0 and each R B j by R B j 0 , i.e., of imposing the zero-sum conditions throughout. Let us view the first R n = i R A i as the real part and the second R n = j R B j as the imaginary part of C n . Then the zero-sum condition on an element of R A i is expressed by vanishing of j σ 1,A i ∩B j applied to the real part of a point of i,j Sym |A i ∩B j | (C). Similarly, the zero sum condition on an element of R B j is expressed by vanishing of i σ 1,A i ∩B j applied to the imaginary part a point of i,j Sym |A i ∩B j | (C). So Q is specified, inside Q C n , by vanishing of a collection of R-linear functions and so is homeomorphic to a real Euclidean space as claimed. Examples and pictures. We illustrate the above concepts in low dimensions. Example 3.8. The 3rd stochastihedron St 3 is a 4-dimensional cellular complex with 33 cells, corresponding to the matrices in the "contingency square" A 3 of Example 2.5: • 6 vertices; they correspond to 3 × 3 permutation matrices in the upper right corner; • 12 edges; they correspond to 2 × 3 and 3 × 2 matrices; • 10 2-faces, more precisely: -4 bigons corresponding to 2 × 2 matrices M which contain an entry 2; -4 squares corresponding to 2 × 2 matrices M which cosists of 0's and 1's only; -2 hexagons P 3 , corresponding to 1 × 3 and 3 × 1 matrices; • 4 3-faces, of the shape we call hangars, see Fig. 1 below. They correspond to 2 × 1 and 1 × 2 matrices; • one 4-cell corresponding to the matrix (3).
Remark 3.9. Note that the boundaries of the cells of St n come from decontractions (acting to the right and upwards in the contingency meta-square M(3), in the above example) and not contractions. Therefore St n is not the realization of the bi-semisimplicial set CM n (• + 2, • + 2) but, rather, the Poincaré dual cell complex to it. Because of this, Theorem 3.2 is non-trivial. For the nature of the realization itself (which is a cellular space by its very construction), see Remark 4.2(a) below.
Example 3.10. Here we describe one hangar corresponding to the matrix (2, 1) t = 2 1 (the other hangars look similarly). This particular hangar is a cellular 3-ball, whose cells correspond to elements of the lower interval CM

The stochastihedron and symmetric products
The symmetric product and its complex stratification S C . Let P n be the set of (unordered) partitions α = (α 1 ≥ · · · ≥ α p ), α i = n of n. For any ordered partition β ∈ OP n let β ∈ P n be the corresponding unordered partition (we put the parts of β in the non-increasing order).
We consider the symmetric product Sym n (C) = S n \C n with the natural projection π : C n −→ Sym n (C). (4.1) It is classical that Sym n (C) C n , the isomorphism given by the elementary symmetric functions. We can view points z of Sym n (C) in either of two ways: • As effective divisors z = z∈C α z · z with α z ∈ Z ≥0 , of degree n, that is, z α z = n.
• As unordered collections z = {z 1 , . . . , z n } of n points in C, possibly with repetitions.
Viewing z as a divisor, we have an ordered partition Mult(z) = (α 1 ≥ · · · ≥ α p ), called the multiplicity partition of z, which is obtained by arranging the α z in a non-increasing way. For a given α ∈ P n the complex stratum X C α is formed by all z with Mult(z) = α. These strata are smooth complex varieties forming the complex stratification S C of Sym n (C).
Our eventual interest is in constructible sheaves and perverse sheaves on Sym n (C) which are smooth with respect to the stratification S C . We now review various refinements of the stratification S C obtained by taking into account the real and imaginary parts of the points z ν ∈ C forming a point z ∈ Sym n (C).
The codimension 1 faces of ∆ r are Note that we have the identification We denote the open r-simplex and the m-simplex with just the rth face removed. In other words, ∆ r < is a cone over ∆ r−1 but with the foundation of the cone removed. Note that under (4.2) For i = 0, . . . , r − 1 we can speak about the ith face ∂ i ∆ r < which is homeomorphic to ∆ r−1 < . Proposition 4.1.
, and the cells lying there are given by the faces of ∆ p−1 < × ∆ q−1 < . That is, codimension 1 closed cells lying in X cont In particular, the collection of the X cont M forms a quasi-regular cell decomposition of Sym n (C) refining the stratification S C .
We denote the collection of the X cont M the contingency cell decomposition of Sym n (C) and denote S cont . The X cont M themselves will be called the contingency cells.
Proof of Proposition 4.1. (a) If the matrix M = µ(z), i.e., the integers µ ij (z), are fixed, then the only data parametrizing z are the real numbers x 1 < . . . , x p and y 1 < · · · < y q . Subtracting the first elements of these sequences we get But the interval [0, ∞) is identified, in a monotone way, with [0, 1), so and similarly is obtained by adding all the limit points of X cont M . Such points are obtained when some of the x i or the y j merge together, and in view of the second identification in (4.3), such mergers correspond to the faces of ∆ p−1 < × ∆ q−1 < .

Remark 4.2.
(a) It is useful to compare the above with the concept of the geometric realization of a bisemisimplicial set. That is, given a bi-semisimplicial set Y •,• , its geometric realization is where ∼ is the equivalence relation which, for y ∈ Y r,s , matches ∂ i y with ∂ i ∆ r × ∆ s and ∂ j y with ∆ r × ∂ j ∆ s . This is completely analogous to the classical concept of the geometric realization of a simplicial set [8,10].
In our case we have an augmented bi-semisimplicial set Y •• with Y r,s = CM n (r + 2, s + 2), so the standard concept of realization is not applicable (as we cannot attach a product containing ∆ −1 = ∅). Instead, Proposition 4.1 says that so we replace each r-simplex by the cone over it, which for r = −1 is taken to be just the point.
(b) Proposition 4.1 also shows that the stochastihedron St n is simply the cell complex Poincaré dual to the quasi-regular cell decomposition S cont of Sym n (C). The fact that it is indeed a cellular ball (Theorem 3.2) reflects the property that Sym n (C) is smooth (homeomorphic to a Euclidean space). This also shows that contingency tensors of valency d > 2 (see Remark 2.9) do not lead to a cellular complex analogous to St n , since Sym n R d is singular for d > 2.
Next, the imaginary part map Im : C → R gives a map I : Sym n (C) → Sym n (R). The preimages X I β = I −1 (K β ) will be called the imaginary strata of Sym n (C). They are not necessarily cells: for instance, for β = (n) we have that K (n) = Sym n (R) × iR is the set of y = {y 1 , . . . , y n } with Im(y 1 ) = · · · = Im(y n ). In general, to say that z = {z 1 , . . . , z n } lies in K β means that there are exacty q distinct values of the Im(z ν ), and if we denote these values among y 1 < · · · < y q , then y j is achieved exactly β j times. Geometrically, we require that the z ν lie on q horizontal lines, see Fig. 3, but we do not prescribe the nature of the coincidences that happen on these lines.
In other words, we prescribe the number of the z ν with given imaginary parts, as well as coincidences within each value of the imaginary part. But, unlike in forming the contingency cells, we do not pay attention to possible concidences of the real parts of points with different imaginary parts. Therefore our construction is not symmetric: the imaginary part has priority over the real part.
(b) The collection of the X [β:γ] , β ≤ γ, forms a cell decomposition S FNF of Sym n (C) refining the complex stratification S C . More precisely, let λ ∈ P n be an unordered partition of n. Then  (a) Let n = 2 and let Sym 2 0 (C) ⊂ Sym 2 (C) be the subvariety formed by {z 1 , z 2 } with z 1 + z 2 = 0. The function {z 1 , z 2 } → w = z 2 1 identifies Sym 2 0 (C) with C. The cell decomposition S FNF induces the decomposition of this C into the following three cells used by Fox-Neuwirth [6] and Fuchs [7] for the study of the cohomology of the braid group π 1 (X C (1,...,1) ).

From contingency cells to complex strata
Four stratifications. Equivalences of contingency cells. The stratifications of Sym n (C) that we constructed, can be represented by the following picture, with arrows indicating refinement: Here iS FNF is the "dual Fox-Neuwirth-Fuchs" cell decomposition, obtained from S FNF by applying either of the two the automomorphism of Sym n (C) (they give the same stratification up to relabeling): • The holomorphic automorphism induced by i : C → C (multiplication by i).
Remark 5.1. Any real hyperplane arrangement H ⊂ R n gives three stratifications S (0) , S (1) and S (2) of C n , see [13,Section 2]. For example, S (0) consists of generic parts of the complex flats of H and S (2) consists of "product cells" C + iD where C, D are faces of H. Taking for H the root arrangement in R n , i.e., the system of hyperplanes {x i = x j }, we obtain our stratifications S C , S FNF and S cont as the images of S (0) , S (1) and S (2) under the projection π of (4.1).
We are interested in the way the complex strata (from S C ) are assembled out of the cells of S cont . Recall that the partial order ≤ on CM n is the "envelope" of two partial orders ≤ and ≤ given by the horizontal and vertical contractions ∂ i , ∂ j , so that ∂ i M ≤ M and ∂ j M ≤ M . It is enough to describe "elementary" horizontal and vertical equvialences. That is, we call the contraction ∂ i anodyne for M , if ∂ i M ≤ M is a horizontal equvialence. Similarly, the vertical contraction ∂ j is called anodyne for M , if ∂ j M ≤ M is a vertical equivalence. Thus arbitrary horizontal (resp. vertical) equivalences are given by chains of anodyne horizontal (resp. vertical) contractions.
Given two integer vectors r = (r 1 , . . . , r q ), s = (s 1 , . . . , s q ) ∈ Z q ≥0 , we say that they are disjoint, if r j s j = 0 for each j = 1, . . . , q, i.e., in each position at least one of the components of r and s is zero.  Proof . This is clear, as, say, columns being disjoint means precisely that the multiplicities (considered as an unordered collection) do not change after adding the columns.
The upper and lower bound of S FNF and iS FNF . The relation between the four stratifications in (5.1) can be expressed as follows.
(a) We have More precisely, S cont is the coarsest stratification with connected strata that refines both S FNF and iS FNF .
More precisely, S C is the finest stratification of which both S FNF and iS FNF are refinements.
Proof . We first prove part (b) of the theorem. Let W , resp. W , resp. W ⊂ CM n × CM n be the set of pairs (N, M ) such that N ≤ M and the inclusion is an equivalence, resp. N ≤ M and the inclusion is a horizontal equivalence, resp. N ≤ M and the inclusion is a vertical equivalence. Let R, R , R be the equivalence relations generated by W , W , W . Since the strata of S C are connected, we have, first of all:  Proof . It is enough to show (a), since (b) is similar. We first prove the "only if" part, that is, whenever ∂ i is anodyne for M , the cells X cont ∂ i M and X cont M lie in the same Fox-Neuwirth-Fuchs cell. But this is obvious from comparing Figs. 2 and 3: if the (i + 1)st and (i + 2)nd columns of M are disjoint, then the multiplicity structure on each horizontal line is unchanged after a generation resulting in adding these columns.
Let us now prove the "if" part. Since each FNF cell is connected (being a cell), it suffices to prove the following: whenever X cont ∂ i M and X cont M lie in the same FNF cell, the contraction ∂ i is anodyne for M . But this is again obvious, since a non-anodyne contraction will change the multiplicity structure on some horizontal line. Proposition 5.6 is proved.
This also completes the proof of Proposition 5.4(b). We now prove Proposition 5.4(a). Let M ∈ CM n (p, q). By Proposition 4.5, where α = σ hor (M ) and β = σ ver (M ) are the margins of M and γ, resp. δ is obtained by compressing, cf. (4.4), the rows, resp. columns of M . In particular, the size p × q of M is determined as p = (α), q = (β) from the unique cells X [β:γ] and iX [α:δ] containing X cont M . Note that dim X cont M = p + q. This means the following: given any two cells X [β:γ] ∈ S FNF and iX [α:δ] ∈ iS FNF , all contingency cells contained in their intersection, have the same dimension. Since, the union of such cells is the intersection X [β:γ] ∩ iX [α:δ] , we conclude that by taking the connected components of all the X [β:γ] ∩ iX [α:δ] , we get precisely all the contingency cells.
Corollaries for constructible sheaves. Fix a base field k. For a stratified space (X, S) we denote by Sh(X, S) the category formed by sheaves F of k-vector spaces which are constructible with respect to S, i.e., such that restriction of F to each stratum is locally constant. The following is standard, see, e.g., [13,Proposition 1.].
Proposition 5.7. Suppose that (X, S) be a quasi-regular cellular space with the poset (C, ≤) of cells. Then Sh(X, S) is identified with Rep(C), the category of representations of (C, ≤) in k-vector spaces.
We recall that a representation of (C, ≤) is a datum, consisting of: (0) k-vector spaces F σ , given for any σ ∈ C.
For F ∈ Sh(X, S), the corresponding representation has F σ = Γ(σ, F| σ ), the space of sections of F on σ (or, what is canonically the same, the stalk at any point of σ). The map γ σ,σ is the generalization map of F, see [13, Section 1D] and references therein.   A Counting contingency matrices.

Appendix by Pavel Etingof
Definition A.1. A generalized contingency matrix is a rectangular matrix M whose entries m ij are nonnegative integers. The weight of a generalized contingency matrix is m ij .
Thus, a contingency matrix is a generalized contingency matrix without zero rows or columns. The following is obvious. Let P (n) be the unipotent lower triangular matrix such that P (n) pi = p i . The following corollary of Lemma A.3 is immediate. Note also that Indeed, denote the matrix in the r.h.s. by P * (n). Then Thus we get Recall [18] that the (unsigned) Stirling numbers of the first kind c(n, k) are defined by the generating function x(x + 1)(x + 2) · · · (x + n − 1) = n k=1 c(n, k)x k .
Proof . We have B(n) pq = 1 n! k c(n, k)p k q k , which implies the first statement. The second statement follows from the first one and Corollary A.4. In particular, the fraction in the r.h.s. is an integer.
Thus by summing over p, q we get Corollary A.9. Proposition A.10. The matrix Q(n) is upper triangular, and its entries are p!S(k, p), where S(k, p) are the Stirling numbers of the second kind [18]. In particular, the diagonal entries of Q(n) are k!.
Proof . We have Q(n) = P (n) −1 V (n). Thus Q(n) pk = (−1) p−i p i i k = S(k, p)p!, the last equality being the definition of S(k, p). It is well known that S(k, p) = 0 if p > k, which implies the statement.
Proof . This follows from Proposition A.6.
Corollary A.13. The matrix M(n) is totally positive, i.e., all of its determinants of all sizes are positive.
Proof . Let G = GL n (R). Let U + , U − ⊂ G be the subgroups of unipotent upper and lower triangular matrices, and T be the torus of diagonal matrices. Let also G >0 ⊂ G be the set of totally positive matrices. For distinct i, j ∈ {1, . . . , n} and a ∈ R let e ij (a) be the elementary matrix which has 1's on the diagonal, a in the position (i, j) and 0 elsewhere. Recall [14,15] that where • T >0 ⊂ T is the subset of diagonal matrices with all the diagonal entries positive.
• U + >0 ⊂ U + is the subset of matrices of the form i<j e ij (a ij ) where all a ij > 0 and the product is taken in the order of a reduced decomposition of the maximal element in S n . Alternatively. U + >0 can be defined as the interior of the closed subset in U + formed by matrices with all minors non-negative.
• U − >0 is defined similarly using e ij (a ij ) with i > j and a ij > 0 or, equivalently, as the interior of the subset in U − formed by matrices with all minors non-negative.
It is well known [9] that the matrix V (n) is totally positive (it follows from the fact that the Schur polynomials have positive coefficients). Thus it follows from Corollary A.11 that S(n) is totally positive. But then by Corollary A.12 we get that M(n) is totally positive.
We also obtain Corollary A.14. We have p,q m pq (n) = 1 n! p,q,k c(n, k)p!S(k, p)q!S(k, q).