<<

Typing Tensor Calculus in 2-Categories

Fatimah Ahmadi Department of Computer Science University of Oxford November 4, 2020

Abstract We introduce semiadditive 2-categories, 2-categories with binary 2- and a zero object, as a suitable framework for typing tensor calculus. Tensors are the generalization of matrices, whose components have more than two indices.

1 Introduction

Linear algebra is the primary mathematical toolbox for quantum physicists. Categorical quantum mechanics re-evaluates this toolbox by expressing each tool in the categorical language and leveraging the power of graphical calculus accompanying monoidal categories to gain an alternative insight into quantum features. In the categorical description of quantum mechanics, everything is typed in FHilb; the whose objects are finite dimensional Hilbert spaces and are linear maps/matrices. In this category, Hilbert spaces associated with physical systems are typed as objects, and processes between systems as morphisms. MacLane [7] proposed the idea of typing matrices as morphisms while intro- ducing semiadditive categories(categories with well-behaved additions between objects). This line of research, further, has been explored by Macedo and Oliveira in the pursuit of avoiding the cumbersome indexed-based operations of matrices [6]. They address the quest for shifting the traditional perspective of formal methods in software development[10]. To observe why index-level operations do not offer an optimal approach, take the divide-and-conquer algorithm to multiplicate two matrices. In each

arXiv:1908.01212v3 [math.CT] 3 Nov 2020 step, one needs to apply a for-loop to divide a into blocks. While the division happens automatically if one takes matrices whose sources or targets are biproducts of objects. In addition, instead of looping over rows and columns to obtain sections of a matrix, we can multiply a matrix by projections and injections. Developing this project to include higher ranks matrices or tensors motivates us throughout this paper. The name “tensor” has been used in the literature widely for different purposes. In the current context, tensor signifies an umbrella term for scalars, vectors, and matrices. Scalars are tensors without any index; vectors have one index, and matrices denote tensors with two indices.

1 To take the first step towards this goal, one needs to identify a suitable category. Category Matk, which captures all structures of a semiadditive cat- egory, provides an intuition for us. Translating Category Matkin the lan- guage of higher categories, one observes vectors as 0-morphisms, matrices as 1-morphisms, and tensors with at most four indices as 2-morphisms. This sim- ple observation demonstrates that the suitable category for our purpose should be a 2-category with extra structures. This 2-category needs to have biproducts between objects, biproducts be- tween 1-morphisms and additions between 2-morphisms. Such a generalization yields a semiadditive 2-category. Current literature lacks a rigorous definition for biproducts in 2-categories and semiadditive 2-categories. In this paper, we define 2-biproducts and semi- additive 2-categories. We propose both the algebraic and -form definitions of biproducts and show their compatibility. Considering this 2-category as a basic framework, we demonstrate the details of typing tensor calculus. 2Vec is given as an example of symmetric monoidal 2-categories by Kapra- nov and Voevodsky [4]. Objects of 2Vec are natural numbers, 1-morphisms are matrices between natural numbers whose entries are finite dimensional vector spaces, and 2-morphisms are linear maps between vector spaces. It is folklore that 2Vec also represents a prototype of semiadditive 2-categories. Neverthe- less, lacking a rigorous definition for semiadditive 2-categories, this claim has not been examined closely. We examine the algebraic form of 2-biproducts in 2Vec and explore the details of the multiplication of tensors. We con- clude with a thorough analysis of enrichment in semiadditive 2-categories. Ul- timately, based on our observations about the behavior of zero 1-morphisms in 2-categories, we raise a critical non-trivial question about the relationship between limits and 2-limits in 2-categories. Remark 1. For a concise review of bicategories, consult Leinster’s paper [5]. By a 2-category, we mean a strict 2-category: bicategories whose associators and unitors are identities. Remark 2. In this paper, all categories and 2-categories are small. Remark 3. We use the pasting lemma [11] whenever we intend to recognize equal 2-morphisms. Notation. Capital letters, A, B, .. are reserved for objects, small letters f, g, ... for 1-morphisms and Greek letters α, β, ... for 2-morphisms. The horizontal composition is denoted by juxtaposition and vertical composi- tion of 2-morphisms by “odot" . Plus sign + represents addition of morphisms in categories and addition of 2-morphisms in 2-categories. Addition () of objects in categories and addition of 1-morphisms in 2-categories are shown by “oplus" ⊕. Finally, addition of objects in 2-categories or 2-biproducts is represented by “boxplus" . For every object A, the identity 1- or 1-identity is shown by idA and for every 1-morphism f, the identity 2-morphism or 2-identity by 1f . Whenever, it is clear from the context, in the horizontal composition of 1-identities with 2-morphisms, we leave out 1 and use whiskering convention 1f ◦ α = fα. Remark 4. If you are reading this paper in monochromatic, in Figures 1 and 2 and Lemma 9, red lines are dashed and blue lines are solid.

2 2 Semiadditive categories

This section is devoted to a review of definitions and propositions of semiadditive categories, to establish the 2-dimensional version of them in the next section. The review part is based on [1, 2, 3].

2.1 Constant morphisms in categories A constant morphism is a particular morphism whose left and right composites for all composable morphisms are equal. Generally, a category can have constant morphisms for some pairs of objects, but not all of them. If all hom-sets, however, have constant morphisms, then they should be compatible and unique. Definition 1. A morphism f : X −→ Y is left constant if for every object W and every pair of morphisms h, g : W −→ X, the right composition with f is the same, fg = fh. Definition 2. A morphism f : X −→ Y is right constant if for every object Y and for every pair of morphisms h, g : Y −→ Z , the left composition with f is the same, gf = hf. Definition 3. A morphism is constant if it is both left and right constant. The following definition indicates the compatibility condition between con- stant morphisms in hom-sets. Definition 4. A locally pointed category is a category whose hom-sets for every pair of objects (A, B) have constant morphisms ?B,A : A −→ B such that for f g an arbitrary pair of morphisms A −→ B −→ C, Diagram 1 commutes.

?B,A A B

f ?C,A g

B C ?C,B (1) Proposition 1. In a locally pointed category, the family of constant morphisms is unique. Proof. Consider two different families of constant morphisms {?} and {?0}. If ?B,A ?C,B 0 0 0 A −−−→ B −−−→ C ? ? ?B,A = ? 0 , then from left constantness of , we have C,B C,A ?C,B 0 and from right constantness of ?, we have ?C,B?B,A = ?C,A therefore, ?C,A = 0 ?C,A for every (A, C). Definition 5. A zero object is an object which is simultaneously initial and terminal. Definition 6. A pointed category is a category with a zero object. Definition 7. In a category with a zero object, a is a morphism which factorizes through the zero object.

