Two-dimensional partial cubes

We investigate the structure of two-dimensional partial cubes, i.e., of isometric subgraphs of hypercubes whose vertex set defines a set family of VC-dimension at most 2. Equivalently, those are the partial cubes which are not contractible to the 3-cube $Q_3$ (here contraction means contracting the edges corresponding to the same coordinate of the hypercube). We show that our graphs can be obtained from two types of combinatorial cells (gated cycles and gated full subdivisions of complete graphs) via amalgams. The cell structure of two-dimensional partial cubes enables us to establish a variety of results. In particular, we prove that all partial cubes of VC-dimension 2 can be extended to ample aka lopsided partial cubes of VC-dimension 2, yielding that the set families defined by such graphs satisfy the sample compression conjecture by Littlestone and Warmuth (1986). Furthermore we point out relations to tope graphs of COMs of low rank and region graphs of pseudoline arrangements.


Introduction
Set families are fundamental objects in combinatorics, algorithmics, machine learning, discrete geometry, and combinatorial optimization.The Vapnik-Chervonenkis dimension (the VC-dimension for short) VC-dim(S) of a set family S ⊆ 2 U is the size of a largest subset of X ⊆ U which can be shattered by S [51], i.e., 2 X = {X ∩ S : S ∈ S}.Introduced in statistical learning by Vapnik and Chervonenkis [51], the VC-dimension was adopted in the above areas as complexity measure and as a combinatorial dimension of S. Two important inequalities relate a set family S ⊆ 2 U with its VC-dimension.The first one, the Sauer-Shelah lemma [49,50] establishes that if |U | = m, then the number of sets in a set family S ⊆ 2 U with VC-dimension d is upper bounded by m ≤d .The second stronger inequality, called the sandwich lemma, proves that |S| is sandwiched between the number of strongly shattered sets (i.e., sets X such that S contains an X-cube, see Section 2.3) and the number of shattered sets [2,11,21,44].The set families for which the Sauer-Shelah bounds are tight are called maximum families [27,25] and the set families for which the upper bounds in the sandwich lemma are tight are called ample, lopsided, and extremal families [5,11,35].Every maximum family is ample, but not vice versa.
To take a graph-theoretical point of view on set families, one considers the subgraph G(S) of the hypercube Q m induced by the subsets of S ⊆ 2 U .(Sometimes G(S) is called the 1-inclusion graph of S [30,31].)Each edge of G(S) corresponds to an element of U .Then analogously to edge-contraction and minors in graph theory, one can consider the operation of simultaneous contraction of all edges of G(S) defined by the same element e ∈ U .The resulting graph is the 1-inclusion graph G(S e ) of the set family S e ⊆ 2 U \{e} obtained by identifying all pairs of sets of S differing only in e.Given Y ⊆ U , we call the set family S Y and its 1-inclusion graph G(S Y ) obtained from S and G(S) by successively contracting the edges labeled by the elements of Y the Q-minors of S and G(S).Then X ⊆ U is shattered by S if and only if the Q-minor G(S U \X ) is a full cube.Thus, the cubes play the same role for Q-minors as the complete graphs for classical graph minors.
To take a metric point of view on set families, one restricts to set families whose 1-inclusion graph satisfies further properties.The typical property here is that the 1-inclusion graph G(S) of S is an isometric (distance-preserving) subgraph of the hypercube Q m .Such graphs are called partial cubes.Partial cubes can be characterized in a pretty and efficient way [20] and can be recognized in quadratic time [24].Partial cubes comprise many important and complex graph classes occurring in metric graph theory and initially arising in completely different areas of research such as geometric group theory, combinatorics, discrete geometry, and media theory (for a comprehensive presentation of partial cubes and their classes, see the survey [4] and the books [19,29,43]).For example, 1-inclusion graphs of ample families (and thus of maximum families) are partial cubes [5,35] (in view of this, we will call such graphs ample partial cubes and maximum partial cubes, respectively).Other important examples comprise median graphs (aka 1-skeletons of CAT(0) cube complexes [17,48]) and, more generally, 1skeletons of CAT(0) Coxeter zonotopal complexes [28], the tope graphs of oriented matroids (OMs) [8], of affine oriented matroids (AOMs) [34], and of lopsided sets (LOPs) [34,35], where the latter coincide with ample partial cubes (AMPs).More generally, tope graphs of complexes of oriented matroids (COMs) [6,34] capture all of the above.Other classes of graphs defined by distance or convexity properties turn out to be partial cubes: bipartite cellular graphs (aka bipartite graphs with totally decomposable metrics) [3], bipartite Pasch [14,16] and bipartite Peano [46] graphs, netlike graphs [45], and hypercellular graphs [18].
Many mentioned classes of partial cubes can be characterized via forbidden Q-minors; in case of partial cubes, Q-minors are endowed with a second operation called restriction and are called partial cube minors, or pc-minors [18].The class of partial cubes is closed under pc-minors.the interval of G between any two of its vertices.Since the intersection of convex subgraphs is convex, for every subset S ⊆ V there exists the smallest convex set conv(S) containing S, referred to as the convex hull of S. A subset S ⊆ V or the subgraph H of G induced by S is called gated (in G) [23] if for every vertex x outside H there exists a vertex x (the gate of x) in H such that each vertex y of H is connected with x by a shortest path passing through the gate x .It is easy to see that if x has a gate in H, then it is unique and that gated sets are convex.Since the intersection of gated subgraphs is gated, for every subset S ⊆ V there exists the smallest gated set gate(S) containing S, referred to as the gated hull of S.
A graph G = (V, E) is isometrically embeddable into a graph H = (W, F ) if there exists a mapping ϕ : V → W such that d H (ϕ(u), ϕ(v)) = d G (u, v) for all vertices u, v ∈ V , i.e., ϕ(G) is an isometric subgraph of H.A graph G is called a partial cube if it admits an isometric embedding into some hypercube Q m .For an edge e = uv of G, let W (u, v) = {x ∈ V : d(x, u) < d(x, v)}.For an edge uv, the sets W (u, v) and W (v, u) are called complementary halfspaces of G. Theorem 1. [20] A graph G is a partial cube if and only if G is bipartite and for any edge e = uv the sets W (u, v) and W (v, u) are convex.
To establish an isometric embedding of G into a hypercube, Djoković [20] introduced the following binary relation Θ (called Djoković-Winkler relation) on the edges of G: for two edges e = uv and e = u v we set eΘe if and only if u ∈ W (u, v) and v ∈ W (v, u).Under the conditions of the theorem, eΘe if and only if W (u, v) = W (u , v ) and W (v, u) = W (v , u ), i.e.Θ is an equivalence relation.Let E 1 , . . ., E m be the equivalence classes of Θ and let b be an arbitrary vertex taken as the basepoint of G.For a Θ-class E i , let {G − i , G + i } be the pair of complementary convex halfspaces of G defined by setting G − i := G(W (u, v)) and G + i := G(W (v, u)) for an arbitrary edge uv ∈ E i such that b ∈ G − i .Then the isometric embedding ϕ of G into the m-dimensional hypercube Q m is obtained by setting ϕ(v) := {i : v ∈ G + i } for any vertex v ∈ V .Then ϕ(b) = ∅ and for any two vertices u, v of G, d G (u, v) = |ϕ(u)∆ϕ(v)|.
The bipartitions {G − i , G + i }, i = 1, . . ., m, can be canonically defined for all subgraphs G of the hypercube Q m , not only for partial cubes.Namely, if E i is a class of parallel edges of Q m , then removing the edges of E i from Q m but leaving their end-vertices, Q m will be divided into two (m − 1)-cubes Q and Q .Then G − i and G + i are the intersections of G with Q and Q .For a Θ-class E i , the boundary ∂G − i of the halfspace G − i consists of all vertices of G − i having a neighbor in G + i (∂G + i is defined analogously).Note that ∂G − i and ∂G + i induce isomorphic subgraphs (but not necessarily isometric) of G. Figure 2(a) illustrates a Θ-class E i of the two-dimensional partial cube M , the halfspaces M − i , M + i and their boundaries ∂M − i , ∂M + i .An antipode of a vertex v in a partial cube G is a vertex −v such that G = conv(v, −v).Note that in partial cubes the antipode is unique and conv(v, −v) coincides with the interval

I(v, −v).
A partial cube G is antipodal if all its vertices have antipodes.A partial cube G is said to be affine if there is an antipodal partial cube G , such that G is a halfspace of G .

Partial cube minors.
Let G be a partial cube, isometrically embedded in the hypercube Q m .For a Θ-class E i of G, an elementary restriction consists of taking one of the complementary halfspaces G − i and G + i .More generally, a restriction is a subgraph of G induced by the intersection of a set of (non-complementary) halfspaces of G.Such an intersection is a convex subgraph of G, thus a partial cube.Since any convex subgraph of a partial cube G is the intersection of halfspaces [1,14], the restrictions of G coincide with the convex subgraphs of G.
For a Θ-class E i , we say that the graph π i (G) obtained from G by contracting the edges of E i is an (i-)contraction of G; for an illustration, see Figure 2(b).For a vertex v of G, we will denote by π i (v) the image of v under the i-contraction, i.e., if uv is an edge of E i , then π i (u) = π i (v), otherwise π i (u) = π i (v).We will apply π i to subsets S ⊂ V , by setting π i (S) := {π i (v) : v ∈ S}.In particular we denote the i-contraction of G by π i (G).From the proof of the first part of [15,Theorem 3] it easily follows that π i (G) is an isometric subgraph of Q m−1 , thus the class of partial cubes is closed under contractions.Since edge contractions in graphs commute, if E i , E j are two distinct Θ-classes, then π j (π i (G)) = π i (π j (G)).Consequently, for a set A of k Θ-classes, we can denote by π A (G) the isometric subgraph of Q m−k obtained from G by contracting the equivalence classes of edges from A.
Contractions and restrictions commute in partial cubes [18].Consequently, any set of restrictions and any set of contractions of a partial cube G provide the same result, independently of the order in which we perform them.The resulting graph G is a partial cube, and G is called a partial cube minor (or pc-minor) of G.For a partial cube H we denote by F(H) the class of all partial cubes not having H as a pc-minor.In this paper we investigate the class F(Q 3 ).With the observation that a convex subcube of a partial cube can be obtained by contractions as well, the proof of the following lemma is straightforward.
Let G be a partial cube and E i be a Θ-class of G. Then E i crosses a convex subgraph H of G if H contains an edge uv of E i and E i osculates H if E i does not cross H and there exists an edge uv of E i with u ∈ H and v / ∈ H. Otherwise, E i is disjoint from H. The following results summarize the properties of contractions of partial cubes established in [18] and [34]: Lemma 4. [34] Affine and antipodal partial cubes are closed under contractions.

