This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Oriented Matroids and Combinatorial Neural Codes

Alexander Kunin Caitlin Lienkaemper  and  Zvi Rosen
Abstract.

A combinatorial neural code 𝒞2[n]\mathscr{C}\subseteq 2^{[n]} is called convex if it arises as the intersection pattern of convex open subsets of d\mathbb{R}^{d}. We relate the emerging theory of convex neural codes to the established theory of oriented matroids, both with respect to geometry and computational complexity and categorically. For geometry and computational complexity, we show that a code has a realization with convex polytopes if and only if it lies below the code of a representable oriented matroid in the partial order of codes introduced by Jeffs. We show that previously published examples of non-convex codes do not lie below any oriented matroids, and we construct examples of non-convex codes lying below non-representable oriented matroids. By way of this construction, we can apply Mnëv-Sturmfels universality to show that deciding whether a combinatorial code is convex is NP-hard.

On the categorical side, we show that the map taking an acyclic oriented matroid to the code of positive parts of its topes is a faithful functor. We adapt the oriented matroid ideal introduced by Novik, Postnikov, and Sturmfels into a functor from the category of oriented matroids to the category of rings; then, we show that the resulting ring maps naturally to the neural ring of the matroid’s neural code.

Department of Mathematics, Creighton University, [email protected]
Department of Mathematics and Statistics, Boston University, [email protected]
Department of Mathematics, Florida Atlantic University, [email protected]

1. Introduction

A combinatorial neural code is a collection 𝒞\mathscr{C} of subsets of [n]:={1,,n}[n]:=\{1,\dots,n\}. Such codes model neural activity, with each codeword σ[n]\sigma\subseteq[n] in 𝒞\mathscr{C} representing a set of neurons which are simultaneously active. Our motivating example is the activity of hippocampal place cells, neurons in the brain which encode an animal’s physical location [okeefe1978]. Each neuron ii is active when the animal is in a corresponding subset UiU_{i} of the animal’s environment XdX\subseteq\mathbb{R}^{d}, called the ii-th place field. If neural activity is viewed as a function X{0,1}nX\to\{0,1\}^{n}, then the set UiU_{i} is the support of the ii-th component of this function, the “preferred location” of that neuron. Neurons acting as indicators for a preferred set of stimuli appear across many sensory modalities, so we will use the slightly broader term receptive field to de-emphasize the spatial navigation aspect.

In this simplified model, neurons fire together if and only if their receptive fields overlap, and thus the code represents the intersection pattern of the receptive fields. This information can reveal significant topological and geometric information in experimental data, such as the topology of an animal’s environment [curto2008cellgroups] or the intrinsic geometry of more abstract stimulus spaces [giusti2015clique, zhou2018hyperbolic]. Receptive fields are often observed to be convex, and therefore we are interested in characterizing convex neural codes: codes that arise as the intersection patterns of convex open subsets of some Euclidean space. For example, Figure 1 illustrates three convex receptive fields and the associated convex code.

Refer to caption
Figure 1. The code of U1,U2,U3U_{1},U_{2},U_{3} is 𝒞={,1,12,2,23}\mathscr{C}=\{\varnothing,1,12,2,23\}.

Beyond experimental motivation, requiring receptive fields to be convex yields rich theoretical results. In particular, the nerve lemma can be used to deduce topological properties of simplicial complexes associated to convex codes [curto2017makes, chen2019neural]. Another useful tool developed to study neural codes is the neural ring [curto2013neural], the coordinate ring of the code as an algebraic variety in 𝔽2n\mathbb{F}_{2}^{n}. This was used to detect obstructions to convexity in [curto2019algebraic]. However, there are many examples of non-convex codes which cannot be captured by these obstructions [lienkaemper2017obstructions, jeffs2019sunflowers]. While other classes of neural codes have been completely characterized (e.g. codes described by connected receptive fields [mulas2020minimal], or convex codes on five or fewer neurons [goldrup2019classification]), convex codes have evaded full description.

As the literature on combinatorial neural codes proliferated, we observed various similarities with the well-studied realm of oriented matroid theory. For instance, the class of stable hyperplane codes introduced in [itskov2018hyperplane] are defined by a collection of half-spaces intersecting a convex set, which are precisely the sets of topes of a realizable COM (conditional oriented matroid) as studied in [bandelt2018coms]. The neural ideal, defined in [curto2013neural] and further developed in [curto2019algebraic, gunturkun2017polarization, de2019neural], seems to align with the oriented matroid ideal defined in [novik2002syzygies], particularly after the neural ideal is polarized [gunturkun2017polarization]. Finally, morphisms of codes, as defined in [jeffs2019morphisms], seem analogous to strong maps of oriented matroids, as formulated in [hochstattler1999linear]. In this paper, we draw parallels between the notions of convexity for neural codes and representability for oriented matroids, and formalize these connections on a functorial level.

Refer to caption
Figure 2. (a) The covectors of an oriented matroid arising from a central hyperplane arrangement. (b) The combinatorial code of the cover given by the positive open half-spaces.

First, we establish strong connections between representable oriented matroids and convex neural codes by considering the map 𝖫+:𝐎𝐌𝐂𝐨𝐝𝐞\mathsf{L}^{+}:\operatorname{\mathbf{OM}}\to\operatorname{\mathbf{Code}} which takes an oriented matroid to the positive parts of its covectors. Representable oriented matroids are precisely those which can be obtained from real hyperplane arrangements, as in Figure 2(a). Isomorphism classes of neural codes form a partially ordered set denoted 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}}, introduced in [jeffs2019morphisms]. Roughly, 𝒞𝒟\mathscr{C}\leq\mathscr{D} if there is a way to construct a realization for 𝒞\mathscr{C} using a realization of 𝒟\mathscr{D}, in which case we say 𝒞\mathscr{C} is a minor of 𝒟\mathscr{D}. We extend a result of [jeffs2019morphisms] and use it to prove that all codes lying below codes of representable oriented matroids have realizations with interiors of convex polytopes, which we call open polytope convex. Further, the converse also holds:

Theorem 1.

A code is open polytope convex if and only if it is a minor of 𝖫+\mathsf{L}^{+}\mathcal{M} for some representable oriented matroid \mathcal{M}.

Since every code which has a convex realization in the plane has a realization with convex polygons [bukh2022planar], this result gives a full characterization of planar convex codes in terms of representable oriented matroids. In higher dimensions, it is not yet known whether every convex code has a realization with convex polytopes. If this does hold, then 2 would give a full characterization of convex codes in terms of representable oriented matroids. Without this result, we can still categorize non-convex codes: if a code is not convex, then either it does not lie below any oriented matroid in 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}}, or it lies below non-representable matroids only. There are many known examples of non-convex codes [curto2017makes, lienkaemper2017obstructions, jeffs2019morphisms, jeffs2019sunflowers, chen2019neural], and we show that many of these fall into the first category: they are non-convex because they are not below any oriented matroids in 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}}. For instance, codes with topological local obstructions do not lie below oriented matroids. Furthermore, sunflower codes [jeffs2019sunflowers], a well known family of non-convex codes with no local obstructions also do not lie below oriented matroids.

Theorem 2.

The non-convex codes with no local obstructions constructed via sunflowers do not lie below codes of oriented matroids in 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}}.

We are also able to generate an infinite family of non-convex codes of the second kind, those which lie below non-representable matroids only. In order to obtain this family, we establish a relationship between representability and convexity. We do this for the special case of uniform oriented matroids of rank 3, which correspond to non-degenerate pseudoline arrangements in the plane.

Theorem 3.

Let \mathcal{M} be a uniform, rank 3 oriented matroid. Then we can construct a code which is convex if and only if \mathcal{M} is representable.

Using this result, we are able to compare two fundamental decision problems: (1) is a given oriented matroid representable, and (2) is a given neural code realizable by convex sets. We demonstrate that deciding convexity for arbitrary neural codes is at least as hard as deciding representability of an oriented matroid. The latter problem is known to be NP-hard and \exists\mathbb{R}-hard, leading to the following theorem:

Theorem 4.

The convex code decision problem is NP-hard and \exists\mathbb{R}-hard.

Finally, we relate algebraic and categorical structures for matroids and codes. Acyclic oriented matroids form a category 𝐎𝐌\operatorname{\mathbf{OM}} whose morphisms are given by strong maps, as defined in [hochstattler1999linear]. Neural codes form a category 𝐂𝐨𝐝𝐞\operatorname{\mathbf{Code}} introduced in [jeffs2019morphisms], with morphisms defined using trunks of codes. We show that the map 𝖶+:𝐎𝐌𝐂𝐨𝐝𝐞\mathsf{W}^{+}:\operatorname{\mathbf{OM}}\to\operatorname{\mathbf{Code}} which takes an acyclic oriented matroid to the positive parts of its topes is a faithful functor. Furthermore, we adapt the oriented matroid ideal introduced in [novik2002syzygies] to non-affine oriented matroids, producing the oriented matroid dual ideal O()O(\mathcal{M})^{\star} and the oriented matroid ring k[x1,,xn,y1,,yn]/O()k[x_{1},\dots,x_{n},y_{1},\dots,y_{n}]/O(\mathcal{M})^{\star}. We show that the map 𝖲\mathsf{S} taking an oriented matroid to its oriented matroid ring is a functor, and use this to define the category 𝐎𝐌𝐑𝐢𝐧𝐠\operatorname{\mathbf{OMRing}}. Using results from [gunturkun2017polarization], we define the depolarization map 𝖣:𝐎𝐌𝐑𝐢𝐧𝐠𝐍𝐑𝐢𝐧𝐠\mathsf{D}:\operatorname{\mathbf{OMRing}}\to\operatorname{\mathbf{NRing}}, and show that this map is functorial. Finally, we show that these maps play nicely with the functor 𝖱:𝐂𝐨𝐝𝐞𝐍𝐑𝐢𝐧𝐠\mathsf{R}:\operatorname{\mathbf{Code}}\to\operatorname{\mathbf{NRing}} from [jeffs2019morphisms].

Theorem 5.

The maps 𝖲\mathsf{S}, 𝖣\mathsf{D}, and 𝖶+\mathsf{W}^{+} are functorial. In particular, the map 𝖶+\mathsf{W}^{+} is a faithful, but not full functor from 𝐎𝐌𝐂𝐨𝐝𝐞\operatorname{\mathbf{OM}}\to\operatorname{\mathbf{Code}}. Moreover, the square below commutes, that is, 𝖱𝖶+=𝖣𝖲\mathsf{R}\circ\mathsf{W}^{+}=\mathsf{D}\circ\mathsf{S}.

𝐎𝐌{\operatorname{\mathbf{OM}}}𝐎𝐌𝐑𝐢𝐧𝐠{\operatorname{\mathbf{OMRing}}}𝐂𝐨𝐝𝐞{\operatorname{\mathbf{Code}}}𝐍𝐑𝐢𝐧𝐠{\operatorname{\mathbf{NRing}}}𝖲\scriptstyle{\mathsf{S}}𝖶+\scriptstyle{\mathsf{W}^{+}}𝖣\scriptstyle{\mathsf{D}}𝖱\scriptstyle{\mathsf{R}}

The paper is organized as follows: In Section 2, we establish notation and background material that will be necessary for later sections. In Section 3, we relate minors of codes to realizability by intersection-closed families of sets, and use this to establish Theorem 2. In Section 4, we discuss classes of non-convex codes and their relationships to oriented matroids. In Section 5, we detail the functors among the categories of acyclic oriented matroids, combinatorial neural codes, and rings. Finally, in Section 6, we present open questions related to each area discussed in the paper.

2. Background

We provide the essential background information on oriented matroids in Section 2.1 and combinatorial codes in Section 2.2. In Section 2.3, we define the maps 𝖶+\mathsf{W}^{+} and 𝖫+\mathsf{L}^{+} which take oriented matroids to combinatorial codes. This section is by no means comprehensive, and we will occasionally make reference to theorems not fully stated in the text. Our primary reference for oriented matroids is [bjorner1999oriented], which collects and synthesizes decades of research on the subject. For combinatorial codes, there is no single comprehensive reference; for those unfamiliar with the subject, [curto2013neural] and [jeffs2019morphisms] are good introductions to the neural ring and morphisms of codes, respectively.

2.1. Oriented matroids

An oriented matroid =(E,)\mathcal{M}=(E,\mathcal{L}) consists of a finite ground set EE and a collection 2±E\mathcal{L}\subseteq 2^{\pm E} of signed subsets of ±E\pm E satisfying certain axioms. Typically, we will take E=[n]:={1,,n}E=[n]:=\{1,\ldots,n\}, E¯=[n¯]:={1¯,,n¯}\bar{E}=[\bar{n}]:=\{\bar{1},\ldots,\bar{n}\}, and ±E:=EE¯\pm E:=E\cup\bar{E}. The set ±E\pm E is endowed with the involution :±E±E-:\pm E\to\pm E, exchanging eEe\in E with e¯E¯\bar{e}\in\bar{E}. The negative of a subset X±EX\subseteq\pm E is X:={xxX}-X:=\{-x\mid x\in X\}. The support of a set X±EX\subseteq\pm E is the set X¯:={eEeX or eX}E\underline{X}:=\{e\in E\mid e\in X\mbox{ or }-e\in X\}\subseteq E. The positive part of XX is X+:=XEX^{+}:=X\cap E and the negative part is X:=(X)EX^{-}:=(-X)\cap E.

A set X±EX\subseteq\pm E is a signed set if its positive and negative parts are disjoint. If eEe\in E and XX is a signed subset of ±E\pm E, define XeX_{e} by Xe=+X_{e}=+ if eXe\in X, Xe=X_{e}=- if eX-e\in X, and Xe=0X_{e}=0 otherwise; in this way, we can consider signed subsets equivalently as subsets of ±E\pm E or as vectors in {+,0,}E\{+,0,-\}^{E}. The composition of sign vectors XX and YY is defined component-wise by