3 Remark 5. In a pointed category, the family of zero morphisms is the only family of constant morphisms thanks to Proposition 1. Remark 6. A category might have constant morphisms but not a zero object.

2.2 Biproducts in categories In limit-form definition, a biproduct in a category is an addition between objects that induces an addition between morphisms. But in the algebraic form, one needs to start with a CMon-. These two initial conditions shake hands when we examine enrichment in Proposition 2. Definition 8. A CMon-enriched category is a category whose hom-sets are commutative monoids and the composition of morphisms is bilinear. Lemma 1. Every CMon-enriched category is a locally pointed category.

f g Proof. Consider A −−−→ B −→ C, for which e is the unit element. From linearity eB,A of composition g(f + eB,A) = gf + geB,A and since eB,A is the unit element of monoid hom(A, B), so, g(f + eB,A) = gf, and geB,A is the unit element of monoid hom(A, C).

A pair of objects in a category can have non-isomorphic products and co- products, but if they are isomorphic, we say this pair of objects has a biproduct. Another definition is in the algebraic form. Algebraic definitions, whenever they exist, are more desirable, since for in- stance: checking whether an algebraic definition is preserved by a particular functor, boils down to checking functionality. Definition 9. In a category, a product of pair of objects (A, B) is a tuple (A × B, pA, pB) such that for an arbitrary cone (X, f : X −→ A, g : X −→ B) shown in Figure 1, there exists a unique morphism b : X −→ A × B which satisfies pAb = f and pBb = g. Morphisms pA and pB are called projections.

X

b f g A × B

pA pB

A B

Figure 1: Product of (A, B).

Definition 10. In a category, a of pair of objects (A, B) is a tuple (A t B, iA, iB) such that for an arbitrary cone (X, f : A −→ X, g : B −→ X) there exists a unique morphism b : A t B −→ X which satisfies biA = f and biB = g. Morphisms iA and iB are called injections.

4 Definition 11. In a locally pointed category, the canonical morphism between a coproduct of a pair of objects A1,A2, i.e. A1 t A2 and a product A1 × A2 satisfies pkrij = δk,j.

ij r pk Aj −→ A1 t A2 −→ A1 × A2 −→ Ak, if i, j ∈ {1, 2} Definition 12. In a locally pointed category, a pair of objects A and B has a biproduct if the canonical morphism r is an . Definition 13. In a CMon-enriched category, a biproduct of a pair of objects (A, B) is a tuple (A ⊕ B, pA, pB, iA, iB) such that:

pAiA = idA, pBiB = idB, pAiB = 0A,B, pBiA = 0B,A

iApA + iBpB = idA⊕B Definition 14. A semiadditive category is a category with finite biproducts. Proposition 2. A semiadditive category is a CMon-enriched category.

Proof. Define a monoid addition in hom(A, B) as below: 4 f⊕g 5 f + g : A −−→A A ⊕ A −−−→ B ⊕ B −−→B B   idA  Such that 4A = and 5B = idB idB . Commutativity and associa- idA tivity of + follow from associativity and commutativity of biproduct ⊕: f + g = 5B(f ⊕ g)4A = 5B(g ⊕ f)4A = g + f

(f + g) + h = 5Bp12((f ⊕ g) ⊕ h)i124A = 5Bp12(f ⊕ (g ⊕ h))i124A = f + (g + h)

2.3 Matrix notation for biproducts As stated by MacLane [7], and reappeared in Ref [6], a category with biprod- ucts offers a suitable framework for matrix calculus. To observe a transparent example, consider the category of matrices over a field, Matk. Objects of this category are natural numbers, and morphisms are matrices whose entries belong to the field. For example, hom(2, 3) consists of all 3 × 2 matrices over k. The composition of morphisms is matrix multiplication A.B. Since hom-sets with matrix addition form abelian groups, this category is furthermore abelian, hence, semiadditive. Ref [6] gives a full account of Matkand exploits its struc- ture to type linear algebra. To see the role of biproducts in matrix calculus, f b = b0 = h k take the example below in which g and .

1 h k f g b0 b

p1 p2 3 3+2 2

i1 i2

5 1 p = 1 0 p = 0 1 i = Projections are 1 and 2 and injections 1 0 and 0 i = 2 1 . We have:

f f 1 p = 1 0 = f, h k i = h k = h 1 g g 1 0 f f 0 p = 0 1 = g h k i = h k = k 2 g g 2 1

This partitioning of matrices via biproducts is utilized in Ref [6] to implement divide-and-conquer algorithm for matrix multiplication. Our intention to use matrix notation is the other way around. We write pro- jections, injections, and morphisms to/from biproducts in matrix form to facil- itate calculations and gain an intuition while working with 1- and 2-morphisms in 2-categories. As we will discuss later, in the similar fashion to Ref [6], one could expect to type matrices of higher dimensions or do tensor calculus up to rank 4 in a 2-category with 2-biproducts. As it should be clear from the explicit form of projections and injections above, projections and injections play the role of basis elements which deter- mines the entries of morphisms to/from biproducts. For instance, assume the following list of morphisms

0 0 0 f : A1 −→ A1, g : A1 −→ A2, h : A1 −→ A3

0 0 0 0 0 0 f : A2 −→ A1, g : A2 −→ A2, h : A2 −→ A3 f f 0 t 0 0 0 0 It is not difficult to show that A1 ⊕ A2 −→ A1 ⊕ A2 ⊕ A3 is t = g g , h h0    projections p1 = 1 0 0 , p2 = 0 1 0 , p3 = 0 0 1 and injections 1 0 i = i = 1 0 , 1 1 . Our intuition to guess the correct order of matrices comes from the category of matrices Matk. Henceforth, we represent morphisms in matrix notation when it eases our calculations.

3 Semiadditive 2-categories

To define semiadditive 2-categories, a 2-category requires enough structures in both object and Hom-categories levels. This section is devoted to developing these structures. Similar to Section 2, we start with constant morphisms.

3.1 Constant morphisms in 2-categories A 2-category can have constant 1- or 2-morphisms; we start from the top level. Constant 2-morphisms exist independently for horizontal or vertical composi- tions. For example, it is possible for Hom-categories to be locally pointed with respect to the vertical composition of 2-morphisms. It is also conceivable to have a 2-category with horizontally constant 2-morphisms. Hence, it seems constant 2-morphisms in both directions exist completely independently of each other,

6 but if a 2-category happens to have two different families of horizontally and vertically constant 2-morphisms, then they collapse, due to the interchange law.

Definition 15. A 2-morphism ∗h,k : k ⇒ h is left constant if for every object A, every pair of 1-morphisms f, g, and every pair of 2-morphisms, ξ, γ : f ⇒ g, horizontal composition on the right ∗h,kξ = ∗h,kγ is the same.

f k

A γ ξ B ∗h,k C

g h