2.3.
OMs, COMs, and AMPs.In this subsection, we recall the definitions of oriented matroids, complexes of oriented matroids, and ample set families.

2.3.1.
OMs: oriented matroids.Co-invented by Bland & Las Vergnas [10] and Folkman & Lawrence [26], and further investigated by many other authors, oriented matroids represent a unified combinatorial theory of orientations of (orientable) ordinary matroids.OMs capture the basic properties of sign vectors representing the circuits in a directed graph or more generally the regions in a central hyperplane arrangement in R d .OMs obtained from a hyperplane arrangement are called realizable.Just as ordinary matroids, oriented matroids may be defined in a multitude of distinct but equivalent ways, see the book by Björner et al. [8].
Let U be a finite set and let L be a system of sign vectors, i.e., maps from U to {±1, 0} = {−1, 0, +1}.The elements of L are also referred to as covectors and denoted by capital letters X, Y, Z, etc.We denote by ≤ the product ordering on {±1, 0} U relative to the standard ordering of signs with 0 ≤ −1 and 0 ≤ +1.The composition of X and Y is the sign vector X • Y , where for all e ∈ U one defines (X • Y ) e = X e if X e = 0 and (X • Y ) e = Y e if X e = 0.The topes of L are the maximal elements of L with respect to ≤.A system of sign vectors (U, L) is called an oriented matroid (OM) if L satisfies the following three axioms: Furthermore, a system of sign-vectors (U, L) is simple if it has no "redundant" elements, i.e., for each e ∈ U , {X e : X ∈ L} = {+, −, 0} and for each pair e = f in U , there exist X, Y ∈ L with {X e X f , Y e Y f } = {+, −}.From (C), (Sym), and (SE) it easily follows that the set T of topes of any simple OM L are {−1, +1}-vectors.Therefore T can be viewed as a set family (where −1 means that the corresponding element does not belong to the set and +1 that it belongs).We will only consider simple OMs, without explicitly stating it every time.The tope graph of an OM L is the 1-inclusion graph G(T ) of T viewed as a set family.The Topological Representation Theorem of Oriented Matroids of [26] characterizes tope graphs of OMs as region graphs of pseudo-sphere arrangements in a sphere S d [8].See the bottom part of Figure 5 for an arrangement of pseudo-circles in S 2 .It is also well-known (see for example [8]) that tope graphs of OMs are partial cubes and that L can be recovered from its tope graph G(T ) (up to isomorphism).Therefore, we can define all terms in the language of tope graphs.In particular, the isometric dimension of G(T ) is |U | and its VC-dimension coincides with the dimension d of the sphere S d hosting a representing pseudo-sphere arrangement.
Moreover a graph G is the tope graph of an affine oriented matroid (AOM) if G is a halfspace of a tope graph of an OM.In particular, tope graphs of AOMs are partial cubes as well.
2.3.2.COMs: complexes of oriented matroids.Complexes of oriented matroids (COMs) have been introduced and investigated in [6] as a far-reaching natural common generalization of oriented matroids, affine oriented matroids, and ample systems of sign-vectors (to be defined below).Some research has been connected to COMs quite quickly, see e.g.[7,32,38] and the tope graphs of COMs have been investigated in depth in [34], see Subsection 2.3.4.COMs are defined in a similar way as OMs, simply replacing the global axiom (Sym) by a weaker local axiom (FS) of face symmetry: a complex of oriented matroids (COMs) is a system of sign vectors (U, L) satisfying (SE), and the following axiom: As for OMs we generally restrict ourselves to simple COMs, i.e., COMs defining simple systems of sign-vectors.It is easy to see that (FS) implies (C), yielding that OMs are exactly the COMs containing the zero sign vector 0, see [6].Also, AOMs are COMs, see [6] or [7].In analogy with realizable OMs, a COM is realizable if it is the systems of sign vectors of the regions in an arrangement U of (oriented) hyperplanes restricted to a convex set of R d .See Figure 4 for an example in R 2 .For other examples of COMs, see [6].The simple twist between (Sym) and (FS) leads to a rich combinatorial and geometric structure that is build from OM cells but is quite different from OMs.Let (U, L) be a COM and X be a covector of L. The face of X is F (X) := {X • Y : Y ∈ L}.By [6, Lemma 4], each face F (X) of L is an OM.Moreover, it is shown in [6,Section 11] that replacing each combinatorial face F (X) of L by a PL-ball, we obtain a contractible cell complex associated to each COM.The topes and the tope graphs of COMs are defined in the same way as for OMs.Again, the topes T are {−1, +1}-vectors, the tope graph G(T ) is a partial cubes, and the COM L can be recovered from its tope graph, see [6] or [34].As for OMs, the isometric dimension of For each covector X ∈ L, the tope graph of its face F (X) is a gated subgraph of the tope graph of L [34]: the gate of any tope Y in F (X) is the covector X • Y (which is obviously a tope).All this implies that the tope graph of any COM L is obtained by amalgamating gated tope subgraphs of its faces, which are all OMs.
Let ↑ L := {Y ∈ {±1, 0} U : X ≤ Y for some X ∈ L}.Then the ample systems (AMPs)1 of sign vectors are those COMs such that ↑L = L [6].From the definition it follows that any face F (X) consists of the sign vectors of all faces of the subcube of [−1, +1] U with barycenter X.

