The direct sum of $q$-matroids

For classical matroids, the direct sum is one of the most straightforward methods to make a new matroid out of existing ones. This paper defines a direct sum for $q$-matroids, the $q$-analogue of matroids. This is a lot less straightforward than in the classical case, as we will try to convince the reader. With the use of submodular functions and the $q$-analogue of matroid union we come to a definition of the direct sum of $q$-matroids. As a motivation for this definition, we show it has some desirable properties.


Introduction
The study of q-matroids, introduced by Crapo [6], has recently attracted renewed attention because of its link to network coding.After the reintroduction of the object by Jurrius and Pellikaan [14] and independently that of (q, r)-polymatroids by Shiromoto [18], several other papers have studied these objects, often in relation to rank metric codes.See for example [5,7,8,11,10,13,16].
Roughly speaking, a q-analogue in combinatorics is a generalisation from sets to finite dimensional vector spaces.So a q-matroid is a finite dimensional vector space with a rank function defined on its subspaces, satisfying certain properties.One can also view this generalisation from the point of view of the underlying lattice: where matroids have the Boolean lattice (of sets and subsets) as their underlying structure, q-matroids are defined over the subspace lattice.The work of finding a q-analogue often comes down to writing a statement about sets in such a lattice-theoretic way that the q-analogue is a direct rephrasing for the subspace lattice.However, this is often not a trivial task, for two reasons.First, there might be several equivalent ways to define something over the Boolean lattice, where the q-analogues of these statements are not equivalent.Secondly, some statements on the Boolean lattice do not have a q-analogue: the subspace lattice is, contrarily to the Boolean lattice, not distributive.
In this paper we consider the direct sum of two q-matroids.An option to do this is to extend to the realm of sum-matroids [16], but we are looking for a construction that gives a q-matroid.This is one of the cases as mentioned above where the q-analogue is a lot harder than the relatively simple procedure of taking the direct sum of two classical matroids.The latter is defined as follows.Let E 1 and E 2 be disjoint sets and let E = E 1 ∪ E 2 .Let M 1 = (E 1 , r 1 ) and M 2 = (E 2 , r 2 ) be two matroids.Then the direct sum M 1 ⊕ M 2 is a matroid with ground set E. For its rank function, note that we can write any A ⊆ E as a disjoint union A = A 1 A 2 with A 1 ⊆ E 1 and A 2 ⊆ E 2 .The rank function of the direct sum M 1 ⊕ M 2 is now given by r(A) = r 1 (A 1 ) + r 2 (A 2 ).If we try to mimic this procedure in the q-analogue, we run into trouble quite fast.Let E 1 and E 2 be disjoint subspaces and let E = E 1 ⊕ E 2 .If we consider a subspace A ⊆ E, it might be that we cannot write it as a direct sum A 1 ⊕ A 2 , with A 1 ⊆ E 1 and A 2 ⊆ E 2 .In fact, most of the subspaces of E can not be written in this way.Our goal is to define a rank function for these subspaces.A naive try is to define a rank function in the q-analogue for all spaces A ⊆ E that can be written as A 1 ⊕ A 2 , and hope that the axioms for the rank function take care of the rest of the spaces.However, as we show with an example in Section 3, this procedure does not give us a unique direct sum.As a byproduct of this example, we find the smallest non-representable q-matroid.
Our solution for the direct sum of q-matroids is the following.We will first define the notion of matroid union for q-matroids in Section 5.This notion is dual to matroid intersection, that we consider in Section 6.Then we show in Section 7 that the direct sum of a q-matroid and a loop can be defined.Finally, we define the direct sum of two q-matroids by first adding loops to get two q-matroids on the same ground space, and then taking their matroid union.To motivate this definition we show that this construction has several desirable properties.First of all, it generalises our naive attempt in Section 3. Also, taking the dual of a direct sum is isomorphic to first taking duals and then taking the direct sum.Lastly, restriction and contraction to E 1 and E 2 give back one of the original q-matroids.
We finish this paper by briefly considering what it would mean for a q-matroid to be connected (Section 8).As one might assume from the difficulty of the direct sum, this is also not an easy endeavour.We outline the problems that appear when trying to make a q-analogue of some of the several equivalent definitions of connectedness in classical matroids.
At the end of this paper (Appendix A) we give a catalogue of small q-matroids.In the paper, we will often refer to examples from this catalogue.Since the study of q-matroids is a relatively new one, we hope this catalogue to be useful for others learning about q-matroids.