Definition 16. A 2-morphism ∗h,k : k ⇒ h is right constant if for every object D, every pair of 1-morphisms l, m, and every pair of 2-morphisms, α, β : l ⇒ m, horizontal composition on the left β∗h,k = α∗h,k is the same. k l

B ∗h,k C α β D

h m

Definition 17. In a 2-category, a horizontally constant 2-morphism is a 2- morphism which is left and right constant.

Definition 18. A 2-morphism ∗k,g : k ⇒ g in a 2-category is down constant if for every 1-morphism f, and every pair of 2-morphisms β, α : f ⇒ g, vertical composition from above ∗k,g β = ∗k,g α is the same.

f

β α A B g ∗k,g

k

Definition 19. A 2-morphism ∗k,g : k ⇒ g in a 2-category is up constant if for every 1-morphism f, and every pair of 2-morphisms, ξ, γ : k ⇒ h, vertical composition from below ξ ∗k,g = γ ∗k,g is the same. g

∗k,g A B k ξ γ

h

Definition 20. A vertically constant 2-morphism is a 2-morphism which is up and down constant.

7 We now present the proposition which guarantees that zero 2-morphisms in Hom-categories are not only vertically but also horizontally constant. Proposition 3. If a 2-category has a family of horizontally constant 2-morphisms {∗} and a family of vertically constant 2-morphisms {∗0}, then they are equal.

Proof. Given 1- and 2-morphisms shown in the following figure, f k ∗0 β g g,f j A B C α ∗l,j

h l

Due to the interchange law in 2-categories, we expect to have:

0 0 (∗l,j β)(α ∗ g,f ) = (∗l,j α) (β ∗ g,f ) (2)

0 0 Because ∗ is vertically constant. LHS: (∗l,j β)∗h,f . Because ∗ is horizontally 0 constant. RHS: ∗lh,jg (β∗g,f ). Now in LHS and RHS, let B = C and k = j = l = idB. Therefore, we have:

0 0 0 LHS :(∗idB ,idB 1idB )∗h,f = ∗h,f RHS : ∗h,g (1idB ∗g,f ) = ∗h,f

Thus, for every pair of 1-morphisms (h, f), horizontally and vertically constant 2-morphisms are equal.

Remark 7. Generally, the 2-identity 1f for vertical composition is not also a f 1horizontal = 1vertical horizontal 2-identity, unless is a 1-identity. That is, idB idB . Because consider composable α : g ⇒ h and 1f , then α and αf : gf ⇒ hf do not have even the same source and target [12]. The presence of 2-morphisms requires redefining constant 2-morphisms be- cause a category can have both weak and strict versions. We only define the weak version here; the strict case is determined by letting 2- be 2-identities. Definition 21. A 1-morphism f : X −→ Y is weakly left constant if for every object W and for every pair of 1-morphisms, h, g : W −→ X, there exists a 2-isomorphism such that η : fg ⇒ fh. Definition 22. A 1-morphism f : X −→ Y is weakly right constant if for every object Y and for every pair of 1-morphisms, h, g : Y −→ Z, there exists a 2-isomorphism such that η0 : gf ⇒ hf. Definition 23. A 1-morphism is weakly constant if it is both weakly left and right constant. Remark 8. From now on, by constant morphisms we mean weakly constant.

8 Definition 24. A 2-category with constant 1-morphisms is a 2-category for which Diagram 3 commutes up to a 2-isomorphism.

?B,A A B

?C,A ⇒ f g

⇒ B C ?C,B (3)

Proposition 4. In a 2-category with constant 1-morphisms, the family of con- stant 1-morphisms is unique up to a 2-isomorphism.

Proof. : Consider two different families of constant 1-morphisms with their characteristic weakening 2-isomorphisms, {?, η} and {?0, β}. Given η−1 : ? ⇒ ??0 and β : ??0 ⇒ ?0, we have β η−1 : ? ⇒ ?0.

3.2 Zero 1-morphisms =? 1-Morphisms factorizing through the zero object In 2-categories, 2-limits in 2-categories and limits in Hom-categories are coexist- ing. Hence, in principle, two different families of zero 1-morphisms could exist but how they interact with each other. Explicitly, when do these two families of 1-morphisms coincide? • zero 1-morphisms in Hom-categories

• 1-morphisms that factorize through zero objects(0-morphisms) The short answer is: when a 2-category is compositionally distributive. In a 2-category, a Hom-category might have a zero 1-morphism, which means isomorphic initial and terminal 1-morphisms in that Hom-category. Note also this zero 1-morphism generally can exist independently of zero objects(0- morphisms) or constant 1-morphisms. In other words, having some sorts of limits in a Hom-category does not imply anything about limits on the level of 0-morphisms. Assume that each Hom-category has a zero 1-morphism; are they constant 1-morphisms as well? Constantness is the matter of composition, so it might be the case that zero 1-morphisms do not talk to each other. However, we prove later, if a 2-category is compositionally distributive; then, zero 1-morphisms are, indeed, constant. Moreover, given that the family of constant 1-morphisms is unique up to 2-isomorphisms, canonical constant 1-morphisms are those that factorize through the zero object(0-morphism). Therefore, in such a 2-category, up to 2-isomorphisms, 1-morphisms, which factorize through the zero object, are zero 1-morphisms. Definition 25. An object T is weakly terminal, if for every object A, there exists a 1-morphism from A to T , tA : A −→ T such that for any other 1- 0 morphism tA : A −→ T there exists a unique 2-isomorphism between them 0 γA : tA ⇒ tA.

9 Definition 26. A zero object is a simultaneous weakly initial and terminal objects. Remark 9. From now on, by initial/terminal objects, and left/right constant 1-morphisms, we mean the weakly versions. Proposition 5. In a 2-category, a zero object is unique up to an equivalence.

Proof. Consider two distinct zero objects, 0 and 00, for which there exist 1- f f 0 morphisms f and f 0 such that 0 −→ 00 and 00 −→ 0. Due to the uniqueness of the terminal and initial objects up to a 2-isomorphism, there exit 2-isomorphisms 0 0 η : f f ⇒ id0 and  : id00 ⇒ ff . Definition 27. A pointed 2-category is a 2-category with a zero object. u Lemma 2. Every 1-morphism from the initial object, I −−→A A is a weakly left constant 1-morphism.

uA g Proof. Consider I −−→ A −→ B, the composition of these two 1-morphisms fuA f and guA should be unique up to a 2-isomorphism, because 1-morphisms from the initial object are unique up to 2-morphisms. Thus, there exists a 2-isomorphism γ : fuA ⇒ guA; this proves uA is weakly left constant. Proposition 6. Every pointed 2-category is a locally pointed 2-category.