2.3.3.
AMPs: ample set families.Just above we defined ample systems as COMs satisfying ↑L = L.This is not the first definition of ample systems; all previous definitions define them as families of sets and not as systems of sign vectors.Ample sets have been introduced by Lawrence [35] as asymmetric counterparts of oriented matroids and have been re-discovered independently by several works in different contexts [5,11,52].Consequently, they received different names: lopsided [35], simple [52], extremal [11], and ample [5,21].Lawrence [35] defined ample sets for the investigation of the possible sign patterns realized by points of a convex set of R d .Ample set families admit a multitude of combinatorial and geometric characterizations [5,11,35] and comprise many natural examples arising from discrete geometry, combinatorics, graph theory, and geometry of groups [5,35] (for applications in machine learning, see [13,39]).
Let X be a subset of a set U with m elements and let We call any two X-cubes parallel cubes.Recall that X ⊆ U is shattered by a set family S ⊆ 2 U if {X ∩ S : S ∈ S} = 2 X .Furthermore, X is strongly shattered by S if the 1-inclusion graph G(S) of S contains a X-cube.Denote by X (S) and X (S) the families consisting of all shattered and of all strongly shattered sets of S, respectively.Clearly, X (S) ⊆ X (S) and both X (S) and X (S) are closed by taking subsets, i.e., X (S) and X (S) are abstract simplicial complexes.The VC-dimension [51] VC-dim(S) of S is the size of a largest set shattered by S, i.e., the dimension of the simplicial complex X (S).The fundamental sandwich lemma (rediscovered independently in [2,11,21,44] A set family S is called ample if |S| = |X (S)| [11,5].As shown in those papers this is equivalent to the equality X (S) = X (S), i.e., S is ample if and only if any set shattered by S is strongly shattered.Consequently, the VC-dimension of an ample family is the dimension of the largest cube in its 1-inclusion graph.A nice characterization of ample set families was provided in [35]: S is ample if and only if for any cube Q of Q m if Q ∩ S is closed by taking antipodes, then either Q ∩ S = ∅ or Q is included in G(S).The paper [5] provides metric and recursive characterizations of ample families.For example, it is shown in [5] that S is ample if and only if any two parallel X-cubes of the 1-inclusion graph G(S) of S can be connected in G(S) by a shortest path of X-cubes.This implies that 1-inclusion graphs of ample set families are partial cubes; therefore further we will speak about ample partial cubes.Note that maximum set families (i.e., those which the Sauer-Shelah lemma is tight) are ample.

2.3.4.
Characterizing tope graphs of OMs, COMS, and AMPs.In this subsection we recall the characterizations of [34] of tope graphs of COMs, OMs, and AMPs.We say that a partial cube G is a COM, an OM, an AOM, or an AMP if G is the tope graph of a COM, OM, AOM, or AMP, respectively.Tope graphs of COMs and AMPs are closed under pc-minors and tope graphs of OMs and AOMs are closed under contractions but not under restrictions.Convex subgraphs of OMs are COMs and convex subgraphs of tope graphs of uniform OMs are ample.The reverse implications are conjectured in [6, Conjecture 1] and [35,Conjecture], respectively.
As shown in [34], a partial cube is the tope graph of a COM if and only if all its antipodal subgraphs are gated.Another characterization from the same paper is by an infinite family of excluded pc-minors.This family is denoted by Q − and defined as follows.For every m ≥ 4 there are partial cubes X 1 m , . . ., X m+1 m ∈ Q − .Here, X m+1 m := Q m \ {(0, . . ., 0), (0, . . ., 1, 0)}, X m m = X m+1 m \ {(0, . . ., 0, 1)}, and Here e im denotes the vector with all zeroes except positions, i and m, where it is one.See Figure 3 for the members of Q − of isometric dimension at most 4. Note in particular that X 1 4 = SK 4 .Ample partial cubes can be characterized by the excluding set {(0, . . ., 0), (1, . . ., 1)} [34].Further characterizations from [34] yield that OMs are exactly the antipodal COMs, and (as mentioned at the end of Subsection 2.3.1)AOMs are exactly the halfspaces of OMs.On the other hand, ample partial cubes are exactly the partial cubes in which all antipodal subgraphs are hypercubes.
A central notion in COMs and OMs is the one of the rank of G, which is the largest d such that G ∈ F(Q d+1 ).Hence this notion fits well with the topic of the present paper and combining the families of excluded pc-minors Q −− and Q − , respectively, with Q 3 one gets:

Disks.
A pseudoline arrangement U is a family of simple non-closed curves where every pair of curves intersects exactly once and crosses in that point.Moreover, the curves must be extendable to infinity without introducing further crossings.Note that several curves are allowed to cross in the same point.Figure 5 for an example.We say that a partial cube G is a disk if it is the region graph of a pseudoline arrangement U .The Θ-classes of G correspond to the elements of U .Contrary to a convention sometimes made in the literature, we allow a pseudoline arrangement U to be empty, consisting of only one element, or all pseudolines to cross in a single point.These situations yield the simplest examples of disks, namely: K 1 , K 2 , and the even cycles.Disks are closed under contraction, since contracting a Θ-class correspond to removing a line from the pseudoline arrangement.It is well-known that disks are tope graphs of AOMs of rank at most 2. A quick explanation can be found around [8,Theorem 6.2.3].The idea is to first add a line ∞ at infinity to the pseudoline arrangement U representing G. Then embed the disk enclosed by ∞ on a hemisphere of S 2 , such that ∞ maps on the equator.Now, mirror the arrangement through the origin of S 2 in order to obtain a pseudocircle arrangement U .The region graph of U is an OM G , and the regions on one side of ∞ correspond to a halfspace of G isomorphic to G. See Figure 5 for an illustration.

Hyperplanes and isometric expansions
In this section we characterize the graphs from F(Q d+1 ) (i.e., partial cubes of VC-dimension ≤ d) via the hyperplanes of their Θ-classes and via the operation of isometric expansion.
i denote the complementary halfspaces defined by E i and ∂G − i , G + i denote their boundaries.The hyperplane H i of E i has the middles of edges of E i as the vertex-set and two such middles are adjacent in H i if and only if the corresponding edges belong to a common square of G, i.e., H i is isomorphic to ∂G − i and ∂G + i .Combinatorially, H i is the 1-inclusion graph of the set family defined by ∂H − i ∪ ∂H + i by removing from each set the element i.Let G ∈ H d−1 and let E i and E j be two different Θ-classes of G. Since π j (G) is a partial cube, to show that π j (G) belongs to H d−1 it suffices to show that ∂π j (G) − i = π j (∂G − i ).Indeed, this would imply that the ith hyperplane of π j (G) coincides with the jth contraction of the ith hyperplane of G. Consequently, this would imply that the VC-dimension of all hyperplanes of Then v is the image of the edge v v of the hypercube Q m such that at least one of the vertices v , v , say v , belongs to ∂G − i .This implies that the ith neighbor u of v in Q m belongs to ∂G + i .Let u be the common neighbor of u and v in Q m and u be the image of the edge u u by the j-contraction.Since u ∈ ∂G + i , the ith edge vu belongs to As in the previous case, let v be the image of the j-edge v v of the hypercube Q m and let u and u be the i-neighbors of v and v in Q m .Then u is the image of the j-edge u u .Since the vertices u and v belong to π j (G), at least one vertex from each of the pairs {u , u } and {v , v } belongs to G. If one of the edges u v or u v of Q m is an edge of G, then u ∈ π j (∂G + i ) and v ∈ π j (∂G − i ) and we are done.Finally, suppose that u and v are vertices of G. Since G is an isometric subgraph of Q m and d(u , v ) = 2, a common neighbor v , u of u and v also belongs to G and we fall in the previous case.This shows that ∂π j (G Remark 8.In Proposition 6 it is essential for G to be a partial cube.For example, let S consist of all subsets of even size of an m-element set.Then the 1-inclusion graph G(S) of S consists of isolated vertices (i.e., G(S) does not contain any edge).Therefore, any hyperplane of G(S) is empty, however the VC-dimension of G(S) depends on m and can be arbitrarily large.By Corollary 7, the hyperplanes of graphs from F(Q 3 ) have VC-dimension 1. However they are not necessarily partial cubes: any 1-inclusion graph of VC-dimension 1 may occur as a hyperplane of a graph from F(Q 3 ).Thus, it will be useful to establish the metric structure of 1inclusion graphs of VC-dimension 1.We say that a 1-inclusion graph G is a virtual isometric tree of Q m if there exists an isometric tree T of Q m containing G as an induced subgraph.Clearly, each virtually isometric tree is a forest in which each connected component is an isometric subtree of Q m .
Proof.Each isometric tree of Q m has VC-dimension 1, thus any virtual isometric tree has VCdimension ≤ 1. Conversely, let G be an induced subgraph of Q m of VC-dimension ≤ 1.We will say that two parallelism classes E i and j is empty and incompatible if the four intersections are nonempty.From the definition of VC-dimension immediately follows that G has VC-dimension 1 if and only if any two parallelism classes of Q m are compatible on G.By a celebrated result by Buneman [12] (see also [22,Subsection 3.2]), on the vertex set of G one can define a weighted tree T 0 with the same vertex-set as G and such that the bipartitions {G − i , G + i } are in bijection with the splits of T 0 , i.e., bipartitions obtained by removing edges of T 0 .The length of each edge of T 0 is the number of Θ-classes of Q m defining the same bipartition of G.The distance d T 0 (u, v) between two vertices of T 0 is equal to the number of parallelism classes of Q m separating the vertices of T 0 .We can transform T 0 into an isometrically embedded tree T of Q m in the following way: if the edge uv of T 0 has length k > 1, then replace this edge by any shortest path P (u, v) of Q m between u and v. Then it can be easily seen that T is an isometric tree of Q m , thus G is a virtual isometric tree.
3.2.Isometric expansions.In order to characterize median graphs Mulder [42] introduced the notion of a convex expansion of a graph.A similar construction of isometric expansion was introduced in [14,15], with the purpose to characterize isometric subgraphs of hypercubes.A triplet (G 1 , G 0 , G 2 ) is called an isometric cover of a connected graph G, if the following conditions are satisfied: ) by two vertices x 1 and x 2 ; • add an edge between two vertices x i and y i , i = 1, 2 if and only if x and y are adjacent vertices of G i , i = 1, 2; • add an edge between any two vertices x 1 and x 2 such that x is a vertex of V (G 1 )∩V (G 2 ).In other words, G is obtained by taking a copy of G 1 , a copy of G 2 , supposing them disjoint, and adding an edge between any two twins, i.e., two vertices arising from the same vertex of G 0 .The following result characterizes all partial cubes by isometric expansions: Proposition 10. [14,15] A graph is a partial cube if and only if it can be obtained by a sequence of isometric expansions from a single vertex.
We also need the following property of isometric expansions: Example 12.For partial cubes, the operation of isometric expansion can be viewed as the inverse to the operation of contraction of a Θ-class.For example, the two-dimensional partial cube M can be obtained from the two-dimensional partial cube M * (see Figure 2(b)) via an isometric expansion.In Figure 6 we present another isometric expansion M * of M * .By Proposition 10, M * is a partial cube but one can check that it is no longer two-dimensional.
Therefore, contrary to all partial cubes, the classes F(Q d+1 ) are not closed under arbitrary isometric expansions.In this subsection, we characterize the isometric expansions which preserve the class F(Q d+1 ).Let G be isometrically embedded in the hypercube Q Summarizing, we obtain the following property: The following lemma establishes an interesting separation property in partial cubes: and G 1 and G 2 shatter the same subset Y of X, then G 0 also shatters Y .
Proof.To prove that G 0 shatters Y it suffices to show that for any vertex ), and we are done.
Proof.The fact that G is a partial cube follows from Proposition 10.Let E m+1 be the unique Θ-class of G which does not exist in G. Then the halfspaces (G ) − m+1 and (G ) + m+1 of G are isomorphic to G 1 and G 2 and their boundaries ∂(G ) − m+1 and ∂(G Let us end this section with a useful lemma with respect to antipodal partial cubes: Proof.Suppose by way of contradiction that G has Q d as a pc-minor.Since convex subgraphs of H are intersections of halfspaces, there exists a Θ-class Since G has Q d as a pc-minor, −G also has Q d as a pc-minor: both those minors are obtained by contracting the same set I of Θ-classes of H; note that E i / ∈ I. Thus, contracting the Θ-classes from I and all other Θ-classes not crossing the Q d except E i , we will get an antipodal graph H , since antipodality is preserved by contractions.Now, H consists of two copies of Q d separated by E i .Take any vertex v in H . Then there is a path from v to −v first crossing all Θ-classes of the cube containing v and then E i , to finally reach −v.Thus, −v is adjacent to E i and hence every vertex of H is adjacent to E i .Thus H = Q d+1 , contrary to the assumption that H ∈ F(Q d+1 ).

Gated hulls of 6-cycles
In this section, we prove that in two-dimensional partial cubes the gated hull of any 6-cycle C is either C, or Q − 3 , or a maximal full subdivision of K n .4.1.Full subdivisions of K n .A full subdivision of K n (or full subdivision for short) is the graph SK n obtained from the complete graph K n on n vertices by subdividing each edge of K n once; SK n has n + n 2 vertices and n(n − 1) edges.The n vertices of K n are called original vertices of SK n and the new vertices are called subdivision vertices.Note that SK 3 is the 6cycle C 6 .Each SK n can be isometrically embedded into the n-cube Q n in such a way that each original vertex u i is encoded by the one-element set {i} and each vertex u i,j subdividing the edge ij of K n is encoded by the 2-element set {i, j} (we call this embedding of SK n a standard embedding).If we add to SK n the vertex v ∅ of Q n which corresponds to the empty set ∅, we will obtain the partial cube SK By Lemma 19, when a full subdivision H = SK n of a graph G ∈ F(Q 3 ) is fixed, we assume that G is isometrically embedded in a hypercube so that H is standardly embedded.
We describe next the isometric expansions of SK n which result in two-dimensional partial cubes.An isometric expansion of a partial cube G with respect to (G 1 , G 0 , G 2 ) is called peripheral if at least one of the subgraphs G 1 , G 2 coincides with G 0 , i.e., Lemma 20.If G is obtained from G := SK n with n ≥ 4 by an isometric expansion with respect to (G 1 , G 0 , G 2 ), then G ∈ F(Q 3 ) if and only if this is a peripheral expansion and G 0 is an isometric tree of SK n .
Proof.The fact that an isometric expansion of SK n , such that G 0 is an isometric tree, belongs to F(Q 3 ) follows from Proposition 15 and Lemma 17.Conversely, suppose that G belongs to F(Q 3 ).By Proposition 15, G 0 has VC-dimension ≤ 1 and by Proposition 9 G 0 is a virtual tree.It suffices to prove that G 1 or G 2 coincides with G 0 .Indeed, since G 1 and G 2 are isometric subgraphs of SK n , this will also imply that G 0 is an isometric tree.We distinguish two cases.
Case 1. First, let G 0 contain two original vertices u i and u j .Since u i and u j belong to G 1 and G 2 and those two subgraphs are isometric subgraphs of G, the unique common neighbor u i,j of u i and u j must belong to G 1 and G 2 , and thus to G 0 .If another original vertex u k belongs to G 0 , then the four vertices u i,j , u i , u j , u k of G 0 shatter the set {i, j}, contrary to the assumption that G 0 has VC-dimension ≤ 1 (Proposition 15).This implies that each other original vertex u k either belongs to G 1 \ G 2 or to G 2 \ G 1 .If there exist original vertices u k and u such that u k belongs to G 1 \ G 2 and u belongs to G 2 \ G 1 , then their unique common neighbor u k, necessarily belongs to G 0 .But in this case the four vertices u i,j , u i , u j , u k, of G 0 shatter the set {i, j}.Thus we can suppose that all other original vertices u k belong to G 1 \ G 2 .Moreover, for the same reason and since G 1 is an isometric subgraph of G, any vertex u k, with {k, } = {i, j} also belongs to G 1 \ G 2 .Since G 1 is an isometric subgraph of G, for any k = i, j, the vertices Case 2. Now, suppose that G 0 contains at most one original vertex.Let A 1 be the set of original vertices belonging to G 1 \ G 2 and A 2 be the set of original vertices belonging to G 2 \ G 1 .First suppose that |A 1 | ≥ 2 and |A 2 | ≥ 2, say u 1 , u 2 ∈ A 1 and u 3 , u 4 ∈ A 2 .But then the vertices u 1,3 , u 1,4 , u 2,3 , u 2,4 must belong to G 0 .Since those four vertices shatter the set {1, 3}, we obtain a contradiction that G 0 has VC-dimension ≤ 1.Hence, one of the sets A 1 or A 2 contains at most one vertex.Suppose without loss of generality that A 1 contains at least n − 2 original vertices u 1 , u 2 , . . ., u n−2 .First suppose that G 1 contains all original vertices.Then since G 1 is an isometric subgraph of G, each subdivision vertex u i,j also belongs to G 1 .This implies that G 1 = G and we are done.Thus suppose that the vertex u n does not belong to A 1 .Since G 0 contains at most one original vertex, one of the vertices u n−1 , u n , say u n , must belong to A 2 (i.e., to G 2 \ G 1 ).This implies that all vertices u i,n , i = 1, . . ., n − 2 belong to G 0 .Since n ≥ 4 and u n is the unique common neighbor of the vertices u i,n and u j,n with i = j and 1 ≤ i, j ≤ n − 2 and G 1 is an isometric subgraph of G, necessarily u n must be a vertex of G 1 , contrary to our assumption that u n ∈ A 2 .This contradiction concludes the proof of the lemma.
and G contains SK n with n ≥ 4 as a pc-minor, then G contains SK n as a convex subgraph.
Proof.Suppose by way of contradiction that G is a smallest graph in F(Q 3 ) which contains SK n as a pc-minor but does not contain SK n as a convex subgraph.This means that any contraction of G along a Θ-class of G that do not cross the SK n pc-minor, also contains this SK n as a pc-minor.We denote the resulting graph by G. Since G ∈ F(Q 3 ), by minimality choice of G , G contains SK n as a convex subgraph, denote this subgraph by H. Now, G is obtained from G by an isometric expansion.By Lemma 11, Lemma 20 this isometric expansion restricted to H = SK n is a peripheral expansion.This implies that the image of H under this expansion is a convex subgraph H of G which contains a copy of SK n as a convex subgraph, and thus G contains a convex copy of SK n .
Gatedness of full subdivisions of K n .The goal of this subsection is to prove the following result: Proof.The proof of Proposition 23 uses the results of previous subsection and two claims.
Proof.Suppose by way of contradiction that H = SK n does not extend in G to SK * n however H is not convex.Then there exists a vertex v ∈ V (G) \ V (H) such that v ∈ I(x, y) for two vertices x, y ∈ V (H).First note that x and y cannot be both original vertices.Indeed, if x = u i and y = u j , then in Q m the vertices x and y have two common neighbors: the subdivision vertex u i,j and v ∅ .But v ∅ is adjacent in Q m to all original vertices of H, thus it cannot belong to G because H = SK n does not extend to SK * n .Thus, further we can suppose that the vertex x is a subdivision vertex, say x = u i,j .We distinguish several cases depending of the value of d(x, y).

Case 1. d(x, y) = 2.
This implies that y = u i,k is also a subdivision vertex and x and y belong in H to a common isometric 6-cycle C. Since v belongs to conv(C), Lemma 22 implies that v is adjacent to the third subdivision vertex z = u j,k of C. Hence v = {i, j, k}.Since n ≥ 4, there exists = i, j, k such that { } is an original vertex of H and {i, }, {j, }, and {k, } are subdivision vertices of H. Contracting , we will obtain a forbidden Q 3 .
This implies that y = u k is an original vertex with k = i, j.Then again the vertices x and y belong in H to a common isometric 6-cycle C. Since v belongs to conv(C), Lemma 22 implies that either v is adjacent to u i , u j , and u k or to u i,j , u i,k , and u j,k , which was covered by the Case 1.
This implies that y = u k, is a subdivision vertex with k, = i, j.In view of the previous cases, we can suppose that v is adjacent to x or to y, say v is adjacent to x.Let Q be the convex hull of {x, y} in Q m .Then Q is a 4-cube and x = {i, j} has 4 neighbors in Q: {i}, {j}, {i, j, k} and {i, j, }.The vertices {i}, {j} are original vertices of H. Thus suppose that v is one of the vertices {i, j, k}, {i, j, }, say v = {i, j, k}.But then v is adjacent to {j, k}, which is a subdivision vertex of H and we are in the conditions of Case 1. Hence H is a convex subgraph of G.
Proof.Since H is convex, the vertex v ∅ of Q m is not a vertex of G. Let u i = {i}, i = 1, . . ., n be the original vertices of H. Suppose that in Q m the vertex v ∅ is adjacent to a vertex u of G, which is not included in H, say u = {n + 1}.Since u and each u i has in Q m two common neighbors v ∅ and u i,n+1 = {i, n + 1} and since G is an isometric subgraph of Q m , necessarily each vertex u i,n+1 is a vertex of G. Consequently, the vertices of H together with the vertices u, u 1,n+1 , . . ., u n,n+1 define an isometric subgraph H = SK n+1 of Q m .Since v ∅ does not belong to G, by Claim 24 H is convex, contrary to the assumption that H is not included in a larger convex full subdivision of G. Consequently, the neighbors in G of v ∅ are only the original vertices u 1 , . . ., u n of H. Now, we prove Proposition 23.Let G ∈ F(Q 3 ) be an isometric subgraph of the cube Q m in such that the embedding of H is standard.Let Q be the convex hull of H in Q m ; Q is a cube of dimension n and a gated subgraph of Q m .Let v be a vertex of G and v 0 be the gate of v in Q.To prove that H is gated it suffices to show that v 0 is a vertex of H. Suppose by way of contradiction that H is not gated in G and among the vertices of G without a gate in H pick a vertex v minimizing the distance d(v, v 0 ).Suppose that v is encoded by the set A. Then its gate v 0 in Q m is encoded by the set A 0 := A ∩ {1, . . ., n}.If |A 0 | = 1, 2, then A 0 encodes an original or subdivided vertex of H, therefore v 0 would belong to H, contrary to the choice of v.
First suppose that A 0 = ∅, i.e., v 0 = v ∅ .Since v ∅ is adjacent only to the original vertices of H, by Claim 25 all original vertices of H have distance k = d(v, v ∅ ) + 1 ≥ 3 to v. From the choice of v it follows that I(v, u i ) ∩ I(v, u j ) = {v} for any two original vertices u i and u j , i = j.Indeed, if I(v, u i ) ∩ I(v, u j ) = {v} and w is a neighbor of v in I(v, u i ) ∩ I(v, u j ), then d(w, u i ) = d(w, u j ) = k − 1. Therefore the gate w 0 of w in Q has distance at most k − 2 from w, yielding that d(v, w 0 ) = k − 1.This is possible only if w 0 = v 0 .Therefore, replacing v by w we will get a vertex of G whose gate w 0 = v 0 in Q does not belong to H and for which d(w, w 0 ) < d(v, v 0 ), contrary to the minimality in the choice of v. Thus I(v, u i ) ∩ I(v, u j ) = {v}.Let A = {n + 1, . . ., n + k − 1}.
If k = 3, then v is encoded by A = {n + 1, n + 2}.By Claim 25, any shortest path of G from u i = {i} to v must be of the form ({i}, {i, }, { }, {n + 1, n + 2}), where ∈ {n + 1, n + 2}.Since we have at least four original vertices, at least two of such shortest paths of G will pass via the same neighbor {n + 1} or {n + 2} of v, contrary to the assumption that I(v, u i ) ∩ I(v, u j ) = {v} for any u i and u j , i = j.If k ≥ 4, let G = π n+1 (G) and H = π n+1 (H) be the images of G and H by contracting the edges of Q m corresponding to the coordinate n + 1.Then G is an isometric subgraph of the hypercube Q m−1 and H is a full subdivision isomorphic to SK n isometrically embedded in G .Let also v , v ∅, and u i , i = 1, . . ., n, denote the images of the vertices v, v ∅ , and u i of G. Then u 1 , . . ., u n are the original vertices of H . Notice also that v has distance k − 1 to all original vertices of H and distance k − 2 to v ∅ .Thus in G the vertex v does not have a gate in H .By the minimality in the choice of v and H, either H is not convex in G or H is included in a larger full subdivision of G .If H is not convex in G , by Claim 24 v ∅ must be a vertex of G .Since v ∅ is not a vertex of G, this is possible only if the set {n + 1} corresponds to a vertex of G.But we showed in Claim 25 that the only neighbors of v ∅ in G are the original vertices of H.This contradiction shows that H is a convex.Therefore, suppose that H is included in a larger full subdivision H = SK n+1 of G .Denote by u = { } the original vertex of H different from the vertices u i , i = 1, . . ., n; hence / ∈ {1, . . ., n}.Since u is a vertex of G and in Q m the set { } does not correspond to a vertex of G, necessarily the set {n + 1, } is a vertex of G in Q m .Therefore, we are in the conditions of the previous subcase, which was shown to be impossible.This concludes the analysis of case A 0 = ∅.Now, suppose that |A 0 | ≥ 3 and let A 0 = {1, 2, 3, . . ., k}.This implies that the vertices u 1 , u 2 , u 3 are original vertices and u 1,2 , u 1,3 , u 2,3 are subdivision vertices of H. Since H = SK n with n ≥ 4, H contains an original vertex u with ≥ 4, say = 4.But then the sets corresponding to the vertices u 1 , u 2 , u 3 , u 4 , u 1,2 , u 1,3 , u 2,3 , and v of G shatter the set {1, 2, 3}, contrary to the assumption that G ∈ F(Q 3 ).This concludes the case |A 0 | ≥ 3. Consequently, for any vertex v of G the gate v 0 of v in Q belongs to H.This shows that H is a gated subgraph of G and concludes the proof of the proposition.4.3.Gated hulls of 6-cycles.The goal of this subsection is to prove the following result: In this case we assert that S is gated and thus gate(C) = conv(C).Suppose that G is a two-dimensional partial cube of smallest size for which this is not true.Let v be a vertex of G that has no gate in S and is as close as possible to S, where Since any convex subgraph of G is the intersection of halfspaces, if all Θ-classes of G cross S, then S coincides with G, contrary to the choice of G. Thus G contains Θ-classes not crossing S. First suppose that there exists a Θ-class Since the distance in G between v and any vertex of S is either the same as the distance in G between v and the corresponding vertex of S (if E i does not separate v from S) or is one less than the corresponding distance in G (if v and S belong to complementary halfspaces defined by E i ), S is not gated in G , namely the vertex v has no gate in S .Therefore, if S = Q − 3 , then contracting all Θ-classes of G separating S from v , we will get Q 3 as a pc-minor, contrary to the assumption that G and G belong to F(Q 3 ).This implies that S = C and thus that S = C.Moreover, by minimality of G, the 6-cycle C is included in a maximal full subdivision H = SK n of G .By Proposition 23, H is a gated subgraph of G .Let w be the gate of v in H (it may happen that w = v ).Since C is not gated, necessarily w is not a vertex of C .For the same reason, w is not adjacent to a vertex of C .The graph G is obtained from G by an isometric expansion ψ i (inverse to π i ).By Lemma 20, ψ i , restricted to H , is a peripheral expansion along an isometric tree of H .By Corollary 21, G contains an isometric subgraph isomorphic to H .By the choice of E i , C does not cross E i , and this implies that in G the convex cycle C is contained in a full subdivision of K n , contrary to the choice of C. Now, suppose that for any Θ-class E i of G not crossing S, S is not convex in G .Since C is an isometric 6-cycle of G , G ∈ F(Q 3 ), and the 6-cycle C is not convex in G , by Lemma 22 we conclude that the convex hull of C in G is Q − 3 and this Q − 3 is different from S .Hence S = C and S = C.This implies that there exists a vertex z of G adjacent to three vertices z 1 , z 2 , and z 3 of C .Let z 1 , z 2 , z 3 be the three preimages in C of the vertices z 1 , z 2 , z 3 .Let also y, z be the preimages in the hypercube Q m of the vertex z .Suppose that y is adjacent to z 1 , z 2 , z 3 in Q m .Since C is the image of the convex 6-cycle of G, this implies that y is not a vertex of G while z is a vertex of G. Since G is an isometric subgraph of Q m , G contains a vertex w 1 adjacent to z and z 1 , a vertex w 2 adjacent to z and z 2 , and a vertex w 3 adjacent to z and z 3 .Consequently, the vertices of C together with the vertices z, w 1 , w 2 , w 3 define a full subdivision SK 4 , contrary to our assumption that C is not included in such a subdivision.This shows that the convex hull of the 6-cycle C is gated.

Convex and gated hulls of long isometric cycles
In the previous section we described the structure of gated hulls of 6-cycles in two-dimensional partial cubes.In this section, we provide a description of convex and gated hulls of long isometric cycles, i.e., of isometric cycles of length ≥ 8.We prove that convex hulls of long isometric cycles are disks, i.e., the region graphs of pseudoline arrangements.Then we show that all such disks are gated.In particular, this implies that convex long cycles in two-dimensional partial cubes are gated.

Convex hulls of long isometric cycles.
A two-dimensional partial cube D is called a pseudo-disk if D contains an isometric cycle C such that conv(C) = D; C is called the boundary of D and is denoted by ∂D.If D is the convex hull of an isometric cycle C of G, then we say that D is a pseudo-disk of G. Admitting that K 1 and K 2 are pseudo-disks, the class of all pseudo-disks is closed under contractions.The main goal of this subsection is to prove the following result: Proof.The fact that disks are pseudo-disks follows from the next claim: i , y, w ∈ D − i .Let P, Q be two shortest paths in D − i connecting v with y and w, respectively.Since the total length of P and Q is equal to the shortest path of C from x to z passing through u, the paths P and Q intersect only in v. Extending P and Q, respectively within D − i ∩ C until −u, yields shortest paths P , Q that are crossed by all Θ-classes except E i .Therefore, both such paths can be extended to shortest (v, −v)-paths by adding the edge −u−v of E i .Similarly to the case of v, there are shortest paths P , Q from the vertex −v ∈ D + i to the vertices x, z ∈ C ∩ D + i .Again, P and Q intersect only in −v.Let E j be any Θ-class crossing P and E k be any Θ-class crossing Q.We assert that the set S := {u, v, x, y, z, w, −u, −v} of vertices of D shatter {i, j, k}, i.e., that contracting all Θ-classes except E i , E j , and E k yields a forbidden Q 3 .Indeed, E i separates S into the sets {u, x, −v, z} and {v, y, −u, w}, E j separates S into the sets {x, y, −v, −u} and {u, v, z, w}, and E k separates S into the sets {u, v, x, y} and {−v, −u, z, w}.This contradiction shows that A D ⊆ C, whence A D = C. Claim 30.If D is a pseudo-disk with boundary C, then D is an affine partial cube.Moreover, there exists an antipodal partial cube D ∈ F(Q 4 ) containing D as a halfspace.
Proof.First we show that D is affine.Let u, v ∈ D. Using the characterization of affine partial cubes provided by [34,Proposition 2.16] we have to show that for all vertices u, v of D one can find w, −w ∈ A D such that the intervals I(w, u) and I(v, −w) are not crossed by the same Θ-class of D. By Claim 29 this is equivalent to finding such w, −w in C. Let I be the index set of all Θ-classes crossing I(u, v).Without loss of generality assume that u ∈ D + i (and therefore v ∈ D − i ) for all i ∈ I.We assert that ( i∈I D + i ) ∩ C = ∅.Then any vertex from this intersection can play the role of w.
For i ∈ I, let By the Helly property for arcs of a circle, there exist three classes i, j, k ∈ I such that the paths C + i , C + j , and C + k pairwise intersect, together cover all the vertices and edges of the cycle C, and all three have empty intersection.This implies that C is cut into 6 nonempty paths: But then the six paths partitioning C together with u, v will shatter the set {i, j, k}, i.e., contracting all Θ-classes except i, j, k yields a forbidden Q 3 .
Consequently, D is an affine partial cube, i.e., D is a halfspace of an antipodal partial cube G, say D = G + i for a Θ-class E i .Suppose that G can be contracted to the 4-cube Since the contractions of Θ-classes commute, suppose without loss of generality that E i was contracted last.Let G be the partial cube obtained at the step before contracting E i .Let D be the isometric subgraph of G which is the image of D under the performed contractions.Since the property of being a pseudo-disk is preserved by contractions, D is a pseudo-disk, moreover D is one of the two halfspaces of G defined by the class E i restricted to G .Analogously, by Lemma 4 antipodality is preserved by contractions, whence G is an antipodal partial cube such that π i (G ) = Q 4 .This implies that G was obtained from H := Q 4 by an isometric antipodal expansion (H 1 , H 0 , H 2 ).Notice that one of the isometric subgraphs H 1 or H 2 of the 4-cube H, say H 1 coincides with the disk in two sets of vertices.However, no isometric cycle of Q 4 separates the graph.If D / ∈ F(Q 3 ) is the convex hull of an isometric cycle, then D is not necessarily affine, see X 5  4 in Figure 3. On the other hand, SK 4 ∈ F(Q 3 ) is affine but is not a pseudo-disk.Let us introduce the distinguishing feature.
Claim 31.If D is a pseudo-disk with boundary C, then D is a disk, i.e., the region graph of a pseudoline arrangement.
Proof.By Claim 30 we know that D is the halfspace of an antipodal partial cube G. Suppose by contradiction that G is not an OM.By [34] G has a minor X from the family Q − .Since the members of this class are non-antipodal, to obtain X from G not only contractions but also restrictions are necessary.We perform first all contractions I to obtain a pseudo-disk D := π I (D) ∈ F(Q 3 ) that is a halfspace of the antipodal graph G := π I (G).By the second part of Claim 30 we know that G ∈ F(Q 4 ).Now, since G contains X as a proper convex subgraph, by Lemma 16 we get X ∈ F(Q 3 ).Since SK 4 is the only member of the class Q − containing SK 4 as a convex subgraph, by Proposition 5, we obtain X = SK 4 .Assume minimality in this setting, in the sense that any further contraction destroys all copies of X present in D .We distinguish two cases.
First, suppose that there exists a copy of X which is a convex subgraph of D .Let n ≥ 4 be maximal such that there is a convex H = SK n in D extending a convex copy of X.By Proposition 23, H is gated.If H = D , there exists a Θ-class E i of D not crossing H. Contracting E i , by Lemma 3(iii) we will obtain a gated full subdivision π i (H) = SK n contrary to the minimality in the choice of D .Therefore D = H = SK n , but it is easy to see that all SK n , n ≥ 4, are not pseudo-disks, a contradiction.Now, suppose that no copy of X is a convex subgraph of D .Since G contains X as a convex subgraph, D is a halfspace of G (say D = (G ) + i ) defined by a Θ-class E i , and G is an antipodal partial cube, we conclude that E i crosses all convex copies H of X = SK 4 .Then E i partitions H into a 6-cycle C and a K 1,3 such that all edges between them belong to E i .The antipodality map of G maps the vertices of (G ) + i to vertices of (G ) − i and vice-versa.Therefore in D there must be a copy of K 1,3 and a copy of C = C 6 , and both such copies belong to the boundary ∂(G ) + i .The antipodality map is also edge-preserving.Therefore, it maps edges of E i to edges of E i and vertices of (G ) Consequently, all vertices of ∂(G ) − i have antipodes in the pseudo-disk D = (G ) + i and their antipodes also belong to ∂(G ) + i .This and Claim 29 imply that ∂(G ) + i ⊂ A D = ∂D .Therefore the isometric cycle ∂D contains an isometric copy of C 6 , whence ∂D = C 6 .Since ∂D also contains the leafs of a K 1,3 we conclude that the pseudo-disk D coincides with Q − 3 .However, the only antipodal partial cube containing Q − 3 as a halfspace is depicted in Figure 8 and it is an OM, leading to a contradiction.
Note that Claim 31 generalizes Lemma 22. Together with Claim 28 it yields that pseudo-disks are disks, i.e., tope graphs of AOMs of rank two, concluding the proof of Proposition 27. 5.2.Gated hulls of long isometric cycles.By Proposition 27 disks and pseudo-disks are the same, therefore, from now on we use the name "disk" for both.We continue by showing that in two-dimensional partial cubes all disks with boundary of length > 6 are gated.
In particular, convex long cycles of G are gated.
Proof.Let G be a minimal two-dimensional partial cube in which the assertion does not hold.Let D be a non-gated disk of G whose boundary C := ∂D is a long isometric cycle.Let v be a vertex of G that has no gate in D and is as close as possible to D, where d G (v, D) = min{d G (v, z) : z ∈ D}.We use some notations from the proof of [18, Proposition 1].Let Since D is not gated, R v contains at least two vertices.Obviously, P v ⊆ R v and the vertices of R v are pairwise nonadjacent.We denote the vertices of P v by x 1 , . . ., x k .For any x i ∈ P v , let v i be a neighbor of v on a shortest (v, x i )-path.By the choice of v, each v i has a gate in D. By the definition of P v , x i is the gate of v i in D. This implies that the vertices v 1 , . . ., v k are pairwise distinct.Moreover, since x i is the gate of v i in D, for any two distinct vertices x i , x j ∈ P v , we have We assert that any three distinct vertices x j , x k , x ∈ P v do not have a common neighbor.Suppose by way of contradiction that there exists a vertex x adjacent to x j , x k , x .Then x belongs to D by convexity of D and x j , x k , x ∈ I(x, v) since x j , x k , x ∈ P v .Let E j be the Θ-class of the edge v j v and let C k be the cycle of G defined by a (v, x j )-shortest path P passing via v j , the 2-path (x j , x, x k ), and a shortest (x k , v)-path Q passing via v k .Then E j must contain another edge of C k .Necessarily this cannot be an edge of P .Since v is a closest vertex to D without a gate, this edge cannot be an edge of Q.Since x j ∈ I(x, v), this edge is not xx j .Therefore the second edge of E j in C k is the edge xx k .This implies that v and x k belong to the same halfspace defined by E j , say G + j , and v j and x belong to its complement G − j .Using an analogously defined cycle C , one can show that the edge xx also belong to E j , whence the vertices x k and x belong to the same halfspace G + j .Since x ∈ I(x k , x ) and x ∈ G − j , we obtain a contradiction with convexity of G + j .Therefore, if x j , x k , x ∈ P v , then conv(x j , x k , x ) is an isometric 6-cycle of D. In particular, this implies that each of the intervals I(x j , x k ), I(x k , x ), I(x j , x ) consists of a single shortest path.
Lemma 36.If G is the 1-extension of G ∈ F(Q 3 ) and G is obtained with respect to the maximal by inclusion convex full subdivision H = SK n of G, then G ∈ F(Q 3 ) and G is an isometric subgraph of G .Moreover, any convex full subdivision SK r with r ≥ 3 of G is a convex full subdivision of G and any convex cycle of length ≥ 6 of G is a convex cycle of G.
Proof.Let G be an isometric subgraph of Q m .To show that G is an isometric subgraph of Q m it suffices to show that any vertex v of G can be connected in G with v ∅ by a shortest path.By Proposition 23 H is a gated subgraph of G and the gate v 0 of v in Q = conv(H) belongs to H.This means that if v is encoded by the set A and v 0 is encoded by the set A 0 = A ∩ {1, . . ., n}, then either A 0 = {i} or A 0 = {i, j} for an original vertex u i or a subdivision vertex u i,j .This means that d(v, v 0 ) = d(v, u i ) = |A| − 1 in the first case and d(v, v 0 ) = d(v, u i,j ) = |A| − 2 in the second case.Since d(v, v ∅ ) = |A|, we obtain a shortest (v, v ∅ )-path in G first going from v to v 0 and then from v 0 to v ∅ via an edge or a path of length 2 of H.This establishes that G is an isometric subgraph of Q m .Since any two neighbors of v ∅ in H have distance 2 in G and v ∅ is adjacent in G only to the original vertices of H, we also conclude that G is an isometric subgraph of G .Now we will show that G belongs to F(Q 3 ).Suppose by way of contradiction that the sets corresponding to some set S of 8 vertices of G shatter the set {i, j, k}.Since G ∈ F(Q 3 ), one of the vertices of S is the vertex v ∅ : namely, v ∅ is the vertex whose trace on {i, j, k} is ∅.Thus the sets corresponding to the remaining 7 vertices of S contain at least one of the elements i, j, k.Now, since H = SK n with n ≥ 4, necessarily there exists an original vertex u of H with / ∈ {i, j, k}.Clearly, u is not a vertex of S. Since the trace of { } on {i, j, k} is ∅, replacing in S the vertex v ∅ by u we will obtain a set of 8 vertices of G still shattering the set {i, j, k}, contrary to G ∈ F(Q 3 ).
It remains to show that any convex full subdivision of G is a convex full subdivision of G. Suppose by way of contradiction that H = SK r , r ≥ 3, is a convex full subdivision of G containing the vertex v ∅ .By Claim 25, in G v ∅ is adjacent only to the original vertices of H. Hence, if v ∅ is an original vertex of H then at least two original vertices of H are subdivision vertices of H and if v ∅ is a subdivision vertex of H then the two original vertices of H adjacent to v ∅ are original vertices of H.In both cases, denote those two original vertices of H by x = u i and y = u j .Since H is convex and u i,j is adjacent to u i and u j , u i,j must belong to H .But this implies that H contains the 4-cycle (x = u i , v ∅ , y = u j , u i,j ), which is impossible in a convex full subdivision.In a similar way, using Claim 25, one can show that any convex cycle of length ≥ 6 of G is a convex cycle of G. Now, suppose that we consequently perform the operation of 1-extension to all gated full subdivisions and to the occurring intermediate partial cubes.By Lemma 36 all such isometric subgraphs of Q m have VC-dimension 2 and all occurring convex full subdivisions are already convex full subdivisions of G.After a finite number of 1-extension steps (by the Sauer-Shelah-Perles lemma, after at most m ≤2 1-extensions), we will get an isometric subgraph G of Q m such that G ∈ F(Q 3 ), G is an isometric subgraph of G , and all maximal full subdivisions SK n of G are included in SK * n .We call G the canonical 1-completion of G.We summarize this result in the following proposition: ) is an isometric subgraph of the hypercube Q m , then after at most m ≤2 1-extension steps, G can be canonically completed to a two-dimensional COM G and G is an isometric subgraph of G .Proof.To prove that G is a two-dimensional COM, by second assertion of Proposition 5 we have to prove that G belongs to F(Q 3 , SK 4 ) = F(Q 3 ) ∩ F(SK 4 ).The fact that G belongs to F(Q 3 ) follows from Lemma 36.Suppose now that G contains SK 4 as a pc-minor.By Corollary 21, G contains a convex subgraph H isomorphic to SK 4 .Then H extends in G to a maximal by inclusion SK n , which we denote by H . Since G ∈ F(Q 3 ) and H does not extend to SK * 4 , H does not extend to SK * n either.By Claim 24 and Proposition 23 applied to G , we conclude that H is a convex and thus gated subgraph of G .Applying the second assertion of Lemma 36 (in the reverse order) to all pairs of graphs occurring in the construction transforming G to G , we conclude that H is a convex and thus gated full subdivision of G.But this is impossible because all maximal full subdivisions SK n of G are included in SK * n .This shows that G belongs to F(SK 4 ), thus G is a two-dimensional COM.That G is isometrically embedded in G follows from Lemma 36 and the fact that if G is an isometric subgraph of G and G is an isometric subgraph of G , then G is an isometric subgraph of G .
).Then we recursively apply the same construction to the cycle C and we call the resulting graph a cycle completion of G along a gated cycle C; see Figure 9 for an illustration.Proposition 38 establishes the basic properties of this construction, in particular it shows that the cycle completion along a gated cycle is well defined.
Proof.To prove (1), notice that the Θ-classes of G extend to G C,E j is a natural way, i.e., edges of the form v i v i for all 2 ≤ i ≤ k − 1 belong to E j , while an edge v i v i+1 belongs to the Θ-class of the edge v i v i+1 for all 1 ≤ i ≤ k − 1.Clearly, among the old vertices distances have not changed and the new vertices are embedded as an isometric path.If w ∈ C and u ∈ C is a new vertex, then it is easy to see that there is a shortest path using each Θ-class at most once.In fact, since w is at distance at most one from C it has a gate in C , i.e., the path only uses E j .Finally, let v be an old vertex of G \ C, w be its gate in C, and u be a new vertex, i.e., u ∈ G C,E j \ G. Let P be a path from v to u that is a concatenation of a shortest (v, w)-path P 1 and a shortest (w, u)-path P 2 .Since C is gated and all Θ-classes crossing P 2 also cross C, the Θ-classes of G crossing P 1 and the Θ-classes crossing P 2 are distinct.Since P 1 and P 2 are shortest paths, the Θ-classes in each of two groups are also pairwise different.Consequently, P is a shortest (v, u)-path and thus G C,E j is a partial cube.Finally, G is an isometric subgraph of G C,E j by construction.
To prove (2), let v ∈ G \ C .If v ∈ G \ C, let w be its gate in C. Thus there is a shortest (v, w)-path which does not cross the Θ-classes crossing C. Suppose that w / ∈ C , otherwise we are done.Then there exists a vertex w such that the edge ww belongs to E j .Since E j crosses C and not C , w is the gate of v in C .If v ∈ C \ C , using the previous argument, there exists an edge vv belonging to E j and we conclude that v is the gate of v in C .
To prove (3), suppose by way of contradiction that G C,E j has a Q 3 as a pc-minor.Then there exists a sequence s of restrictions ρ s and contractions π s such that s(G) = Q 3 .Recall that restrictions and contractions commute in partial cube [18].Hence, we get a graph G = π s (G) which contains a convex Q 3 .Thus, this pc-minor Q 3 can be obtained by contractions.Clearly, E j must be among the uncontracted classes, because π j (G C,E j ) = π j (G).Furthermore, if only one other Θ-class of C is not contracted in G C,E j , then contraction will identify all new vertices with (contraction) images of old vertices and again by the assumption G ∈ F(Q 3 ) we get a contradiction.Thus, the three classes that constitute the copy of Q 3 are E j and two other classes say E j , E j of C. Thus, the augmented C yields a Q − 3 in the contraction of G C,E j , but the last vertex of the Q 3 comes from a part of G.In other words, there is a vertex v ∈ G, such that all shortest paths from v to C cross E j , E j , or E j .This contradicts that C was gated, establishing that G C,E j ∈ F(Q 3 ).
To prove (4), suppose by way of contradiction that G C,E j contains a convex SK n .Since SK n has no 4-cycles nor vertices of degree one, the restrictions leading to SK n must either include E j or the class of the edge v 1 v 2 or v 2k−1 v 2k .The only way to restrict here in order to obtain a graph that is not a convex subgraph of G is restricting to the side of E j , that contains the new vertices.But the obtained graph cannot use new vertices in a convex copy of SK n because they form a path of vertices of degree two, which does not exist in a SK n .Thus G C,E j does not contain a convex SK n .
Propositions 37 and 38 allow us to prove Theorem 35.Namely, applying Proposition 37 to a graph G ∈ F(Q 3 ), we obtain a two-dimensional COM G , i.e. a graph G ∈ F(Q 3 , SK 4 ).Then, we recursively apply the cycle completion along gated cycles to the graph G and to the graphs resulting from G .By Proposition 38 (3), ( 4), all intermediate graphs belong to F(Q 3 , SK 4 ), i.e. they are two-dimensional COMs.This explain why we can recursively apply the cycle completion construction cycle-by-cycle.Since this construction does not increase the VC-dimension, by Sauer-Shelah lemma after a finite number of steps, we will get a graph (G ) ∈ F(Q 3 , SK 4 ) in which all convex cycles must be gated (by Propositions 26 and 32) and must have length 4.This implies that (G ) ∈ F(C 6 ).Consequently, (G ) ∈ F(Q 3 , C 6 ) and by Proposition 5 the final graph G = (G ) is a two-dimensional ample partial cube.This completes the proof of Theorem 35.For an illustration, see Figure 10.
Remark 39.One can generalize the construction in Proposition 38 by replacing a gated cycle C by a gated AOM that is the convex hull of C, such that all its convex cycles are gated.In a sense, this construction captures the set of all possible extensions of the graph G.