Preliminaries
Following the notation of [5] we denote by n a fixed positive integer and by E a fixed n-dimensional vector space over an arbitrary field F. The notation L(E) indicates the lattice of subspaces of E. For any A, B ∈ L(E) with A ⊆ B we denote by [A, B] the interval between A and B, that is, the lattice of all subspaces X with A ⊆ X ⊆ B. For A ⊆ E we use the notation L(A) to denote the interval [{0}, A].For more background on lattices, see for example Birkhoff [1].
We use the following definition of a q-matroid.Definition 1.A q-matroid M is a pair (E, r) where r is an integer-valued function defined on the subspaces of E with the following properties: (R1) For every subspace A ∈ L(E), 0 ≤ r(A) ≤ dim A.
The function r is called the rank function of the q-matroid.
Sometimes, we will need to deal with the rank functions of more than one qmatroid at a time, say M, M , with ground spaces E, E , respectively.In order to distinguish them (and emphasize the q-matroid in which we are computing the rank), we will write r(M; A) for the rank in M of a subspace A ⊆ E and r(M ; A ) for the rank in M of a subspace A ⊆ E .For a q-matroid M with ground space E, we use r(M) as notation for r(M; E).We will use the axioms of the rank functions repeatedly in our proofs, as well as the following lemma that follows by induction from the axiom (R2') in [5,Theorem 31].
A way to visualise a q-matroid is by taking the Hasse diagram of the underlying subspace lattice and colour all the covers: red if the rank goes up and green if the rank stays the same.This is done in Appendix A. More properties of this bicolouring can be found in [2].There are several important subspaces in q-matroids.
An independent subspace that is maximal with respect to inclusion is called a basis.A subspace that is not an independent space of (E, r) is called a dependent space of the q-matroid (E, r).We call C ∈ L(E) a circuit if it is itself a dependent space and every proper subspace of C is independent.A spanning space of the q-matroid (E, r) is a subspace S such that r(S ) = r(E).A subspace A of a q-matroid (E, r) is called a flat if for all 1-dimensional subspaces x ∈ L(E) such that x A we have A subspace H is called a hyperplane if it is a maximal proper flat, i.e., if H E and the only flat that properly contains H is E. A 1-dimensional subspace is called a loop if r( ) = 0.All loops together form a subspace ([14, Lemma 11]) that we call the loop space of M.
A q-matroid can be equivalently defined by its independent spaces, bases, circuits, spanning spaces, flats and hyperplanes.See [5] for an overview of these cryptomorphic definitions.We will explicitly use the axioms for circuits: We define the following circuit axioms.
If C satisfies the circuit axioms (C1)-(C3), we say that (E, C) is a collection of circuits.
Recall that a lattice isomorphism between a pair of lattices (L 1 , ≤ 1 , ∨ 1 , ∧ 1 ) and (L 2 , ≤ 2 , ∨ 2 , ∧ 2 ) is a bijective function ϕ : L 1 −→ L 2 that is order-preserving and preserves the meet and join, that is, for all x, y ∈ L 1 we have that ϕ(x ∧ 1 y) = ϕ(x) ∧ 2 ϕ(y) and ϕ(x ∨ 1 y) = ϕ(x) ∨ 2 ϕ(y).A lattice anti-isomorphism between a pair of lattices is a bijective function ψ : L 1 −→ L 2 that is order-reversing and interchanges the meet and join, that is, for all x, y ∈ L 1 we have that ψ(x We hence define a notion of equivalence and duality between q-matroids.
Definition 5. Let E 1 , E 2 be vector spaces over the same field and M 2 = (E 2 , r 2 ) be q-matroids.We say that M 1 and M 2 are lattice-equivalent or isomorphic if there exists a lattice isomorphism ϕ : In this case we write M 1 M 2 .
Fix an anti-isomorphism ⊥: L(E) −→ L(E) that is an involution.For any subspace X ∈ L(E) we denote by X ⊥ the dual of X in E with respect to ⊥.Note that since an anti-isomorphism preserves the length of intervals, we have for any Important operations on q-matroids are restriction, contraction and duality.We give a short summary here and refer to [4,14] for details.Definition 6.Let M = (E, r) be a q-matroid.Then M * = (E, r * ) is also a q-matroid, called the dual q-matroid, with rank function The subspace B is a basis of M if and only if B ⊥ is a basis of M * .From bi-colouring point of view, we get the dual q-matroid by turning the Hasse diagram upside down and interchange all red and green covers.Definition 7. Let M = (E, r) be a q-matroid.The restriction of M to a subspace X is the q-matroid M| X with ground space X and rank function r M| X (A) = r M (A).The contraction of M of a subspace X is the q-matroid M/X with ground space E/X and rank function r M/X (A) = r M (A) − r M (X).A q-matroid that is obtained by restriction and contraction of M is called a minor of M. Theorem 8. Restriction and contraction are dual operations, that is, M * /X (M| X ⊥ ) * and (M/X) * M * | X ⊥ .
Finally, we will define what it means for a q-matroid to be representable and give an example of an important class of q-matroids.Definition 9. Let M = (E, r) be a q-matroid of rank k over a field K. Let A ⊆ E and let Y be a matrix with column space A. We say that M is representable if there exists a k × n matrix G over an extension field L/K such that r(A) is equal to the matrix rank of GY over L.
Example 10.Let k be a positive integer, k ≤ n.The uniform q-matroid is the q-matroid M = (E, r) with rank function defined as follows: We denote this q-matroid by U k,n .

Intuitive try for the direct sum
As stated in the introduction, the q-analogue of the direct sum is not straightforward.Let E = E 1 ⊕ E 2 be a direct sum of subspaces and let A ⊆ E. Then we cannot, in general, decompose With other cryptomorphic definitions of q-matroids we run into similar problems.
Look for example at the independent spaces.In the classical case, the independent sets of the direct sum M 1 ⊕ M 2 are the unions of an independent set in M 1 and an independent set in M 2 .If we want to take the direct sum of the q-matroids M 1 = U 1,1 and M 2 = U 1,1 , we expect all subspaces to be independent.However, not all such spaces can be written as the sum of an independent space in M 1 and an independent space in M 2 .Similar problems arise when trying to construct the bases and circuits of the direct sum of the q-matroids M 1 and M 2 .
In this section we explore if we can define the rank function of a direct sum of q-matroids by simply defining r(A) = r 1 (A 1 ) + r 2 (A 2 ) for all A that can be written as A = A 1 ⊕ A 2 , and hoping that the rank axioms will take care of the rest of the subspaces.(Spoiler alert: it will not work).

First definition and properties
Let us make our first trial to define the direct sum.We start with a definition mimicking the classical case.We consider these properties desirable for the direct sum of q-matroids.We also prove some direct consequences of these properties.The properties from Definition 11 will turn out not to define a unique q-matroid, hence they are not sufficient for defining the direct sum of q-matroids.However, our final definition will satisfy these properties.
Definition 11.Let M 1 = (E 1 , r 1 ) and M 2 = (E 2 , r 2 ) be two q-matroids on trivially intersecting ground spaces.For a q-matroid M = (E, r) on the ground space E = E 1 ⊕ E 2 we define the following properties: • the minors M| E 1 and M/E 2 are both isomorphic to M 1 , • the minors M| E 2 and M/E 1 are both isomorphic to M 2 .
In particular, it follows from this construction that the rank of M is the sum of the ranks of M 1 and M 2 .The next theorem shows that this definition is equivalent to what we recognise as the q-analogue of the definition of direct sum in the classical case.
Theorem 12. Let M 1 = (E 1 , r 1 ) and M 2 = (E 2 , r 2 ) be two q-matroids on trivially intersecting ground spaces.We define a q-matroid M = (E, r) on the ground space E = E 1 ⊕ E 2 .Then M satisfies the properties of Definition 11 if and only if for each Proof.First, assume M satisfies the properties of Definition 11.Note that for all A ⊆ E 1 we have r(A) = r(M; A) = r(M| E 1 ; A) = r 1 (A) and similarly, for all B ⊆ E 2 we have r(B) = r 2 (B).So we need to show that r(A + B) = r(A) + r(B).We prove this by applying semimodularity multiple times.We claim that r(M; E 1 + B) = r(M; E 1 ) + r(M; B).Indeed, r(M/E 1 ; (E 1 + B)/E 1 ) = r(M 2 ; B) by Definition 11.Moreover, by Definition 7, r(M/E 1 ; This implies that r(A + B) ≥ r(A) + r(B).
Combining the two inequalities gives the desired equality: r(A + B) = r(A) + r(B).
For the other implication, suppose that r(A+ B) = r 1 (A)+r 2 (B).The two conditions in Definition 11 are symmetric, so we only need to prove the first one.We show that the rank function on M| E 1 is equal to the rank function on It follows that M| E 1 and M/E 2 are both isomorphic to M 1 .
As mentioned, the classical case of this last theorem is exactly the definition of the rank in the direct sum of matroids.This implies that Definition 11, when applied to the classical case, completely determines the direct sum.We will see in the next subsection that this is not the case in the q-analogue.
We will close this section with some small results that show that Definition 11 implies the rank of all spaces of dimension and codimension 1.Note that the next results only depend on Definition 11, with the exception of Lemma 14.
Proposition 13.Let M be a q-matroid satisfying the properties of Definition 11.
Suppose M 1 has loop space L 1 and M 2 has loop space L 2 .Then the loop space of M is L 1 ⊕ L 2 .
Proof.Since loops come in subspaces [14,Lemma 11], L 1 ⊕ L 2 in E only contains loops.We will show M contains no other loops.Suppose, towards a contraction, that there is a loop in M that is not in L 1 ⊕ L 2 .By assumption, is not in E 1 or in E 2 .First we apply the semimodular inequality to E 1 and : We claim that this space has rank 1. Towards a contradiction, suppose r(x) = 0 hence x ⊆ L 2 .Then r( + x) = 0. Let y be the 1-dimensional space ( We conclude that r(x) = 1.Now we apply the semimodular inequality to E 1 + and E 2 .
and this is a contradiction.So there are no loops outside L 1 ⊕ L 2 in M.
In particular, since we know exactly what are the loops of the direct sum, we know that all other 1-dimensional spaces have rank 1. Dually, we can derive a similar result for the codimension-1 spaces.The next Lemma holds for all q-matroids.It is the dual of the statement that loops come in subspaces.Lemma 14.Let M = (E, r) be a q-matroid.Let H be the intersection of all codimension 1 spaces in E of rank r(M) − 1.Then the spaces A such that H ⊆ A ⊆ E are exactly all the elements of Hence X ⊥ is a loop in M * .This implies that H ⊥ is the sum of all loops in M * , hence it is the loop space of M * and there are no other loops in M * .For any A such that by the same calculation as above.This implies the only spaces A for which it holds that r(E) − r(A) = dim E − dim A, are the spaces such that H ⊆ A ⊆ E.
The next result is the dual of Proposition 13.
Proposition 15.Let M be a q-matroid satisfying the properties of Definition 11.Suppose M 1 and M 2 do not have any codimension 1 spaces of rank r(M 1 ) − 1 and r(M 2 ) − 1, respectively.Then M does not have any codimension 1 spaces of rank r(M) − 1.
Proof.Suppose, towards a contraction, that there is a codimension 1 space and by construction it has rank r(E 1 ).Now we apply the semimodular inequality to E 1 and H.
and this is a contradiction.So there are no codimension 1 spaces in of rank r(M) in M.

Non-uniqueness of the first definition
In this section we show by example that Definition 11 does not uniquely define the direct sum of q-matroids.
We will attempt to construct the direct sum M = M 1 ⊕ M 2 .We assume that it has the properties from Definition 11.So the q-matroid M has at least two circuits: E 1 and E 2 .Our goal is to determine M completely.Note that Theorem 12 defines the rank for all subspaces of E that can be written as a direct sum of a subspace of E 1 and a subspace of E 2 .
All 1-dimensional spaces in E have rank 1 because of Proposition 13 and by Proposition 15 all 3-dimensional spaces in E have rank 2. This means that what is left to do is to decide for all 2-dimensional spaces if they have rank 1 or rank 2, that is, whether they are a circuit or an independent space.We use the next lemma for this.
This means that every 2-dimensional space that intersects with either E 1 or E 2 is independent.A counting argument shows that there are only six 2-dimensional spaces that have trivial intersection with both E 1 and E 2 .Denote by A, B, C, D, F, G the six 2-spaces of unknown rank.The following is independent of a choice of basis for E, but for convenience, we can coordinatize the spaces in the following way: Note that {E 1 , E 2 , A, B, C} and {E 1 , E 2 , D, F, G} form a spread in E (a spread is a set of subspaces of the same dimension such that every 1-dimensional space is in exactly one spread element [17]).The two spreads are isomorphic, in the sense that a change of basis of E maps one to the other.Since A, B, and C all intersect D, F, and G, deciding that at least one of {A, B, C} is a circuit means {D, F, G} are all independent, and vice versa.So, without loss of generality, we have completely determined the matroid M if we have found which of the three 2-dimensional spaces A, B, and C are circuits and this implies that D, F, G are all independent.
Lemma 17.Every 3-dimensional space T contains an element of the spread Proof.This can be done via a counting argument and the pigeon hole principle.
T intersects all spread elements in dimension at least 1, since dim E = 4.All 1-dimensional subspaces of E are by definition contained in exactly one spread element.There are five spread elements and seven 1-dimensional subspaces in T , so there has to be a spread element that contains at least two 1-dimensional subspaces of T , and hence intersects it in dimension 2. But that means the whole spread element is contained in T .
If A, B, and C are all circuits, there are no other circuits because of Lemma 16 and axiom (C2).If not all of A, B, and C are circuits, there have to be circuits of dimension 3.These will be all the 3-dimensional spaces that do not contain a circuit of dimension 2. These circuits do, however, contain an element of the spread, by Lemma 17.
We check the circuit axioms for this construction.(C1) and (C2) are clear.For (C3), notice that the sum of every pair of circuits is equal to E. Thus it is sufficient to show that every 3-space contains a circuit.This is true by construction: a 3-space either contains a 2-dimensional circuit, or it is a circuit itself.
We have seen that no matter what we decide for the independence of A, B, and C, we always get a q-matroid.This means that the properties of the direct sum as in Definition 11 are not enough to determine the direct sum completely: we can make a q-matroid with 2, 3, 4 or 5 circuits that all satisfy this definition.

A small non-representable q-matroid
As a byproduct of the example in the previous section, we find a non-representable q-matroid in dimension 4. The existence of non-representable q-(poly)matroids was established and discussed in [11].However, the example here is not included in their construction and it is also the smallest possible non-representable q-matroid.
In the classical case, the smallest non-representable matroid is of size 8 and rank 4 (the Vámos matroid).For q-matroids it is smaller: dimension 4 and rank 2.
Proposition 18.Let M be a representable q-matroid over F 2 of rank 2 and dimension 4, with (at least) two circuits of dimension 2 and no loops.Then the matrix representing M has the shape Proof.Since M has rank 2 and dimension 4, the shape of the matrix is with all entries in F 2 m .Without loss of generality we apply row reduction and get x 1 = 1, y 1 = 0. Since there are no loops, the columns of G cannot be all zero.Consider now the two circuits.They are, without loss of generality, E 1 := (1, 0, 0, 0), (0, 1, 0, 0) and E 2 := (0, 0, 1, 0), (0, 0, 0, 1) .We have for whose rank must be one, leading to y 2 = 0. Similarly, for E 2 we have whose rank must be one, leading to the fact that (x 3 , x 4 ) and (y 3 , y 4 ) are scalar multiples.By row reduction we can conclude that x 3 = x 4 = 0 and the absence of loops implies that x 2 , y 3 , y 4 0. We can finally set, again by row reduction, y 3 = 1.Note that column operations over the ground field F 2 give an isomorphic q-matroid, so we have that x 2 and y 4 are elements of F 2 m but not of F 2 .
Theorem 19.If the q-matroid from Section 3.2 is representable, it cannot have 4 circuits of dimension 2. This gives an example of a non-representable q-matroid.
Proof.We know the representation is of the form In order to have a circuit of dimension 2, the determinant of this 2×2 matrix should be zero.In particular, we need to have proportional columns.This automatically tells us that a 0 = a 1 = 0 implies b 0 = b 1 = 0, and that a 2 = a 3 = 0 implies b 2 = b 3 = 0.These two cases correspond to the two circuits E 1 and E 2 from Proposition 18.Using the representations from Section 3.2, we found the determinants of all 2-dimensional spaces A, B, C, D, F, G.They are the following: Now, it is easy to see that if A and B vanish, then C vanishes as well, and the same goes for D, F and G.We already saw that circuits appear either in {A, B, C} or {D, E, F} and the other spaces are independent.Therefore, the alternatives we have are: • none of the six determinants above vanishes, so E 1 and E 2 are the only circuits of dimension 2; • one determinant vanishes, so we have three circuits of dimension 2; • the determinants of all the elements in a spread vanish, leading to five circuits of dimension 2 (that are all circuits in the q-matroid).
Corollary 20.The q-matroid over F 2 of rank 2 and dimension 4 with four circuits, as described in Theorem 19, is the smallest non-representable q-matroid.
Proof.See the appendix for a list of all q-matroids with a ground space of dimension at most 3.All of these are representable.Hence, the q-matroid from Theorem 19 is the smallest non-representable q-matroid.

♦
Remark 22. Example 21 above also tells us something about the direct sum of two representable q-matroids.Suppose we have two representable q-matroids M 1 and M 2 over the same field K. Suppose these q-matroids are representable by matrices G 1 and G 2 over an extension field L of K.One would expect the direct sum M 1 ⊕M 2 to be representable by However, this construction is not uniquely defined, in the sense that it depends on the representations of M 1 and M 2 .Over F 64 , we can represent the q-matroid U 1,2 as 1 β for any β ∈ F 64 \F 2 .Then the q-matroids of Example 21 are all of the form of the matrix G above, so we would expect all of them to represent U 1,2 ⊕U 1,2 .However, these are not isomorphic q-matroids.

Submodular functions and associated q-matroids
Our goal is to define the direct sum of q-matroids in terms of matroid union.Before we can define that, we need some background on integer-valued increasing submodular functions.A function f on the subspaces of E is submodular if the following hold for all A, B ⊆ E: Such function can be viewed as the rank function of a q-polymatroid, and we refer to [11] for an extension of, and some overlap with, the results presented here.
The following proposition and corollary are the q-analogues of Proposition 11.1.1 and Corollary 11.1.2in [15].
Proposition 23.Let f be an integer-valued increasing submodular function on the subspaces of a finite-dimensional vector space E. Let Then C( f ) is the collection of circuits of a q-matroid M( f Proof.We prove that C( f ) satisfies the circuit axioms from Definition 4. The axiom (C1) holds by definition and, by minimality, we have (C2).
Let us now prove (C3).Let C 1 C 2 be two elements of C( f ) and let X be a codimension 1 space containing neither C 1 nor C 2 (otherwise the assertion holds void).We have and because This shows that M( f ) is a q-matroid defined by its circuits C( f ).
The following is a direct result of the definition of C( f ) and the fact that every proper subspace of a circuit is independent.
Corollary 24.A subspace I ⊆ E is independent in M( f ) if and only if dim(I ) ≤ f (I ) for all nontrivial subspaces I of I.
The next theorem is the q-analogue of [19, Chapter 8.1 Theorem 2].We point out that Theorem 25 and Propsition 27 ware already proven in [11, Theorem 3.9], but with the minimum taken over the subspaces of A instead of all spaces in E. See also Remark 26.
Theorem 25.Let f be a non-negative integer-valued increasing submodular function on the subspaces of E with f (0) = 0. Then is the rank function of a q-matroid.
Proof.We will prove that the function r satisfies the rank axioms.It is clear that r is integer-valued.It is non-negative because both f (A) and dim(A) − dim(A ∩ X) are non-negative.By taking X = {0} in the definition, we get f ({0}) + dim(A) − dim({0}) = dim(A) and therefore r(A) ≤ dim(A).This proves (r1).
In order to prove (r2), let for all X ⊆ E and thus r(A) ≤ r(B).The proof of (r3) is rather technical, but essentially a lot of rewriting.We first claim that This statement will be used later on in the proof.By using that and multiplying by −1 we can rewrite our claim as Using the modular equality again, we get and thus our claim is equivalent to dim To prove this, it is enough to show the inclusion of vector spaces (A∩ X)+(B∩ A) as was to be shown.This finishes the proof of our claim.
We can now get back to proving axiom (r3).In the third step we use the claim together with the submodularity of f .In the fourth step we set U = X + Y and V = X ∩ Y.This will not produce all possible U, V ⊆ E, so the minimum is at least as big as the minimum over all U, V ⊆ E.
Remark 26.Note that the minimum in Theorem 25 is taken over all subspaces of E. This is convenient for some of the proofs, but not strictly necessary.Let X ⊆ E and let X = A ∩ X.Then . This means that the minimum over all subspaces X ⊆ E is the same as the minimum taken only over the subspaces X ⊆ A. This makes calculating the rank function a lot faster in practice.
The next proposition shows that the q-matroids from Corollary 24 and Theorem 25 are the same.
Proposition 27.Let f be a non-negative integer-valued increasing submodular function with f (0) = 0. Let M( f ) be the corresponding q-matroid as defined in Corollary 24 with independent spaces I. Let r be the rank function as defined in Theorem 25.Then both give the same q-matroid because r(I) = dim(I) for all I ∈ I.
Proof.We have to prove that r(I) = dim(I) iff dim(I ) ≤ f (I ) for all nontrivial subspace I of I.Note that since f (0) = 0, this holds for all subspaces I of I, also the trivial one.(Note that Proposition 23 does not require f (0) = 0, but Theorem 25 does.)From the remark before we have that As already proven in Theorem 25, r(I) ≤ dim(I).For the other inequality, the following are equivalent: This proves that r(I) = dim(I).

Matroid union
In this section we define the q-analogue of matroid union by means of its rank function and we show what are the independent spaces.
Definition 28.Let M 1 and M 2 be two q-matroids on the same ground space E, with rank functions r 1 and r 2 , respectively.Then the matroid union M 1 ∨ M 2 is defined by the rank function Theorem 29.Let M 1 and M 2 be two q-matroids on the same ground space E, with rank functions r 1 and r 2 , respectively.Then the matroid union M 1 ∨ M 2 is a q-matroid.
Proof.For all A ⊆ E, define a function f (A) = r 1 (A) + r 2 (A).We claim that f is a non-negative integer-valued submodular function on the subspaces of E with f (0) = 0. Note that r 1 and r 2 are non-negative integer valued submodular functions on the subspaces of E with r 1 ({0}) = r 2 ({0}) = 0.It follows directly that f is a nonnegative integer-valued function on the subspaces of E. It is increasing, because for all A ⊆ B ⊆ E we have Furthermore, f is submodular, because for all A, B ⊆ E we have Now we apply Theorem 25 and Remark 26 to the function f : this shows that the function r of Definition 28 is indeed the rank function of a q-matroid (E, r).
We gather some important properties of the matroid union.
Remark 30.The matroid union is not always invariant under coordinatisation.That is, if ϕ : We illustrate this with a small example.
Let M 1 and M 2 both be isomorphic to the mixed diamond, see A.3.That is: dim(E) = 2, r(E) = 1 and r(A) = 1 for all 1-dimensional spaces except one loop.Suppose the loop is at the same coordinates for both M 1 and M 2 , call this subspace .Then the rank of M 1 ∨ M 2 is one, as we will show.Consider all X ⊆ E. If dim(X) = 0 or dim(X) = 2 then the expression inside the minimum of Definition 28 is equal to 2.
If dim(X) = 1 we have to distinguish between and the any other space.If X = the expression is 0 Consider now the case where the loop of M 1 is 1 and the loop of M 2 is 2 , with 1 2 .Then the calculations are as before for dim(X) = 0 or dim(X) = 2.For dim(X) = 1 and X 1 , 2 we get 1+1+2−1 = 3.If X = 1 we get 0+1+2−1 = 2, and similarly for X = 2 we get 1 This example illustrates that we have to be careful to define M 1 and M 2 precisely, not just up to isomorphism.
We prove two straightforward lemmas concerning the matroid union.
Lemma 31.Let M 1 and M 2 be two q-matroids on the same ground space E and let r(M 2 ) = 0. Then M 1 ∨ M 2 = M 1 and in particular, M ∨ U 0,n = M.
Proof.The rank function of the matroid union is equal to By local semimodularity (Lemma 2), r 1 (X)−dim(X)+dim(A) ≥ r 1 (A) for all X ⊆ A and equality is attained for X = A. Hence r(A) = r 1 (A) and Lemma 32.Let M 1 and M 2 be q-matroids on the same ground space E. Let I be independent in both M 1 and M 2 .Then I is independent in M 1 ∨ M 2 .
Proof.We have that r(M 1 ; I) = r(M 2 ; I) = dim I by definition.Also, all subspaces of I are independent.This means that The independent spaces of the matroid union can be found in the following way.
Theorem 33.Let M 1 = (E, I 1 ) and M 2 = (E, I 2 ) be two q-matroids defined by their independent spaces.Then I ⊆ E is an independent space of the matroid union M 1 ∨ M 2 if and only if for all J ⊆ I there exist I 1 ∈ I 1 and I 2 ∈ I 2 such that J = I 1 ⊕ I 2 .We notate the collection of independent spaces of M 1 ∨ M 2 by I.
Proof.Let f (A) = r 1 (A) + r 2 (A), as in the proof of Theorem 29.According to Corollary 24 and Proposition 27, we know that the independent spaces of the matroid union are exactly those I ⊆ E such that for all nontrivial subspaces J ⊆ I we have dim J ≤ f (J).First, let I ⊆ E such that all nontrivial subspace J ⊆ I can be written as J = I 1 ⊕ I 2 with I 1 ∈ I 1 and I 2 ∈ I 2 .We need to prove that I is independent in M 1 ∨ M 2 , that is, for all J ⊆ I it holds that dim J ≤ f (J).This follows from dim(J) = dim(I 1 ) + dim(I 2 ) = r 1 (I 1 ) + r 2 (I 2 ) ≤ r 1 (J) + r 2 (J) = f (J), the inequality coming from the axiom (r2).For the other implication, let I be independent in M 1 ∨ M 2 .We need to show that we can write all I as I = I 1 ⊕ I 2 with I 1 ∈ I 1 and I 2 ∈ I 2 .Because all subspaces of an independent space are independent, this proves the statement.First, note that if I is independent in M 1 ∨M 2 , then its rank is equal to its dimension: dim I = r(I) = min X⊆I {r 1 (X) + r 2 (X) + dim I − dim X}.Therefore, for each X ⊆ I it holds r 1 (X) + r 2 (X) − dim X ≥ 0.
We will proceed by mathematical induction on the dimension of I.If dim I = 0 then I = {0} and we can write {0} = {0} ⊕ {0} where {0} ∈ I 1 and {0} ∈ I 2 .If dim I = 1, then r 1 (I) + r 2 (I) ≥ 1 so I is independent in at least one of M 1 and M 2 .Without loss of generality, let I be independent in M 1 , then we can write I = I ⊕ {0} with I ∈ I 1 and {0} ∈ I 2 .
Let I be independent in M 1 ∨ M 2 with dim I = h + 1.Let J ⊆ I with dim J = h and J = J 1 ⊕ J 2 for some J 1 ∈ I 1 and J 2 ∈ I 2 .We will show that there is a 1-dimensional x ⊆ I − J such that either Assume that for all x ⊆ I − J the space J 1 ⊕ x is dependent in M 1 .This implies that r 1 (J 1 ⊕ x) = r 1 (J 1 ) and by [14,Prop. 7] we have r 1 (I) = r(J 1 ) = dim J 1 .Since I ⊆ I we have the following equivalent statements: and hence r 2 (I) ≥ 1.This implies that not all x ⊆ I − J can be loops in M 2 , because if they were, by semimodularity this would imply r 2 (I) = 0.So assume x ⊆ I − J with r 2 (x) = 1.Then, by applying semimodularity in M 2 again, we get and it follows that J 2 ⊕ x is independent in M 2 .This gives the decomposition I = J 1 ⊕ (J 2 ⊕ x) with J 1 ∈ I 1 and J 2 ⊕ x ∈ I 2 .
Remark 34.We want to point out that Theorem 33 is indeed a q-analogue of the classical case.There the independent sets of the matroid union are defined by First of all, note that the union can be rewritten as a disjoint union.Let I = J 1 ∪ J 2 with J 1 ∈ I 1 and J 2 ∈ I 2 .Take I 1 = J 1 and This procedure does not create a unique I 1 and I 2 , there is a lot of choice involved.However, it does imply that every independent set I of the matroid union is of the form I = I 1 I 2 , and conversely, every I = I 1 I 2 is independent in the matroid union.
In the classical case, if I = I 1 I 2 then for all J ⊆ I we can write directly J = J1 J2 with J1 = J ∩ I 1 and J2 = J ∩ I 2 .Since J1 ⊆ I 1 and J2 ⊆ I 2 , these are independent.This reasoning does not hold in the q-analogue (see also the Introduction), which is why we specifically have to state it in the definition.For a counterexample, see the example in Remark 30: if 1 = 2 = we can write E = I 1 ⊕ I 2 for some 1-dimensional I 1 and I 2 that are not equal to , but we cannot write as the direct sum of independent spaces of M 1 and M 2 .

Matroid intersection and duality
We complete our study of the matroid union for q-matroids by defining the dual operation, that is matroid intersection.We follow [19, p.123].
Definition 35.Let M 1 and M 2 be q-matroids on the same ground space E with collection of spanning spaces S(M 1 ) and S(M 2 ).Define the q-matroid intersection of M 1 and M 2 by its spanning spaces: We need to prove that it is a q-matroid.This can be done by checking the axioms for spanning spaces, but we can also do this by proving a more general result: Theorem 36.Let M 1 and M 2 be q-matroids on the same ground space E. Then Proof.From [5] we know that the orthogonal complements of the spanning spaces of a q-matroid M are the independent spaces of the dual q-matroid M * .So we have to prove that the orthogonal complements of S(M 1 ∧ M 2 ) are the independent spaces of M * 1 ∨ M * 2 .First, start with S ∈ S(M 1 ∧ M 2 ).Then we can write S = S 1 ∩ S 2 for S 1 ∈ S(M 1 ) and S 2 ∈ S(M 2 ).Let S ⊇ S be a superspace of S .Then we can write S = T 1 ∩ T 2 for T 1 ⊇ S 1 and T 2 ⊇ S 2 .Note that T 1 and T 2 are also spanning spaces of M 1 and M 2 , respectively.Now we take orthogonal complements.The orthogonal complement is We need to prove that that is, we have to show that all I ⊆ I * 1 + I * 2 can be written as J 1 ⊕ J 2 with J 1 independent in M * 1 and J 2 independent in M * 2 .Note that all I ⊆ I * 1 + I * 2 can be written as I = (S ) ⊥ , with S = T 1 ∩ T 2 as above.If we take orthogonal complements of T 1 and T 2 , we get independent spaces of M * 1 and M * 2 .So we can write I = J 1 ⊕ J 2 .(We can always make the sum a direct sum by taking a subspace of J 1 if necessary.)We conclude that For the opposite inclusion, start with an independent space Then by Theorem 33 we can write I = I 1 + I 2 with I 1 independent in M * 1 and I 2 independent in M * 2 .Taking orthogonal complements gives that * is a q-matroid, this shows that M 1 ∧ M 2 is a q-matroid as well.
We have the following corollary on intersection, union, and restriction and contraction.
Corollary 37. Let M 1 and M 2 be q-matroids on the same ground space E.Then, for T ⊆ E, and also Proof.The first part of the statement follows directly from Definition 28 of the matroid union and the fact that for the rank function of the restriction is r M| T (A) = r(A).The second statement follows from the first by applying Theorem 36, use (M/T ) * M * | T ⊥ from Theorem 8, and then applying Theorem 36 again.
We finish this section with the dual of Lemma 31.
Lemma 38.Let M be a q-matroid.Then M = M ∧ U n,n .
Proof.Applying Lemma 31 to M * gives that Dualising both sides gives the desired result.

The direct sum
In this section we will define the direct sum of two q-matroids.The idea will be to first add loops to M 1 and M 2 , so they are on the same ground space, and then taking their matroid union.In the classical case, we can also write the direct sum like this: the idea for this construction comes from [3, Proposition 7.6.13part 2].

Defining the direct sum
The next definition explains how to "add a loop" to a q-matroid.
Definition 39.Let M = (E, r) be a q-matroid.Then the direct sum of M and a loop is denoted by M = M ⊕ and constructed in the following way.Let E = E + .Then for every A ⊆ E we can write A + = A ⊕ for a unique A ⊆ E. Then r (A ) = r(A).
Remark 40.The definition above divides the subspaces of E into three different kinds.
There is a diamond with bottom A ∩ A ⊆ E, top A + and with A and A in between.
This construction is well defined, in the sense that it gives a q-matroid, as the next theorem shows.
Proof.(r1) Since r(A) ≥ 0 we have r (A ) ≥ 0 as well.We get that r Now let us prove the claims.For addition, we see that For intersection we distinguish three cases depending on whether A and B contain .
We combine the adding of loops and the matroid union to define the direct sum.
• Let E = E 1 ⊕ E 2 .This will be the ground space of M. By slight abuse of notation, we denote by E i both the ground space of M i and the embedding of E i in E.
• In the lattice L(E) we have that the intervals [0, E 1 ] and [E 2 , 1] are isomorphic to L(E 1 ), and the intervals [0, E 2 ] and • Add n 2 times a loop to M 1 , using Theorem 41.This gives the q-matroid M 1 on ground space E. Assume that • Add n 1 times a loop to M 2 , using again Theorem 41.This gives the q-matroid M 2 on ground space E. Assume that Now the direct sum is defined as M 1 ⊕ M 2 = M 1 ∨ M 2 , with the matroid union as in Theorem 29.
Note that this procedure is well-defined, since we already showed that adding loops and taking the matroid union are well-defined constructions.We do, however, have to show that this procedure always defines the same q-matroid up to isomorphism, since it was observed in Remark 30 that matroid union is not invariant under coordinatisation.
Theorem 43.Let M 1 = (E 1 , r 1 ) and M 2 = (E 2 , r 2 ) be two q-matroids on trivially intersecting ground spaces and let M = M 1 ⊕ M 2 be their direct sum as constructed in Definition 42.Let ϕ i be a lattice-isomorphism of L(E i ) for i = 1, 2. Then there is an isomorphism Proof.Let ψ be an isomorphism on L(E) such that ψ| E 1 = ϕ 1 and ψ| E 2 = ϕ 2 .We can construct ψ by its images of n 1 +n 2 linearly independent 1-dimensional spaces: we find these by taking the image under ϕ 1 of n 1 linearly independent 1-spaces in E 1 and the image under ϕ 2 of n 2 linearly independent 1-spaces in The rank function of ϕ 1 (M 1 ) is equal to = r(M 1 ; ψ(A)).
We have a similar argument for M 2 and ϕ 2 .Combining these gives that This proves the theorem.
The next lemma is a direct consequence of Theorem 47, but we prove it now to make the calculations in the next section easier.
Proof.By applying Definitions 39 and 42, we get that If we take X = E, we get that r(M 1 ; X) + r(M 2 ; X) ≥ r(M 1 ) + r(M 2 ).
This means that the minimum min X⊆E {r(M 1 ; X) + r(M 2 ; X)

Examples of the direct sum
To get some feeling for this construction, we analyse some small examples.We refer to the Appendix for an overview of small q-matroids.
We start with the easiest examples possible, with n 1 = n 2 = 1.

Properties of the direct sum
We will now show that the direct sum as defined here has some desirable properties.
All of these results are also true for the classical case, motivating the 'correctness' of the definition of the direct sum presented in the previous section.Further support of the definition is provided by [9], where it is shown that the direct sum is the coproduct in the category of q-matroids and linear weak maps.
Theorem 47.Let M 1 and M 2 be two q-matroids with ground spaces E 1 and E 2 , respectively.Let their direct sum be as defined in Definition 42.Then for any A ⊆ E of the form Proof.By definition of the direct sum we have that We will show that the minimum is attained for Then taking X = A inside the minimum gives We have left to show that for any X ⊆ A, the quantity inside the minimum is at least r(M 1 ; A 1 ) + r(M 2 ; A 2 ).To see this, take For the dimension of B 1 , we have that dim . Furthermore, B 1 ⊆ A 1 and thus by local semimodularity (Lemma 2), r(M 1 ; A 1 ) − dim A 1 ≤ r(M 1 ; B 1 ) − dim B 1 .Similar results hold for B 2 .Finally, note that dim Combining this, we get that r(M 1 ; X) + r(M 2 ; X) This completes the proof that r(M 1 ⊕ M 2 ; A) = r(M 1 ; A 1 ) + r(M 2 ; A 2 ).
From Theorem 12 the following is now immediate.
Corollary 48.Let M 1 and M 2 be two q-matroids with ground spaces E 1 and E 2 , respectively.Then their direct sum, as defined in Definition 42, satisfies the properties of Definition 11.
because for a space in E 1 , first adding E 2 and then intersecting with E 1 is giving the same space we start with.With this in mind, we can rewrite one of the rank functions: We have a similar result for r((M * 2 ) ; X).Applying this yields In order for this quantity to be greater than or equal to dim X, we need to prove for all X ⊆ B ⊥ the following inequality: We proceed by mathematical induction on dim X ⊥ , so the base case is X ⊥ = B. We claim that r(M 1 ; B ∩ E 1 ) = dim(B ∩ E 1 ).Since B is a basis, it holds for all Y ⊆ B that r(M 1 ; Y) + r(M 2 ; Y) ≥ dim Y (by a reasoning as in the beginning of this proof).In particular, this holds for Y and thus by the rank axiom (r2) equality holds and we prove our claim.By the same reasoning, we have that r(M 2 ; B ∩ E 2 ) = dim(B ∩ E 2 ).This implies the induction step of our proof:

Now assume the inequality holds for all
Consider a space Y with dim Y = d + 1 and write Y = Y ⊕ x for some 1-dimensional subspace x.Since x cannot be in both E 1 and E 2 , we can assume without loss of generality that x E 1 for any choice of x such that Y = Y ⊕ x (the case x E 2 goes similarly).Then by rewriting and using the induction hypothesis we get This concludes the proof that B ⊥ is independent in M * 1 ⊕ M * 2 , hence a basis, and we have proven that In the last example we will answer the question started in Section 3 about the direct sum of two copies of U 1,2 .This direct sum is now uniquely defined.
We first compute U 1,2 .Since n 1 = n 2 = 2, we need to add two loops to U 1,2 via Definition 39.This gives a q-matroid with ground space E and r(A) = 1 for each A ⊆ E, unless A ⊆ E 2 , then r(A) = 0.
To determine M = U 1,2 ∨ U 1,2 we use Lemma 44 to get r(M) = 2.By Proposition 13, M does not have any loops.So it suffices to decide for every 2-dimensional space A whether it is a basis or a circuit.First, note that We distinguish between different types of 2-spaces, depending on their intersection with E 1 and E 2 .
so we conclude that r(A) = 2.
• In the case dim(A ∩ E 2 ) = 1 and A ∩ E 1 = {0} (or vice versa) we have We see that all 2-spaces except E 1 and E 2 are basis.Since we have E 1 = E ⊥ 2 , it follows that this q-matroid is self-dual.Because U * 1,2 = U 1,2 , this example is in agreement with Theorem 50.

Connectedness
In the classical case, every matroid is the direct sum of its connected components.It therefore makes sense to consider the notion of connectedness in the study of the direct sum of q-matroids.In this final section we collect some thoughts and examples concerning a possible q-analogue of connectedness.We will not be able to define the concept, but we hope to argue why it is not straightforward and give some possible paths for further investigation.
To define connectedness in classical matroids, we use the following relation on the elements of a matroid M = (E, r).
Two elements x, y ∈ E are related if either x = y or if there is a circuit of M that contains both x and y.This relation is in fact an equivalence relation [12,Theorem 3.36].We call a matroid connected if it has only one equivalence class under this relation.If there are multiple equivalence classes E 1 , . . ., E k then we can write We will discuss some attempts to find a q-analogue of this equivalence relation.Note that we are looking for an equivalence relation on the 1-dimensional spaces of E. Let x, y, z be 1-dimensional spaces in E. Let x, y H 1 and y, z H 2 .We have to show there exists a hyperplane H not containing x and z.If x H 2 or z H 1 , we are done, so suppose x ⊆ H 2 and z ⊆ H 1 .We will use induction on dim .By the induction hypothesis, we can now find an H ∈ H such that x, z H .This proves that the relation R is transitive, and hence an equivalence relation.
The good news is that we have found a relation that is in fact an equivalence relation.The bad news is that it does not work like we want to.The uniform q-matroids U 0,3 and U 3,3 only have one equivalence class, where we would want that U 0,3 is the sum of three copies of U 0,1 and U 3,3 is the sum of three copies of U 1,1 .Also the q-matroid P * 1 (Section A.4.6) in the catalog has only one equivalence class, where we constructed it in Example 46 as the direct sum U 1,1 ⊕ U 1,2 .P 1 on the other hand (the dual of P * 1 ) has more than one equivalence class: a signal that this attempt for an equivalence relation does not play nice with duality.

Towards a well-defined definition
As we saw, Definition 52 is in general not an equivalence relation.However, in some q-matroids it is an equivalence relation.From our examples, we think the following statements could be true.Both conjectures are of course true in the classical case.To see this for the last conjecture, note that it can be proven that the intersection between a circuit and a cocircuit can never be a single element.See for example [15,Proposition 2.1.11].The q-analogue of this statement is not true in general: see for example the qmatroid P * 1 of Section A.4.6.It has one circuit, (0, 1, 0), (0, 0, 1) , that intersects in dimension 1 with the cocircuit (1, 1, 0), (0, 0, 1) .
We welcome any further hints towards a better understanding of the q-analogues of the direct sum, connectedness, and their relation.
1 has dimension at most 2 (otherwise it would have rank 0), the loopspace can have dimension 0, 1 or 2. This gives three q-matroids of rank 1.
We will now explicitly list all eight q-matroids of dimension 3.For convenience, we do this over the field F 2 , but the general construction of the theorem above holds for other fields as well.Representation: 1 0 0 0 α 1 First we apply it to A and B. Since A ∩ B = {0}, we have r(A ∩ B) = 0 and (r3) gives us r(A + B) ≤ r(A) + r(B).

Conjecture 56 .
The relation of Definition 52 is an equivalence relation in at least one of M and M * .Conjecture 57.Let M be a q-matroid with circuits C and cocircuits C * .Suppose dim(C ∩ C * ) 1 for all C ∈ C and C * ∈ C * .Then Definition 52 is an equivalence relation.