(XY)e:={Xe if Xe0Ye otherwise.\displaystyle(X\circ Y)_{e}:=\begin{cases}X_{e}\mbox{ if }X_{e}\neq 0\\ Y_{e}\mbox{ otherwise}.\end{cases}

The separator of XX and YY is the unsigned set sep(X,Y):={eXe=Ye0}\operatorname{sep}(X,Y):=\{e\mid X_{e}=-Y_{e}\neq 0\}.

Now, we are ready to define oriented matroids, which we do via the covector axioms.

Definition 2.1.

Let EE be a finite set, and 2±E\mathcal{L}\subseteq 2^{\pm E} a collection of signed subsets satisfying the following covector axioms:

  1. (V1)

    \varnothing\in\mathcal{L}

  2. (V2)

    XX\in\mathcal{L} implies X-X\in\mathcal{L}.

  3. (V3)

    X,YX,Y\in\mathcal{L} implies XYX\circ Y\in\mathcal{L}.

  4. (V4)

    If X,YX,Y\in\mathcal{L} and esep(X,Y)e\in\operatorname{sep}(X,Y), then there exists ZZ\in\mathcal{L} such that Ze=0Z_{e}=0 and Zf=(XY)f=(YX)fZ_{f}=(X\circ Y)_{f}=(Y\circ X)_{f} for all fsep(X,Y)f\notin\operatorname{sep}(X,Y).

Then, the pair =(E,)\mathcal{M}=(E,\mathcal{L}) is called an oriented matroid, and \mathcal{L} its set of covectors.

Maximal covectors (with respect to inclusion) are called topes. An oriented matroid is acyclic if it has a positive tope, i.e. a tope with empty negative part.

Example 2.2.

A central hyperplane arrangement \mathcal{H} in d\mathbb{R}^{d} produces an oriented matroid. Let 1,,n\ell_{1},\dots,\ell_{n} be linear forms on d\mathbb{R}^{d}, and H1,,HnH_{1},\dots,H_{n} their zero sets (i.e. hyperplanes). We can assign each point xdx\in\mathbb{R}^{d} to a signed set X±[n]X\subseteq\pm[n] by

Xi={+ if i(x)>0 if i(x)<00 if i(x)=0.\displaystyle X_{i}=\begin{cases}+\mbox{ if }\ell_{i}(x)>0\\ -\mbox{ if }\ell_{i}(x)<0\\ 0\mbox{ if }\ell_{i}(x)=0.\end{cases}

The family of signed sets which arise in this way satisfies the covector axioms, and therefore defines an oriented matroid. Notice that each covector corresponds to a cell of the hyperplane arrangement, and that topes correspond to top-dimensional cells. We will refer to this oriented matroid ()=([n],())\mathcal{M}(\mathcal{H})=([n],\mathcal{L}(\mathcal{H})) as the oriented matroid of \mathcal{H}.

An oriented matroid \mathcal{M} is representable if =()\mathcal{M}=\mathcal{M}(\mathcal{H}) for some hyperplane arrangement \mathcal{H}. Figure 2(a) illustrates an example in 2\mathbb{R}^{2}. The rank of a representable oriented matroid is the minimum possible dimension of the hyperplane arrangement \mathcal{H} with =()\mathcal{M}=\mathcal{M}(\mathcal{H}). Not every oriented matroid is representable. However, we are able to take this hyperplane picture as paradigmatic. The topological representation theorem guarantees that every oriented matroid has a representation by a pseudosphere arrangement [folkman1978oriented]. For details, see [bjorner1999oriented, Chapter 5].

We can also use oriented matroid theory to describe affine hyperplane arrangements. An affine oriented matroid consists of a pair (,g)(\mathcal{M},g) where \mathcal{M} is an oriented matroid and gg is a distinguished element of its ground set. The affine space of (,g)(\mathcal{M},g) is the set {X()Xg=+}\{X\in\mathcal{L}(\mathcal{M})\mid X_{g}=+\}. We can embed an affine hyperplane arrangement in d\mathbb{R}^{d} as a central hyperplane arrangement in d+1\mathbb{R}^{d+1}. We replace each affine hyperplane w1x1++wdxd+b=0w_{1}x_{1}+\cdots+w_{d}x_{d}+b=0 with a central hyperplane w1x1++wdxd+bxd+1=0w_{1}x_{1}+\cdots+w_{d}x_{d}+bx_{d+1}=0, and add an additional hyperplane xd+1=0x_{d+1}=0. Restricting to the xd+1=1x_{d+1}=1 plane recovers the original hyperplane arrangement. Each chamber of the affine arrangement corresponds to an element of the affine space of ((),g)(\mathcal{M}(\mathcal{H}),g), where gg corresponds to the hyperplane xd+1=0x_{d+1}=0. Because we can translate between affine and central realizations, the matroid \mathcal{M} is representable with a central hyperplane arrangement if and only if (,g)(\mathcal{M},g) is representable by an affine hyperplane arrangement for any ground set element gg.

There are many equivalent axiomatizations of oriented matroids. The two formulations we use most often throughout this work are the covector axioms (V1)-(V4), stated above, and the circuit axioms (C1)-(C4), which we state here.

Definition 2.3.

Let EE be a finite set, and 𝒞2±E\mathcal{C}\subseteq 2^{\pm E} a collection of signed subsets satisfying the following circuit axioms:

  1. (C1)

    𝒞\varnothing\notin\mathcal{C}.

  2. (C2)

    X𝒞X\in\mathcal{C} implies X𝒞-X\in\mathcal{C}.

  3. (C3)

    X,Y𝒞X,Y\in\mathcal{C} and X¯Y¯\underline{X}\subseteq\underline{Y} implies X=YX=Y or X=YX=-Y.

  4. (C4)

    For all X,Y𝒞X,Y\in\mathcal{C} with XYX\neq-Y and an element eX+Ye\in X^{+}\cap Y^{-}, there is a Z𝒞Z\in\mathcal{C} such that Z+(X+Y+)eZ^{+}\subseteq(X^{+}\cup Y^{+})\setminus e and Z(XY)eZ^{-}\subseteq(X^{-}\cup Y^{-})\setminus e.

Then the pair =(E,𝒞)\mathcal{M}=(E,\mathcal{C}) is an oriented matroid, and 𝒞\mathcal{C} is its set of circuits.

In some contexts, we admit the sets {e,e¯}\{e,\bar{e}\} as improper circuits. We will call a circuit a proper circuit when we wish to emphasize that it is a signed set, i.e. its positive and negative parts are disjoint.

For an oriented matroid arising from a hyperplane arrangement, circuits are the signs of the coefficients in the minimal linear dependencies among the normal vectors to the hyperplanes. As a result, the rank of an oriented matroid can be defined via its circuits – the rank of an oriented matroid is the one less than the cardinality of its largest circuit. An oriented matroid is uniform of rank rr if all of its circuits have the same cardinality of r+1r+1. Uniform oriented matroids correspond to generic hyperplane arrangements.

An element eEe\in E is a loop of \mathcal{M} if {e}𝒞()\{e\}\in\mathcal{C}(\mathcal{M}). An oriented matroid is loopless if no element is a loop.

Proper circuits are related to covectors as follows: Two signed sets XX and YY are called orthogonal if either X¯Y¯=\underline{X}\cap\underline{Y}=\varnothing or if there exist e,fX¯Y¯e,f\in\underline{X}\cap\underline{Y} such that XeXf=YeYfX_{e}X_{f}=-Y_{e}Y_{f}. A signed set is called a vector of \mathcal{M} if and only if it is orthogonal to every covector. Equivalently, a signed set is a vector of \mathcal{M} if and only if it is orthogonal to every tope. The circuits are the minimal vectors of \mathcal{M}. The vectors of an oriented matroid define a dual oriented matroid, hence the vector and covector axioms are identical. Minimal covectors are know as cocircuits. They also satisfy the circuit axioms.

For a given oriented matroid \mathcal{M}, each one of the set of covectors ()\mathcal{L}(\mathcal{M}), the set of topes 𝒲()\mathcal{W}(\mathcal{M}), the set of vectors 𝒱()\mathcal{V}(\mathcal{M}), and the set of circuits 𝒞()\mathcal{C}(\mathcal{M}) is sufficient to recover all of the others.

2.2. Combinatorial codes

A combinatorial code 𝒞\mathscr{C} is a collection of subsets of a finite set VV, i.e. 𝒞2V\mathscr{C}\subseteq 2^{V}. Typically, we take V=[n]V=[n].

Given an arbitrary set XX and collection 𝒰={U1,,Un}\mathcal{U}=\{U_{1},\dots,U_{n}\} with each UiXU_{i}\subseteq X, the code of the cover 𝒰\mathcal{U} (relative to XX) is

code(𝒰,X):={σ[n]|iσUijσUj}.\operatorname{code}(\mathcal{U},X):=\Biggl{\{}\sigma\subseteq[n]\Biggm{|}\bigcap_{i\in\sigma}U_{i}\setminus\bigcup_{j\notin\sigma}U_{j}\neq\varnothing\Biggr{\}}.

Note we do not require X=i[n]UiX=\bigcup_{i\in[n]}U_{i}; indeed, code(𝒰,X)\varnothing\in\operatorname{code}(\mathcal{U},X) if and only if i[n]UiX\bigcup_{i\in[n]}U_{i}\subsetneq X. A code 𝒞\mathscr{C} is called open convex if there exists a collection 𝒰={U1,,Un}\mathcal{U}=\{U_{1},\dots,U_{n}\} of open convex sets and an open convex set XdX\subseteq\mathbb{R}^{d}, such that 𝒞=code(𝒰,X)\mathscr{C}=\operatorname{code}(\mathcal{U},X), for some dd. We will refer to open convex codes simply as convex codes.

Example 2.4.

Let UiU_{i} denote the open half-space on the positive side of hyperplane HiH_{i} in Figure 2(a), i.e. Ui={x2i(x)>0}U_{i}=\{x\in\mathbb{R}^{2}\mid\ell_{i}(x)>0\}. Then, code(𝒰,n)\operatorname{code}(\mathcal{U},\mathbb{R}^{n}) is the combinatorial code with codewords as labeled in Figure 2(b).

Morphisms of combinatorial codes were defined in [jeffs2019morphisms] in terms of trunks. For σ[n]\sigma\subseteq[n], the trunk of σ\sigma in 𝒞\mathscr{C} is the set of codewords which contain σ\sigma,

Tk𝒞(σ):={τ𝒞στ}.\operatorname{Tk}_{\mathscr{C}}(\sigma):=\{\tau\in\mathscr{C}\mid\sigma\subseteq\tau\}.

A subset of 𝒞\mathscr{C} is a trunk if it is equal to Tk𝒞(σ)\operatorname{Tk}_{\mathscr{C}}(\sigma) for some σ[n]\sigma\subseteq[n] or if it is empty. A simple trunk is the trunk of a singleton set. A map f:𝒞𝒟f:\mathscr{C}\to\mathscr{D} is a morphism of codes if the preimage of each trunk of 𝒟\mathscr{D} is a trunk of 𝒞\mathscr{C}. Any set of trunks T1,,Tm𝒞T_{1},\ldots,T_{m}\subseteq\mathscr{C} defines a morphism f:𝒞2[m]f:\mathscr{C}\to 2^{[m]} by f(σ):={iσTi}f(\sigma):=\{i\mid\sigma\in T_{i}\}, and any code morphism f:𝒞𝒟f:\mathscr{C}\to\mathscr{D} can be obtained in this way [jeffs2019morphisms, Proposition 2.12]. The class of codes, together with these morphisms, forms the category 𝐂𝐨𝐝𝐞\operatorname{\mathbf{Code}}.

A subset σ[n]\sigma\subseteq[n] can be encoded as a point c𝔽2nc\in\mathbb{F}_{2}^{n} by setting ci=1c_{i}=1 for iσi\in\sigma and ci=0c_{i}=0 for iσi\notin\sigma. Hence, a code 𝒞2[n]\mathscr{C}\subseteq 2^{[n]} can equivalently be thought of as a variety 𝒞𝔽2n\mathscr{C}\subseteq\mathbb{F}_{2}^{n}. The vanishing ideal of a code 𝒞\mathscr{C} is the ideal

I𝒞:={f(𝐱)𝔽2[x1,,xn]f(c)=0 for all c𝒞},I_{\mathscr{C}}:=\{f(\mathbf{x})\in\mathbb{F}_{2}[x_{1},\dots,x_{n}]\mid f(c)=0\mbox{ for all }c\in\mathscr{C}\},

and the neural ring of 𝒞\mathscr{C} is the quotient ring R𝒞=𝔽2[x1,,xn]/I𝒞R_{\mathscr{C}}=\mathbb{F}_{2}[x_{1},\dots,x_{n}]/I_{\mathscr{C}}. The vanishing ideal I𝒞I_{\mathscr{C}} is a pseudo-monomial ideal, meaning it is generated by products of the form iσxijτ(1xj)\prod_{i\in\sigma}x_{i}\prod_{j\in\tau}(1-x_{j}), called pseudo-monomials. As with circuits, we distinguish between proper pseudo-monomials, with σ\sigma and τ\tau disjoint, and improper pseudo-monomials, which are divisible by some xi(1xi)x_{i}(1-x_{i}). We will briefly discuss the vanishing ideal and neural ring in Section 5.1, but many more details can be found in [curto2013neural]. For clarity, we will denote pseudo-monomials and monomials with superscripts, i.e.

xσ(1x)τ:=iσxijτ(1xj)andxσyτ:=iσxijτyj.x^{\sigma}(1-x)^{\tau}:=\prod_{i\in\sigma}x_{i}\prod_{j\in\tau}(1-x_{j})\qquad\mbox{and}\qquad x^{\sigma}y^{\tau}:=\prod_{i\in\sigma}x_{i}\prod_{j\in\tau}y_{j}.

2.3. Codes from oriented matroids

Consider an oriented matroid \mathcal{M} on ground set EE. We can consider the positive parts of covectors (respectively, topes) as a code on EE, which we denote 𝖫+\mathsf{L}^{+}\mathcal{M} (respectively 𝖶+\mathsf{W}^{+}\mathcal{M}) to emphasize the change in categories:

𝖫+:={X+X()}and𝖶+:={W+W𝒲()}.\mathsf{L}^{+}\mathcal{M}:=\{X^{+}\mid X\in\mathcal{L}(\mathcal{M})\}\qquad\text{and}\qquad\mathsf{W}^{+}\mathcal{M}:=\{W^{+}\mid W\in\mathcal{W}(\mathcal{M})\}.

In Sections 3 and 4 we will show how 𝖫+\mathsf{L}^{+} relates representability of oriented matroids with convexity of codes. In Section 5, we will examine the functorial properties of 𝖶+\mathsf{W}^{+}; culminating in a proof of 5.

If \mathcal{M} is the matroid of a hyperplane arrangement the code 𝖫+\mathsf{L}^{+}\mathcal{M} matches the code of the cover given by positive sides of the hyperplanes (as in Figure 2). This extends to any topological representation of \mathcal{M} by a pseudosphere arrangement (as introduced in [folkman1978oriented]).

Observation 2.5.

If \mathcal{M} is any oriented matroid and {Se}eE\{S_{e}\}_{e\in E} is an oriented pseudosphere arrangement topologically realizing \mathcal{M}, then

𝖫+=code({Se+}eE,𝕊d).\mathsf{L}^{+}\mathcal{M}=\operatorname{code}(\{S_{e}^{+}\}_{e\in E},\mathbb{S}^{d}).

In particular, if \mathcal{M} is a representable oriented matroid and {He}eE\{H_{e}\}_{e\in E} is an oriented hyperplane arrangement realizing \mathcal{M}, then

𝖫+=code({He+}eE,d).\mathsf{L}^{+}\mathcal{M}=\operatorname{code}(\{H_{e}^{+}\}_{e\in E},\mathbb{R}^{d}).

The map 𝖫+\mathsf{L}^{+} is better behaved geometrically than 𝖶+\mathsf{W}^{+}. In particular, 2.5 fails for 𝖶+\mathsf{W}^{+}. For instance, in the hyperplane arrangement pictured in Figure 2, \varnothing is a codeword in the code of the cover given by the positive open half-spaces, but is not the positive part of any tope.

Remark 2.6.

If \mathcal{M} is an acyclic oriented matroid, then the the signed set E-E is a tope. Thus, if SES\subseteq E is the positive part of some covector X()X\in\mathcal{L}(\mathcal{M}), then SS is also the positive part of the tope XE𝒲().X\circ-E\in\mathcal{W}(\mathcal{M}). Thus, on acyclic oriented matroids, 𝖶+\mathsf{W}^{+} and 𝖫+\mathsf{L}^{+} coincide.

3. Intersection-closed families and morphisms

In [jeffs2019morphisms], Jeffs shows that the image of a convex code under a code morphism, as well as any trunk of a convex code, is itself a convex code. From this observation, he defines the poset of isomorphism classes of codes 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}} in which convex codes form a down-set: if 𝒟𝒞\mathscr{D}\leq\mathscr{C} in 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}} and 𝒞\mathscr{C} is convex, then so is 𝒟\mathscr{D}. In this section, we generalize this statement to intersection-closed families, of which open convex subsets of d\mathbb{R}^{d} is one example. A family \mathcal{F} of subsets of a topological space is called intersection-closed if it is closed under finite intersections and contains the empty set. We say that a neural code 𝒞\mathscr{C} is \mathcal{F}-realizable if 𝒞=code(𝒰,X)\mathscr{C}=\operatorname{code}(\mathcal{U},X) for some 𝒰\mathcal{U}\subseteq\mathcal{F} and XX\in\mathcal{F}. For instance, a neural code is convex if and only if it is \mathcal{F}-realizable for the set \mathcal{F} of convex open subsets of some d\mathbb{R}^{d}. Then, using this result, we prove 2.

We recall the relevant definitions. Two codes 𝒞\mathscr{C} and 𝒟\mathscr{D} are isomorphic if there is a bijective code morphism f:𝒞𝒟f:\mathscr{C}\to\mathscr{D} whose inverse is also a code morphism. If there is a sequence of codes 𝒞=𝒞0,𝒞1,,𝒞k=𝒟\mathscr{C}=\mathscr{C}_{0},\mathscr{C}_{1},\dots,\mathscr{C}_{k}=\mathscr{D} such that each successive code is either the image of a morphism from or a trunk of the preceding code, we say 𝒟\mathscr{D} is a minor of 𝒞\mathscr{C} [jeffs2021embedding]. Codes are then quasi-ordered by setting 𝒟𝒞\mathscr{D}\leq\mathscr{C} if 𝒟\mathscr{D} is a minor of 𝒞\mathscr{C}. The poset of isomorphism classes of codes induced by this order is denoted 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}}.

Proposition 3.1.

For any intersection closed family \mathcal{F}, if 𝒞\mathscr{C} is \mathcal{F}-realizable and 𝒟𝒞\mathscr{D}\leq\mathscr{C}, then 𝒟\mathscr{D} is \mathcal{F}-realizable.

Proof.

We first check the case 𝒟=f(𝒞)\mathscr{D}=f(\mathscr{C}). This closely follows the proof of Theorem 1.4 in [jeffs2019morphisms], since the only property of convex sets this proof uses is that the family of open convex subsets of d\mathbb{R}^{d} is closed under finite intersection. We repeat the details here. Let 𝒞2[n]\mathscr{C}\subseteq 2^{[n]}, 𝒟2[m]\mathscr{D}\subseteq 2^{[m]}, and T1,,TmT_{1},\ldots,T_{m} be the trunks in 𝒞\mathscr{C} that define the morphism f:𝒞𝒟f:\mathscr{C}\to\mathscr{D}. Let {U1,,Un}\{U_{1},\ldots,U_{n}\}\subseteq\mathcal{F} be an \mathcal{F}-realization of 𝒞\mathscr{C}.

If TjT_{j} is nonempty, let σj\sigma_{j} be the intersection of all elements of TjT_{j}, which is the unique largest subset of [n][n] such that Tj=Tk𝒞(σj)T_{j}=\operatorname{Tk}_{\mathscr{C}}(\sigma_{j}). Then, for j[m]j\in[m], define

Vj={Tj=iσjUiTj\displaystyle V_{j}=\begin{cases}\varnothing&T_{j}=\varnothing\\ \bigcap_{i\in\sigma_{j}}U_{i}&T_{j}\neq\varnothing\end{cases}

Since \mathcal{F} is closed under finite intersection and contains the empty set, VjV_{j}\in\mathcal{F} for all j[m]j\in[m]. Thus, it suffices to show that the code \mathscr{E} that they realize is 𝒟\mathscr{D}. To see this, note that we can associate each point pXp\in X to a codeword in 𝒞\mathscr{C} or \mathscr{E} by p{i[n]pUi}p\mapsto\{i\in[n]\mid p\in U_{i}\} and p{j[m]pVj}p\mapsto\{j\in[m]\mid p\in V_{j}\}. Then let pXp\in X be arbitrary, and let cc and ee be the associated codewords in 𝒞\mathscr{C} and \mathscr{E} respectively. By the definition of the VjV_{j}, we have that cTjc\in T_{j} if and only if jej\in e, which is equivalent to e=f(c)e=f(c). Since pp was arbitrary and every codeword arises at some point, we conclude that =f(𝒞)=𝒟\mathscr{E}=f(\mathscr{C})=\mathscr{D}, as desired.

Next, we check the case 𝒟=Tk𝒞(σ)\mathscr{D}=\operatorname{Tk}_{\mathscr{C}}(\sigma). In this case, let 𝒞2[n]\mathscr{C}\subseteq 2^{[n]}, σ[n]\sigma\subseteq[n], 𝒰={U1,,Un}\mathcal{U}=\{U_{1},\ldots,U_{n}\} be a \mathcal{F}-realization of 𝒞\mathscr{C}. Then for define 𝒱={V1,,Vn}\mathcal{V}=\{V_{1},\ldots,V_{n}\} where

Vi=Ui(jσUj),andY=X(jσUj).V_{i}=U_{i}\cap\left(\bigcap_{j\in\sigma}U_{j}\right),\qquad\text{and}\qquad Y=X\cap\left(\bigcap_{j\in\sigma}U_{j}\right).

Then 𝒟=code(𝒱,Y)\mathscr{D}=\operatorname{code}(\mathcal{V},Y). To check this, as above, we can associate each point pYp\in Y to a codeword by p{j[n]pVj}p\mapsto\{j\in[n]\mid p\in V_{j}\}. Since Y=X(jσUj)Y=X\cap\left(\bigcap_{j\in\sigma}U_{j}\right), each of these codewords will contain σ\sigma, and we will obtain every codeword of 𝒞\mathscr{C} containing σ\sigma in this way. ∎

Refer to caption
Figure 3. Example of construction from proof of Proposition 3.1

Our first application of Proposition 3.1 is to good cover codes. A code 𝒞\mathscr{C} is a good cover code if there exist open sets U1,,UnU_{1},\ldots,U_{n} realizing 𝒞\mathscr{C} which form a good cover, i.e. all intersections iσUi\bigcap_{i\in\sigma}U_{i} are either empty or contractible. Good cover codes are precisely the codes with no local obstructions, as proved by [chen2019neural, Theorem 3.13]. Codes with local obstructions formed the first known class of non-convex codes [curto2017makes]. Recall the link of a face σ\sigma in a simplicial complex Δ\Delta is the subcomplex

linkσ(Δ)={τΔστ=,στΔ}.\operatorname{link}_{\sigma}(\Delta)=\{\tau\in\Delta\mid\sigma\cap\tau=\varnothing,\sigma\cup\tau\in\Delta\}.

For a code 𝒞\mathscr{C}, Δ(𝒞)\Delta(\mathscr{C}) is the simplicial complex of 𝒞\mathscr{C}, obtained by taking the closure of 𝒞\mathscr{C} under taking subsets. A neural code 𝒞\mathscr{C} has a local obstruction if there is some σΔ(𝒞)𝒞\sigma\in\Delta(\mathscr{C})\setminus\mathscr{C} such that linkσ(Δ(𝒞))\operatorname{link}_{\sigma}(\Delta(\mathscr{C})) is not contractible.

We show that codes with no local obstructions form a down-set in 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}}. The only requirement to be an open set in some good cover is contractibility, and the family of contractible sets is not intersection-closed. Instead, we consider the sets U1,,UnU_{1},\ldots,U_{n} in one particular good cover and their intersections as our intersection-closed family.

Corollary 3.2.

The set of codes with no local obstructions is a down-set in 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}}.

Proof.

Let 𝒞\mathscr{C} be a code with no local obstructions. By [chen2019neural, Theorem 3.13], 𝒞\mathscr{C} is a good cover code. Fix a good cover 𝒰={U1,,Un}\mathcal{U}=\{U_{1},\ldots,U_{n}\} realizing 𝒞\mathscr{C}. Let 𝒰\mathcal{F}_{\mathcal{U}} denote the family of sets obtained by arbitrary intersections of sets in 𝒰\mathcal{U}, together with the empty set. This family still forms a good cover. Any code 𝒟𝒞\mathscr{D}\leq\mathscr{C} is 𝒰\mathcal{F}_{\mathcal{U}}-realizable by Proposition 3.1; it is therefore a good cover code and thus has no local obstructions. ∎

Armed with these results, we look at the codes of oriented matroids and those lying below them. In particular, we examine the intersection-closed family of interiors of convex polytopes in n\mathbb{R}^{n}. We say that a code 𝒞\mathcal{C} is polytope convex if there exists a collection of interiors of convex polytopes 𝒫={P1,,Pn}\mathcal{P}=\{P_{1},\ldots,P_{n}\} and a bounding convex polytope XX such that 𝒞=code(𝒫,X)\mathcal{C}=\operatorname{code}(\mathcal{P},X). Note that polytope convex codes are open convex. Proposition 3.1 implies that the image of any polytope code under a surjective morphism is also a polytope code. Thus, since the codes of representable oriented matroids correspond to codes of hyperplane arrangements, all codes which lie below a representable oriented matroid are polytope codes. We prove the converse, showing that every polytope code is itself the image of the code of an oriented matroid under some surjective morphism. This demonstrates that polytope codes are a down-set generated by the set of representable oriented matroid codes.