Cells and carriers
This section uses concepts and techniques developed for COMs [6] and for hypercellular graphs [18].Let C(G) denote the set of all convex cycles of a partial cube G and let C(G) be the 2-dimensional cell complex whose 2-cells are obtained by replacing each convex cycle C of length 2j of G by a regular Euclidean polygon [C] with 2j sides.It was shown in [33] that the set C(G) of convex cycles of any partial cube G constitute a basis of cycles.This result was extended in [18, Lemma 13] where it has been shown that the 2-dimensional cell complex C(G) of any partial cube G is simply connected.Recall that a cell complex X is simply connected if it is connected and if every continuous map of the 1-dimensional sphere S 1 into X can be extended to a continuous mapping of the (topological) disk D 2 with boundary S 1 into X.
Let G be a partial cube.For a Θ-class E i of G, we denote by N (E i ) the carrier of E i in C(G), i.e., the subgraph of G induced by the union of all cells of C(G) crossed by E i .The carrier N (E i ) of G splits into its positive and negative parts ) the extended halfspaces of E i .By Djoković's Theorem 1, halfspaces of partial cubes G are convex subgraphs and therefore are isometrically embedded in G.However, this is no longer true for carriers, half-carriers, and extended halfspaces of all partial cubes.However this is the case for two-dimensional partial cubes: ) and E i is a Θ-class of G, then the carrier N (E i ), its halves N + (E i ), N − (E i ), and the extended halfspaces are isometric subgraphs of G, and thus belong to F(Q 3 ).
Proof.Since the class F(Q 3 ) is closed under taking isometric subgraphs, it suffices to show that each of the mentioned subgraphs is an isometric subgraph of G.The following claim reduces the isometricity of carriers and extended halfspaces to isometricity of half-carriers: Claim 41.Carriers and extended halfspaces of a partial cube G are isometric subgraphs of G if and only if half-carriers are isometric subgraphs of G.
Proof.One direction is implied by the equality N + (E i ) := N (E i )∩G + i and the general fact that the intersection of a convex subgraph and an isometric subgraph of G is an isometric subgraph of G. Conversely, suppose that N + (E i ) and N − (E i ) are isometric subgraphs of G and we want to prove that the carrier N (E i ) is isometric (the proof for G ) is similar).Pick any two vertices u, v ∈ N (E i ).If u and v belong to the same half-carrier, say N + (E i ), then they are connected in N + (E i ) by a shortest path and we are done.Now, let u ∈ N + (E i ) and v ∈ N − (E i ).Let P be any shortest (u, v)-path of G. Then necessarily P contains an edge u , v with u ∈ ∂G + i ⊆ N + (E i ) and v ∈ ∂G − i ⊆ N − (E i ).Then u, u can be connected in N + (E i ) by a shortest path P and v, v can be connected in N − (E i ) by a shortest path P .The path P , followed by the edge u v , and by the path P is a shortest (u, v)-path included in N (E i ).
By Claim 41 it suffices to show that the half-carriers N + (E i ) and N − (E i ) of a two-dimensional partial cube G are isometric subgraphs of G.By Proposition 37, G is an isometric subgraph of its canonical COM-extension G .Moreover from the construction of G it follows that the carrier N (E i ) and its half-carriers N + (E i ) and N − (E i ) are subgraphs of the carrier N (E i ) and its half-carriers N + (E i ), N − (E i ) in the graph G .By [6,Proposition 6], carriers and their halves of COMs are also COMs.Consequently, N + (E i ) and N − (E i ) are isometric subgraphs of G .Since the graph G is obtained from G via a sequence of 1-extensions, it easily follows that any shortest path P ⊂ N + (E i ) between two vertices of N + (E i ) can be replaced by a path P of the same length lying entirely in N + (E i ).Therefore N + (E i ) is an isometric subgraph of the partial cube N + (E i ), thus the half-carrier N + (E i ) is also an isometric subgraph of G.
A partial cube G = (V, E) is a 2d-amalgam of two-dimensional partial cubes G 1 = (V 1 , E 1 ), G 2 = (V 2 , E 2 ) both isometrically embedded in the cube Q m if the following conditions are satisfied: (2) the subgraph G 12 of Q m induced by V 1 ∩ V 2 is a two-dimensional partial cube and each maximal full subdivision SK n of G 12 is maximal in G; (3) G is a partial cube.
As a last ingredient for the next proposition we need a general statement about COMs.
Lemma 42.If G is a COM and the cube Q d is a pc-minor of G, then there is an antipodal subgraph H of G that has Q d as a pc-minor.
Proof.By [34, Lemma 6.2.], if H is an antipodal subgraph of a COM G and G is an expansion of G, then the expansion H of H in G is either antipodal as well or is peripheral, where the latter implies that H contains H as a convex subgraph.In either case G contains an antipodal subgraph, that has H as minor.Since Q d is antipodal, considering a sequence of expansions from Q d = G 0 , . . .G k = G every graph at an intermediate step contains an antipodal subgraph having Q d as a minor.
Proposition 43.Two-dimensional partial cubes are obtained via successive 2d-amalgamations from their gated cycles and gated full subdivisions.Conversely, the 2d-amalgam of twodimensional partial cubes G 1 = (V 1 , E 1 ) and G 2 = (V 2 , E 2 ) of Q m is a two-dimensional partial cube of Q m in which every gated cycle or gated full subdivision belongs to at least one of the two constituents.
Proof.Let G = (V, E) be a two-dimensional partial cube which is not a single cell.We can suppose that G is 2-connected, otherwise we can do an amalgam along an articulation vertex.We assert that G contains two gated cells intersecting in an edge.Since the intersection of two gated sets is gated and any cell does not contain any proper gated subgraph except vertices and edges, the intersection of any two cells of G is either empty, a vertex, or an edge.If the last case never occur, since any convex cycle of G is included in a single cell, any cycle of G containing edges of several cells (such a cycle exists because G is 2-connected) cannot be written as a modulo 2 sum of convex cycles.This contradicts the result of [33] that the set of convex cycles of any partial cube G constitute a basis of cycles.Pick two gated cells C 1 and C 2 intersecting in an edge e.Let E i be a Θ-class crossing C 1 and not containing e. Since C 2 is gated, C 2 is contained in one of the halfspaces G + i or G − i , say C 2 ⊆ G + i .Notice also that C 2 is not included in the carrier N (E i ).Set G 1 := G − i ∪ N + (E i ) and G 2 := G + i .By Proposition 40, G 1 , G 2 , and G 1 ∩ G 2 = N + (E i ) are two-dimensional partial cubes, thus G is a 2d-amalgam of G 1 and G 2 .Conversely, suppose that a partial cube G is a 2d-amalgam of two-dimensional partial cubes G 1 and G 2 .Consider the canonical COM completions G 1 and G 2 of G 1 and G 2 , which are in F(Q 3 ) by the Lemma 36.Then G 1 ∩ G 2 coincides with G 12 .Therefore, by [6,Proposition 7] this provides a COM G , which is a COM amalgam of G 1 and G 2 along G 12 without creating the hyperplane of the Θ-class E i of N (E i ) is a virtual isometric tree.Since this hyperplane of N (E i ) coincides with the hyperplane H i of G, we deduce that all hyperplanes of G are virtual isometric trees, establishing (ii)⇒(iii).The implication (iii)⇒(i) follows from Propositions 6 and 9.The equivalence (i)⇔(iv) follows from Proposition 15.The equivalence (i)⇔(v) follows from Proposition 43.The implication (i)⇒(vi) follows from Theorem 35 and the implication (vi)⇒(i) is evident.Finally, the implication (i)⇒(vii) is the content of Theorem 33.
Note that it is not true that if in a partial cube G the convex hull of every isometric cycle is in F(Q 3 ), then G ∈ F(Q 3 ); see X 4  2 in Figure 3.However, we conjecture that the condition (vii) of Theorem 45 is equivalent to conditions (i)-(vi): Conjecture 46.Any partial cube G in which the gated hull of each isometric cycle is a disk or a full subdivision is two-dimensional.