Proof. In each Hom-category, there exists a 1-morphism ?B,A : A −→ B, which ∼ factorizes uniquely up to a 2-isomorphism through the zero object, ?B,A = uBtA. It is constant because uB is left constant by Lemma 2, and tA is right constant by the colemma of 2.

3.3 Biproducts in 2-categories In order to define 2-biproducts, we substitute categories with 2-categories and limits with 2-limits. One can consider four possible limits in 2-categories: strict, weak, lax, and oplax [2]. We restrict our attention to weak 2-limits; the strict version is obtained by letting all weakening 2-isomorphisms be identities. The following definition is by Borceux in Categorical Algebra volume I [2]. Definition 28. In a 2-category, a weak 2-product of a pair of objects A, B is an object A × B equipped with 1-morphism projections (pA : A × B −→ A, pB : A × B −→ B) such that:

• for every cone (X, f : X −→ A, g : X −→ B), there exist a 1-morphism b : X −→ A × B and 2-isomorphisms {ξ} such that (ξA : pAb =⇒ f, ξB : pBb =⇒ g) (the red cone in Figure 2). • Moreover, for any other cone (X, f 0 : X −→ A, g0 : X −→ B) with a 0 0 corresponding 1-morphism b : X −→ A × B and 2-isomorphisms (ξA : 0 0 0 0 0 pAb =⇒ f , ξB : pBb =⇒ g ) (the blue cone in Figure 2) and given 0 0 2-morphisms (ΣA : f =⇒ f , ΣB : g =⇒ g ),

10 there exists a unique 2-morphism γ : b =⇒ b0 which satisfies the following condition: 0 −1 (pAγ) = (ξ A) ΣA (ξA) (4)

X f 0 f g g0 γ b b0 Σ A B ξ Σ A A × B ξ B ξ 0 0 A ξB pA pB

A B

Figure 2: Weak 2-product in 2-categories.

Definition 29. In a 2-category, a strict 2-product of a pair of objects is a weak 2-product whose weakening 2-isomorphisms ξA and ξB are identities. Remark 10. Observe that unlike 2-limits, because a 1-morphism from X to A × B is not unique, corresponding to each of these 1-morphisms, there exists a cone with the same apex X. Also, for weak 2-limits, each of the side triangles commutes up to a 2-isomorphism. Definition 30. A locally semiadditive 2-category is a 2-category whose hom- categories are semiadditive(have finite biproducts). Definition 31. A locally semiadditive and compositionally distributive 2-category is a locally semiadditive 2-category whose 2-morphisms distribute over addition of 2-morphisms. That is Equations 5 and 6 hold in a compositionally distributive 2-category:

γ(α + β) = γα + γβ (5) α (β + γ) = α β + α γ (6)

Remark 11. In a locally semiadditive 2-category, biproducts in Hom-categories are biproducts of 1-morphisms. In the proceeding sections, projections π and injections ν are 2-morphisms indexed by 1-morphisms. Proposition 7. In a locally semiadditive and compositionally distributive 2- category, the composition of 1-morphisms is distributive over biproducts of 1- morphisms. f(g ⊕ h) =∼ fg ⊕ fh

Proof. From universality of products of 1-morphisms shown in Figure 3, we have:

(fπh) α = πfh, (fπg) α = πfg (7)

11 and universality of of 1-morphisms results in:

0 0 α (fνh) = νfh, α (fνg) = νfg (8)

Composing Equations 7 and 8, we have:

0 α (fνh) (fπh) α = νfh πfh (9) 0 α (fνg) (fπg) α = νfg πfg (10)

Considering distributivity conditions 5 and 6 and adding two sides of Equations 9 and 10, we obtain:

0 α (f[(νg πg) + (νh πh)] α = νfg πfg + νfh πfh

0 0 which is: α (1f ◦ 1g⊕h) α = 1(fg⊕fh), hence, α α = 1fg⊕fh. One can also 0 show that α α = 1f(g⊕h) by using the equations above.

fg ⊕ fh

α0 α π fh fg ν π fh fg f(g ⊕ h) ν

g fν fπ h fπ g fν h fg fh

Figure 3: Proof of Proposition 7.

Proposition 8. In a locally semiadditive and compositionally distributive 2- category, zero 1-morphisms are constant.

Proof. Consider the proposition above, for every g we have g(f ⊕ 0) =∼ gf ⊕ g0. On the other hand, f ⊕ 0 =∼ f which shows g0 =∼ 0 because zero 1-morphisms are unique up to 2-isomorphisms. We have developed enough structures to be able to introduce the definition of 2-biproducts: Definition 32. In a locally semiadditive and compositionally distributive 2- category, a weak 2-biproduct of a pair of objects (A, B) is a tuple

(A  B, pA, pB, iA, iB, θA, θB, θAB, θBA, θP ) such that: • 1-Morphism projections and injections:

pA : A  B −→ A, pB : A  B −→ B iA : A −→ A  B, iB : B −→ A  B

12 • Weakening 2-isomorphisms:

θA : pAiA ⇒ idA, θB : pBiB ⇒ idB,

θBA : pBiA ⇒ 0B,A, θAB : pAiB ⇒ 0A,B,

θ : i p ⊕ i p ⇒ id P A A B B AB • Conditions for 2-biproducts:

    (pAiA)θA 0 0 0 pAθP iA = , pBθP iB = (11) 0 0 0 (pBiB)θB

Definition 33. In a locally semiadditive and compositionally distributive 2- category, a strict 2-biproduct is a weak 2-biproduct whose weakening 2-isomorphisms {θ} are 2-identities. Definition 34. A semiadditive 2-category is a locally semiadditive and com- positionally distributive 2-category with weak binary 2-biproducts and a zero object. To prove the consistency of this definition with weak 2-products, we need the following lemmas.

Lemma 3. In a 2-category, if pAiA : A −→ A and θA : pAiA ⇒ idA, then (pAiA)θA = θA(pAiA). −1 Proof. Given f, g : B −→ A and λ : f ⇒ g, one can write (pAiA)λ = [θA g] λ [θAf]. If we let f = pAiA and g = idA and λ = θA, we obtain the desired equality.

Lemma 4. In a locally semiadditive 2-category, θBA : pBiA ⇒ 0B,A and θAB : pAiB ⇒ 0A,B are zero 2-morphisms.

Proof. Because 0A,B is a zero object in Hom-category Hom(A, B) and because each set of 2-morphisms should have a zero 2-morphism and θAB is unique, it is indeed a zero 2-morphism.

Lemma 5. In a locally semiadditive 2-category, 1pAiB = 0 and 1pB iA = 0.

Proof. From Diagram 12, we have θAB 10 θAB = 1pAiB . Because each hom-set has a zero 1-morphism, 10B,A = 00B,A , also from the previous lemma

θAB = 0. Therefore, 1pAiB = 0.

1pB iA pBiA pBiA

−1 θBA θBA

0B,A 0B,A 1 0 (12)

13 Lemma 6. In a 2-category, for a unique 2-morphism γ : h ⇒ h0, if there exists a 2-isomorphism θP : l ⇒ idB, then γ is transformed by the following formula:

0 −1 (θP h ) (lγ) (θP h) = γ (13)

Proof. Follows from the figure below.

h

h ⇒ −1 θP h lh ⇒ ⇒ A γ B = A lγ B 0 lh ⇒ 0 h0 θP h h0

Lemma 7. In a locally semiadditive 2-category, considering the definition of 2-biproducts and r = iApA ⊕ iBpB, the 2-morphisms ΣA : pAr ⇒ pA and ΣB : pBr ⇒ pB are given by the following row matrices:   ΣA = θApA 0 , ΣB = 0 θBpB (14)   θApA 0 Proof. Given Diagram 4, we have: λ = . To obtain, ΣA, we 0 θABpB must calculate π1 λ, which is    θApA 0  π1 λ = 1 0 = θApA 0 0 θABpB   0 0 θB,ApA 0 One can similarly show that for π2 λ = ΣB, if λ = . 0 θBpB

pA ⊕ 0A λ

pAr ν1 ν2 π1 ν1 ν2 π2

pAiApA pAiBpB

θAB pB θApA pA 0A,B

Figure 4: The 2-morphism λ in the figure is λ = ν1 θApA π1 +ν2 θABpB π2.

14 Lemma 8. In a semiadditive 2-category, for every 1-morphism written as h = i f ⊕ i g θ : i p ⊕ i p ⇒ id A B and given a 2-isomorphism P A A B B AB we have:   iAθAf 0 θP h = (15) 0 iBθBg

Proof. The essence of the proof is in the figure below, in which α = θP h ν1 and β = θph ν2. Because α and β determine θP h, we only need to find them.

h

θP h α β (iApA ⊕ iB pB )h

ν ν 1 2

iApAh iBpBh

We can determine α by writing the explicit forms of iApAh and iBpBh to find the 2-morphism from iApAh to h.

π1 iAθAf ν1 iApAh = iApAiAf ⊕ iApAiBg iApAiAf iAf h

Starting from iBpBh and following the same procedure, we can find β.

α = ν1 iAθAf π1, β = ν2 iBθBg π2

We now present the main theorem of this paper. Similar to the 1-dimensional case, which was discussed in References [3, 8], we show the consistency of the algebraic definition of weak 2-biproducts with weak 2-products/2-coproducts. Theorem 1. In a locally semiadditive and compositionally distributive 2-category, the following conditions for a pair of objects A and B are equivalent:

1. the weak 2-product (P, pA, pB) of A, B exists.

2. the weak 2-coproduct (P, iA, iB) of A, B exists.

3. the weak 2-biproduct (P, pA, pB, iA, iB, θA, θB, θAB, θBA, θP ) of A, B exists.

Proof. 1 =⇒ 3: Assuming a pair of objects A, B has a weak 2-product P , we want to show P is also the weak 2-biproduct. To this end, check the universal property of weak 2-products for (A, idA : A −→ A, 0B,A : A −→ B, iA : A −→ P ) and (B, idB : B −→ B, 0A,B : B −→ A, iB : B −→ P ). From the definition of 2-products, we know that there exist two 2-morphisms (γA : pAiA =⇒ idA, γB : pBiB =⇒ idB). We let θA := γA and θB := γB. To find θp, we check the universality condition for P and two 2-cones:

1. (P, pAl : P −→ A, pBl : P −→ B, l : P −→ P ), l := iApA ⊕ iBpB

15 2. (P, pA : P −→ A, pB : P −→ B, idP : P −→ P ) By Lemma 7, 2-morphisms between these two cones are as below:  ΣA = γApA 0 : pAiApA ⊕ pAiBpB ⇒ pA,  ΣB = 0 γBpB : pBiApA ⊕ pBiBpB ⇒ pB     iAΣA iAγApA 0 Therefore, θP = = . iBΣB 0 iBγBpB 2 Considering Lemmas 5 and 3, also the point that (1pAiA ) = 1pAiA , we can show θP satisfies necessary conditions. (p i )θ (p i ) 0 (p i )θ 0 p θ i = A A A A A = A A A . A P A 0 0 0 0 3 =⇒ 1: Now if we have the algebraic definition of 2-biproduct for a pair of objects, we want to demonstrate P is also a 2-product. Because we already have projections, it is enough to show it satisfies the universality condition. To this end, check the universality condition for an arbitrary cone (X, f : X −→ A, g : X −→ B) and let a 1-morphism from X to P be h = iAf ⊕ iBg:

ξA : pAh = pA(iAf ⊕ iBg) ⇒ f, ξA = θAf π1

0 0 Similarly, we obtain ξB = θBg π2. Given another cone (X, f : X −→ A, g : 0 0 0 0 0 0 0 X −→ B), Letting h = iAf ⊕iBg , we have ξA = θAf π1 and ξB = θBg π2. 0 0 If there exist 2-morphisms (ΣA : f =⇒ f , ΣB : g =⇒ g ), we should show 0 0 that there is a unique 2-morphism γ : iAf ⊕ iBg =⇒ iAf ⊕ iBg such that 0 −1 (pAγ) = (ξA) ΣA ξA. Suppose γ in the explicit form is γ = ν1 iAΣA π1 + ν2 iBΣB π2 and in the matrix form is as follows: i Σ 0  γ = A A 0 iBΣB

Multiplying γ by pA, we have:

pAγ = ν1 pAiAΣA π1 + ν2 pAiBΣB π2 −1 0 ∼ Note that pAiAΣA = (θA f ) ΣA (θAf) and pAiB = 0A,B, so: −1 0 pAγ = ν1 (θA f ) ΣA (θAf) π1 −1 −1 Additionally, the inverse of ξA = (θAf) π1 is (ξA) = ν1 (θA f). Substitu- tion of these terms results in the desired condition: −1 pAγ = ξA ΣA ξA 0 Uniqueness of γ: Assume that there exists another 2-morphism γ : iAf ⊕ 0 0 iBg ⇒ iAf ⊕ iBg such that it satisfies all necessary conditions. Using lemma 6 and lemma 8, we prove γ0 is equivalent to γ:

0 0 lemma 6 0 0 −1 Equation 4, lemma 8 γ = (idp)γ = (θP h ) [(iApA ⊕ iBpB)γ ] (θP h) ======⇒

 0   −1 0  0 iA(θAf ) 0 iA[(θA f ) ΣA (θAf)] 0 γ = 0 −1 0 0 iB(θBg ) 0 iB[(θB g ) ΣB (θBg)]  −1    iA(θA f) 0 iAΣA 0 −1 = = γ. 0 iB(θB g) 0 iBΣB

16 In the second line, the first and third matrices are written by using Lemma 8, and the middle matrix is obtained by condition of weak 2-products Equation 4. Note that θP h = ν1 (iAθAf) π1 + ν2 (iBθBg) π2. If one lets X = P , f = idA, and g = 0B,P ; this yields h = iA and ξA = θAidA, hence, θP h = θP iA. Multiplying θP h with pA, we obtain one of the conditions of 2-biproducts. (p i )θ 0 p θ i = A A A A P A 0 0

As mentioned earlier, the categorification of the canonical definition of biprod- ucts is achievable in a rather simple way by only using the notion of weak 2-limits in 2-categories. In the following, we first state the definition obtained from the limit notion and examine the compatibility of this definition with our algebraic version. Definition 35. In a locally semiadditive and compositionally distributive 2- category, a canonical 1-morphism between a 2-coproduct of a pair of objects A, B, i.e. A t B and a 2-product A × B is a 1-morphism which satisfies θk,j : pkrij ⇒ δk,jidj, if θk,j are 2-isomorphisms.

ij r pk Aj −→ A1 t A2 −→ A1 × A2 −→ Ak, if j, k ∈ {1, 2}

Remark 12. A canonical 1-morphism r is unique up to a unique 2-isomorphism. That is, for every pair of such 1-morphisms, there exists a unique 2-isomorphism 0 0 −1 γ : r ⇒ r such that pkγij = (θk,j) θk,j. Remark 13. 2-Isomorphisms θi,j for i 6= j are zero 2-morphisms, according to Lemma 4. Definition 36. In a locally semiadditive and compositionally distributive 2- category, a pair of objects A and B has a weak 2-biproduct if the canonical 1-morphism r is an equivalence and satisfies the following conditions:

r r0 A1 t A2 −→ A1 × A2,A1 t A2 ←− A1 × A2 0 0 ξA×B : rr ⇒ idA×B, ξAtB : idAtB ⇒ r r 0 0 (r ξA×B) (ξAtBr ) = 1r0 , (ξA×Br) (rξAtB) = 1r

To show the consistency of this definition with the algebraic version, we first need to prove 1-morphism projections are weakly monic. Definition 37. In a 2-category, a 1-morphism f : B −→ C is weakly monic if for every pair of 1-morphisms g, h : A −→ B, if fg is isomorphic to fh, i.e. fg =∼ fh. Then g and h are isomorphic g =∼ h. Lemma 9. In a 2-category with binary 2-products, 1-morphism projections are monomorphisms.

Σ ∼A 0 Proof. To prove pA is mono, we need to show that if pAb = pAb there exists a 2-isomorphism γ : b ⇒ b0. With 1-morphisms b and b0, we can make two 0 0 0 2-cones (X, pAb, pBb, b) and (X, pAb , pBb , b ). Due to our assumption, there 0 0 exists 2-isomorphisms ΣA : pAb ⇒ pAb and ΣB : pBb ⇒ pBb , hence, a unique 0 2-isomorphism γ : b ⇒ b such that pAγ = ΣA and pBγ = ΣB.

17 X 0 0 pAb pAb γ pBb pBb b b0 ΣA ΣB A × B

pA pB

A B

Proposition 9. In a locally semiadditive and compositionally distributive 2- category, a canonical 1-morphism r, between a 2-coproduct A t B and a 2- product A × B of a pair of objects is an equivalence if and only if projections and injections satisfy the conditions of Definition 32.

Proof. Suppose we have the algebraic definition of 2-biproducts, that is θα,β : p i ⇒ δ id θ : ⊕ i p ⇒ id θ = θ θ = θ α β α,β α and p α α α AB. If A,A A and B,B B. To prove a canonical 1-morphism r, which satisfies ξα,β : pαriβ ⇒ δα,β, has an inverse, we first need to show that A  B is indeed a 2-product and a 2- coproduct, i.e. it satisfies the universal property, which is exactly the first part of Theorem 1. Therefore, it remains to show that r is an equivalence. Let the 0 inverse be r = iApA ⊕ iBpB. Using θα,β : pαiβ ⇒ δα,βidα, we have:

0 λ π1 pArr = pAr(iApA ⊕ iBpB) =⇒ pA ⊕ 0 ==⇒ pA

  ξA,A 0 which shows λ = . Since pA is monic, there exists a 2-isomorphism 0 ξA,B 0 ξA×B : rr ⇒ idA×B such that pAξA×B = π1 λ. One can also show that 0 0 r r ⇒ idAtB by checking r riA and using epiciticy of iA. 0 0 ⇐ Now given r and r which satisfy ξα,β : pαriβ ⇒ δα,β, ξAtB : r r ⇒ idAtB 0 and ξA×B : rr ⇒ idA×B, to obtain necessary equations and the condition for 0 2-biproducts, we definition new injections iA = riA and claim the 2-product of 0 0 two objects with these injections (A × B, iA, iB) is a 2-coproduct .i.e. it satisfies the universal property.

X c b A × B f g r A t B iA iB

A B

Because (A t B, iA, iB) is a 2-coproduct, there exists a 1-morphism b such that 0 ηA : biA ⇒ f and ηB : biB ⇒ g. Let c = br , therefore, for f and similarly for g:

0 0 bξAtB iA ηA ciA = br riA ======⇒ b idAtB iA = biA ==⇒ f

18 0 Moreover, (A×B, iα, pα, α = A, B) is a 2-biproduct of A and B. That is, we need 0 0 0 to find 2-isomorphisms θα,β : pαiβ ⇒ δα,βidα and θp : iApA ⊕ iBpB ⇒ idA×B which satisfy appropriate conditions. By condition on r, we let 2-isomorphisms 0 0 θα,β := ξα,β, Finally, θp : iApA ⊕ iBpB ⇒ idA×B is the result of the universal property of 2-products and moniticity of projections. 0 0 ρ pA[iApA ⊕ iBpB] = pA(riA)pA ⊕ pA(riB)pB =⇒ pA ⊕ 0

0 0 0 ρ pB[iApA ⊕ iBpB] = pB(riA)pA ⊕ pB(riB)pB =⇒ 0 ⊕ pB

ξ p 0  ξ p 0  such that ρ = A,A A and ρ0 = A,B A . Note that 0 ξA,BpB 0 ξB,BpB 0 pAθP = ρ and pBθP = ρ . So we can check the condition on θp, by   ξA,ApAiA 0 pAθpiA = . 0 ξA,BpBiA

3.4 Typing tensors We have used matrix notation through this chapter to make the difficult calcu- lations easier and to gain an intuition about the difference between biproducts in categories and 2-categories. For instance, we have represented the condition on 2-biproducts 11 as 2 × 2 matrices. But the conditions on 2-Morphism θP be- come matrix after applying projections and injections, this observation clearly displays the type of 2-morphisms in semiadditive 2-categories is different from the type of 1-morphisms. Tensor is an umbrella term for mathematical objects including scalars, vec- tors, matrices, and so on. Each tensor has a rank specified by their indices, for example, scalars are rank zero tensors, vectors rank one, matrices are rank two tensor, and this list can go on. In linear algebra, they are represented as below, when eαj is the jth basis vector: X T = tα1,α2,...(eα1 ⊗ eα2 ⊗ ...) (16) α1,α2,α3,... Hence, in this notation, X Scalar: n = t Vector: v = tα1 eα1

α1 X Matrix: M = tα1,α2 (eα1 ⊗ eα2 )

α1,α2 Pay attention to entries of tensors above. Entries of vectors are scalar. If we fix only one basis, then entries of a matrix become vectors. If we fix both bases of a matrix, then entries are scalar. Remark 14. One can easily observe that in a n-category, n-morphisms are ten- sors of rank 2n.

3.5 Category of 2Vec Similar to Section 2 that we carried the guiding example of the category of matrices Matk, 2-Category 2Vec in the sense of Kapranov and Voevodsky [4] inspires us throughout this section.

19 Kapranov and Voevodsky in their seminal work, introduced 2Vec as an ex- ample of symmetric monoidal 2-categories. Objects of 2Vec are natural num- bers, 1-morphisms are matrices between natural numbers whose entries are fi- nite dimensional vector spaces, and 2-morphisms are linear maps between vector spaces. 2Vec is certainly monoidal but due to lacking a rigorous definition for 2-biproducts, the folklore claim that it is also semiadditive has not been stayed on a sound ground. From 2Vec perspective, one can observe some properties of semiadditive 2- categories. For instance, in 2Vec , there are two collections of bases: global bases which are 1-morphism projections and injections {p, i} indexed by ob- jects(natural numbers) and local bases, which are the internal bases of each vector space {π, ν}. Correspondingly, a semiadditive 2-category has a collection of global bases, and for each Hom-category a collection of local bases, which are 2-morphisms projections and injections indexed by 1-morphisms. Global bases are projections p and injections i of 2-biproducts , and local bases are projections π and injections ν of biproducts ⊕ in Hom-categories. Generally, a 2-morphism is a tensor of rank up to four, or in other words, it is a 4-dimensional matrix. Thus, each entry of a matrix has four indices: Latin indices are global and Greek indices are local.

X X k β θ = (θj )α[(να ⊗ πβ) ⊗ (ij ⊗ pk)] (17) α,β k,l

Applying the global projections and injections, one selects an entry which itself is a matrix with entries indexed by local bases. In a 4-dimensional picture, by applying a 1-morphism , one picks a 3-dimensional matrix, a cube. Applying a 1-morphism injection to that cube, we select a square matrix. To pick an entry from this square matrix, one has to apply 2-morphism projections and injections, Figure 3.5.

Figure 5: Global and local bases. Left figure is taken from [9]

To unpack Equation 17 , consider a 2-morphism θ : f ⇒ g and

n m f, g : j=0Aj −→ k=0Ak Explicitly, f, g have the following expressions: m n m n M M k M M k f = fj (ij ⊗ pk), g = gj (ij ⊗ pk) (18) k=0 j=0 k=0 j=0

20 f

A1  A2  ···  An θ A1  A2  ···  Am

g (19) Note that entries of f and g are in the same Hom-categories as f and g, that k k P is, fi , gj ∈ Hom(Aj, Ak). We intentionally use ⊕ instead of to emphasis what we are summing over are 1-morphisms, so the correct sum is actually biproduct. Now if entries of f and g are a sum of 1-morphisms,

p z k M k M fj = hα gj = hβ (20) α=0 β=0

k k k The unpacked form of a 2-morphism θj : fj ⇒ gj is as follows:

p z k X X k β θj = (θj )α(να ⊗ πβ) (21) α=0 β=0

For the horizontal composition of 1-morphisms in matrix notation, we first calculate the usual multiplication of matrices, then we compose the corre- sponding entries of matrices. In the example above, consider a 1-morphism m w r : k=0Ak −→ l=0Al, the composition of r with f is:

m n w m M M k M M l f = fj (ij ⊗ pk), r = rk0 (ik0 ⊗ pl) k=0 j=0 l=0 k0=0 m n w m M M M M k l pk⊗ik0 =δk,k0 r ◦ f = [(fj ◦ rk0 )][(ij ⊗ pk) ⊗ (ik0 ⊗ pl)] ======⇒ k=0 j=0 l=0 k0=0 n w m n w m M M M k l M M M k l r ◦ f = [(fj ◦ rk0 )][δkk0 (ij ⊗ pl)] = (fj ◦ rk)(ij ⊗ pl) j=0 l=0 k,k0=0 j=0 l=0 k=0

The reader should not be surprized by the tensor sign between projection and injection pk ⊗ik0 . This convention agrees with our knowledge of tensors calculus in algebra. The horizontal composition of 2-morphisms is similar to 1-morphisms composition.

M k m θ ◦ ξ = (θj ⊗ ξk )(ij ⊗ pm) j,k,m

The vertical composition is obtained first by Hadamard product or entry-wise matrix multiplication, and then by usual matrix multiplication between corre- θ ξ sponding terms. Consider 2-morphisms f =⇒ g =⇒ q, note that f, g, q all have the same source and target; so the same orders, i.e. order = m × n. To do Hadamard product, we need to apply 1-morphism projections and injections

21 k k pkθij = θj and pkξij = ξj . Then the vertical composition of θ and ξ is ob- tained by matrix multiplication of corresponding entries. The P sign here is the monoid addition. x z p z k k X X X X k β k α0 πβ ⊗νβ0 =δβ,β0 θj ξj = (θj )α(ξj )β0 [(να ⊗ πβ) ⊗ (νβ0 ⊗ πα0 )] ======⇒ α0=0 β0=0 α=0 β=0 x p z k k X X X k β k α0 θj ξj = (θj )α(ξj )β (να ⊗ πα0 ) α0=0 α=0 β=0

We summarize the content of this section in an example in 2Vec . Consider 1- and 2-morphisms in the following figure:

f h ⇒ θ

g ⇒ 0 0 00 A1  A2  A3 A1  A2 ξ A η ⇒ l k

We write 1-morphisms as matrices of orders 2 × 3 and 1 × 2. Orders of 1- morphisms are specified by the number of objects in the target times the number of objects in the source.

f f f  g g g  l l l  f = 11 12 13 , g = 11 12 13 , l = 11 12 13 , f21 f22 f23 g21 g22 g23 l21 l22 l23

  h = h11 h12 , k = k11 k12

Entries of 2-morphisms are 2-morphisms between 1-morphisms θij : fij ⇒ gij written in the following. So the order of θ is the same as f and g, but orders of entries are determined by the number of components in entries of f and g.     θ11 θ12 θ13 η11 η12 η13  θ = , η = , ξ = ξ11 ξ12 , θ21 θ22 θ23 η21 η22 η23

Assume that some of the entries of 1-morphisms are biproducts of 1-morphisms in the same Hom-category, and other entries do not have any further compo- nents:

1 2 1 2 3 1 2 f11 = f11 ⊕ f11, g12 = g12 ⊕ g12 ⊕ g12, l22 = l22 ⊕ l22, 1 2 1 2 h11 = h11 ⊕ h11 k11 = k11 ⊕ k11

Thus, the entries of 2-morphisms have the explicit matrix form as follows:

 1  θ12  1 2   1  1 2  2 ξ11 ξ11 η22 θ11 = θ11 θ11 , θ12 = θ12 , ξ11 = 3 4 , η22 = 2 , 3 ξ11 ξ11 η22 θ12 1 2 3  η12 = η12 η12 η12

22 • Composition of 1-morphisms  h ◦ f = h11f11 ⊕ h12f21 h11f12 ⊕ h12f22 h11f13 ⊕ h12f23

• Vertical composition of 2-morphisms

η η η  θ θ θ  η .θ η .θ η .θ  η θ = 11 12 13 11 12 13 = 11 11 12 12 13 13 η21 η22 η23 θ21 θ22 θ23 η21.θ21 η22.θ22 η23.θ23  1 2  1 1 2 2 3 3  η11θ11 η11θ11 η12θ12 + η12θ12 + η12θ12 η13θ13  1  =  η22θ22  η21θ21 2 η23θ23 η22θ22

• Horizontal composition of 2-morphisms    θ11 θ12 θ13 ξ ◦ θ = ξ11 ξ12 ◦ θ21 θ22 θ23   = ξ11 ⊗ θ11 ⊕ ξ12 ⊗ θ21 ξ11 ⊗ θ12 ⊕ ξ12 ⊗ θ22 ξ11 ⊗ θ13 ⊕ ξ12 ⊗ θ23 = α β γ

 1 1 2  2 1 2   ξ11 θ11 θ11 ξ11 θ11 θ11 3 1 2  4 1 2  α =  ξ11 θ11 θ11 ξ11 θ11 θ11  , ξ12 ⊗ θ21   1   1   θ12 θ12 1 2 2 2 ξ11 θ12 ξ11 θ12   3 3    θ12 θ12     1   1   β =  θ12 θ12    3 2 4 2   ξ11 θ12 ξ11 θ12   3 3   θ12 θ12  ξ12 ⊗ θ22  1 2   ξ11θ13 ξ11θ13 3 4  ξ θ13 ξ θ13  γ =  11 11    ξ12 ⊗ θ23

4 Discussion and future works 4.1 Enrichment over semiadditive categories To algebraically define 2-biproducts in a 2-category, the additions of all mor- phisms are required. Hence, one should top-down equip the 2-category with additions for 1- and 2-morphisms. Conversely, one expects that similar to cat- egories (Proposition 2) if a 2-category happens to have additions of all objects, then one should be able to show this category is enriched over the 2-category of semiadditive categories. However, this expectation for our definition fails. Mainly because the existence of limits of lower morphisms does not guarantee having corresponding limits for higher morphisms. For an example, take the 2-category CAT which is complete, and consider a category without products A. If T is the terminal category, then Cat(T,A) =∼ A which does not have products. For the specific case of biproducts, take the

23 category of relations Rel as a 2-category with Hom-categories as posets. Rel has as 2-biproducts disjoint unions of sets; however, posets do not have biproducts since joins(coproducts) and meets(products) are not the same. Despite this point, Theorem 1 strongly confirms our version represents a special case of a more general definition. Additionally, our explicit working method is illuminating for investigating the general case in future.

4.2 Generalization of 2-biproducts The first step towards generalization of this definition is by exploring biproducts in a 2-category enriched over the 2-category of symmetric monoidal categories. We expect that conditions on θp become the tensor product of two 2-morphisms. Additionally, one can weaken 2-categories to bicategories, which will add asso- ciators and unitors in both versions of 2-biproducts, i.e. algebraic and limit form.

4.3 Interaction between limits and 2-limits In Subsection 3.2, we discussed the special case of interaction between limits and 2-limits for zero 1-morphisms. However, answering this question in the general case seems rather non-trivial. To elaborate on the question’s statement, consider a 2-category whose Hom-categories have products; we ask: specify the necessary conditions under which objects have 2-products? The opposite question asks: when do 2-limits induce limits? This question seems connected to the question of enrichment. Investigating further this topic directs us to another exciting area of future research.

5 Acknowledgments

The author thanks Jamie Vicary for discussions and Carmen Constantin for careful reading of the earlier version of the manuscript.

References

[1] Adámek, Jiří, Horst Herrlich, and George E. Strecker. “Abstract and con- crete categories. The joy of cats." (2004). [2] Borceux, Francis. Handbook of categorical algebra: volume 1, Basic cate- gory theory. Vol. 1. Cambridge University Press, 1994. [3] Borceux, Francis. Handbook of categorical Algebra: volume 2, Categories and Structures. Vol. 50. Cambridge University Press, 1994. [4] Kapranov, Misha M., and Vladimir A. Voevodsky. “2-categories and Zamolodchikov tetrahedra equations." Proc. Symp. Pure Math. Vol. 56. No. Part 2. 1994.

[5] Leinster, Tom. "Basic bicategories." https://arxiv.org/abs/math/ 9810017

24 [6] Macedo, Hugo Daniel, and José Nuno Oliveira. “Typing linear algebra: A biproduct-oriented approach." Science of Computer Programming 78.11 (2013): 2160-2191.

[7] MacLane, Saunders. Categories for the working mathematician. Vol. 5. Springer Science and Business Media, 2013. [8] Murfet, Daniel.“Abelian categories." Mathematics Notes (2006). [9] Norton, John D. “What is a four dimensional space like?"(April 2014). Available at https://www.pitt.edu/~jdnorton/teaching/HPS_ 0410/chapters/four_dimensions/index.html

[10] Parnas, David Lorge. “Really rethinking’formal methods’." Computer 43.1 (2010): 28-34.

[11] Power, A. John. “A 2-categorical pasting theorem." Journal of Algebra 129.2 (1990): 439-445. [12] Riehl, Emily, and Dominic Verity. “Elements of ∞-." Preprint available at www.math.jhu.edu/~eriehl/elements.pdf (2018).

25