We begin by noting that codes below oriented matroids have no local obstructions. This result appears in different language in [edelman2002convex]. We flesh this out.

Proposition 3.3.

Let \mathcal{M} be an oriented matroid. If 𝒞𝖫+\mathscr{C}\leq\mathsf{L}^{+}\mathcal{M} in 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}}, 𝒞\mathscr{C} is a good cover code, and thus has no local obstructions.

Proof.

Edelman, Reiner, and Welker define a simplicial complex Δacyclic()\Delta_{\mathrm{acyclic}}(\mathcal{M}) which is identical to Δ(𝖫+)\Delta(\mathsf{L}^{+}\mathcal{M}) [edelman2002convex]. Proposition 11 and Lemma 13 of [edelman2002convex] establish that if σΔ(𝖫+)𝖫+\sigma\in\Delta(\mathsf{L}^{+}\mathcal{M})\setminus\mathsf{L}^{+}\mathcal{M}, then linkσΔ(𝖫+)\operatorname{link}_{\sigma}\Delta(\mathsf{L}^{+}\mathcal{M}) is contractible. Thus, 𝖫+\mathsf{L}^{+}\mathcal{M} has no local obstructions, and is therefore a good cover code. By 3.2, good cover codes form a down-set in 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}}, so if 𝒞𝖫+\mathscr{C}\leq\mathsf{L}^{+}\mathcal{M} in 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}}, then 𝒞\mathscr{C} has no local obstructions. ∎

Theorem 2.

A code 𝒞\mathscr{C} is polytope convex if and only if there exists a representable oriented matroid \mathcal{M} such that 𝒞𝖫+()\mathscr{C}\leq\mathsf{L}^{+}(\mathcal{M}).

Proof.

(\Rightarrow) A polytope is an intersection of half-spaces, so this follows from 2.5 and Proposition 3.1.

(\Leftarrow) Let 𝒞\mathscr{C} be a polytope convex code with (𝒱,X)(\mathcal{V},X) a realization of 𝒞\mathscr{C} with convex polytopes ViV_{i} and bounding convex set XX. Without loss of generality, we can choose XX to be a convex polytope. Then each ViV_{i} is the intersection of a collection of open half spaces Ui1,,UikiU_{i1},\ldots,U_{ik_{i}}, and XX is the intersection of open half spaces X1,,XkX_{1},\ldots,X_{k}. Now, let =code({U11,,U1k1,,Unkn,X1,,Xk},d)\mathscr{H}=\operatorname{code}(\{U_{11},\ldots,U_{1k_{1}},\ldots,U_{nk_{n}},X_{1},\ldots,X_{k}\},\mathbb{R}^{d}). Let \mathscr{H}^{\prime} be the trunk of the neurons associated to X1,,XkX_{1},\ldots,X_{k}. Now, we define a surjective morphism f:𝒞f:\mathscr{H}^{\prime}\to\mathscr{C} as follows. Choose trunks T1,,TnT_{1},\ldots,T_{n} of \mathscr{H}^{\prime} by Ti=Tk({i1,,iki})T_{i}=\operatorname{Tk}_{\mathscr{H}^{\prime}}(\{i1,\dots,ik_{i}\}). Let ff be the morphism defined by the trunks T1,,TnT_{1},\ldots,T_{n}. We now show that its image is 𝒞\mathscr{C}.

To do this, construct the realization of f()f(\mathscr{H}^{\prime}) given in the proof of Proposition 3.1. This construction gives the realization

Vj=i=1i=kjUji\displaystyle V_{j}^{\prime}=\bigcap_{i=1}^{i=k_{j}}U_{ji}

relative to the convex set X=i=1kXiX=\bigcap_{i=1}^{k}X_{i}. Thus, f()=code({V1,,Vn},X)=𝒞f(\mathscr{H}^{\prime})=\operatorname{code}(\{V_{1},\ldots,V_{n}\},X)=\mathscr{C}. ∎

In dimension two, every convex code admits a realization with convex polytopes [bukh2022planar]. Thus, in dimension two, we can strengthen Theorem 2 as follows:

Corollary 3.4.

A code 𝒞\mathscr{C} including the empty codeword is open convex with minimal embedding dimension two if and only if there exists a representable affine oriented matroid (,g)(\mathcal{M},g) of rank three such that 𝒞Tk𝖫+()(g)\mathscr{C}\leq\operatorname{Tk}_{\mathsf{L}^{+}(\mathcal{M})}(g).

Proof.

First suppose 𝒞\mathscr{C} is a planar convex code. By intersecting each of the convex sets with the same sufficiently large ball, we obtain a realization of 𝒞\mathscr{C} by bounded convex sets. Then by Theorem 1 of [bukh2022planar], 𝒞\mathscr{C} has a realization with interiors of convex polygons in 2\mathbb{R}^{2}. These convex polygons are intersections of half-spaces. Let (,g)(\mathcal{M},g) be the affine oriented matroid of the corresponding affine, oriented hyperplane arrangement. Notice that \mathcal{M} is representable and rank three, since it arises from the centralization of a hyperplane arrangement in 2\mathbb{R}^{2}. The covectors in the affine space of (,g)(\mathcal{M},g) each contain gg in their positive part. Then by the argument used in the proof of Theorem 2, 𝒞Tk𝖫+()(g)\mathscr{C}\leq\operatorname{Tk}_{\mathsf{L}^{+}(\mathcal{M})}(g).

Now suppose that 𝒞Tk𝖫+()(g)\mathscr{C}\leq\operatorname{Tk}_{\mathsf{L}^{+}(\mathcal{M})}(g), where (,g)(\mathcal{M},g) is a representable affine oriented matroid of rank two. Then by Theorem 2, 𝒞\mathscr{C} has a realization with intersections of half spaces in 2\mathbb{R}^{2}, and is thus convex with minimal embedding dimension two. ∎

4. Non-convex codes

In dimensions three or higher, it is unknown whether every convex code has a realization with convex polytopes. However, the contrapositive to Theorem 2 still helps us characterize non-convex codes. If 𝒞\mathscr{C} is not convex, one of two possibilities hold: either 𝒞\mathscr{C} does not lie below any oriented matroid, or 𝒞\mathscr{C} lies below only non-representable oriented matroids in 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}}. In this section, we prove that codes with local obstructions as well as “sunflower codes” do not lie below any oriented matroids. We also construct a new class of non-convex codes which lie below non-representable oriented matroids.

4.1. Sunflower codes do not lie below oriented matroids

The first example of a non-convex code with no local obstructions,

𝒞={,123,13,134,14,145,23,2345,3,34,4,45},\mathscr{C}=\{\varnothing,123,13,134,14,145,23,2345,3,34,4,45\},

appeared in [lienkaemper2017obstructions]. In [jeffs2019morphisms], Jeffs uses this code to construct a smaller non-convex code 𝒞2𝒞\mathscr{C}_{2}\leq\mathscr{C} with no local obstructions,

𝒞2={,1236,13,135,23,234,4,456,5,6}.\mathscr{C}_{2}=\{\varnothing,1236,13,135,23,234,4,456,5,6\}.

This code is minimally non-convex, in the sense that any code 𝒞<𝒞2\mathscr{C}^{\prime}<\mathscr{C}_{2} in 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}} is convex. The proofs that 𝒞\mathscr{C} and 𝒞2\mathscr{C}_{2} are not convex depend on the n=3n=3 case of the following theorem:

Theorem 4.1 ([jeffs2019sunflowers], Theorem 1.1).

Let U1,,UnU_{1},\ldots,U_{n} be convex open sets in n1\mathbb{R}^{n-1} such that for all i,j[n]i,j\in[n], UiUj=k[n]UkU_{i}\cap U_{j}=\bigcap_{k\in[n]}U_{k}. Then any hyperplane which passes through each of U1,,UnU_{1},\ldots,U_{n} passes through k[n]Uk\bigcap_{k\in[n]}U_{k}.

Jeffs uses this theorem to construct an infinite family {𝒞n}n2\{\mathscr{C}_{n}\}_{n\geq 2} of minimally non-convex codes with no local obstructions generalizing 𝒞2\mathscr{C}_{2}; we refer to these as “sunflower codes.” In the rest of this subsection, we define the code 𝒞n\mathscr{C}_{n} for n2n\geq 2 and give a proof that for all n2n\geq 2, the code 𝒞n\mathscr{C}_{n} does not lie below any oriented matroid, representable or otherwise.

Definition 4.2 ([jeffs2019sunflowers], Definition 4.1).

Let n2n\geq 2, P={p1,,pn+1}P=\{p_{1},\ldots,p_{n+1}\} and S={s1,,sn+1}S=\{s_{1},\ldots,s_{n+1}\} be sets of size n+1n+1. Denote by 𝒞n2PS\mathscr{C}_{n}\subseteq 2^{P\cup S} the code that consists of the following codewords:

  • \varnothing;

  • S{pn+1}S\cup\{p_{n+1}\};

  • PP;

  • the codeword X{sn+1}X\cup\{s_{n+1}\} for each X{s1,,sn}\varnothing\subsetneq X\subsetneq\{s_{1},\dots,s_{n}\};

  • the codewords {pi}\{p_{i}\} for each 1in+11\leq i\leq n+1;

  • and (S{si}){pi}(S\setminus\{s_{i}\})\cup\{p_{i}\} for each 1in1\leq i\leq n.

We will refer to the regions indexed by PP as petals, and the regions indexed by SS as simplices.

Refer to caption
Figure 4. A good cover realization of 𝒞2={,23,13,4,5,6,234,135,1236,456}.\mathscr{C}_{2}~{}=~{}\{\varnothing,23,13,4,5,6,234,135,1236,456\}. Here P={1,2,3}P=\{1,2,3\} and S={4,5,6}S=\{4,5,6\}.

The proof of 2 depends on some basic facts about tope graphs of oriented matroids. The tope graph 𝒯\mathcal{T} of an oriented matroid \mathcal{M} is a graph whose vertices are the topes of \mathcal{M}, and whose edges connect pairs of topes which differ by one sign. A subgraph 𝒬𝒯\mathcal{Q}\subseteq\mathcal{T} is called TT-convex if it contains the shortest path between any two of its members. Any eEe\in E divides the tope graph into two half-spaces 𝒯e+={W𝒲eW+}\mathcal{T}_{e}^{+}=\{W\in\mathcal{W}\mid e\in W^{+}\} and 𝒯e={W𝒲eW}\mathcal{T}_{e}^{-}=\{W\in\mathcal{W}\mid e\in W^{-}\}. A subgraph 𝒬𝒯\mathcal{Q}\subseteq\mathcal{T} is TT-convex if and only if it is an intersection of half-spaces [bjorner1999oriented, Proposition 4.2.6].

Theorem 3.

For each n2n\geq 2, the code 𝒞n𝖫+\mathscr{C}_{n}\not\leq\mathsf{L}^{+}\mathcal{M} for any oriented matroid \mathcal{M}.

Proof.

Fix n2n\geq 2. Suppose to the contrary that there is an oriented matroid \mathcal{M} such that 𝒞n𝖫+\mathscr{C}_{n}\leq\mathsf{L}^{+}\mathcal{M}. For ease of notation, let \mathscr{M} denote the code 𝖫+\mathsf{L}^{+}\mathcal{M}. Since 𝒞n\varnothing\in\mathscr{C}_{n}, we can assume without loss of generality that 𝒞n=f()\mathscr{C}_{n}=f(\mathscr{M}) for some code morphism ff.

Denote the ground set of \mathcal{M} by EE. The map ff must be defined by trunks

Tk(π1),,Tk(πn+1),Tk(σ1),,Tk(σn+1),\operatorname{Tk}_{\mathscr{M}}(\pi_{1}),\dots,\operatorname{Tk}_{\mathscr{M}}(\pi_{n+1}),\operatorname{Tk}_{\mathscr{M}}(\sigma_{1}),\ldots,\operatorname{Tk}_{\mathscr{M}}(\sigma_{n+1}),

with πi,σiE\pi_{i},\sigma_{i}\subseteq E corresponding to pip_{i} and sis_{i} respectively.

Claim 1: There is a tope TT of \mathcal{M} such that (i=1n+1σi)(j=1nπj)πn+1T+\left(\bigcup_{i=1}^{n+1}\sigma_{i}\right)\cup\left(\bigcap_{j=1}^{n}\pi_{j}\right)\cup\pi_{n+1}\subseteq T^{+}.
Roughly speaking, we are producing a codeword in the intersection of the last petal and all simplices, which also lies in the convex hull of the other petals.

Define a morphism g:2[n+1]g:\mathscr{M}\to 2^{[n+1]} by the trunks Ti=Tk(τi)T_{i}=\operatorname{Tk}_{\mathscr{M}}(\tau_{i}), with τi=σi(j=1nπj)\tau_{i}=\sigma_{i}\cup\left(\,\,\bigcap_{j=1}^{n}{\pi_{j}}\,\right) for i=1,,n+1i=1,\ldots,n+1. Let 𝒟=g()\mathscr{D}=g(\mathscr{M}).

Since (S{si}){pi}𝒞n(S\setminus\{s_{i}\})\cup\{p_{i}\}\in\mathscr{C}_{n} for each i[n]i\in[n], we deduce that [n+1]i[n+1]\setminus i is a codeword of 𝒟\mathscr{D} for each i[n]i\in[n]. Thus, link{n+1}(Δ(𝒟))\operatorname{link}_{\{n+1\}}(\Delta(\mathscr{D})) is either a hollow (n1)(n-1)-simplex or a solid (n1)(n-1)- simplex. Since we have defined 𝒟\mathscr{D} as the image of an oriented matroid code, it cannot have local obstructions. The codeword {n+1}\{n+1\} is not in 𝒟\mathscr{D}; if it were, then f(g1({n+1}))f(g^{-1}(\{n+1\})) would contain a codeword of 𝒞\mathscr{C} including sn+1s_{n+1} without any other sis_{i}. No such codeword exists in 𝒞\mathscr{C}. Thus link{n+1}(Δ(𝒟))\operatorname{link}_{\{n+1\}}(\Delta(\mathscr{D})) must be contractible and so must be a solid (n1)(n-1)-simplex; therefore, [n+1][n+1] is a codeword of 𝒟\mathscr{D}.

Based on the trunks defining gg, we know that (i=1n+1σi)(j=1nπj)c\left(\bigcup_{i=1}^{n+1}\sigma_{i}\right)\cup\left(\bigcap_{j=1}^{n}\pi_{j}\right)\subseteq c for any codeword cg1([n+1])c\in g^{-1}([n+1]). By definition of ff, we must also have ScS\subseteq c for any codeword cf(g1([n+1]))c\in f(g^{-1}([n+1])); however, the only codeword of 𝒞n\mathscr{C}_{n} which contains SS is S{pn+1}S\cup\{p_{n+1}\}. Thus, there is a codeword of \mathscr{M} containing (i=1n+1σi)(j=1nπj)πn+1\left(\bigcup_{i=1}^{n+1}\sigma_{i}\right)\cup\left(\bigcap_{j=1}^{n}\pi_{j}\right)\cup\pi_{n+1}. This implies that \mathcal{M} has a covector XX such that (i=1n+1σi)(j=1nπj)πn+1X+\left(\bigcup_{i=1}^{n+1}\sigma_{i}\right)\cup\left(\bigcap_{j=1}^{n}\pi_{j}\right)\cup\pi_{n+1}\subseteq X^{+}. To produce a tope satisfying the condition, take T=XWT=X\circ W for any tope WW of \mathcal{M}.

Claim 2: πn+1(j=1nπj)T+\pi_{n+1}\cup\left(\,\,\bigcap_{j=1}^{n}\,\pi_{j}\right)\subseteq T^{+} implies j=1n+1πjT+\,\,\bigcup_{j=1}^{n+1}\,\pi_{j}\subseteq T^{+} for any tope TT of \mathcal{M}.
The intuition here is that the last petal must intersect the convex hull of the other petals only in the common intersection of all petals.

Refer to caption
Figure 5. Any path from a tope UU with (j=1n+1πj)U+\left(\bigcup_{j=1}^{n+1}\,\pi_{j}\right)\subseteq U^{+} to a tope VV with (j=1n+1πj)V+\left(\bigcup_{j=1}^{n+1}\,\pi_{j}\right)\not\subseteq V^{+} must cross an edge in (j=1n+1πj)\left(\bigcap_{j=1}^{n+1}\,\pi_{j}\right). Analogously, a path from a point in the atom P={p1,p2,,pn}P=\{p_{1},p_{2},\ldots,p_{n}\} to the atom {pn+1}\{p_{n+1}\} must cross the boundaries of p1,p2,,pnp_{1},p_{2},\ldots,p_{n} all at one time.

Let UU be a tope with (j=1n+1πj)U+\left(\bigcup_{j=1}^{n+1}\,\pi_{j}\right)\subseteq U^{+}. Such a tope must exist, since P𝒞nP\in\mathscr{C}_{n}. Suppose for the sake of contradiction that there exists a tope VV such that

πn+1(j=1nπj)V+, but j=1n+1πjV+.\pi_{n+1}\cup\left(\,\,\bigcap_{j=1}^{n}\,\pi_{j}\right)\subseteq V^{+},\text{ but }\bigcup_{j=1}^{n+1}\,\pi_{j}\not\subseteq V^{+}.

Consider a shortest path from UU to VV in the tope graph of \mathcal{M}. Each edge of the tope graph is naturally labeled by the ground set element ee by which the two incident topes differ. By the TT-convexity of intersections of half-spaces in the tope graph, each tope along this path has πn+1(j=1nπj)\pi_{n+1}\cup\left(\,\bigcap_{j=1}^{n}\,\pi_{j}\right) in its positive part, so no edge is labeled with an element of j=1nπj\bigcap_{j=1}^{n}\,\pi_{j}.

Thus at some point along the path from UU to VV, we must cross an edge (T,W)(T,W) labeled by a ground set element e(j=1n+1πj)(j=1n+1πj)e\in\left(\,\,\bigcup_{j=1}^{n+1}\,\pi_{j}\right)\setminus\left(\,\,\bigcap_{j=1}^{n+1}\,\pi_{j}\right). Choose the first such edge (T,W)(T,W) labeled with ground set element ee. By our choice of ee, there exist k,[n]k,\ell\in[n] such that eπke\in\pi_{k}, and eπe\notin\pi_{\ell}. This means πkW+\pi_{k}\not\subseteq W^{+}, whereas πW+\pi_{\ell}\subseteq W^{+}. Then {p,pn+1}f(W+)\{p_{\ell},p_{n+1}\}\subseteq f(W^{+}), but f(W+)Pf(W^{+})\neq P. However, the only codeword of 𝒞n\mathscr{C}_{n} containing {p,pn+1}\{p_{\ell},p_{n+1}\} is PP, so we have reached a contradiction. Therefore, no such tope VV may exist.

By Claim 1, \mathcal{M} must have a tope TT which has (i=1n+1σi)(j=1nπj)πn+1T+\left(\bigcup_{i=1}^{n+1}\sigma_{i}\right)\cup\left(\bigcap_{j=1}^{n}\pi_{j}\right)\cup\pi_{n+1}\subseteq T^{+}. Because TT satisfies (i=1n+1πi)πn+1T+\left(\bigcap_{i=1}^{n+1}\pi_{i}\right)\cup\pi_{n+1}\subseteq T^{+}, Claim 2 implies that i=1n+1πiT+\bigcup_{i=1}^{n+1}\pi_{i}\subseteq T^{+}. Therefore, (i=1n+1πi)(i=1n+1σi)T+\left(\bigcup_{i=1}^{n+1}\pi_{i}\right)\cup\left(\bigcup_{i=1}^{n+1}\sigma_{i}\right)\subseteq T^{+}, but this implies f(T)=PS𝒞nf(T)=P\cup S\in\mathscr{C}_{n}, a contradiction. ∎