Final remarks
In this paper, we provided several characterizations of two-dimensional partial cubes via hyperplanes, isometric expansions and amalgamations, cells and carriers, and gated hulls of isometric cycles.One important feature of such graphs is that gated hulls of isometric cycles have a precise structure: they are either full subdivisions of complete graphs or disks, which are plane graphs representable as graphs of regions of pseudoline arrangements.Using those results, first we show that any two-dimensional partial cube G can be completed in a canonical way to a COM G of rank 2 and that G can be further completed to an ample partial cube G := (G ) of VC-dimension 2. Notice that G is isometrically embedded in G and that G is isometrically embedded in G .This answers in the positive (and in the strong way) the question of [39] for partial cubes of VC-dimension 2. However, for Theorem 35 it is essential that the input is a partial cube: Figure 11 presents a (non-isometric) subgraph Z of Q 4 of VC-dimension 2, such that any ample partial cube containing Z has VC-dimension 3. Therefore, it seems to us interesting and nontrivial to solve the question of [47] and [39] for all (non-isometric) subgraphs of hypercubes of VC-dimension 2 (alias, for arbitrary set families of VC-dimension 2).
It is also important to investigate the completion questions of [39] and [47] for all partial cubes from F(Q d+1 ) (i.e., for partial cubes of VC-dimension ≤ d).For this, it will be interesting to see which results for partial cubes from F(Q 3 ) can be extended to graphs from F(Q d+1 ).We have the impression, that some of the results on disks can be extended to balls; a partial cube is a d-ball if G ∈ F(Q d+1 ) and G contains an isometric antipodal subgraph C ∈ F(Q d+1 ) such that G = conv(C).With this is mind, one next step would be to study the class F(Q 4 ).