By showing that the family of codes {𝒞n}n2\{\mathscr{C}_{n}\}_{n\geq 2} do not lie below oriented matroids, we have given an alternate proof that these codes do not have realizations with interiors of convex polytopes. This proof is significantly different in structure than the original proof that these codes are not convex using 4.1, which is in turn proved by induction on dimension. In contrast, our proof makes no reference to rank or dimension, and does not use induction. While the codes {𝒞n}n2\{\mathscr{C}_{n}\}_{n\geq 2} are not open convex, they do have realizations with closed convex sets, which can even be chosen to be (non-full dimensional) closed convex polytopes. Notice that 2 establishes that if 𝒞\mathscr{C} has a realization with interiors of convex polytopes, then 𝒞𝖫+\mathscr{C}\leq\mathsf{L}^{+}\mathcal{M}. However, the fact that a code has a realization with closed convex polytopes does not guarantee this. Further, in showing that these codes do not lie below any oriented matroids at all, we have established that, even while these codes are good cover codes, their obstructions to convexity are somehow still topological in nature.

4.2. Representability and convexity

Having exhibited that many well-known non-convex codes do not lie below any oriented matroids at all, we now exhibit a family of non-convex codes which lie below non-representable oriented matroids. For each uniform, rank 3 affine oriented matroid (,g)(\mathcal{M},g), we construct a code 𝒞(,g)\mathscr{C}(\mathcal{M},g) which is convex if and only if \mathcal{M} is representable (recall a uniform oriented matroid is one in which all circuits have the same cardinality). Moreover, this code is always the image of an oriented matroid under a code morphism.

Consider a uniform, affine oriented matroid (,g)(\mathcal{M},g) of rank 3. A pseudoline is a simple curve LL in 2\mathbb{R}^{2}, unbounded in both directions, which partitions the plane into unbounded pieces 2=L+LL\mathbb{R}^{2}=L^{+}\sqcup L\sqcup L^{-}. By the topological representation theorem ([bjorner1999oriented, Section 1.3],[folkman1978oriented]), (,g)(\mathcal{M},g) can be represented by a uniform arrangement of piecewise linear pseudolines, that is, a family 𝒫={Li}i[n]\mathcal{P}=\{L_{i}\}_{i\in[n]} of pseudolines such that each pair intersects exactly once and no more than two meet at any point. The sign vectors of this arrangement are the covectors of (,g)(\mathcal{M},g). An example is illustrated in Figure 6(a).

Note that the oriented matroid of a pseudoline arrangement is completely determined by the order in which each line meets all of the other lines. We can record this information as follows: Let L1,,LnL_{1},\ldots,L_{n} be a pseudoline arrangement. For each pseudoline, fix one end of the pseudoline as the “head”. Let πi(j)\pi_{i}(j) denote the index kk such that LjL_{j} is the kk-th pseudoline we encounter as we follow LiL_{i} from the head to the tail.

We use this order to define a code 𝒞(,g)\mathscr{C}(\mathcal{M},g). We then use the concept of order-forcing introduced in [jeffs2020order] to prove that the code 𝒞(,g)\mathscr{C}(\mathcal{M},g) is convex if and only if \mathcal{M} is representable. Order-forcing depends on feasible walks in the codeword containment graph.

Definition 4.3.

Let 𝒞2[n]\mathscr{C}\subseteq 2^{[n]} be a neural code. The codeword containment graph of 𝒞\mathscr{C} is the graph G𝒞G_{\mathscr{C}} whose vertices are codewords of 𝒞\mathscr{C}, with edges {σ,τ}\{\sigma,\tau\} when either στ\sigma\subsetneq\tau or τσ\tau\subsetneq\sigma. A σ,τ\sigma,\tau walk σ=v1,v2,,vk=τ\sigma=v_{1},v_{2},...,v_{k}=\tau in G𝒞G_{\mathscr{C}} is called feasible if vivjvmv_{i}\cap v_{j}\subseteq v_{m} for all 1i<m<jk1\leq i<m<j\leq k. A sequence of codewords σ1,,σk\sigma_{1},...,\sigma_{k} is order-forced if every feasible σ1,σk\sigma_{1},\sigma_{k} walk contains that sequence as a subsequence.

Order forcing constrains the realizations of a code by forcing certain sequences of codewords to correspond to straight-line paths in all convex realizations. In any realization of a code, the atom corresponding to codeword σ\sigma is the region Aσ=iσUijσUjA_{\sigma}=\bigcap_{i\in\sigma}U_{i}\setminus\bigcup_{j\notin\sigma}U_{j}.

Theorem 4.4 ([jeffs2020order], Theorem 1.1).

Let σ1,σ2,,σk\sigma_{1},\sigma_{2},\ldots,\sigma_{k} be an order-forced sequence of codewords in a code 𝒞2[n]\mathscr{C}\subseteq 2^{[n]}. Let 𝒰={U1,,Un}\mathcal{U}=\{U_{1},\ldots,U_{n}\} be a (closed or open) convex realization of 𝒞\mathscr{C}, and let xAσ1x\in A_{\sigma_{1}} and yAσky\in A_{\sigma_{k}}. Then the line segment xy¯\overline{xy} must pass through the atoms of σ1,σ2,,σk\sigma_{1},\sigma_{2},\ldots,\sigma_{k}, in this order.

Now, we construct the code 𝒞(,g)\mathscr{C}(\mathcal{M},g) so that a sequence of codewords along each pseudoline is order-forced.

Definition 4.5.

Let (,g)(\mathcal{M},g) be a uniform, affine oriented matroid of rank 3 with pseudoline arrangement L1,,LnL_{1},\ldots,L_{n}. Without loss of generality, assume we have labeled pseudolines L1,,LnL_{1},\ldots,L_{n}, with their heads in clockwise order around the outside of the plane. An example is illustrated in Figure 6 (a).

𝒞(,g)\mathscr{C}(\mathcal{M},g) is a code on n+2+n2+2n=(n+1)(n+2)n+2+n^{2}+2n=(n+1)(n+2) neurons, labeled:

a1,,ana_{1},\ldots,a_{n}: Strips corresponding to each pseudoline of \mathcal{M}.
b,brb_{\ell},b_{r}: Strips corresponding to two new “boundary” pseudolines whose positive quadrant includes all pseudoline intersections.
ci,jc_{i,j} for all i,j[n]i,j\in[n]: nn neurons along each aia_{i} to apply order-forcing.
ds,id_{s,i} for all s{,r},i[n]s\in\{\ell,r\},i\in[n]: nn neurons along brb_{r} and bb_{\ell} to apply order-forcing.

The codewords of 𝒞(,g)\mathscr{C}(\mathcal{M},g) are as follows:

bbrd,1dr,1b_{\ell}b_{r}d_{\ell,1}d_{r,1}: Intersection of the two boundary strips.
bsds,jb_{s}d_{s,j}: Order-forcing along each boundary strip
(s=,rs=\ell,r, j=1,,nj=1,\ldots,n.)
braidr,idr,i+1ci,1b_{r}a_{i}d_{r,i}d_{r,i+1}c_{i,1}: Intersection of each pseudoline with right boundary strip, with order-forcing neurons. (i=1,,n1i=1,\ldots,n-1)
brandr,ncn,1b_{r}a_{n}d_{r,n}c_{n,1}: Intersection of final pseudoline with right boundary strip (one less order-forcing neuron is required.)
ban+1id,id,i+1cn+1i,nb_{\ell}a_{n+1-i}d_{\ell,i}d_{\ell,i+1}c_{n+1-i,n}: Intersection of each pseudoline with left boundary strip plus order-forcing neurons. (i=1,,n1i=1,\ldots,n-1.)
ba1d,nc1,nb_{\ell}a_{1}d_{\ell,n}c_{1,n}: Intersection of first pseudoline with left boundary strip.
aici,ja_{i}c_{i,j}: Order-forcing along each pseudoline
(i=1,,ni=1,\ldots,n, j=1,,nj=1,\ldots,n)
aiajci,πi(j)ci,πi(j)+1a_{i}a_{j}c_{i,\pi_{i}(j)}c_{i,\pi_{i}(j)+1} Pairwise intersections of pseudolines plus order-forcing
cj,πj(i)cj,πj(i)+1c_{j,\pi_{j}(i)}c_{j,\pi_{j}(i)+1}: (i=1,,ni=1,\ldots,n, j=1,,n1j=1,\ldots,n-1.)

We include an example of a good cover realization of this code in Figure 6(b).

Refer to caption
Figure 6. (a) A pseudoline arrangement for the oriented matroid \mathcal{M}. (b) A good-cover realization of the code 𝒞(,g)\mathscr{C}(\mathcal{M},g). Left, representative open sets are shown. Right, select codewords are labeled. (c) A pseudoline arrangement for ^\widehat{\mathcal{M}}.
Proposition 4.6.

For any uniform, rank 3 affine oriented matroid (,g)(\mathcal{M},g), there exists a rank 3 oriented matroid ^\widehat{\mathcal{M}} such that 𝒞(,g)𝖫+^\mathscr{C}(\mathcal{M},g)\leq\mathsf{L}^{+}\widehat{\mathcal{M}}.

Proof.

We describe the pseudoline arrangement associated to ^\widehat{\mathcal{M}}. Fix a piecewise-linear pseudoline arrangement L1,,LnL_{1},\ldots,L_{n} representing (,g)(\mathcal{M},g) consistent with the labeling in 𝒞(,g)\mathscr{C}(\mathcal{M},g). Let BrB_{r} be a line which meets L1,L2,,LnL_{1},L_{2},\ldots,L_{n} in the clockwise order consistent with the labeling. Let BB_{\ell} be a line which meets BrB_{r} and then Ln,Ln1,,L1L_{n},L_{n-1},\ldots,L_{1} in the opposite of this clockwise order. Orient BrB_{r} and BB_{\ell} such that Br+B_{r}^{+} and B+B_{\ell}^{+} are the half-spaces containing all bounded cells of the pseudoline arrangement. Orient each LiL_{i} such that BrBB_{r}\cap B_{\ell} lies in LiL_{i}^{-}.

Now, for each i[n]i\in[n], we define a pseudoline LiL_{i}^{\prime} which acts as a translation of LiL_{i} into its positive half-space. That is, we let LiL_{i}^{\prime} be a pseudoline which intersects B,BrB_{\ell},B_{r}, and each Lj,jiL_{j},j\neq i in the same order as LiL_{i}, and such that for each other pseudoline LL, the intersections of LiL_{i} and LiL_{i}^{\prime} are adjacent along LL. Further, we ensure that Li,LiL_{i},L_{i}^{\prime} do not intersect. Orient LiL_{i}^{\prime} so that LiLi+L_{i}\subseteq L_{i}^{\prime+}. Define B,BrB_{\ell}^{\prime},B_{r}^{\prime} and orient them analogously. This pseduoline arrangement is illustrated in Figure 6(c).

Finally, we produce an oriented matroid ^\widehat{\mathcal{M}} from this pseudoline arrangement by fixing a ground set element hh such that the set of covectors of the pseudoline arrangement is the affine space of (^,h)(\widehat{\mathcal{M}},h). We claim the oriented matroid of this arrangement, ^\widehat{\mathcal{M}}, lies above 𝒞(,g)\mathscr{C}(\mathcal{M},g). The morphism ff such that f(Tk𝖫+^(h))=𝒞(,g)f(\operatorname{Tk}_{\mathsf{L}^{+}\widehat{\mathcal{M}}}(h))=\mathscr{C}(\mathcal{M},g) is defined by the the trunks

{Tai}i=1,,n{Tbr,Tb}{Tci,j}i=1,,n,j=1,,n{Tds,j}s=r,,j=1,,n.\displaystyle\{T_{a_{i}}\}_{i=1,\ldots,n}\cup\{T_{b_{r}},T_{b_{\ell}}\}\cup\{T_{c_{i,j}}\}_{i=1,\ldots,n,j=1,\ldots,n}\cup\{T_{d_{s,j}}\}_{s=r,\ell,j=1,\ldots,n}.

corresponding to the neurons of 𝒞(,g)\mathscr{C}(\mathcal{M},g). We let i,ii,i^{\prime} (for each i[n]i\in[n]), r,r,,r,r^{\prime},\ell, and \ell^{\prime} be the ground set elements corresponding to Li,Li,Br,Br,B,L_{i},L_{i}^{\prime},B_{r},B_{r}^{\prime},B_{\ell}, and BB_{\ell}^{\prime} respectively. These trunks are defined as follows:

Tai\displaystyle T_{a_{i}} :=Tk({i,i,r,}) for i=1,,n\displaystyle:=\operatorname{Tk}(\{i,i^{\prime},r,\ell\})\mbox{ for }i=1,\ldots,n
Tbr\displaystyle T_{b_{r}} :=Tk({r,r,,n})\displaystyle:=\operatorname{Tk}(\{r,r^{\prime},\ell,n^{\prime}\})
Tb\displaystyle T_{b_{\ell}} :=Tk({,,r,1})\displaystyle:=\operatorname{Tk}(\{\ell,\ell^{\prime},r,1^{\prime}\})
Tdr,1\displaystyle T_{d_{r,1}} :=Tk({r,r,,1})\displaystyle:=\operatorname{Tk}(\{r,r^{\prime},\ell,1^{\prime}\})
Tdr,i\displaystyle T_{d_{r,i}} :=Tk({r,r,i1,i}) for i=2,,n\displaystyle:=\operatorname{Tk}(\{r,r^{\prime},{i-1},{i}^{\prime}\})\mbox{ for }i=2,\ldots,n
Td,1\displaystyle T_{d_{\ell,1}} :=Tk({,,r,n})\displaystyle:=\operatorname{Tk}(\{\ell,\ell^{\prime},r,n^{\prime}\})
Td,i\displaystyle T_{d_{\ell,i}} :=Tk({,,ni+2,ni+1}) for i=2,,n.\displaystyle:=\operatorname{Tk}(\{\ell,\ell^{\prime},{n-i+2},{n-i+1}^{\prime}\})\mbox{ for }i=2,\ldots,n.

In order to define Tci,jT_{c_{i,j}}, we introduce some notation. Let

right(i,j)={j if j<ij if j>ileft(i,j)={j if j<ij if j>i.\displaystyle\mathrm{right}(i,j)=\begin{cases}j\mbox{ if }j<i\\ j^{\prime}\mbox{ if }j>i\end{cases}\qquad\mathrm{left}(i,j)=\begin{cases}j^{\prime}\mbox{ if }j<i\\ j\mbox{ if }j>i\\ \end{cases}.

That is, right(i,j)\mathrm{right}(i,j) is whichever of j,jj,j^{\prime} the pseudoline LiL_{i} meets first as we follow it from its intersection with BrB_{r} to its intersection with BB_{\ell}, and left(i,j)\mathrm{left}(i,j) is whichever it hits second. Now, we define

Tci,1\displaystyle T_{c_{i,1}} :=Tk({i,i,r,left(i,πi(1))}) for i=1,,n.\displaystyle:=\operatorname{Tk}(\{i,i^{\prime},r,\mathrm{left}(i,\pi_{i}(1))\})\mbox{ for }i=1,\ldots,n.
Tci,j\displaystyle T_{c_{i,j}} :=Tk({i,i,right(i,πi(j1)),left(i,πi(j))}) for i=1,,n,j=2,,n1.\displaystyle:=\operatorname{Tk}(\{i,i^{\prime},\mathrm{right}(i,\pi_{i}(j-1)),\mathrm{left}(i,\pi_{i}(j))\})\mbox{ for }i=1,\ldots,n,\>j=2,\ldots,n-1.
Tci,n\displaystyle T_{c_{i,n}} :=Tk({i,i,right(i,πi(n1)),}) for i=1,,n,j=2,,n1.\displaystyle:=\operatorname{Tk}(\{i,i^{\prime},\mathrm{right}(i,\pi_{i}(n-1)),\ell\})\mbox{ for }i=1,\ldots,n,\>j=2,\ldots,n-1.

Finally, we verify that the map f(σ)={sσTs}f(\sigma)=\{s\mid\sigma\in T_{s}\} has image 𝒞(,g)\mathscr{C}(\mathcal{M},g). Each TsT_{s} specifies the open set UsU_{s} given by the intersection of the open half-spaces indexed by ss. By construction, the {Us}\{U_{s}\} give rise to a good cover realization of 𝒞(,g)\mathscr{C}(\mathcal{M},g).

Theorem 4.

Let =(E,)\mathcal{M}=(E,\mathcal{L}) be a uniform, rank 3 oriented matroid. Then for gEg\in E, the code 𝒞(,g)\mathscr{C}(\mathcal{M},g) is convex if and only if \mathcal{M} is representable.

Proof.

First, we show that if \mathcal{M} is representable, 𝒞(,g)\mathscr{C}(\mathcal{M},g) is convex. Note that by Proposition 4.6, we have that 𝒞(,g)𝖫+^\mathscr{C}(\mathcal{M},g)\leq\mathsf{L}^{+}\widehat{\mathcal{M}}. Also note that by construction, if \mathcal{M} is representable, then so is ^\widehat{\mathcal{M}}. Therefore, by Theorem 2, if \mathcal{M} is representable, 𝒞(,g)\mathscr{C}(\mathcal{M},g) is convex.

Next, we show that if 𝒞(,g)\mathscr{C}(\mathcal{M},g) is convex, then \mathcal{M} is representable. Note that the following sequences are order-forced in 𝒞(,g)\mathscr{C}(\mathcal{M},g).

  1. (1)

    The only feasible path from brbdr,1d,1b_{r}b_{\ell}d_{r,1}d_{\ell,1} to brandr,nb_{r}a_{n}d_{r,n} in G𝒞(,g)G_{\mathscr{C}(\mathcal{M},g)} is

    brbdr,1d1brdr,1bra1dr,1dr,2brdr,2brdr,nbrandr,n\displaystyle b_{r}b_{\ell}d_{r,1}d_{\ell 1}\leftrightarrow b_{r}d_{r,1}\leftrightarrow b_{r}a_{1}d_{r,1}d_{r,2}\leftrightarrow b_{r}d_{r,2}\leftrightarrow\cdots\leftrightarrow b_{r}d_{r,n}\leftrightarrow b_{r}a_{n}d_{r,n}
  2. (2)

    The only feasible path from brbdr,1d,1b_{r}b_{\ell}d_{r,1}d_{\ell,1} to ba1d,nb_{\ell}a_{1}d_{\ell,n} in G𝒞(,g)G_{\mathscr{C}(\mathcal{M},g)} is

    brbdr,1d,1bd,1band,1d,2brd,2bd,nba1d,n\displaystyle b_{r}b_{\ell}d_{r,1}d_{\ell,1}\leftrightarrow b_{\ell}d_{\ell,1}\leftrightarrow b_{\ell}a_{n}d_{\ell,1}d_{\ell,2}\leftrightarrow b_{r}d_{\ell,2}\leftrightarrow\cdots\leftrightarrow b_{\ell}d_{\ell,n}\leftrightarrow b_{\ell}a_{1}d_{\ell,n}
  3. (3)

    For each ii, the only feasible path from braici,1dr,idr,i+1b_{r}a_{i}c_{i,1}d_{r,i}d_{r,i+1} to aibci,nd,(ni+1)a_{i}b_{\ell}c_{i,n}d_{\ell,(n-i+1)} in G𝒞(,g)G_{\mathscr{C}(\mathcal{M},g)} is

    braici,1dr,idr,i+1\displaystyle b_{r}a_{i}c_{i,1}d_{r,i}d_{r,i+1} aici,1aiaπi1(1)ci,1ci,2cπi1(1),ππi1(1)(i)cπi1(1),ππi1(1)(i)+1aici,2\displaystyle\leftrightarrow a_{i}c_{i,1}\leftrightarrow a_{i}a_{\pi^{-1}_{i}(1)}c_{i,1}c_{i,2}c_{\pi^{-1}_{i}(1),\pi_{\pi^{-1}_{i}(1)}(i)}c_{\pi^{-1}_{i}(1),\pi_{\pi^{-1}_{i}(1)}(i)+1}\leftrightarrow a_{i}c_{i,2}\leftrightarrow
    \displaystyle\cdots aici,(n1)aiaπi1(n1)ci,(n1)ci,ncπi1((n1)),ππi1(n1)(i)cπi1(1),ππi1(n1)(i)+1\displaystyle\leftrightarrow a_{i}c_{i,(n-1)}\leftrightarrow a_{i}a_{\pi^{-1}_{i}(n-1)}c_{i,(n-1)}c_{i,n}c_{\pi^{-1}_{i}((n-1)),\pi_{\pi^{-1}_{i}(n-1)}(i)}c_{\pi^{-1}_{i}(1),\pi_{\pi^{-1}_{i}(n-1)}(i)+1}\leftrightarrow
    \displaystyle\cdots aici,naibci,nd,(ni+1)\displaystyle\leftrightarrow a_{i}c_{i,n}\leftrightarrow a_{i}b_{\ell}c_{i,n}d_{\ell,(n-i+1)}

We claim if 𝒞(,g)\mathscr{C}(\mathcal{M},g) is convex, then it has a realization in the plane. Suppose that 𝒞(,g)\mathscr{C}(\mathcal{M},g) is convex, and fix a realization 𝒰\mathcal{U} in d\mathbb{R}^{d}. Choose points p1,p2,p3p_{1},p_{2},p_{3} in the atoms Abrbdr,1d,1A_{b_{r}b_{\ell}d_{r,1}d_{\ell,1}}, Abrandr,nA_{b_{r}a_{n}d_{r,n}}, and Aba1d,nA_{b_{\ell}a_{1}d_{\ell,n}} respectively. We will show that each atom in this realization has a nonempty intersection with conv(p1,p2,p3)\operatorname{conv}(p_{1},p_{2},p_{3}). By order forcing (1), the line from p1p_{1} to p2p_{2} must pass through the atoms of all codewords containing brb_{r} in the listed order. Likewise, by order forcing (2), the line from p1p_{1} to p3p_{3} must pass through the atoms of all codewords containing bb_{\ell} in the listed order.

In particular, we have shown that for each ii, the atoms of σ=braidr,idr,(i+1)ci,1\sigma=b_{r}a_{i}d_{r,i}d_{r,(i+1)}c_{i,1} and τ=baid,(n+1i)d,(n+2i)ci,1\tau=b_{\ell}a_{i}d_{\ell,(n+1-i)}d_{\ell,(n+2-i)}c_{i,1} have a nonempty intersection with conv(p1,p2,p3)\operatorname{conv}(p_{1},p_{2},p_{3}). For each ii, pick a point qiconv(p1,p2,p3)Aσq_{i}\in\operatorname{conv}(p_{1},p_{2},p_{3})\cap A_{\sigma} and a point riconv(p1,p2,p3)Aτr_{i}\in\operatorname{conv}(p_{1},p_{2},p_{3})\cap A_{\tau}. Applying order forcing (3) for each ii, we have that the line from rir_{i} to qiq_{i} passes through the atoms of all codewords containing aia_{i}, in the listed order. This accounts for every codeword of 𝒞(,g)\mathscr{C}(\mathcal{M},g). Thus, intersecting the open sets in 𝒰\mathcal{U} with the plane aff(p1,p2,p3)\operatorname{aff}(p_{1},p_{2},p_{3}) produces a two-dimensional convex realization of 𝒞(,g)\mathscr{C}(\mathcal{M},g).

Now, we obtain a straight line arrangement for (,g)(\mathcal{M},g) in this plane by extending the line segment from qiq_{i} to rir_{i} to be a line. By uniformity of \mathcal{M} and our choice of bounding lines, every pair of pseudolines intersects in B+Br+B_{\ell}^{+}\cap B_{r}^{+} and so no new intersections are introduced. Notice that by order forcing (3), this line meets the sets Ua1,,UanU_{a_{1}},\ldots,U_{a_{n}} in the order consistent with the pseudoline arrangement. Thus, if this code is convex, \mathcal{M} is representable. ∎

Proposition 4 demonstrates that matroid representability and convex code realizability are intertwined. One consequence is that non-representable oriented matroids are a new source for constructing non-realizable codes:

Corollary 4.7.

There is an infinite family of non-convex codes which lie below oriented matroids in 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}}.

Proof.

There are infinitely many non-representable uniform oriented matroids of rank 3 [bjorner1999oriented, Proposition 8.3.1]. By Proposition 4, 𝒞(,g)\mathscr{C}(\mathcal{M},g) is non-convex for each of these. By Proposition 4.6, 𝒞(,g)𝖫+^\mathscr{C}(\mathcal{M},g)\leq\mathsf{L}^{+}\widehat{\mathcal{M}}. ∎

Example 4.8.

Let (,g)(\mathcal{M},g) be the uniform non-Pappus matroid from [shor1991stretchability], whose pseudoline arrangement appears in Figure 7. This matroid is non-representable, since a realization of it would violate Pappus’s hexagon theorem. Then 𝒞(,g)\mathscr{C}(\mathcal{M},g) is a non-convex code with no local obstructions.

Refer to caption
Figure 7. The pseudoline arrangement for the uniform non-Pappus matroid. The pairs of lines 23, 45, 78, 79, and 89 are taken to intersect outside of the figure.

.

4.3. The convex code decision problem is NP-hard

We now turn to the computational aspects of convex codes. Using the relationship between convex codes and representable oriented matroids (Theorem 3), we demonstrate the convex code decision problem is NP-hard and \exists\mathbb{R}-hard, though it remains open whether the convex code decision problem lies in either of these classes, or is even decidable. The complexity class \exists\mathbb{R}, read as the existential theory of the reals, is the class of decision problems of the form

(x1)(xn)P(x1,,xn),\exists(x_{1}\in\mathbb{R})\ldots\exists(x_{n}\in\mathbb{R})P(x_{1},\ldots,x_{n}),

where PP is a quantifier-free formula whose atomic formulas are polynomial equations, inequations, and inequalities in the xix_{i}. In other words, a problem in \exists\mathbb{R} defines a semialgebraic set over the real numbers and asks whether or not it contains any points [broglia2011lectures]. Many well known problems in computational geometry lie in \exists\mathbb{R}, including some problems very similar to determining whether a code is convex. For instance, determining whether a graph is the intersection graph of convex sets in the plane is \exists\mathbb{R} complete [schaefer2009complexity].

Theorem 3 implies the convex code decision problem is at least as difficult as deciding if an oriented matroid is representable. This decision problem is \exists\mathbb{R}-complete [mnev1988universality, shor1991stretchability, sturmfels1987decidability, richter1999universality]: given any decision problem in \exists\mathbb{R}, there is a polynomial time algorithm to produce an oriented matroid (presented in terms of covectors) which is realizable if and only if the decision problem has a positive answer. Therefore the convex code decision problem is \exists\mathbb{R}-hard.

Theorem 5.

Any problem in \exists\mathbb{R} can be reduced in polynomial time to the problem of determining whether a neural code is convex.

Proof.

By the Mnëv-Sturmfels universality theorem (see [mnev1988universality, sturmfels1987decidability, shor1991stretchability, bjorner1999oriented, richter1999universality]), determining whether a rank 3 uniform oriented matroid (presented in terms of covectors) is representable is complete for the existential theory of the reals. By Proposition 4, a rank 3 uniform oriented matroid \mathcal{M} is representable if and only if 𝒞(,g)\mathscr{C}(\mathcal{M},g) is a convex neural code. Further, the number of neurons in 𝒞(,g)\mathscr{C}(\mathcal{M},g) is quadratic in the size of the ground set of \mathcal{M}, and the number of codewords of 𝒞(,g)\mathscr{C}(\mathcal{M},g) is less than the number of covectors of \mathcal{M}. Finally, we can construct 𝒞(,g)\mathscr{C}(\mathcal{M},g) from the covectors of \mathcal{M} in polynomial time. Any problem in \exists\mathbb{R} can be reduced in polynomial time to deciding representability of a uniform oriented matroid and thus convexity of the corresponding code. ∎

Since any \exists\mathbb{R} complete problem is also NP\mathrm{NP}-hard, we have as a corollary that determining whether a code is convex is NP\mathrm{NP}-hard.

Corollary 4.9.

The problem of determining whether a code is convex is NP\mathrm{NP}-hard, where the problem size is measured in the number of codewords.

Notice that because we can perform this reduction of a problem in \exists\mathbb{R} to a neural code in polynomial time, this result holds even when we measure the problem size in terms of the number of codewords, which may be exponentially large in the number of neurons. Again, this NP hardness result is not surprising. For instance, it parallels the result that recognizing whether a simplicial complex is the nerve of convex sets in d\mathbb{R}^{d} is NP\mathrm{NP}-hard for d2d\geq 2 [tancer2010d].

5. Categories of codes, matroids, and rings

5.1. The Neural Ring

To set the stage for the functorial connections between combinatorial codes and oriented matroids, we begin with a brief discussion of the functor 𝖱:𝐂𝐨𝐝𝐞𝐍𝐑𝐢𝐧𝐠\mathsf{R}:\operatorname{\mathbf{Code}}\to\operatorname{\mathbf{NRing}} defined in [jeffs2019morphisms], and its relation to the combinatorial relations of a code, introduced in [curto2013neural]. Recall that the neural ring of a code 𝒞\mathscr{C} is R𝒞=𝔽2[x1,,xn]/I𝒞R_{\mathscr{C}}=\mathbb{F}_{2}[x_{1},\dots,x_{n}]/I_{\mathscr{C}}, where I𝒞I_{\mathscr{C}} is the vanishing ideal of 𝒞\mathscr{C} as a variety in 𝔽2n\mathbb{F}_{2}^{n}. This is the ring of 𝔽2\mathbb{F}_{2}-valued functions on 𝒞\mathscr{C} with distinguished coordinate functions x1,,xnx_{1},\dots,x_{n}, that is, xi(σ)=1x_{i}(\sigma)=1 iff iσi\in\sigma. The category 𝐍𝐑𝐢𝐧𝐠\operatorname{\mathbf{NRing}} is the category of neural rings together with monomial maps, ring homomorphisms ϕ:R𝒟R𝒞\phi:R_{\mathscr{D}}\to R_{\mathscr{C}} which map the coordinate functions of R𝒟R_{\mathscr{D}} either to products of coordinate functions in R𝒞R_{\mathscr{C}} or to 0. By restricting to this class of homomorphisms, the functor 𝖱\mathsf{R} which takes a code to its neural ring is a contravariant equivalence of categories [jeffs2019morphisms, Theorem 1.6]. For f:𝒞𝒟f:\mathscr{C}\to\mathscr{D} a morphism of codes defined by trunks Ti=Tk𝒞(σi)T_{i}=\operatorname{Tk}_{\mathscr{C}}(\sigma_{i}) for i[m]i\in[m], the ring homomorphism 𝖱f:R𝒟R𝒞\mathsf{R}f:R_{\mathscr{D}}\to R_{\mathscr{C}} sends the coordinate function xix_{i} in R𝒟R_{\mathscr{D}} to the product xσix^{\sigma_{i}} in R𝒞R_{\mathscr{C}}.

The pseudo-monomials in I𝒞I_{\mathscr{C}} provide a dual description of 𝒞\mathscr{C}. They record the dependencies among the elements of [n][n], or, equivalently, among the sets UiU_{i} in any realization of 𝒞\mathscr{C}. If 𝒞=code(𝒰,X)\mathscr{C}=\operatorname{code}(\mathcal{U},X), then [curto2013neural, Lemma 4.2] implies:

(1) xσ(1x)τI𝒞iσUijτUj.\displaystyle x^{\sigma}(1-x)^{\tau}\in I_{\mathscr{C}}\iff\bigcap_{i\in\sigma}U_{i}\subseteq\bigcup_{j\in\tau}U_{j}.

Containment relationships as in the right hand side of (1) are called the combinatorial relations of 𝒞\mathscr{C}. As a generating set for I𝒞I_{\mathscr{C}}, the minimal pseudo-monomials, i.e. the minimal combinatorial relations, are sufficient to recover the code 𝒞\mathscr{C}. The minimal proper pseudo-monomials in I𝒞I_{\mathscr{C}} are called the canonical form of 𝒞\mathscr{C} [curto2013neural]. The following lemma shows that the structure of a pseudo-monomial ideal encodes the weak elimination axiom (axiom (C4)) of oriented matroid circuits.

Lemma 5.1.

Let 𝒞=2[n]\mathscr{C}=2^{[n]} be a combinatorial code. Denoting pseudo-monomials xσ(1x)τx^{\sigma}(1-x)^{\tau} as sets στ¯±[n]\sigma\cup\bar{\tau}\subseteq\pm[n], the minimal relations of 𝒞\mathscr{C} satisfy circuit axiom (C4) (weak elimination).

Proof.

Suppose p1=xσ(1x)τp_{1}=x^{\sigma}(1-x)^{\tau} and p2=xα(1x)βp_{2}=x^{\alpha}(1-x)^{\beta} are minimal in I𝒞I_{\mathscr{C}}, with eσβe\in\sigma\cap\beta. Then

xασ(1x)β(τe)p1+xσ(αe)(1x)τβp2=xσαe(1x)τβeI𝒞.\displaystyle x^{\alpha\setminus\sigma}(1-x)^{\beta\setminus(\tau\cup e)}p_{1}+x^{\sigma\setminus(\alpha\cup e)}(1-x)^{\tau\setminus\beta}p_{2}=x^{\sigma\cup\alpha\setminus e}(1-x)^{\tau\cup\beta\setminus e}\in I_{\mathscr{C}}.

Thus, some minimal pseudo-monomial xZ+(1x)Zx^{Z^{+}}(1-x)^{Z^{-}} in I𝒞I_{\mathscr{C}} divides xσαe(1x)τβex^{\sigma\cup\alpha\setminus e}(1-x)^{\tau\cup\beta\setminus e}, i.e. Z+(σα)eZ^{+}\subseteq(\sigma\cup\alpha)\setminus e and Z(τβ)eZ^{-}\subseteq(\tau\cup\beta)\setminus e, which is exactly circuit axiom (C4). ∎

Note that, while the proper circuits of an oriented matroid satisfy axiom (C4), we must include improper pseudo-monomials of the form xi(1xi)x_{i}(1-x_{i}) in order for the generators of I𝒞I_{\mathscr{C}} to satisfy (C4). While elements of the canonical form are minimal combinatorial relations, they do not satisfy axiom (C3) (incomparability). Combinatorial relations on the same support need not be equal or opposite: for instance, the combinatorial relations of the code 𝒞={,1,2,3,123}\mathscr{C}=\{\varnothing,1,2,3,123\} are U1U2U3,U2U3U1U_{1}\cap U_{2}\subseteq U_{3},U_{2}\cap U_{3}\subseteq U_{1}, and U1U3U2U_{1}\cap U_{3}\subseteq U_{2}, which are all supported on the set {1,2,3}\{1,2,3\}.

The relationship between pseudo-monomials in I𝒞I_{\mathscr{C}} and codewords in 𝒞\mathscr{C} is analogous to the relationship between circuits and topes. In light of 5.1, the oriented matroid analogue of 𝖱\mathsf{R} maps an oriented matroid \mathcal{M} to an ideal generated by the circuits of \mathcal{M} and then the depolarization map 𝖣\mathsf{D} is simply the algebraic analogue of 𝖶+\mathsf{W}^{+}. As we will see, most of the work involved in establishing these connections is in showing 𝖶+\mathsf{W}^{+} and 𝖲\mathsf{S} are functors.

5.2. Oriented matroids to neural codes

We now show that the map 𝖶+\mathsf{W}^{+} is a contravariant functor from the category 𝐎𝐌\operatorname{\mathbf{OM}} whose objects are acyclic oriented matroids and whose morphisms are strong maps, to the category 𝐂𝐨𝐝𝐞\operatorname{\mathbf{Code}} whose objects are neural codes and whose objects are code morphisms.

We define strong maps in terms of convexity following [hochstattler1999linear]. First, we include the requisite information on convexity for oriented matroids.

Definition 5.2.

A subset S±ES\subseteq\pm E is convex in \mathcal{M} if for all xSx\notin S, there is no circuit C𝒞()C\in\mathcal{C}(\mathcal{M}) such that xCS{x}-x\in C\subseteq S\cup\{-x\}. The convex closure of a set S±ES\subseteq\pm E is the intersection of all convex sets that contain SS.

Remark 5.3.

This definition differs from [bjorner1999oriented, Exercise 3.9, p 152] in that it acts on subsets of ±E\pm E rather than EE. The intuition behind this definition comes from vector arrangements. A signed-linear dependence on S{x}S\cup\{-x\} gives a signed-linear representation of xx in terms of SS: just add xx to both sides of the equation. This can be rescaled to a convex combination of elements in SS; therefore, xx should be in the convex closure.

We now define strong maps:

Definition 5.4.

Let 1,2\mathcal{M}_{1},\mathcal{M}_{2} be a pair of oriented matroids on ground sets E1,E2E_{1},E_{2} and f¯:E1{}E2{}\underline{f}:E_{1}\cup\{\circ\}\to E_{2}\cup\{\circ\} such that f¯()=\underline{f}(\circ)=\circ. Extend f¯\underline{f} to a map ff on the signed ground sets by f(e)=f(e)f(-e)=-f(e), where =\circ=-\circ. We say that ff induces a strong map ϕf:12\phi_{f}:\mathcal{M}_{1}\to\mathcal{M}_{2} if whenever S±E2S\subseteq\pm E_{2} is a convex set of 2\mathcal{M}_{2}, f1(S)±E1f^{-1}(S)\subseteq\pm E_{1} is a convex set of 1\mathcal{M}_{1}.

Remark 5.5.

We briefly explain the loops in the definition of strong maps. We want the function on sets to be well-defined while still allowing some elements to “disappear,” so we add {}\{\circ\} in the target to absorb the disappearing elements. Since strong maps between matroids on the same ground set have certain duality properties, we include {}\{\circ\} in the source as well.

The following lemma gives us an equivalent definition of convexity in terms of topes. We will make use of a corollary (5.7) along the way to proving 𝖶+\mathsf{W}^{+} is a functor.

Lemma 5.6.

A subset S±ES\subseteq\pm E is convex if and only if for all xSx\notin S and ASA\subseteq S containing no signed circuits, there exists a tope X𝒲()X\in\mathcal{W}(\mathcal{M}) such that A{x}XA\cup\{-x\}\subseteq X.

Proof.

Assume that for all xSx\notin S and ASA\subseteq S containing no signed circuits, there is a tope XX with A{x}XA\cup\{-x\}\subseteq X.

Suppose that SS is not convex, by way of contradiction. Then there exists some xSx\notin S for which there is a circuit CC with xCS{x}-x\in C\subseteq S\cup\{-x\}. But, A=C{x}A=C\setminus\{-x\} is a subset of SS containing no signed circuits (by axiom (C3)), and if any tope contained A{x}A\cup\{-x\}, that would contradict tope-circuit orthogonality.

For the reverse implication, we prove the contrapositive using the four-painting axioms [bjorner1999oriented, Theorem 3.4.4 (4P)]. Suppose that there is some set ASA\subseteq S containing no signed circuits and an element xSx\notin S such that A{x}A\cup\{-x\} is not contained in any tope. Paint the ground set to be black and white coincident with A{x}A\cup\{-x\}, and to be red on the remaining elements. By the four-painting axioms, there must be a circuit supported on the elements of A{x}A\cup\{-x\}; this proves that SS is not convex. ∎