Figure 1 .
Figure 1.A two-dimensional partial cube M

Figure 2 .
Figure 2. (a) The halfspaces and their boundaries defined by a Θ-class E i of M .(b) The two-dimensional partial cube M * = π i (M ) obtained from M by contracting E i .

Figure 4 .
Figure 4.The system of sign-vectors associated to an arrangement of hyperplanes restricted to a convex set and the tope graph of the resulting realizable COM.

Figure 5 .
Figure 5. From upper left to bottom right: a disk G, a pseudoline arrangement U whose region graph is G, adding a line ∞ to U , the pseudocircle arrangement U obtained from U ∪ { ∞ } with a centrally mirrored copy, the pseudocircle arrangement U with region graph G , the OM G with halfspace G.
contrary to Lemma 2. To prove the converse implication, denote by H d−1 the set of all partial cubes of G in which the hyperplanes have VC-dimension ≤ d − 1.We assert that H d−1 is closed under taking pc-minors.First, H d−1 is closed under taking restrictions because the hyperplanes H i of any convex subgraph G of a graph G ∈ H d−1 are subgraphs of the respective hyperplanes H i of G. Next we show that H d−1 is closed under taking contractions.
this implies that any set Y of size d + 1 shattered by G contains the element m + 1.Let Y = Y \ {m + 1}.The (m + 1)th halfspaces (G ) − m+1 and (G ) + m+1 of G shatter the set Y .Since (G ) − m+1 and (G ) + m+1 are isomorphic to G 1 and G 2 , the subgraphs G 1 and G 2 of G both shatter Y .By Lemma 14, the subgraph G 0 of G also shatters Y .Since |Y | = d, this contradicts our assumption that G 0 has VC-dimension ≤ d − 1.