Corollary 5.7.

Every tope of a loopless matroid is convex.

Proof.

Let XX be a tope. By tope-circuit orthogonality, there is no circuit contained in XX. Consider xXx\notin X. Since topes have full support, xXx\notin X implies xX-x\in X. This means that for any AXA\subseteq X, the set A{x}XA\cup\{-x\}\subseteq X, which is a tope. Therefore XX is convex. ∎

Now we define the contravariant functor 𝖶+:𝐎𝐌𝐂𝐨𝐝𝐞\mathsf{W}^{+}:\operatorname{\mathbf{OM}}\to\operatorname{\mathbf{Code}}. We restate the map on objects and add the action on morphisms.

Definition 5.8.

Let \mathcal{M} be an acyclic oriented matroid. Take 𝖶+\mathsf{W}^{+}\mathcal{M} to be the code consisting of the positive parts of topes of \mathcal{M},

𝖶+={W+W𝒲()}2E.\mathsf{W}^{+}\mathcal{M}=\{W^{+}\mid W\in\mathcal{W}(\mathcal{M})\}\subseteq 2^{E}.

Let ϕf:12\phi_{f}:\mathcal{M}_{1}\to\mathcal{M}_{2} be a strong map with associated set map f¯:E1{}E2{}\underline{f}:E_{1}\cup\{\circ\}\to E_{2}\cup\{\circ\}. Then, take 𝖶+ϕf:𝖶+2𝖶+1\mathsf{W}^{+}\phi_{f}:\mathsf{W}^{+}\mathcal{M}_{2}\to\mathsf{W}^{+}\mathcal{M}_{1}, to be the map on codewords (𝖶+ϕf)(σ)=f¯1(σ)(\mathsf{W}^{+}\phi_{f})(\sigma)=\underline{f}^{-1}(\sigma).

In order to prove that 𝖶+\mathsf{W}^{+} is a functor, we must prove that 𝖶+ϕ\mathsf{W}^{+}\phi is actually a well-defined function with the desired domain. At this point, acyclicity becomes necessary.

Example 5.9.

Consider the matroid 1\mathcal{M}_{1} on ground set E={1,2,3}E=\{1,2,3\} defined by the columns of the matrix

[110001]\left[\begin{array}[]{cccc}1&-1&0\\ 0&0&1\\ \end{array}\right]

The topes of 1\mathcal{M}_{1} are {12¯3,12¯3¯,1¯23,1¯23¯}\{1\bar{2}3,1\bar{2}\bar{3},\bar{1}23,\bar{1}2\bar{3}\}. Let 2\mathcal{M}_{2} be the rank-1 matroid on one element obtained by contracting the first two columns of 1\mathcal{M}_{1}. That is, 2\mathcal{M}_{2} is the oriented matroid on ground set [1][1] with topes {1¯,1}\{\bar{1},1\}. The contraction is the strong map induced by the set map f¯(1)=f¯(2)=\underline{f}(1)=\underline{f}(2)=\circ, f¯(3)=1\underline{f}(3)=1.

Passing to 𝐂𝐨𝐝𝐞\operatorname{\mathbf{Code}}, we have 𝖶+2={,1}\mathsf{W}^{+}\mathcal{M}_{2}=\{\varnothing,1\} and 𝖶+1={1,13,2,23}\mathsf{W}^{+}\mathcal{M}_{1}=\{1,13,2,23\}. For the functor to work, we would need 𝖶+ϕ(1)=3\mathsf{W}^{+}\phi(1)=3 to be the positive part of some tope, but there is no such tope. By demanding that the matroids are acyclic we avoid this problem. Acyclic oriented matroids are also loopless, so topes of acyclic oriented matroids have full support.

Proposition 5.10.

Let 1\mathcal{M}_{1} and 2\mathcal{M}_{2} be acyclic oriented matroids on E1E_{1} and E2E_{2} respectively, and ϕf:12\phi_{f}:\mathcal{M}_{1}\to\mathcal{M}_{2} a strong map induced by f¯:E1E2\underline{f}:E_{1}\cup\circ\to E_{2}\cup\circ. If X𝒲(2)X\in\mathcal{W}(\mathcal{M}_{2}) is a tope, there is a tope Z𝒲(1)Z\in\mathcal{W}(\mathcal{M}_{1}) such that f¯1(X+)=Z+\underline{f}^{-1}(X^{+})=Z^{+}.

Proof.

Since both matroids are loopless, topes of each have full support on their ground sets. By 5.7, X{}X\cup\{\circ\} is convex, and since ff is a strong map, we conclude that f1(X{})=f¯1(X+)+f¯1(X)±f¯1()f^{-1}(X\cup\{\circ\})=\underline{f}^{-1}(X^{+})^{+}\sqcup\underline{f}^{-1}(X^{-})^{-}\sqcup\pm\underline{f}^{-1}(\circ) is convex. We claim that omitting the positive-signed elements of f1()f^{-1}(\circ) to obtain Z:=f¯1(X+)+f¯1(X{})Z:=\underline{f}^{-1}(X^{+})^{+}\sqcup\underline{f}^{-1}(X^{-}\cup\{\circ\})^{-} retains convexity.

If not, then by nonconvexity of ZZ, there is xZx\notin Z, such that x-x is in some circuit CC contained in Z{x}Z\cup\{-x\}. Thus, xx would be an element in the convex closure of ZZ but not in ZZ itself, rendering ZZ nonconvex. Because ZZ has full support, this means xZ-x\in Z, implying CZC\subseteq Z. Because 1\mathcal{M}_{1} is acyclic, CC must have at least one element xf¯1(X+)+x\in\underline{f}^{-1}(X^{+})^{+}. But this implies that x-x should be in the convex closure of f1(X{})f^{-1}(X\cup\{\circ\}), contradicting convexity.

Finally, by 5.7, we note that a maximal signed convex set must be a tope, indicating that ZZ is a tope satisfying our constraints. ∎

Thus, Proposition 5.10 confirms that the map of codes has the desired domain, so it is well-defined as a map of sets. We need to confirm that this set map is also a morphism of codes (i.e. the preimage of a trunk is a trunk).

Proposition 5.11.

For a strong map of acyclic oriented matroids ϕf:12\phi_{f}:\mathcal{M}_{1}\to\mathcal{M}_{2}, the map of neural codes given by 𝖶+ϕf(σ)=f¯1(σ)\mathsf{W}^{+}\phi_{f}(\sigma)=\underline{f}^{-1}(\sigma) is a morphism of codes.

Proof.

Let 𝒞i=𝖶+i\mathscr{C}_{i}=\mathsf{W}^{+}\mathcal{M}_{i} for i=1,2i=1,2. It is sufficient to check that the preimage of a simple trunk (i.e. the trunk of a singleton set) is a trunk. Thus, we compute (𝖶+ϕf)1Tk𝒞1(i)(\mathsf{W}^{+}\phi_{f})^{-1}\operatorname{Tk}_{\mathscr{C}_{1}}(i). Let τ(𝖶+ϕf)1Tk𝒞1(i)\tau\in(\mathsf{W}^{+}\phi_{f})^{-1}\operatorname{Tk}_{\mathscr{C}_{1}}(i), so (𝖶+ϕf)(τ)Tk𝒞1(i)(\mathsf{W}^{+}\phi_{f})(\tau)\in\operatorname{Tk}_{\mathscr{C}_{1}}(i). By our definition of 𝖶+ϕf\mathsf{W}^{+}\phi_{f}, this is equivalent to the condition f1(τ)Tk𝒞1(i)f^{-1}(\tau)\in\operatorname{Tk}_{\mathscr{C}_{1}}(i). By the definition of a trunk, this is equivalent to if1(τ)i\in f^{-1}(\tau), or f(i)τf(i)\in\tau. Thus, τTk𝒞2(f(i))\tau\in\operatorname{Tk}_{\mathscr{C}_{2}}(f(i)) if and only if τ(𝖶+ϕf)1Tk𝒞1(i)\tau\in(\mathsf{W}^{+}\phi_{f})^{-1}\operatorname{Tk}_{\mathscr{C}_{1}}(i). Therefore

(𝖶+ϕf)1Tk𝒞1(i)=Tk𝒞2(f(i)).(\mathsf{W}^{+}\phi_{f})^{-1}\operatorname{Tk}_{\mathscr{C}_{1}}(i)=\operatorname{Tk}_{\mathscr{C}_{2}}(f(i)).

Thus, the map 𝖶+ϕf\mathsf{W}^{+}\phi_{f} is a morphism of neural codes. ∎

To finish off the proof that 𝖶+\mathsf{W}^{+} is a functor, we need only check that it respects the identity morphism and composition of morphisms.

Proposition 5.12.

The identity strong map on a matroid id:\operatorname{id}:\mathcal{M}\to\mathcal{M} yields 𝖶+id:𝖶+𝖶+\mathsf{W}^{+}\operatorname{id}:\mathsf{W}^{+}\mathcal{M}\to\mathsf{W}^{+}\mathcal{M} the identity on the corresponding code.

Given two strong maps ϕ:12\phi:\mathcal{M}_{1}\to\mathcal{M}_{2} and ψ:23\psi:\mathcal{M}_{2}\to\mathcal{M}_{3}, the morphisms 𝖶+(ψϕ)\mathsf{W}^{+}(\psi\circ\phi) and 𝖶+ϕ𝖶+ψ\mathsf{W}^{+}\phi\circ\mathsf{W}^{+}\psi from 𝖶+3𝖶+1\mathsf{W}^{+}\mathcal{M}_{3}\to\mathsf{W}^{+}\mathcal{M}_{1} are equal.

Proof.

Based on Proposition 5.10, the map of codes is well-defined. The composition of strong maps is defined by ϕgϕf:=ϕgf\phi_{g}\circ\phi_{f}:=\phi_{g\circ f}. Then

𝖶+(ϕgϕf)(σ)=𝖶+(ϕgf)(σ)=(gf)1(σ)=f1g1(σ)=(𝖶+ϕf𝖶+ϕg)(σ).\mathsf{W}^{+}(\phi_{g}\circ\phi_{f})(\sigma)=\mathsf{W}^{+}(\phi_{g\circ f})(\sigma)=(g\circ f)^{-1}(\sigma)=f^{-1}\circ g^{-1}(\sigma)=(\mathsf{W}^{+}\phi_{f}\circ\mathsf{W}^{+}\phi_{g})(\sigma).

Thus 𝖶+\mathsf{W}^{+} respects composition of morphisms. Next, we check that

𝖶+(ϕid)(σ)=id1(σ)=σ,\mathsf{W}^{+}(\phi_{\operatorname{id}})(\sigma)=\operatorname{id}^{-1}(\sigma)=\sigma,

thus 𝖶+\mathsf{W}^{+} respects the identity morphism. Therefore, 𝖶+\mathsf{W}^{+} is a functor. ∎

Proposition 5.13.

The map 𝖶+\mathsf{W}^{+} is a faithful, but not full, contravariant functor from the category 𝐎𝐌\operatorname{\mathbf{OM}} of acyclic oriented matroids with strong maps to the category 𝐂𝐨𝐝𝐞\operatorname{\mathbf{Code}} of neural codes with code morphisms.

Since we have already proven that the map of categories 𝖶+\mathsf{W}^{+} is indeed a functor, we only need to prove that the functor is faithful but not full to complete the proof of Proposition 5.13.

Proof.

For a given strong map ϕ:12\phi:\mathcal{M}_{1}\to\mathcal{M}_{2}, it is easy to read out the map on ground sets E1E2E_{1}\to E_{2} from the values of 𝖶+ϕ\mathsf{W}^{+}\phi. Because the set map uniquely determines the strong map, the functor is faithful – that is, it is injective on morphisms.

To show that not all morphisms of codes arise from strong maps of oriented matroids we produce the following example:

Take the morphism f:𝒞𝒟f:\mathscr{C}\to\mathscr{D}, where

𝒞={,1,12345,1235,1245,13,1345,135,14,145,2,23,2345,235,24,245,3,4}𝒟={,1,12,2},\begin{array}[]{lcl}\mathscr{C}&=&\{\varnothing,1,12345,1235,1245,13,1345,135,14,145,2,23,2345,235,24,245,3,4\}\\ \mathscr{D}&=&\{\varnothing,1^{\prime},1^{\prime}2^{\prime},2^{\prime}\},\end{array}

and the morphism is defined by trunks Tk𝒞(135)\operatorname{Tk}_{\mathscr{C}}(135) and Tk𝒞(245)\operatorname{Tk}_{\mathscr{C}}(245). See Figure 8 for realizations of these codes. By construction, ff is a morphism of neural codes. Both codes are hyperplane codes, thus they arise from oriented matroids 2\mathcal{M}_{2} and 1\mathcal{M}_{1}. However, the map ff does not arise from any strong map. To see this, notice that the proof of Proposition 5.11 actually proves that the preimage of a simple trunk is a simple trunk for any morphism arising from a strong map. However, by construction, f1(Tk𝒟(1))=Tk𝒞(135)f^{-1}(\operatorname{Tk}_{\mathscr{D}}(1^{\prime}))=\operatorname{Tk}_{\mathscr{C}}(135), which is not a simple trunk.

This proves that the functor is not full. ∎

Refer to caption
Figure 8. Partial realization of code 𝒞\mathscr{C} (left) and a realization of code 𝒟\mathscr{D} (right). To construct the complete realization of 𝒞\mathscr{C}, embed this figure in the plane z=1z=1 in 3\mathbb{R}^{3}. For i=1,2,3,4i=1,2,3,4, let the plane HiH_{i} be the plane spanned by the line embedded in the plane z=1z=1 and the origin, and let the H5H_{5} be the plane z=0z=0, oriented up. Notice that the canonical construction of a realization of 𝒟\mathscr{D} from the realization of 𝒞\mathscr{C} is not a hyperplane realization, even though 𝒟\mathscr{D} happens to be a hyperplane code.

5.3. Oriented matroids to rings

We now describe the oriented matroid ring and show that the map taking an oriented matroid to its associated ring is a functor. The key ingredient for doing this is the oriented matroid ideal introduced in [novik2002syzygies]. As defined in that paper, the oriented matroid ideal is associated to affine oriented matroids; in other words, oriented matroids with a distinguished element. We alter their definition to avoid the need for a distinguished element, and show that the affine oriented matroid ideal can be constructed algebraically from the oriented matroid ideal. Finally, we define the oriented matroid ring as the quotient by the Alexander dual ideal. We define the functor 𝖲\mathsf{S} which takes an oriented matroid to its oriented matroid ring and describe its image, which we take as our category 𝐎𝐌𝐑𝐢𝐧𝐠\operatorname{\mathbf{OMRing}}.

Fix a field kk. We will consider polynomial rings over kk with variables indexed by the ground set EE of an oriented matroid; when the indexing set is apparent, we will denote these as k[𝐱,𝐲]k[\mathbf{x},\mathbf{y}] or k[𝐱]k[\mathbf{x}]. The affine oriented matroid ideal is defined in [novik2002syzygies] (under the name “oriented matroid ideal”) with an equivalent description from their Proposition 2.8 as follows:

Definition 5.14.

Let =(E,,g)\mathcal{M}=(E,\mathcal{L},g) be an affine oriented matroid with E={1,,n,g}E=\{1,\ldots,n,g\}.

(Covectors) For every sign vector Z{0,+,}EZ\in\{0,+,-\}^{E}, associate a monomial

mxy(g)(Z)=(i:Zi=+xi)(i:Zi=yi) where xg=yg=1.m_{xy}^{(g)}(Z)=\left(\prod_{i:Z_{i}=+}x_{i}\right)\left(\prod_{i:Z_{i}=-}y_{i}\right)\text{ where }x_{g}=y_{g}=1.

The affine oriented matroid ideal Og()O_{g}(\mathcal{M}) is the ideal in k[𝐱,𝐲]k[{\bf x},{\bf y}] generated by all monomials corresponding to covectors Z+={XXg=+}Z\in\mathcal{L}^{+}=\{X\in\mathcal{L}\mid X_{g}=+\}.

(Circuits) The minimal prime decomposition of the affine oriented matroid ideal is
Og()=CPC(g)O_{g}(\mathcal{M})=\bigcap_{C}P_{C}^{(g)}, where PC(g)P_{C}^{(g)} is the ideal generated by variables xi,yjiC+,jC\langle x_{i},y_{j}\mid i\in C^{+},j\in C^{-}, jgj\neq g\rangle, and the intersection is over all circuits CC such that gCg\in C^{-}.

We define the oriented matroid ideal in terms of generators, and show that it also has this dual description in terms of minimal primes.

Definition 5.15.

Let \mathcal{M} be a loopless oriented matroid. Let the oriented matroid ideal O()O(\mathcal{M}) denote the ideal generated as

mxy(Z):Z tope of , where mxy(Z)=(i:Zi=+xi)(i:Zi=yi).\left\langle m_{xy}(Z):Z\text{ tope of }\mathcal{M}\right\rangle,\text{ where }m_{xy}(Z)=\left(\prod_{i:Z_{i}=+}x_{i}\right)\left(\prod_{i:Z_{i}=-}y_{i}\right).

Remark 5.16.

This definition can be extended in a straightforward way to matroids with loops, but “topes” would be replaced with “complements of covectors.” Note that the minimal complements of covectors in loopless matroids are indeed the topes.

Proposition 5.17.

Let =(E,)\mathcal{M}=(E,\mathcal{L}) be a loopless oriented matroid. The minimal prime decomposition of O()O(\mathcal{M}) is given by O()=CPCO(\mathcal{M})=\bigcap_{C}P_{C}, where PCP_{C} is the ideal generated by variables xi,yjiC+,jC\langle x_{i},y_{j}\mid i\in C^{+},j\in C^{-}\rangle, and the intersection is over all (proper and improper) circuits CC.

Proof.

Note that O()O(\mathcal{M}) is a monomial ideal, as is the intersection of the monomial ideals {PC}C\{P_{C}\}_{C}. Therefore, it is sufficient to check that the sets of monomials in the two ideals are identical.

First, consider mZ=mxy(±[n]Z)m_{Z}=m_{xy}(\pm[n]\setminus Z) for Z𝒲()Z\in\mathcal{W}(\mathcal{M}). We will show that mZPCm_{Z}\in P_{C} for all C𝒞()C\in\mathcal{C}(\mathcal{M}). For each element bEb\in E, exactly one of bb or b-b is in every tope ZZ, so mZxb,ybm_{Z}\in\langle x_{b},y_{b}\rangle; this covers improper circuits of the form {b,b¯}\{b,\bar{b}\}. For every proper circuit CC, both sep(Z,C)\operatorname{sep}(Z,C) and sep(Z,C)\operatorname{sep}(Z,-C) are non-empty by tope-circuit orthogonality. In this case, there exists iCi\in C (resp, iC-i\in C) such that iZi\notin Z (iZ-i\notin Z); this means that ximZx_{i}\mid m_{Z} for iCi\in C which implies mZPCm_{Z}\in P_{C}. Since mZPCm_{Z}\in P_{C} for all types of circuits, it is also in the intersection.

In the reverse direction, we show that for any monomial mm in CPC\bigcap_{C}P_{C}, there is a tope ZZ such that mxy(±[n]Z)mm_{xy}(\pm[n]\setminus Z)\mid m. For all elements jEj\in E, either xjmx_{j}\mid m or yjmy_{j}\mid m; so there exist disjoint sets I,JI,J such that [n]=IJ[n]=I\cup J and

mI,J=(iIxijJyj)m.m_{I,J}=\left(\prod_{i\in I}x_{i}\prod_{j\in J}y_{j}\right)\mid m.

We claim that Z=IJ¯Z=I\cup\bar{J} is a tope of \mathcal{M}. It is enough to show that every circuit C𝒞()C\in\mathcal{C}(\mathcal{M}) is orthogonal to ZZ. The fact that mI,JPCm_{I,J}\in P_{C} and mI,JPCm_{I,J}\in P_{-C} means that both sep(Z,C)\operatorname{sep}(Z,C) and sep(Z,C)\operatorname{sep}(Z,-C) are nonempty, implying orthogonality. ∎

The affine oriented matroid ideal can be obtained from the oriented matroid ideal using the following construction.

Proposition 5.18.

The affine oriented matroid ideal Og()O_{g}(\mathcal{M}) can be obtained via the following ideal quotient and specialization

Og()=[O():O(g)]xg=1yg=0k[x1,,xn,y1,,yn].O_{g}(\mathcal{M})=[O(\mathcal{M}):O(\mathcal{M}\setminus g)]\>\vline_{\>\>\begin{subarray}{c}x_{g}=1\\ y_{g}=0\end{subarray}}\subseteq k[x_{1},\ldots,x_{n},y_{1},\ldots,y_{n}].
Proof.

By 5.14,

O()=C𝒞()PC=Cg=0C𝒞()PCCg=+C𝒞()PCCg=C𝒞()PC=Cg=0C𝒞()PC(xg+Cg=+C𝒞()PC(g))(yg+Cg=C𝒞()PC(g))=O(g)(xg+Og())(yg+Og())\begin{matrix}O(\mathcal{M})=\displaystyle\bigcap_{C\in\mathcal{C}(\mathcal{M})}P_{C}&=&\displaystyle\bigcap_{\begin{subarray}{c}C_{g}=0\\ C\in\mathcal{C}(\mathcal{M})\end{subarray}}P_{C}&\cap&\displaystyle\bigcap_{\begin{subarray}{c}C_{g}=+\\ C\in\mathcal{C}(\mathcal{M})\end{subarray}}P_{C}&\cap&\displaystyle\bigcap_{\begin{subarray}{c}C_{g}=-\\ C\in\mathcal{C}(\mathcal{M})\end{subarray}}P_{C}\\[22.76219pt] &=&\displaystyle\bigcap_{\begin{subarray}{c}C_{g}=0\\ C\in\mathcal{C}(\mathcal{M})\end{subarray}}P_{C}&\cap&\left(\langle x_{g}\rangle+\displaystyle\bigcap_{\begin{subarray}{c}C_{g}=+\\ C\in\mathcal{C}(\mathcal{M})\end{subarray}}P_{C}^{(-g)}\right)&\cap&\left(\langle y_{g}\rangle+\displaystyle\bigcap_{\begin{subarray}{c}C_{g}=-\\ C\in\mathcal{C}(\mathcal{M})\end{subarray}}P_{C}^{(g)}\right)\\[31.29802pt] &=&O(\mathcal{M}\setminus g)&\cap&(\langle x_{g}\rangle+O_{-g}(\mathcal{M}))&\cap&(\langle y_{g}\rangle+O_{g}(\mathcal{M}))\end{matrix}

Ideal quotients commute with intersection, so we can apply the quotient to each component. The first component becomes the ideal quotient of O(g)O(\mathcal{M}\setminus g) by itself, which is the full ring. After specializing xg=1x_{g}=1, the second component is also the full ring. Turning to the third component, we need to prove that ((yg+Og()):O(g))=yg+Og()\big{(}(\langle y_{g}\rangle+O_{g}(\mathcal{M})):O(\mathcal{M}\setminus g)\big{)}=\langle y_{g}\rangle+O_{g}(\mathcal{M}).

A monomial mm is in the quotient if and only if for all A=±[n]BA=\pm[n]\setminus B where B(g)B\in\mathcal{L}(\mathcal{M}\setminus g), either ygmmxy(A)y_{g}\mid m\cdot m_{xy}(A) or there exists covector Z()Z\in\mathcal{L}(\mathcal{M}) with Zg=Z_{g}=- such that mxy(g)(Z)mmxy(A)m_{xy}^{(g)}(Z)\mid m\cdot m_{xy}(A). Suppose mmxy(A)ygm\cdot m_{xy}(A)\in\langle y_{g}\rangle. Then ygmy_{g}\mid m since mxy(A)m_{xy}(A) is defined on the deletion by gg; this implies that mygm\in\langle y_{g}\rangle. Suppose instead that mmxy(A)Og()m\cdot m_{xy}(A)\in O_{g}(\mathcal{M}). This implies that there is a covector ZZ of \mathcal{M} with Zg=Z_{g}=- such that mxy(g)(Z)mmxy(A)m_{xy}^{(g)}(Z)\mid m\cdot m_{xy}(A). By [bjorner1999oriented, Prop 3.8.2 (b)], this implies that the support of mm is a covector of the matroid. Since ygmxy(A)y_{g}\nmid m_{xy}(A), the support of mm must include ygy_{g}, implying that its support is a covector BB of \mathcal{M} with Bg=B_{g}=-. This implies mOg()m\in O_{g}(\mathcal{M}). We conclude that ((yg+Og()):O(g))=yg+Og()\big{(}(\langle y_{g}\rangle+O_{g}(\mathcal{M})):O(\mathcal{M}\setminus g)\big{)}=\langle y_{g}\rangle+O_{g}(\mathcal{M}). Specializing yg=0y_{g}=0 leaves us with Og()O_{g}(\mathcal{M}). ∎

One more step is needed to make the functor 𝖲\mathsf{S} work. The oriented matroid ideal O()O(\mathcal{M}) is a square-free monomial ideal; we take its Alexander dual (see e.g. [miller2004combinatorial, Definition 1.35]) to obtain O()O(\mathcal{M})^{\star}. This takes the oriented matroid ideal and swaps the role of topes and circuits; i.e. irreducible components now correspond to topes, and monomial generators to circuits. Let WW be a tope and let 𝔭(W)=xeWe=++yeWe=\mathfrak{p}(W)=\langle x_{e}\mid W_{e}=+\rangle+\langle y_{e}\mid W_{e}=-\rangle. Then, for acyclic oriented matroids,

(2) O()=mxy(C)C𝒞()=W𝒲()𝔭(W).\displaystyle O(\mathcal{M})^{\star}=\langle m_{xy}(C)\mid C\in\mathcal{C}(\mathcal{M})\rangle=\bigcap_{W\in\mathcal{W}(\mathcal{M})}\mathfrak{p}(W).

The oriented matroid ring is then the quotient ring k[𝐱,𝐲]/O()k[\mathbf{x},\mathbf{y}]/O(\mathcal{M})^{\star}.

Proposition 5.19.

Let 𝐎𝐌\operatorname{\mathbf{OM}} be defined as above.

Let \mathcal{M} be an oriented matroid and ϕ:12\phi:\mathcal{M}_{1}\to\mathcal{M}_{2} be a strong map of matroids with associated set map f:E1{}E2{}f:E_{1}\cup\{\circ\}\to E_{2}\cup\{\circ\}.

Define 𝖲=S=k[𝐱,𝐲]/O()\mathsf{S}\mathcal{M}=S_{\mathcal{M}}=k[\mathbf{x},\mathbf{y}]/O(\mathcal{M})^{\star}. Define 𝖲ϕf:𝖲1𝖲2\mathsf{S}\phi_{f}:\mathsf{S}\mathcal{M}_{1}\to\mathsf{S}\mathcal{M}_{2} by

(𝖲ϕf)(xi)={0f(i)=xf(i)else.(𝖲ϕf)(yi)={0f(i)=yf(i)else.(\mathsf{S}\phi_{f})(x_{i})=\begin{cases}0&f(i)=\circ\\ x_{f(i)}&else.\end{cases}\hskip 28.45274pt(\mathsf{S}\phi_{f})(y_{i})=\begin{cases}0&f(i)=\circ\\ y_{f(i)}&else.\end{cases}

We refer to the ring SS_{\mathcal{M}} as an oriented matroid ring and the map 𝖲ϕf\mathsf{S}\phi_{f} as a strong monomial map. Then, 𝖲\mathsf{S} is a covariant functor from 𝐎𝐌\operatorname{\mathbf{OM}} to 𝐑𝐢𝐧𝐠\operatorname{\mathbf{Ring}}.

Proof.

We need to prove that this map defines a ring homomorphism, respects the identity morphism, and respects composition of morphisms.

We begin by checking that the map 𝖲ϕf\mathsf{S}\phi_{f} is a ring homomorphism. Since it is defined as a map on generators, 𝖲ϕf\mathsf{S}\phi_{f} defines a ring homomorphism k[x1,,xn1,y1,,yn1]k[x1,,xn2,y1,,yn2].k[x_{1},\ldots,x_{n_{1}},y_{1},\ldots,y_{n_{1}}]\to k[x_{1},\ldots,x_{n_{2}},y_{1},\ldots,y_{n_{2}}]. We need to check that this map respects the quotient structure. That is, we must show that if mO(1)m\in O(\mathcal{M}_{1})^{\star}, then 𝖲ϕf(m)O(2)\mathsf{S}\phi_{f}(m)\in O(\mathcal{M}_{2})^{\star}.

Since O(1)O(\mathcal{M}_{1})^{\star} is a monomial ideal, it is sufficient to check this for monomials m=iIxijJyj.m=\prod_{i\in I}x_{i}\prod_{j\in J}y_{j}. If f(i)=f(i)=\circ (or f(j)=f(j)=\circ) for some iIi\in I (jJj\in J), then 𝖲ϕf(m)=0O(2)\mathsf{S}\phi_{f}(m)=0\in O(\mathcal{M}_{2})^{\star}. Next, we consider the case when 𝖲ϕf(xi)=xf(i),𝖲ϕf(yj)=yf(j)\mathsf{S}\phi_{f}(x_{i})=x_{f(i)},\mathsf{S}\phi_{f}(y_{j})=y_{f(j)} for all iI,jJi\in I,j\in J. Because O(1)O(\mathcal{M}_{1})^{\star} is a monomial ideal, mO(1)m\in O(\mathcal{M}_{1})^{\star} implies that 𝐱C+𝐲C\mathbf{x}^{C+}\mathbf{y}^{C-} divides mm for some generator 𝐱C+𝐲CO(1)\mathbf{x}^{C+}\mathbf{y}^{C-}\in O(\mathcal{M}_{1})^{\star}.

If f(C)f(C) is not a signed set, then it contains an improper circuit of the form {i,i¯}\{i,\bar{i}\}, so 𝖲ϕf(m)\mathsf{S}\phi_{f}(m) is divided by xiyix_{i}y_{i}, so 𝖲ϕf(m)O(2)\mathsf{S}\phi_{f}(m)\in O(\mathcal{M}_{2})^{\star} as desired. Thus, suppose that f(C)f(C) is a signed set. We show that f(C)f(C) contains a circuit. Let eCe\in C. We will show that f(e)-f(e) is in the convex closure of f(C)f(C); this implies that there is a circuit DD of 2\mathcal{M}_{2} such that

f(e)Df(C){f(e)}=f(C),f(e)\in D\subseteq f(C)\cup\{f(e)\}=f(C),

which is what we need. Suppose that f(e)-f(e) is not in the convex closure of f(C)f(C). Then there is some convex set SS such that f(e)S-f(e)\notin S, f(C)Sf(C)\subset S. By the definition of a strong map, f1(S)f^{-1}(S) must be convex. However, ef1(S)-e\notin f^{-1}(S), and

eCf1(S){e},e\in C\subset f^{-1}(S)\cup\{e\},

contradicting convexity of SS. We conclude that f(e)-f(e) is in the convex hull of f(C)f(C). Thus, there is a circuit DD of 2\mathcal{M}_{2} such that f(e)Df(C)f(e)\in D\subseteq f(C), so xD+yDx^{D^{+}}y^{D^{-}} divides f(m)f(m).

To see that 𝖲\mathsf{S} respects the identity morphism, note that if f(i)=if(i)=i for each iEi\in E, then 𝖲ϕf(xi)=xi\mathsf{S}\phi_{f}(x_{i})=x_{i} and 𝖲ϕf(yi)=yi\mathsf{S}\phi_{f}(y_{i})=y_{i}, so 𝖲ϕf\mathsf{S}\phi_{f} is the identity on 𝖲\mathsf{S}\mathcal{M}. Now, let ϕf\phi_{f} and ϕg\phi_{g} be strong maps. First, suppose neither f(i)=f(i)=\circ nor g(f(i))=g(f(i))=\circ. Without loss of generality, we check that composition of morphisms is respected on the xix_{i}. Then 𝖲(ϕfϕg)(xi)=xfg(i)=(𝖲f)(𝖲g)xi\mathsf{S}(\phi_{f}\phi_{g})(x_{i})=x_{f\circ g(i)}=(\mathsf{S}f)(\mathsf{S}g)x_{i}. Now, if either f(i)=f(i)=\circ or g(f(i))=g(f(i))=\circ, then 𝖲(ϕfϕg)(xi)=0=(𝖲f)(𝖲g)xi\mathsf{S}(\phi_{f}\phi_{g})(x_{i})=0=(\mathsf{S}f)(\mathsf{S}g)x_{i}. Thus the map 𝖲\mathsf{S} respects composition of morphisms. ∎

We define the category 𝐎𝐌𝐑𝐢𝐧𝐠\operatorname{\mathbf{OMRing}} to be the category whose objects are oriented matroid rings SS_{\mathcal{M}} with distinguished generators x1,,xn,y1,,ynx_{1},\ldots,x_{n},y_{1},\ldots,y_{n}. The morphisms of 𝐎𝐌𝐑𝐢𝐧𝐠\operatorname{\mathbf{OMRing}} are the strong monomial maps 𝖲ϕf\mathsf{S}\phi_{f}, where ϕf\phi_{f} is a strong map of oriented matroids.

5.4. Oriented matroid rings to neural rings and back

The final piece of the puzzle is describe the relationship between 𝐎𝐌𝐑𝐢𝐧𝐠\operatorname{\mathbf{OMRing}} and the category of neural rings 𝐍𝐑𝐢𝐧𝐠\operatorname{\mathbf{NRing}}. Note that neural rings are defined over 𝔽2\mathbb{F}_{2}, thus we take all rings in this section to be over 𝔽2\mathbb{F}_{2}. The vanishing ideal of a code is a pseudo-monomial ideal, meaning it has a pseudo-monomial generating set. Polarization of a pseudo-monomial ideal, introduced in [gunturkun2017polarization], produces a true monomial ideal which encodes the same combinatorial information. As 𝖶+\mathsf{W}^{+} is not a full functor and 𝖱\mathsf{R} is an equivalence of categories, there is no reason to expect polarization to be a functor. Instead, we will use the operation of depolarization to define the functor 𝖣\mathsf{D} so that 𝖱𝖶+=𝖣𝖲\mathsf{R}\circ\mathsf{W}^{+}=\mathsf{D}\circ\mathsf{S}, i.e. the diagram below commutes.

(3) 𝐎𝐌{\operatorname{\mathbf{OM}}}𝐎𝐌𝐑𝐢𝐧𝐠{\operatorname{\mathbf{OMRing}}}𝐂𝐨𝐝𝐞{\operatorname{\mathbf{Code}}}𝐍𝐑𝐢𝐧𝐠{\operatorname{\mathbf{NRing}}}𝖲\scriptstyle{\mathsf{S}}𝖶+\scriptstyle{\mathsf{W}^{+}}𝖣\scriptstyle{\mathsf{D}}𝖱\scriptstyle{\mathsf{R}}
Definition 5.20.

Let SS_{\mathcal{M}} be an oriented matroid ring. Define 𝖣S\mathsf{D}S_{\mathcal{M}} to be the ring S/xi+yi1i[n]S_{\mathcal{M}}/\langle x_{i}+y_{i}-1\mid i\in[n]\rangle with distinguished coordinate functions x1,,xnx_{1},\ldots,x_{n}.

If ϕ:S1S2\phi:S_{\mathcal{M}_{1}}\to S_{\mathcal{M}_{2}} is a morphism in 𝐎𝐌𝐑𝐢𝐧𝐠\operatorname{\mathbf{OMRing}} with underlying set map f:E1{}E2{}f:E_{1}\cup\{\circ\}\to E_{2}\cup\{\circ\}, then define 𝖣ϕ:𝖣S1𝖣S2\mathsf{D}\phi:\mathsf{D}S_{\mathcal{M}_{1}}\to\mathsf{D}S_{\mathcal{M}_{2}} to be the map sending xixf(i)x_{i}\mapsto x_{f(i)} if f(i)f(i)\neq\circ and xi0x_{i}\mapsto 0 otherwise.

Proposition 5.21.

The map 𝖣\mathsf{D} is a functor 𝐎𝐌𝐑𝐢𝐧𝐠\operatorname{\mathbf{OMRing}} to 𝐍𝐑𝐢𝐧𝐠\operatorname{\mathbf{NRing}}.

Proof.

We first show 𝖣\mathsf{D} maps an oriented matroid ring to a neural ring. Denote S=𝔽2[𝐱,𝐲]S=\mathbb{F}_{2}[\mathbf{x},\mathbf{y}] and D=xi+yi1i[n]SD=\langle x_{i}+y_{i}-1\mid i\in[n]\rangle\subseteq S. Let D¯\bar{D} denote the ideal with the same generators as DD, but considered as an ideal of SS_{\mathcal{M}}, i.e. 𝖣S=S/D¯\mathsf{D}S_{\mathcal{M}}=S_{\mathcal{M}}/\bar{D}, and let S=O()+DSS^{\prime}=O(\mathcal{M})^{\star}+D\subseteq S. We apply standard isomorphism theorems to conclude

𝖣S=S/D¯S/S(S/D)/(S/D).\mathsf{D}S_{\mathcal{M}}=S_{\mathcal{M}}/\bar{D}\cong S/S^{\prime}\cong(S/D)/(S^{\prime}/D).

Observe that S/D𝔽2[𝐱]S/D\cong\mathbb{F}_{2}[\mathbf{x}] under the map yi1xiy_{i}\mapsto 1-x_{i}. Under this same map, xσyτxσ(1x)τx^{\sigma}y^{\tau}\mapsto x^{\sigma}(1-x)^{\tau}, so S/DS^{\prime}/D is a pseudo-monomial ideal; since xiyiO()x_{i}y_{i}\in O(\mathcal{M})^{\star} for all i[n]i\in[n], we have xi(1xi)S/Dx_{i}(1-x_{i})\in S^{\prime}/D for all ii and therefore S/DS^{\prime}/D is the vanishing ideal of a combinatorial code.

Next we check that if ϕ:S1S2\phi:S_{\mathcal{M}_{1}}\to S_{\mathcal{M}_{2}} is a strong monomial map, then 𝖣ϕ\mathsf{D}\phi is a monomial map of neural rings. By definition, ϕ\phi induces a monomial map 𝔽2[x1,,xn1]𝔽2[x1,,xn2]\mathbb{F}_{2}[x_{1},\dots,x_{n_{1}}]\to\mathbb{F}_{2}[x_{1},\dots,x_{n_{2}}], sending each xix_{i} to some xjx_{j} or 0 as appropriate. So, we only need to check this is a well-defined ring homomorphism. This follows from properties of polarization: xσ(1x)τ(O()+D)/Dx^{\sigma}(1-x)^{\tau}\in(O(\mathcal{M})^{\star}+D)/D if and only if xσyτO()x^{\sigma}y^{\tau}\in O(\mathcal{M})^{\star} [gunturkun2017polarization]. Therefore,

xσ(1x)τ(O()+D)/D\displaystyle x^{\sigma}(1-x)^{\tau}\in(O(\mathcal{M})^{\star}+D)/D xσyτO(1)ϕ(xσyτ)O(2)\displaystyle\implies x^{\sigma}y^{\tau}\in O(\mathcal{M}_{1})^{\star}\implies\phi(x^{\sigma}y^{\tau})\in O(\mathcal{M}_{2})^{\star}
𝖣ϕ(xσ(1x)τ)(O(2)+D)/D.\displaystyle\implies\mathsf{D}\phi(x^{\sigma}(1-x)^{\tau})\in(O(\mathcal{M}_{2})^{\star}+D)/D.

Thus, 𝖣ϕ\mathsf{D}\phi is a well-defined monomial map.

To complete the proof 𝖣\mathsf{D} is a functor, we need to show 𝖣\mathsf{D} respects the identity and composition of morphisms. These are immediate from the definitions: 𝖣idxi=xid(i)\mathsf{D}\operatorname{id}x_{i}=x_{\operatorname{id}(i)} and 𝖣(ϕfϕg)(xi)=xfg(i)=𝖣ϕf𝖣ϕgxi\mathsf{D}(\phi_{f}\circ\phi_{g})(x_{i})=x_{f\circ g(i)}=\mathsf{D}\phi_{f}\circ\mathsf{D}\phi_{g}x_{i}. ∎

Proposition 5.22.

The diagram (3) commutes.

Proof.

We will show that:

  1. (1)

    for any acyclic oriented matroid \mathcal{M},

    (𝖣𝖲)()=(𝖱𝖶+)(), and(\mathsf{D}\circ\mathsf{S})(\mathcal{M})=(\mathsf{R}\circ\mathsf{W}^{+})(\mathcal{M}),\text{ and}
  2. (2)

    for a strong map of acyclic oriented matroids f:12f:\mathcal{M}_{1}\to\mathcal{M}_{2},

    (𝖣𝖲)(f)=(𝖱𝖶+)(f).(\mathsf{D}\circ\mathsf{S})(f)=(\mathsf{R}\circ\mathsf{W}^{+})(f).

(1) We prove the first part by showing that the ring of functions on 𝖶+\mathsf{W}^{+}\mathcal{M} is precisely the ring (𝖣𝖲)()(\mathsf{D}\circ\mathsf{S})(\mathcal{M}). We do this by showing that they are both quotients of 𝔽2[𝐱]\mathbb{F}_{2}[\mathbf{x}] by the same ideal. For a tope W±[n]W\subseteq\pm[n], denote 𝔭¯(W)=xiWi=++1xiWi=\bar{\mathfrak{p}}(W)=\langle x_{i}\mid W_{i}=+\rangle+\langle 1-x_{i}\mid W_{i}=-\rangle, i.e. the image of 𝔭(W)\mathfrak{p}(W) under the map yi1xiy_{i}\mapsto 1-x_{i} (recall Eq. 2). Then we have

(𝖣𝖲)()𝔽2[𝐱]/(W𝒲()𝔭¯(W)).(\mathsf{D}\circ\mathsf{S})(\mathcal{M})\cong\mathbb{F}_{2}[\mathbf{x}]/\left(\bigcap_{W\in\mathcal{W}(\mathcal{M})}\bar{\mathfrak{p}}(W)\right).

Now consider (𝖱𝖶+)=𝔽2[𝐱]/I𝖶+(\mathsf{R}\circ\mathsf{W}^{+})\mathcal{M}=\mathbb{F}_{2}[\mathbf{x}]/I_{\mathsf{W}^{+}\mathcal{M}}. For each tope WW, let 𝔪(W)=xiWi=+1xiWi=+\mathfrak{m}(W)=\langle x_{i}\mid W_{i}=-\rangle+\langle 1-x_{i}\mid W_{i}=+\rangle, the maximal ideal of 𝔽2[𝐱]\mathbb{F}_{2}[\mathbf{x}] vanishing at codeword W+W^{+}. As the vanishing ideal of a finite variety, we have

I𝖶+=W𝒲()𝔪(W).I_{\mathsf{W}^{+}\mathcal{M}}=\bigcap_{W\in\mathcal{W}(\mathcal{M})}\mathfrak{m}(W).

By construction, 𝔪(W)=𝔭¯(W)\mathfrak{m}(W)=\bar{\mathfrak{p}}(-W). By symmetry (axiom (V2)), WW is a tope if and only if W-W is a tope. Therefore, the ideals are defined by the same intersection and therefore the corresponding quotients are identical.

(2) Now we prove that strong maps point to the same monomial map via 𝖣𝖲\mathsf{D}\circ\mathsf{S} and 𝖱𝖶+\mathsf{R}\circ\mathsf{W}^{+}. It is sufficient to check the action of each monomial map on generators of 𝔽2[𝐱]\mathbb{F}_{2}[\mathbf{x}].

A strong map ϕf\phi_{f} is defined by a set map f:E1E2f:E_{1}\to E_{2} satisfying SE2S\subseteq E_{2} convex implies f1(S)E1f^{-1}(S)\subseteq E_{1} convex. The strong monomial map 𝖲ϕf\mathsf{S}\phi_{f} sends xix_{i} to 0 if f(i)=f(i)=\circ and xf(i)x_{f(i)} otherwise; it acts similarly on yiy_{i}. Applying 𝖣\mathsf{D}, the monomial map (𝖣𝖲)(ϕf)(\mathsf{D}\circ\mathsf{S})(\phi_{f}) still sends xix_{i} to 0 if f(i)=f(i)=\circ and xf(i)x_{f(i)} otherwise.

Going around the diagram the other way, 𝖶+ϕf\mathsf{W}^{+}\phi_{f} sends a codeword σ𝖶+2\sigma\in\mathsf{W}^{+}\mathcal{M}_{2} to f1(σ)𝖶+1f^{-1}(\sigma)\in\mathsf{W}^{+}\mathcal{M}_{1}. The functor 𝖱\mathsf{R} sends a morphism of codes g:𝒞1𝒞2g:\mathscr{C}_{1}\to\mathscr{C}_{2} to the ring homomorphism given by sending ν𝖱𝒞2\nu\in\mathsf{R}\mathscr{C}_{2} to its precomposition with gg, i.e. νg𝖱𝒞1\nu\circ g\in\mathsf{R}\mathscr{C}_{1}. Starting with a strong map ϕf\phi_{f}, let us consider the action of 𝖱𝖶+ϕf\mathsf{R}\mathsf{W}^{+}\phi_{f} on generators of 𝖱𝖶+1\mathsf{R}\mathsf{W}^{+}\mathcal{M}_{1}:

(𝖱𝖶+ϕf)(xi)=xi[(𝖶+ϕf)1]=xi[σf1(σ)](\mathsf{R}\mathsf{W}^{+}\phi_{f})(x_{i})=x_{i}\circ[(\mathsf{W}^{+}\phi_{f})^{-1}]=x_{i}\circ[\sigma\mapsto f^{-1}(\sigma)]

This function takes as input a codeword σ𝖶+2\sigma\in\mathsf{W}^{+}\mathcal{M}_{2}. If if1(σ)i\in f^{-1}(\sigma), then it takes the value 11, and if if1(σ)i\notin f^{-1}(\sigma) then it takes the value 0. If f(i)=f(i)=\circ, then the function is identically zero. If f(i)f(i)\neq\circ, then xi[σf1(σ)]x_{i}\circ[\sigma\mapsto f^{-1}(\sigma)] is equal to xf(i)x_{f(i)}, proving that the monomial maps (𝖣𝖲)(ϕf)(\mathsf{D}\circ\mathsf{S})(\phi_{f}) and (𝖱𝖶+)(ϕf)(\mathsf{R}\circ\mathsf{W}^{+})(\phi_{f}) are the same. ∎

5 (proven by Propositions 5.13, 5.19, 5.21 and 5.22) gives us a new lens to see the neural ideal. In essence, neural codes can be seen as a relaxation of oriented matroids. The neural ideal is a generalization of the oriented matroid ideal to the less constrained category of neural codes. Further, Propositions 5.21 and 5.22 demonstrates that the duality between a neural code and its combinatorial relations is analogous to the duality between topes and circuits. In particular, in the special case when a neural code arises from an oriented matroid, the codewords correspond to topes and the elements of the canonical form correspond to circuits. 5.1, which states that the elements of the canonical form partially follow the circuit axioms, strengthens this analogy.

6. Open questions

The preceding sections have presented our case for employing oriented matroid theory in the study of neural codes. However, we stand at the very beginning of exploring this connection. In this section, we outline some directions for future work.

6.1. Is the missing axiom of convex neural codes also lost forever?

Oriented matroids capture much of combinatorial structure of hyperplane arrangements in a few axioms. Is it possible to give a similar characterization for convex neural codes, or at least for codes which lie below oriented matroids in 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}}? While general neural codes are not required to satisfy any axioms, the codes below oriented matroids may be more tractable to combinatorial description.