Proof.
By definition, D is the region graph of an arrangement A of pseudolines.The cycle C is obtained by traversing the unbounded cells of the arrangement in circular order, i.e., C = ∂D.This cycle C is isometric in D because the regions corresponding to any two opposite vertices v and −v of C are separated by all pseudolines of A, thus d D (v, −v) = |A|.Moreover, conv(C) = D because for any other vertex u of D, any pseudoline ∈ A separates exactly one of the regions corresponding to v and −v from the region corresponding to u, whence d D (v, u) + d D (u, −v) = d D (v, −v).The remaining part of the proof is devoted to prove that any pseudo-disk is a disk.Let D be a pseudo-disk with boundary C. Let A D := {v ∈ D : v has an antipode}.As before, for a Θ-class E i of D, by D + i and D − i we denote the complementary halfspaces of D defined by E i .Claim 29.If D is a pseudo-disk with boundary C, then A D = C. Proof.Clearly, C ⊆ A D .To prove A D ⊆ C, suppose by way of contradiction that v, −v are antipodal vertices of D not belonging to C. Contract the Θ-classes until v is adjacent to a vertex u ∈ C, say via an edge in class E i (we can do this because all such classes crosses C and by Lemma 3(ii) their contraction will lead to a disk).Let u ∈ D + i and v ∈ D − i .Since D = conv(C), the Θ-class E i crosses C. Let xy and zw be the two opposite edges of C belonging to E i and let x, z ∈ D +

6. 2 .
Completion to ample two-dimensional partial cubes.Let G ∈ F(Q 3 ), C a gated cycle of G, and E j a Θ-class crossing C. Set C := (v 1 , v 2 , . . ., v 2k ), where the edges v 2k v 1 and v k v k+1 are in E j .The graph G C,E j is defined by adding a path on vertices

Figure 9 .
Figure 9. (a) G C,E j is obtained by adding the white vertices to a graph G with a gated cycle C = (v 1 , v 2 , . . ., v 8 ).(b) A cycle completion of G along the cycle C = (v 1 , v 2 , . . ., v 8 ).

Figure 10 .
Figure 10.An ample completion M of the running example M .

Figure 11 .
Figure 11.A subgraph Z of Q 4 of VC-dimension 2, such that any ample partial cube containing Z has VC-dimension 3.