Question 6.1.

Can the class of neural codes below oriented matroids be characterized by a set of combinatorial axioms?

The functorial view we introduced in Section 5 may be helpful in finding this characterization. If this question is answered in the affirmative, then these codes can be thought of as “partial oriented matroids.” Suppose that 𝒞2[n]\mathscr{C}\subseteq 2^{[n]} is a code and \mathcal{M} is an oriented matroid on ground set [N][N] such that 𝒞=f(𝖫+)\mathscr{C}=f(\mathsf{L}^{+}\mathcal{M}); then, we obtain constraints on the set of covectors of \mathcal{M}. Each included codeword σ𝒞\sigma\in\mathscr{C} implies existence of a preimage covector in \mathcal{M}, and each excluded codeword τ𝒞\tau\notin\mathscr{C} implies a set of forbidden covectors which may not be in \mathcal{M}. The oriented matroids satisfying these constraints can then be said to be “completions” of the partial oriented matroid.

Just as we wish to characterize codes lying below oriented matroids with a set of combinatorial axioms, we might also wish to characterize convex codes using a set of combinatorial axioms. However, this is likely not possible. In [mayhew2018yes], Mayhew, Newman, and Whittle show that “the missing axiom of matroid theory is lost forever.” Slightly more formally, they show that there is no sentence characterizing representability in the monadic second order language MS0MS_{0}, which is strong enough to state the standard matroid axioms. Roughly, this means that there is no “combinatorial” characterization of representability, or no characterization of representability in the language of the other matroid axioms.

Because we have found strong connections between representability and convexity, it is natural to ask whether a similar statement can be proven for convex codes.

Question 6.2.

Is there a natural language in which we can state “combinatorial” properties of neural codes, in analogy with the MS0MS_{0} for matroids? If so, is it possible to characterize convexity in this language?

6.2. Computational questions

While we have shown that the convex code decision problem is \exists\mathbb{R}-hard, we have not actually shown that the convex code decision problem lies in \exists\mathbb{R}, or is even algorithmically decidable. A similar problem, that of determining whether a code has a good cover realization, is undecidable by [chen2019neural, Theorem 4.5]. Here, the distinction between codes with good cover realizations and convex realizations may be significant. For instance, while there is an algorithm to decide whether, for any given dd, a simplicial complex is the nerve of convex open subsets of d\mathbb{R}^{d}, for each d5d\geq 5, it is algorithmically undecidable whether a simplicial complex is the nerve of a good cover in d\mathbb{R}^{d} [tancer2013nerves].

We outline a possible path towards resolving [chen2019neural, Question 4.5], which asks whether there is an algorithm which decides whether a code is convex. Our approach hinges on 2: a code is polytope convex if and only if it lies below a representable oriented matroid. A first step towards solving the convex code decision problem is answering the following open question:

Question 6.3.

Can every convex code be realized with convex polytopes?

In dimension two, this question has an affirmative answer, as a result, the class of planar convex codes is decidable [bukh2022planar]. If this holds in all dimensions, then our Theorem 2 becomes strengthened to the following:

Conjecture.

A code 𝒞\mathscr{C} is convex if and only if 𝒞𝖫+\mathscr{C}\leq\sf{L}^{+}\mathcal{M} for \mathcal{M} a representable oriented matroid.

If this conjecture holds, then we can replace the problem of determining whether a code is convex with the problem of determining whether a code lies below a representable matroid. We only need to consider the set of minor-minimal matroids lying above the code, and check these matroids for representability.

Question 6.4.

Given a code 𝒞\mathscr{C}, is the set of minor-minimal matroids above 𝒞\mathscr{C} finite? If so, is there an efficient algorithm to enumerate them?

One way to find oriented matroids above a code 𝒞\mathscr{C} is to travel step-by-step up the poset 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}}. While there is a straightforward algorithm to enumerate the O(n)O(n) codes which are covered by a code 𝒞2[n]\mathscr{C}\subseteq 2^{[n]} in 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}} [jeffs2019sunflowers], we do not know of a straightforward way to characterize the codes which cover 𝒞\mathscr{C}. If we can characterize these codes as well, we may be able to find a way to “climb up” towards an oriented matroid. Alternatively, we can use the “partial oriented matroid” perspective described above to obtain a set of constraints that must be obeyed by any oriented matroid above this code. Then we can look for a matroid satisfying these constraints.

Both of these approaches depend on the minimal size of the ground set of oriented matroids that lie above 𝒞\mathscr{C} in 𝐏𝐂𝐨𝐝𝐞\mathbf{P}_{\mathbf{Code}}. Let

M(n)=max𝒞2[n]𝒞 below an oriented matroid[min𝒞𝖫+()|E()|]M(n)=\max_{\begin{subarray}{c}\mathscr{C}\subseteq 2^{[n]}\\ \mathscr{C}\mbox{ \scriptsize below an}\\ \mbox{ \scriptsize oriented matroid}\end{subarray}}\left[\min_{\mathscr{C}\leq\sf{L}^{+}(\mathcal{M})}|E(\mathcal{M})|\right]

be the smallest NN such that any code 𝒞\mathcal{C} on nn neurons which lies below an oriented matroid lies below an oriented matroid with ground set of size at most NN. Similarly, let

H(n)=max𝒞2[n]𝒞 below a representable oriented matroid[min𝒞𝖫+ representable|E()|]H(n)=\max_{\begin{subarray}{c}\mathscr{C}\subseteq 2^{[n]}\\ \mathscr{C}\mbox{ \scriptsize below a representable}\\ \mbox{ \scriptsize oriented matroid}\end{subarray}}\left[\min_{\begin{subarray}{c}\mathscr{C}\leq\sf{L}^{+}\mathcal{M}\\ \mathcal{M}\mbox{ \scriptsize representable}\end{subarray}}|E(\mathcal{M})|\right]

be the smallest NN such that any code 𝒞\mathscr{C} on nn neurons below a representable oriented matroid lies below a representable oriented matroid with ground set of size at most NN. Clearly, M(n)H(n)M(n)\leq H(n), since any representable matroid is a matroid.

Question 6.5.

Describe the growth of M(n)M(n) and H(n)H(n) as functions of nn. Are they equal?

Note that if H(n)H(n) is a computable function of nn, and Question  6.3 is answered in the affirmative, then the convex code decision problem is decidable.

6.3. Other questions in geometric combinatorics

Many classic theorems about convex sets, such as Helly’s theorem, Radon’s theorem, and Caratheodory’s theorem, have oriented matroid analogues. In some way, we can view our Theorem 2 as an oriented matroid version of Jeffs’ sunflower theorem [jeffs2019sunflowers, Theorem 1.1]. The fact that the non-convex codes constructed from the sunflower theorem do not lie below oriented matroids shows us that there is some fact about oriented matroids underlying the sunflower theorem.

Question 6.6.

Is there a natural oriented matroid version of Jeffs’ sunflower theorem?

Proposition 3.3 stated that if \mathcal{M} is an oriented matroid, the code 𝖫+\sf{L}^{+}\mathcal{M} has no local obstructions. That is, for any σΔ(𝖫+)𝖫+\sigma\in\Delta(\sf{L}^{+}\mathcal{M})\setminus\sf{L}^{+}\mathcal{M}, linkσ(Δ(𝖫+))\operatorname{link}_{\sigma}(\Delta(\sf{L}^{+}\mathcal{M})) is contractible. This result can also be found in [edelman2002convex], where is is phrased as a result about the simplicial complex Δacyclic()\Delta_{\mathrm{acyclic}}(\mathcal{M}). Something stronger holds for representable oriented matroids: by [chen2019neural, Theorem 5.10], if \mathcal{M} is a representable oriented matroid, and σΔ(𝖫+)𝖫+\sigma\in\Delta(\sf{L}^{+}\mathcal{M})\setminus\sf{L}^{+}\mathcal{M}, then linkσ(𝖫+)\operatorname{link}_{\sigma}(\sf{L}^{+}\mathcal{M}) must be collapsible. Expanding upon this work, [jeffs2019convex] gives stronger conditions that the link of a missing codeword in a convex code must satisfy.

We ask whether this holds for all oriented matroids:

Question 6.7.

If \mathcal{M} is an oriented matroid, and σΔ(𝖫+)𝖫+\sigma\in\Delta(\sf{L}^{+}\mathcal{M})\setminus\sf{L}^{+}\mathcal{M}, is linkσ(Δ(𝖫+))\operatorname{link}_{\sigma}(\Delta(\sf{L}^{+}\mathcal{M})) collapsible? More generally, which simplicial complexes can arise as linkσ(Δ(𝖫+))\operatorname{link}_{\sigma}(\Delta(\sf{L}^{+}\mathcal{M})) for σΔ(𝖫+)𝖫+\sigma\in\Delta(\sf{L}^{+}\mathcal{M})\setminus\sf{L}^{+}\mathcal{M}?

If not, then the non-collapsibility of linkσ(Δ(𝖫+))\operatorname{link}_{\sigma}(\Delta(\mathsf{L}^{+}\mathcal{M})) gives a new “signature” of non-representability.

6.4. Functorial questions

The maps 𝖶+\mathsf{W}^{+} and 𝖫+\mathsf{L}^{+} established analogies between structures of oriented matroids and neural codes. Topes and covectors are translated into the codewords, and signed circuits are mapped to the combinatorial relations. This leads us to the following natural question:

Question 6.8.

Do 𝖶+\mathsf{W}^{+} and 𝖫+\mathsf{L}^{+} map other matroid features to meaningful structures associated to neural codes? In particular, do the chirotope, rank function, and convex closure function have a natural interpretation when mapped to general neural codes?

This paper focused on the category of oriented matroids, since they have a well-established notion of morphisms (strong maps) and since they are extensively studied. However, there is also a notion of “affine strong maps” defined in [hochstattler1999linear] that may serve to turn affine oriented matroids into a category. This might also admit a natural functor to neural codes. Additionally, the recently defined objects COM’s (which stands for both conditional oriented matroids and complexes of oriented matroids) [bandelt2018coms] are a natural place to try to extend strong maps next.

Question 6.9.

Can affine oriented matroids with affine strong maps be embedded in 𝐂𝐨𝐝𝐞\operatorname{\mathbf{Code}}? Can strong maps be defined for COM’s in such a way that the resulting category can be embedded in 𝐂𝐨𝐝𝐞\operatorname{\mathbf{Code}}?

While strong maps are more frequently used as morphisms of oriented matroids, weak maps are the next best option.

Question 6.10.

Can the category of oriented matroids with morphisms given by weak maps be embedded in 𝐂𝐨𝐝𝐞\operatorname{\mathbf{Code}}?

Acknowledgements

The authors thank Carina Curto, Emanuele Delucchi, Boaz Haberman, Gregory Henselman-Petrusek, Vladimir Itskov, R. Amzi Jeffs, Anne Shiu, Bernd Sturmfels, and Nora Youngs for helpful conversations. We remark that Henselman-Petrusek developed connections between neural codes and oriented matroids independently, and we look forward to his upcoming article on the topic. They also extend deep gratitude to Anne Shiu, R. Amzi Jeffs, and Carina Curto for their comments on an early draft. Further, they also thank Laura Anderson for heroic efforts to fix the proof of an earlier version of Proposition 4. They also appreciate the thorough reviews by anonymous referees which contributed significantly to readability and accuracy of the results. CL was supported by NSF fellowship grant DGE1255832. ABK was supported by an NLM Training Program fellowship T15LM007093

References