A constructive approach to Freyd categories

In this paper we give an algorithmic description of Freyd categories that subsumes and enhances the usual approach to finitely presented modules in computer algebra. The upshot is a constructive approach to finitely presented functors that only relies on a few basic algorithms.


Introduction
With this paper we hope to convince the reader that important parts of category theory such as the theory of Freyd categories are inherently algorithmic. To an additive category P, Peter Freyd associated the so-called Freyd category ApPq [Fre66,Bel00] that equips P with cokernels in a universal way. If we think of objects and morphisms in Freyd categories as data types, then theorems like the existence of kernels in ApPq (assuming P has weak kernels) can actually be proven by providing explicit constructions. Such constructions can in turn be directly implemented in computer algebra projects like Cap (Categories, Algorithms, Programming) [GSP17,Gut17,Pos17] for performing effective computations. In this paper we provide various important constructions for Freyd categories.
Freyd categories have already played an important hidden role in computer algebra systems. A common data structure for finitely presented (left) modules over a ring R in computer algebra systems like Singular [DGPS16], Macaulay2 [GS], or in a software project like homalg [hom17] written in GAP [GAP17] is given by matrices over R, where an mˆn-matrix M is interpreted as the cokernel of its induced map between free row modules R 1ˆm M ÝÑ R 1ˆn . Performing operations like taking kernels in terms of this data structure can be seen as a special instance of performing those operations within a Freyd category, namely ApRows R q, the Freyd category associated to the additive category of row modules. We make this hidden role played by Freyd categories explicit, and push it forward to reach new applications for computer algebra like the following computations with finitely presented functors, i.e., functors that are given as the cokernels of a natural transformation between representable functors: ‚ Determination of sets of natural transformations between two finitely presented functors like Tor 1 pM,´q and Ext i pA,´q, where M and A are suitable R-modules (see Subsection 7.2). ‚ Construction of injective resolutions of finitely presented functors (Subsection 7.4). ‚ Deciding whether a given finitely presented functor is left exact (Subsection 7.3) or right exact (Subsection 7.5). This paper is organized as follows. In Section 2 we explain our constructive approach to category theory. In Section 3 we give a constructive proof of the main theorem by Freyd [Fre66] in a way such that a direct computer implementation becomes possible: Given an additive category P, then ApPq is abelian if and only if P has weak kernels.
To this end, we provide explicit constructions for sufficiently many operations in ApPq like taking (co)kernels and computing lifts/colifts along monomorphisms/epimorphisms. In Section 4 we give several interpretations of Freyd categories. The Freyd category ApRows R q provides a model for the category of finitely presented (left) modules over R (see Example 4.2) and a similar result holds for finitely presented graded modules (see Example 4.7). Moreover, we characterize so-called (left) computable rings (introduced by Barakat and Lange-Hegermann in [BLH11]) as those rings R for which ApRows R q is abelian with decidable equality for morphisms.
Propositions that classically can be taken for granted have to be explicitly realized by algorithms in our constructive setup. In Section 5 (and also in the end of Section 6) we provide examples of rings with a curious behavior from a computational point of view: ‚ A ring with decidable equality, but the existence of a particular solution of leftand right-sided linear systems are computationally undecidable (Subsection 5.1). ‚ A ring P with decidable equality such that we can find particular solutions of left-sided linear systems, but the existence of a particular solution of right-sided linear systems is computationally undecidable (Subsection 5.2). Such a ring gives us an example of an iterated Freyd category ApApRows P q op q that is abelian but its equality for morphisms is computationally undecidable (see Subsection 5.3). ‚ A commutative ring R that is not coherent (it has a finitely generated ideal that is not finitely presented), but we can find particular solutions of linear systems and the iterated Freyd category ApApRows R q op q is abelian with decidable equality for morphisms (see Theorem 6.17).
In Section 6 we study additive categories P equipped with homomorphism structures, where a homomorphism structure is a powerful tool that allows us to solve linear systems in P in the sense of Definition 6.1 (see Theorem 6.9 for our solving strategy). This tool is also used in the determination of sets of natural transformations between finitely presented functors, with which we finally deal in the last Section 7.
It is planned to implement a constructor for the Freyd category of an additive category as part of the Cap project. Cap is a software project written in GAP and supports the programmer in the implementation of category theory based constructions. In particular, Cap will make it fairly easy to realize the constructive methods for finitely presented functors described in Section 7 on the computer. A first Cap-based attempt of such an implementation building on the ideas of this paper was done by Bies in [Bie17] and used in [BMW17] in the context of sheaf cohomology computations over toric varieties.
Notation. We write morphisms between direct sums A ' B Ñ C ' D in additive categories as matrices using the row conventionˆγ AC γ AD γ BC γ BD˙f or morphisms γ AC : A Ñ C, γ AD : A Ñ D, γ BC : B Ñ C, γ BD : B Ñ D. We prefer writing α¨β : A Ñ C to β˝α for the composition of morphisms α : A Ñ B and β : B Ñ C, since this matches the row convention in a way that composition of morphisms is simply given by matrix multiplication.

Constructive category theory
To present our algorithmic approach to Freyd categories, we chose the language of constructive mathematics (see, e.g., [MRR88]). We did that for the following reasons: the language of constructive mathematics (1) reveals the algorithmic content of the theory of Freyd categories, (2) is perfectly suited for describing generic algorithms, i.e., constructions not depending on particular choices of data structures, (3) allows us to express our algorithmic ideas without choosing some particular model of computation (like Turing machines), (4) encompasses classical mathematics, i.e., all results stated in constructive mathematics are also valid classically, (5) does not differ very much from the classical language in our particular setup.
In constructive mathematics the notions of data types and algorithms (or operations) are taken as primitives and every property must have an algorithmic interpretation. For example given an additive category A we interpret the property A has kernels as follows: we have algorithms that compute for given ‚ A, B P Obj A , α P Hom A pA, Bq an object kerpαq P Obj A and a morphism KernelEmbeddingpαq P Hom A pkerpαq, Aq for which KernelEmbeddingpαq¨α " 0, ‚ A, B, T P Obj A , α P Hom C pA, Bq, τ P Hom A pT, Aq such that τ¨α " 0 a morphism u P Hom A pT, kerpαqq such that where u is uniquely determined (up to ") by this property.
Another important example is given by decidable equality, where we interpret the property that for all objects A, B P A, we have @α, β P Hom A pA, Bq : pα " βq _ pα ‰ βq as follows: we are given an algorithm that decides or disproves equality of a given pair of morphisms. In the appendix A we enlisted a constructive interpretation of various kinds of categories, e.g., additive or abelian categories (cf. the corresponding list in [BLH14a, Appendix B] and note the difference in our treatment of equalities for morphisms explained in Remark A.2). On the other hand, we allow ourselves to work classically whenever we interpret Freyd categories in terms of finitely presented functors (this happens in Section 7). The reason for this is pragmatic: we want to demonstrate the usefulness of having Freyd categories computationally available, and we believe that this can be done by interpreting Freyd categories in terms of other categories that classical mathematicians care about.

Constructive Freyd categories
We recall the definition of a Freyd category.
Definition 3.1. Let P be an additive category. The Freyd category ApPq is given by the following data: (1) An object in ApPq is simply a morphism in P. We will write such an object as pA commutative. We call α the morphism datum and any such ρ α a morphism witness. We often write tα, ρ α u for a morphism in ApPq to highlight a particular choice of a morphism witness ρ α for a morphism datum α. We define two morphisms A ÐÝ R B q to be equal (in ApPq) if there exists a lift λ of the following diagram: We call any such λ a witness for α and α 1 being equal.
(3) Composition and identities are directly inherited from P.
Remark 3.2. Being equal in ApPq clearly defines an equivalence relation (transitivity corresponds to addition of witnesses) that is compatible with composition. Furthermore, ApPq inherits the structure of an additive category from the category of arrows of P.
Remark 3.3. Since we are interested in a constructive approach to Freyd categories, we say a few words about witnesses. Classically, morphisms in the Freyd category are the equivalence classes of "being equal in ApPq". For us, however, it is more convenient to use the language of morphism data and witnesses since these are the actual entities for which we define our algorithms (see Constructions 3.6, 3.10, 3.13, 3.14). In particular, we avoid unnecessary picking of representatives in the beginning of all these constructions. 1 The symbols R A and ρ A stand for relations for A. Thus, we think of a morphism pA ρA ÐÝ R A q as an additional datum for its range A.
Stating the main theorem for ApPq requires another definition.
Definition 3.4. Let P be an additive category. For a morphism α : A Ñ B in P, a weak kernel consists the following data: (1) An object K P P.
(3) An operation that constructs for T P P and test morphism τ : T Ñ A such that τ¨α " 0 a morphism upτ q : T Ñ K with upτ q¨κ " τ .
Note that the morphism upτ q does not have to be unique with this property, so we really weaken the usual definition of a kernel. Furthermore, we say P has weak kernels if it comes equipped with an operation constructing the triple pK, κ, uq for given α.
The following main theorem about ApPq is due to Freyd [Fre66].
Theorem 3.5. Let P be an additive category. Then ApPq is an abelian category if and only if P has weak kernels.
Freyd gives two proofs of his theorem: a non-elementary one using functor categories [Fre66, Proposition 1.4] and a more elementary one using an auxiliary theorem for recognizing abelian categories via the existence of factorizations of morphisms into cokernel projections and kernel embeddings [Fre66, Section 3]. Our goal is to render Theorem 3.5 constructive in a way such that a direct computer implementation becomes possible. To this end, we will state and prove the explicit construction steps for (co)kernels (and their universal properties) in ApPq, as well as for lifts along monomorphisms and colifts along epimorphisms. Our explicitness reveals what is otherwise hidden in propositions, namely the important role of witnesses for the construction of morphism data.
3.1. Cokernels in Freyd categories. We start with the construction of cokernels.
Construction 3.6 (Cokernels). Given a morphism tα, ρ α u : pA in ApPq, the following diagram shows us how to construct its cokernel projection along with the universal property: tτ,ˆρ τ σ˙u σ How to read this diagram: the solid arrow pointing up right is the cokernel projection, the solid arrow pointing down right is a test morphism for the universal property of the cokernel, and the dashed arrow pointing straight down is the morphism induced by the universal property. The dotted arrow labeled with σ is a witness for the composition tα, ρ α u¨tτ, ρ τ u being zero, i.e., it denotes a morphism σ : A Ñ R T such that σ¨ρ T " α¨τ . We see that σ is used in the construction of the morphism witness for the induced morphism, but not in any morphism data. We also see that no morphism witness is used for the construction of any morphism data.
Correctness of the construction. It is an easy calculation that all morphisms are welldefined. A witness for the composition tα, ρ α u¨tid B ,`id R B 0˘u being zero is given by the natural inclusion A ãÑ R B ' A. The commutativity of the triangle even holds strictly in the category of arrows of P. For the uniqueness of the induced morphism, it suffices to see that our construction of the cokernel projection is an epimorphism, which follows from the next Lemma 3.7.
Lemma 3.7. Every morphism in ApPq of the form tid A , ρu : pA is an epimorphism.
Proof. See also [Fre66, first part of the proof of Lemma 3.2.1]. Given a test morphism for tid A , ρu being an epimorphism, i.e., a morphism tβ, ρ β u : pA such that tid A , ρu¨tβ, ρ β u " 0, we can take any witness σ : A Ñ R B for this composition being zero as a witness for tβ, ρ β u being zero.

Kernels in Freyd categories.
For the construction of kernels in ApPq, we first introduce weak pullbacks in P (mainly for introducing our notation).
Definition 3.8. Let P be an additive category. For a given cospan A α ÝÑ B γ ÐÝ C in P, a weak pullback consists the following data: (1) An object AˆB C P P.
(2) Morphisms (3) An operation that constructs for T P P and morphisms p : Note that the morphism " p q ‰ does not have to be unique with this property, so we really weaken the usual definition of a pullback. Also note that we use angular matrices for weak pullback morphisms (in contrast to round matrices for direct sum morphisms).
Remark 3.9. If P has weak kernels, then it also has weak pullbacks, since we can compute weak pullbacks from weak kernels and direct sums in the same way as we can compute pullbacks from kernels and direct sums.

Construction 3.10 (Kernels). Given a morphism
in ApPq, the following diagram shows us how to construct its kernel embedding along with the universal property: σ How to read this diagram: the occurring weak pullbacks are defined by The solid arrow pointing down right is the kernel embedding, the solid arrow pointing up right is a test morphism for the universal property of the kernel, and the dashed arrow pointing straight up is the morphism induced by the universal property. The dotted arrow depicts σ : T Ñ R B , a witness for the composition tτ, ρ τ u¨tα, ρ α u being zero. We see that no morphism witness is used for the construction of any morphism data. But now, in contrast to the cokernel construction, the witness σ is used in the construction of the morphism datum of the induced morphism.
Correctness of the construction. It is easy to see that all morphisms are well-defined. A witness for the composition t " 0 1  , " 0 1  u¨tα, ρ α u being zero is given by the projection The commutativity of the triangle even holds strictly in the category of arrows of P. For the uniqueness of the induced morphism, it suffices to see that our construction of the kernel embedding is a monomorphism, which follows from the next Lemma 3.11. Then " δ σ ‰ : D Ñ AˆB C is a witness for tδ, ρ δ u being zero.
3.3. Lift along monomorphisms in Freyd categories. One axiom of abelian categories states that every monomorphism is the kernel of its cokernel. When we rephrase this axiom constructively, we see that we have to be able to construct lifts along monomorphisms.
Definition 3.12. A category A has decidable lifts if we have an algorithm that creates for a given cospan A α ÝÑ B γ ÐÝ C in A a morphism λ : A Ñ C satisfying λ¨γ " α (called a lift of α along γ) or disproves its existence. If γ is a monomorphism, we also call λ a lift along a monomorphism.
Dually, we say A has decidable colifts if we have an algorithm that creates for a given span A α ÐÝ B γ ÝÑ C in A a morphism λ : C Ñ A satisfying γ¨λ " α (called a colift of α along γ) or disproves its existence. If γ is an epimorphism, we also call λ a colift along an epimorphism. Construction 3.13 (Lifts along monomorphisms). The kernel embedding of a given monomorphism tα, ρ α u : pA in ApPq is zero. A witness of this fact is given by a morphism σ : (see Construction 3.10). Now, the following diagram shows us how to construct a lift along tα, ρ α u for a given test morphism: ow to read this diagram: the solid horizontal arrow is the cokernel projection of our monomorphism tα, ρ α u (see Construction 3.6). The dotted arrow is a witness for the composition of the test morphism tτ, ρ τ u with the cokernel projection being zero. The upwards pointing dashed arrow is the desired lift, whose morphism witness involves the weak pullback induced morphism given by the diagram Correctness of the construction.`τ R B τ A˘b eing a witness gives the equation from which we can already see that if the constructed lift is well-defined as a morphism in ApPq, then it really is a lift along our monomorphism. So we have to check that the morphism witness of our lift is correct. Multiplying (2) with ρ T from the left yields which shows that the morphism witness is correct.

Colifts along epimorphisms in Freyd categories.
Dually, we have to be able to construct colifts along epimorphisms in ApPq.
Construction 3.14 (Colifts along epimorphisms). The cokernel projection of a given epimorphism tα, ρ α u : pA (see Construction 3.6). Now, the following diagram shows us how to construct a colift along tα, ρ α u for a given test morphism: How to read this diagram: the solid horizontal arrow is the kernel embedding of our epimorphism tα, ρ α u (see Construction 3.10), where we set R K :" pR BˆB AqˆA R A . The dotted arrow is a witness for the composition of the kernel embedding with the test morphism tτ, ρ τ u being zero. The downwards pointing dashed arrow is the desired colift, whose morphism witness involves the weak pullback induced morphism given by the diagram Correctness of the construction. Multiplying (5) with ρ B from the left yields and thus Well-definedness of the constructed colift as a morphism in ApPq follows from the commutativity of the two inner squares in the diagram It remains to show that the constructed colift really yields a colift for the given test morphism. To this end, we multiply (5) with α from the left and see that we have found a witness for τ and α¨pσ A¨τ q being equal in ApPq.

A constructive proof of the main theorem.
Proof of Theorem 3.5. Constructions 3.6 shows that ApPq always has cokernels. Moreover, if P has weak kernels, then Constructions 3.10, 3.13, 3.14 show that ApPq is abelian. For the other direction, we construct weak kernels in P using the operation for kernels in ApPq: given a morphism A α ÝÑ B P P, we compute a kernel embedding of tα, 0u : pA ÐÝ 0q ÝÑ pB ÐÝ 0q. Then κ¨α " 0 P P since any witness for tκ, ρ κ u¨tα, 0u being zero in ApPq factors over 0. Thus, κ : K Ñ A is a candidate for a weak kernel embedding of α in P. Let T τ ÝÑ A P P such that τ¨α " 0 P P. We use the universal property of the kernel in ApPq to compute the dashed arrow in the following commutative diagram: Again, from tu, ρ u u¨tκ, ρ κ u " tτ, 0u P ApPq we can deduce u¨κ " τ P P, thus, we really have constructed a weak kernel of α.
Remark 3.15. For an actual computer implementation of an abelian category A, it is a useful feature to have decidable equality of morphisms (see, e.g., Remark 7.5 for an application in the context of Freyd categories). We call categories (in constructive contexts) with decidable equality of morphisms computable. In the case of Freyd categories, ApPq is computable if and only if P has decidable lifts, which means (by our constructive interpretation) to have an algorithm that actually create lifts or to disproves 2 their existence).

Corollary 3.16. Let P be an additive category. Then ApPq is a computable abelian category if and only if P has weak kernels and decidable lifts.
Remark 3.17. Note that if P has weak kernels, then (by our constructive interpretation) we already have an algorithm for lifting some cospans, namely those representing a test situation for the weak kernel (see Definition 3.4.(3)). But it is impossible to derive from such an algorithm one for general lifts: we will see an example of a computable additive category P with weak kernels but with a computationally undecidable lifting problem in Subsection 5.3.
3.6. The induced functor. In this subsection we single out the most important constructive aspect of the idea that the Freyd category is a universal way to add cokernels to P.
Construction 3.18. Let P be an additive category. Given the data: (1) An additive category T.
(3) An operation that constructs for given A α ÝÑ B in P a cokernel object cokerpF pαqq (along with its cokernel projection and universal property) of F pAq F pαq ÝÑ F pBq. Then we can construct an induced functor U : ApPq Ñ T as follows.
we map it to the morphism induced by the universal property of the cokernels: Correctness of the construction. The morphism induced by the universal property of the cokernel is independent of the morphism witness. Now, correctness follows from the functoriality of the cokernel.

Interpretations of Freyd categories
In this subsection we want to give several interpretations of ApPq for specific inputs P that are all of the same spirit: the objects in ApPq represent finitely presented objects in some abelian category A. The first theorem in this section is the main tool for giving these interpretations.
Theorem 4.1. Let P be an additive category, A an abelian category, and F : P Ñ A a full and faithful functor such that F pP q is a projective object for all P P P. Then the induced functor U : ApPq Ñ A is an equivalence between ApPq and the full subcategory B of A generated by those objects A for which there exist P A , Q A P P and an exact sequence Proof. We define an inverse functor V : B Ñ ApPq as follows. We have an operation on objects sending Using all of our assumptions on F , we can conclude: for α : A Ñ B P B, there exists a morphism p : F pqq α commutes for some morphism q : Q A Ñ Q B . Given another morphism p 1 : P A Ñ P B with this property, we have pF ppq´F pp 1 qq¨ǫ B " 0. Again using all of our assumptions on F , we can conclude the existence of λ : P A Ñ Q B such that λ¨d B " p´p 1 , which proves that p and p 1 are equal as morphisms from pP A Thus, using the axiom of unique choice, α Þ Ñ p defines a well-defined action of V on morphisms. Furthermore, U and V are readily seen to be mutual inverses.

Finitely presented modules.
Example 4.2 (Interpretation as finitely presented modules). Let R be a ring. We denote the abelian category of left R-modules by R-Mod. We define Rows R to be the full subcategory of R-Mod generated by all row modules R 1ˆn for n P N 0 considered as free left modules. Morphisms Hom Rows R pR 1ˆm , R 1ˆn q can be naturally identified with matrices R mˆn for m, n P N 0 . Then Rows R Ď R-Mod is a full and faithful embedding of projective objects. From Theorem 4.1 we conclude where R-fpmod is the category of finitely presented left R-modules.
The whole example also works for right modules by considering the full subcategory Cols R Ď Mod-R of right column modules instead. Note that if M P R nˆm represents a morphism from R mˆ1 to R nˆ1 in Cols R , reinterpreting it as a morphism from R 1ˆn to R 1ˆm in Rows R yields an equivalence Cols R » Rows op R . Furthermore, Rows op R » Rows R op . We conclude: where fpmod-R denotes the category of finitely presented right R-modules.
In [BLH11] computable rings are introduced. We give a definition and a characterization of such rings using Freyd categories.

Definition 4.3. A ring R that
(1) is left coherent, i.e., for a given matrix A with coefficients in R we can compute a matrix L such that LA " 0 and for all matrices T such that T A " 0, there exists a matrix U such that UL " T (that means L generates the row syzygies), (2) has decidable lifts, i.e., there is an algorithm to decide solvability and to construct a particular solution of a linear systems XA " B for given matrices A, B with coefficients in R, R is left and right computable we simply call it computable.
Remark 4.4. Be aware of the existential quantifiers in Definition 4.3.(1). By our constructive interpretation we regard left coherent rings as being equipped with an algorithm for computing L (for given A) as well as U (for given A and T ).
Remark 4.5. A left computable ring R has decidable equality, since a " b if and only if x¨0 " pa´bq is solvable for a, b P R (and similar for right computable rings).
Theorem 4.6. Let R be a ring.
(1) R is left coherent if and only if ApRows R q is abelian.
(2) R is left computable if and only if ApRows R q is computable abelian.
Proof. R being left coherent is equivalent to Rows R having weak kernels. So, the first claim follows from Theorem 3.5. R having decidable lifts is equivalent to Rows R having decidable lifts, and the second claim follows from Corollary 3.16 4.2. Finitely presented graded modules.
Example 4.7 (Interpretation as finitely presented graded modules). Let G be a group and S a G-graded ring, i.e., a ring with a direct sum decomposition S " À dPG S d into abelian groups such that S d¨Se Ď S d¨e for all d, e P G. A graded left (resp. right) module is given by a left (resp. right) S-module M equipped with a direct sum decomposition M " À dPG M d into abelian groups such that S d¨Me Ď M d¨e (resp. M e¨Sd Ď M e¨d q for all d, e P G. Graded left (resp. right) S-module homomorphisms are given by left (resp. right) S-module homomorphisms respecting the grading. We denote the corresponding abelian category by S-grMod (resp. grMod-S).
For a graded left (resp. right) module M and given e P G, we denote by Mpeq the e-th shift of M, i.e., the graded left module with Mpeq d :" M d¨e (resp. the graded right module with Mpeq d :" M e¨d ). The full subcategory generated by graded left (resp. right) modules of the form Spe 1 q '¨¨¨' Spe r q for e 1 , . . . , e r P G is denoted by grRows S (resp. grCols S ). Morphisms in grRows S (resp. grCols S ) from Spd 1 q '¨¨¨' Spd r q to Spe 1 q '¨¨¨' Spe s q for d 1 , . . . , d r , e 1 , . . . , e s P G can be naturally identified with matrices H P S rˆs (resp. H P S sˆr ) with homogeneous entries H ij P S d´1 i¨e j (resp. H ji P S e j¨d´1 i ) for i " 1, . . . , r, j " 1, . . . s. Since grRows S Ď S-grMod (resp. grCols S Ď grMod-S) are full and faithful embeddings of projective objects, we conclude (using Theorem 4.1) ApgrRows S q » S-fpgrmod (resp. ApgrCols S q » fpgrmod-S) where S-fpgrmod (resp. fpgrmod-S) is the category of finitely presented graded left (resp. right) S-modules.
For an implementation of ApgrRows S q as a computable abelian category, we need grRows S to have weak kernels and decidable lifts (Corollary 3.16). These requirements for grRows S concisely encode the following specifications needed in an actual implementation: we need data structures for elements in G, a constructor for the neutral element e G P G, algorithms for multiplication, inversion, and equality in G. Furthermore, we need data structures for elements in S d (d P G), constructors for 1 P S e G and 0 P S d (d P G), algorithms S dˆSd 1 Ñ S dd 1 for multiplication (d, d 1 P G), algorithms S dˆSd Ñ S d for addition and subtraction (d P G), an algorithm for equality in S d pd P Gq. Furthermore, for weak kernels and decidable lifts in grRows S , we need an algorithm for computing homogeneous row syzygies of a matrix with homogeneous entries, and an algorithm for deciding the existence and in the affirmative case computing a solution of a linear system XA " B, where A, B and the solution X are matrices with homogeneous entries.  We will study finitely presented functors in the case P abelian in Section 7.

Computationally undecidable lifting and colifting problems
In this section we provide several examples concerning computationally undecidable problems.
(1) We give an example of a ring R with decidable equality 3 whose lifting and colifting problems are computationally undecidable. (2) From such an R, we build a ring P with decidable equality whose colifting problem is still computationally undecidable, but now, P has decidable lifts. (3) We use P for the construction of an additive category P with decidable equality, having weak kernels, but whose lifting problem is computationally undecidable. But first, we will explain what we mean by computationally undecidable problems.
Definition 5.1. Let P be an additive category. We say the lifting problem for P is computationally undecidable if P having decidable lifts would imply the decidability of a problem that is known to be undecidable by Turing machines. We proceed analogously for colifts.
Definition 5.2. Let R be a ring. We say the lifting problem for R is computationally undecidable if the lifting problem for Rows R is computationally undecidable. We can rephrase this condition in terms of equations for R: having an algorithm for deciding and finding particular solutions of left-sided equations XA " B would imply the decidability of a problem that is known to be undecidable by Turing machines. We proceed analogously for colifts. 5.1. A ring with decidable equality and computationally undecidable lifting and colifting problem. We describe the famous word problem for finitely presented groups: given a finite set X , let FrpX q denote the free group over X . Let furthermore R Ď FrpX q be a finite subset and N the normal subgroup generated by R. The word problem for H :" FrpX q{N (more precisely for X and R) is the algorithmic problem of deciding whether a given w P FrpX q represents the identity element in H, i.e., whether there is an algorithm rendering the (classically trivial 4 ) proposition @w P FrpX q : pw P Nq _ pw R Nq constructive. There are known concrete instances for X and R for which the word problem is undecidable [Boo59] when we use Turing machines as a model of computation. Let X , R be such an instance.
Let G :" FrpX qˆFrpX q and let M Ď G denote the equivalence relation induced on FrpX q by N, i.e., the set of all pairs pw 1 , w 2 q such that w 1 and w 2 represent the same element in H. Then M is the so-called Mihailova subgroup of G (introduced in [Ml58]), and deciding whether w P FrpX q represents the identity in H is equivalent to deciding pw, 1q P M. It is easy to see that M is finitely generated as a subgroup by the finite set 3 such rings are also called discrete in [MRR88] 4 by the law of excluded middle We set R :" krGs, i.e., R is the group ring of G with coefficients in a field with decidable equality 5 k. Then R is a k-algebra with decidable equality since the word problem in G is decidable. Furthermore, we claim that the lifting and colifting problems for R are computationally undecidable. This follows from the following lemma. Let k be a field, G be a group, and M Ď G be a subgroup. We define the right ideal I :" x1´m | m P My krGs of the group ring krGs. Given g P G, we have g P M ðñ p1´gq P I. For the second claim, let m 1 , m 2 P M such that p1´m 1 q, p1´m 2 q P I M 1 . Then p1´m 1 qp´m´1 1 q " 1´m´1 1 P I M 1 and p1´m 1 qm 2`p 1´m 2 q " 1´m 1 m 2 P I M 1 .

Lemma 5.3.
Remark 5.4. The choice of formulating Lemma 5.3 in terms of right ideals was arbitrary. It is also valid (with an analogous proof) in terms of left ideals.
Corollary 5.5. The lifting and colifting problems are computationally undecidable for krFrpX qˆFrpX qs.
Proof. For g P FrpX qˆFrpX q and M 1 the finite generating set of the Mihailova subgroup, deciding whether 1´g lies in the finitely generated right ideal I M 1 is equivalent to deciding whether there exists a colift of the diagram Analogously, checking whether an element lies in a finitely generated left ideal can be formulated in terms of a lifting problem.

5.2.
A ring with decidable equality, decidable lifts, and a computationally undecidable colifting problem. For simplifying our exposition, we axiomatize those properties of R that are needed for our construction in this subsection: let R be a k-algebra with decidable equality such that (1) R has an enumerable k-basis v 1 , v 2 , v 3 , . . . , (2) the colifting problem for R is computationally undecidable.
The group ring krFrpX qˆFrpX qs satisfies these requirements since p1q the elements of FrpX qˆFrpX q form a k-basis that can be enumerated and p2q the colifting problem for krFrpX qˆFrpX qs is computationally undecidable due to Corollary 5.5. Goal of this subsection: the creation of a ring P with decidable equality, decidable lifts, and a computationally undecidable colifting problem.
The main idea: we create P from R by "adding" operators that help solving left-sided equations (10) X¨A " B for matrices A, B over R, but that are of no use for right-sided equations A¨X " B.

Helpful operators: as a k-vector
Given matrices A, B over R, there exists a d P N such that all entries of A, B lie in R d . If px mn q mn is a solution over R for the left-sided equation (10), then each entry x mn could be replaced by a k-linear operator ω mn in where ω mn acts like x mn on R d and projects the result back into R d . The crucial observation is the following: replacing the matrix px mn q mn by pω mn q mn still gives a solution for the leftsided equation (10). Now, finding a solution of (10) with entries in Ω d (where A and B are still defined over R) can be done by making an ansatz and using linear algebra. If no solution with entries in Ω d exists, then there is also no solution with entries in R. This motivates to "add" the operator spaces Ω i for all i P N to R, but in an "unbalanced way", i.e., the Ω i must not be helpful for solving right-sided equations.
The details: we extend the action of an operator ω P Ω i from R i to R by setting ωpR i q " 0.
Construction 5.6. We construct a category C enriched over k as follows: (1) C consists of three objects that we denote by z 1 , z 2 , z 3 .
(2) The homomorphism k-vector spaces in C are determined by the following diagram: This means, Hom C pz 1 , z 2 q " R ' p À iPN Ω i q, Hom C pz 2 , z 3 q " R, Hompz j , z j q " k for j " 1, 2, 3, and Hom C pz 1 , z 3 q " R. The other Hom-sets are given by 0. Composition of two consecutive arrows z 1 Ñ z 2 and z 2 Ñ z 3 is induced by the operations of R and Ω i on R.
Next, let P denote the (path) algebra of C, i.e., its underlying vector space is Hom C pz i , z i q ' Hom C pz 1 , z 2 q ' Hom C pz 2 , z 3 q ' Hom C pz 1 , z 3 q with multiplication given by composition in C and setting the multiplication of two noncomposable morphisms to 0. Then P has decidable equality. Given an element x P P , we will write x " x p1,1q`xp2,2q`xp3,3q`xp1,2q`xp2,3q`xp1,3q for its decomposition w.r.t. the direct sum decomposition (11).
Lemma 5.7. The colifting problem is computationally undecidable for P .
Proof. We reduce the computationally undecidable colifting problem of R to the colifting problem of P . Given matrices A, B over R, we interpret the entries of A as elements in Hom C pz 1 , z 2 q and the entries in B as elements in Hom C pz 1 , z 3 q. Then A¨X " B has a solution over R if and only if it has a solution over P , since a solution over R can be interpreted as a solution with entries in Hom C pz 2 , z 3 q Ď P , and a solution X " px mn q mn over P gives rise to a solution px p2,3q mn q mn with entries in Hom C pz 2 , z 3 q " R. For the proof of the next lemma, we introduce the following spaces for all i P N: ‚ Hom i C pz 1 , z 2 q :" R i ' p À jďi Ω j q Ď Hom C pz 1 , z 2 q ‚ Hom i C pz 1 , z 2 q :" R i ' p À jąi Ω j q Ď Hom C pz 1 , z 2 q ‚ Hom i C pz m , z n q :" R i Ď Hom C pz m , z n q for pm, nq P tp1, 3q, p2, 3qu ‚ Hom i C pz m , z n q :" R i Ď Hom C pz m , z n q for pm, nq P tp1, 3q, p2, 3qu ‚ P i :" À 3 i"1 Hom C pz i , z i q ' Hom i C pz 1 , z 2 q ' Hom i C pz 2 , z 3 q ' Hom i C pz 1 , z 3 q ‚ P i :" Hom i C pz 1 , z 2 q ' Hom i C pz 2 , z 3 q ' Hom i C pz 1 , z 3 q Given an element x P P , we will write x " x i`x i for its decomposition in P i ' P i .
Proof. Given matrices A, B over P , we need to decide whether there exists a matrix X over P such that X¨A " B, and in the affirmative case construct such a matrix. There exist d, d 1 P N such that all entries of A and B lie in P d and such that such that R d¨Rd Ď R d 1 (which is actually equivalent to P d¨P d Ď P d 1 ). Our main claim is the following: DX over P solving X¨A " B ô DX with all entries in P d 1 solving X¨A " B.
Once we know that our main claim is true, X¨A " B can simply be solved by making an ansatz with all entries of X lying in P d 1 . This ansatz yields a linear system over k and can be dealt with since k is a field with decidable equality.
The "only if" direction of our main claim is the hard part, so let us assume that we are given a solution X over P . We define an operator σ : P Ñ P d 1 with the idea that entrywise applied to X it will also yield a solution: where we define τ : P d Ñ P d 1 : We show that σ entrywise applied to X yields a solution: given x 1 , . . . , x n P P and a 1 , . . . , a n P P d for n P N 0 such that ř n i"1 x i¨ai P P d , we claim that For this, it suffices to show that Due to our choice of d 1 , the term Now, to simplify our notation, we write We have both lies in Hom C pz 2 , z 3 q d (since the a p3,3q i act like scalars) and Hom C pz 2 , z 3 q d (due to (13)). Thus, the claim (14) simplifies to which is equivalent to which in turn is equivalent to the two equations First, we deal with (15): since this term both lies in Hom C pz 1 , z 2 q d (since the a p2,2q i act like scalars) and Hom C pz 1 , z 2 q d (due to (13)). Because τ is a linear map, we also have Finally, we deal with (16):

5.
3. An additive category with decidable equality, having kernels, and a computationally undecidable lifting problem. Let P be the ring constructed in Subsection 5.2. It has decidable lifts but a computationally undecidable colifting problem. We set P :" ApRows P q op . Then P is additive with decidable equality, since P has decidable lifts. Furthermore it has weak kernels (even kernels), since ApRows P q has cokernels by Construction 3.6. However, the lifting problem for P is computationally undecidable: an algorithm for deciding lifts in P " ApRows P q op , i.e., colifts in ApRows P q, immediately gives an algorithm for deciding colifts in Rows P (because Rows P Ď ApRows P q is a full embedding). But the colifting problem is computationally undecidable for P by Lemma 5.7. We have proven the main theorem of this section: Theorem 5.9. The category ApRows P q op is additive with decidable equality, has kernels, but its lifting problem is computationally undecidable.
Remark 5.10. Theorem 5.9 shows that even if we have an additive category with decidable equality and weak kernels (this includes having an algorithm for lifting those cospans representing a test situation for the weak kernel), we cannot expect to derive an algorithm for solving the lifting problem from these data.
Remark 5.11. ApApRows P q op q is abelian by Theorem 3.5. However, ApApRows P q op q being computable abelian implies P having decidable colifts, which is a computationally undecidable problem. This behavior is not uncommon in our constructive setup. Another example of such an abelian category is the category of unbounded chain complexes of finite dimensional k-vector spaces for a field k with decidable equality.

Lifts and homomorphism structures
We are going to address the problem of computing lifts in the Freyd category ApPq for an additive category P. To this end, we take a look at the following diagram: The solid arrows represent given morphisms in ApPq, the dashed morphism tX, Y u in ApPq is the lift which we want to compute (with unknowns X, Y ), i.e., it has to satisfy (17) ρ A¨X " Y¨ρ C for being well-defined and for being a lift, where the unknown Z is a witness for α and X¨γ being equal. Thus, computing a lift in ApPq means finding morphisms X, Y, Z in P satisfying equations (17) and (18).
6.1. Linear systems in additive categories. In order to develop a strategy for solving equations (17) and (18), we discuss arbitrary linear systems in P.
Definition 6.1. Let P be an additive category. A linear system in P with m P N equations in n P N indeterminates is defined by the following data: (1) Objects pA i q i , pD i q i and pB j q j , pC j q j in P for i " 1, . . . , m, j " 1, . . . , n.
(2) Morphisms pα ij : A i Ñ B j q ij and pβ ij : A solution is given by morphisms pX j : B j Ñ C j q j"1,...,n such that the equations hold. We say P has decidable linear systems if we have an algorithm that constructs for a given linear system a solution or disproves its existence.
Definition 6.2. Let P be an additive category. The set of iterated Freyd categories of P is defined inductively: (1) P is an iterated Freyd category of P.
(2) If X is an iterated Freyd category of P, then so are X op and ApXq.
Important examples of iterated Freyd categories are ApApPqq and ApApPq op q (see Example 4.8). The next theorem is a generalization of the discussion in the beginning of this section. Theorem 6.3. Let P be an additive category. Any linear system in an iterated Freyd category X of P gives rise to a linear system in P such that the former has a solution if and only if the latter has a solution.
Proof by induction. The case X " P is trivial. Furthermore, any linear system in X op trivially gives rise to an equivalent linear system in X. So, let ř n i"j tα mj , ρ α mj u¨X j¨t β mj , ρ β mj u " tγ m , ρ γm u be a linear system in ApXq, where the corresponding sources and ranges are denoted by To define an equivalent linear system in X, we introduce variables pX 1 j q j , pX 2 j q j , and the set of linear equations Furthermore, for each original equation, we need a "witness-variable" pZ i : A i Ñ R D i q i . Now, we can simply encode the original equations by the following linear equations in X: Key observation: finding a solution of a linear system in P is equivalent to finding a lift of the following diagram of abelian groups: The data needed to form this diagram are (1) the abelian group Z, (2) the Hom-functor of P mapping to the category of abelian groups, (3) the translation of elements in Hom P pA, Bq to morphisms Z Ñ Hom P pA, Bq. We abstract these data in the following definition 6 . Definition 6.4. Let P, B be additive categories. A B-homomorphism structure for P consists of the following data: (1) A distinguished object 1 P B.
(2) A bilinear functor H : P opˆP Ñ B, i.e., a functor which is additive in each component.
Example 6.5. We use the notation of Example 4.2. Let R be a commutative ring. The functor H : Rows op RˆR ows R ÝÑ Rows R : The author is not aware of such a definition appearing in the literature.
defines a Rows R -homomorphism structure for Rows R with distinguished object R 1ˆ1 and the natural isomorphism of R-modules Note that H can be interpreted as the restriction of the Hom-functor R-Mod opˆR -Mod Ñ R-Mod to row modules.
The previous example only worked due to the commutativity of the ring in question. In the next example, we show what we can do in the non-commutative case provided that the the center of the ring is "big enough". Example 6.6. We use the notation of Example 4.2. Let R be a ring and C Ď R its center. Assume that R is finitely presented as a C-module, i.e., there exists an exact sequence of C-modules for a, b P N, where C R denotes R regarded as a C-module. In this case the Hom-functor for Rows R can be seen as a functor mapping to C-fpmod: This gives rise to a C-fpmod-homomorphism structure for Rows R with distinguished object C 1ˆ1 P C-fpmod and natural isomorphism nduced by the natural bijection between elements in R and C-module homomorphisms C Ñ C R. This homomorphism structure transfers to a ApRows R q-homomorphism structure via the equivalence R-fpmod » ApRows R q (see Example 4.2).
The next examples are more abstract.
Example 6.7. If P is an additive closed symmetric monoidal category, then its tensor unit 1 P P and the internal Hom-functor define a P-homomorphism structure for P. Example 6.8. If p1, H : P opˆP Ñ B, νq is a B-homomorphism structure for P, then swapping components G : PˆP op " Ý Ñ P opˆP H ÝÑ B defines a B-homomorphism structure for P op with distinguished object 1.
The following theorem is an abstraction of a computational trick presented in [ZL02] (see also [BR08]). Theorem 6.9. We use the notation of Definition 6.1. Let P be an additive category equipped with a B-homomorphism structure p1, H, νq. Given a linear system in P, then pX j q j is a solution if and only if it gives rise to a lift of the following diagram in B: Since ν is an isomorphism, the last term equals pνpγ i qq i if and only if pX j q j is a solution.
Corollary 6.10. Let P be an additive category equipped with a B-homomorphism structure p1, H, νq. If B has decidable lifts, then P has decidable linear systems. In particular, any iterated Freyd category of P has decidable linear systems.
Proof. We use Theorem 6.3 and Theorem 6.9.
Example 6.11. Let R be a commutative ring. Then Rows R has a Rows R -homomorphism structure (Example 6.5). If R has decidable lifts, then ApRows R q and all the other iterated Freyd categories of Rows R have decidable linear systems (in particular lifts and colifts) (Corollary 6.10).
Using the previous example, we can deal with more general rings: Example 6.12. Let R be a ring that is finitely presented as a module over its center. Then Rows R has an ApRows C q-homomorphism structure (Example 6.6). If C has decidable lifts, then so does ApRows C q (Example 6.11). It follows that ApRows R q and all the other iterated Freyd categories of Rows R have decidable linear systems (in particular lifts and colifts) (Corollary 6.10).

Homomorphism structures in Freyd categories.
We show that certain B-homomorphism structures for P induce B-homomorphism structures for ApPq. We will use such an induced homomorphism structure in Subsection 7.2 to compute the sets of natural transformations between finitely presented functors.
Construction 6.13. Let P be an additive category, B an abelian category, and H : P opˆP Ñ B a bilinear functor. We want to construct from these data a bilinear functor extending H (where we think of P as a full subcategory of ApPq). Given morphisms tα, ρ α u : in ApPq, we set H A ptα, ρ α u, tβ, ρ β uq as the morphism between the kernels in the diagram kerpHpρ A , Bqq where we overline a morphism to address its induced morphism on quotient objects.

Correctness of the construction.
To see that all 4 overlined morphisms in the right square are well-defined, let us take a look at Hpρ A , Bq. It induces a well-defined morphism on the quotient objects in question if impHpA, ρ B q¨Hpρ A , Bqq Ď impHpR A , ρ B qq. But this is true since the interchange law for H, i.e., its functoriality as a bifunctor, implies We can deal similarly with the remaining 3 overlined morphisms.
Clearly, the right square commutes. Furthermore, since H A ptα, ρ α u, tβ, ρ β uq is constructed as a morphism between kernels from the right square, it is independent of the morphism Hpρ α , βq and thus of the chosen morphism witnesses ρ α , ρ β . Now, let σ A : A 1 Ñ R A and σ B : B Ñ R B 1 be arbitrary morphisms. Then tα, ρ α u " tα`σ A¨ρA , ρ α`ρA 1¨σ A u and tβ, ρ β u " tβ`σ B¨ρB 1 , ρ β`ρB¨σB u and we have to prove that our construction is independent of this choice of representatives. To this end, we compute Hpα`σ A¨ρA , β`σ B¨ρB 1 q " Hpα, βq`Hpσ A¨ρA , βq`Hpα, σ B¨ρB 1 q looooooomooooooon in HpA 1 ,B 1 q impHpA 1 ,ρ B 1 qq , where the last 2 summands are 0 because the images of Hpα, σ B¨ρB 1 q and Hpσ A¨ρA , σ B¨ρB 1 q lie in impHpA 1 , ρ B 1 qq. And since Hpσ A¨ρA , βq " Hpρ A , Bq¨Hpσ A , βq, i.e., it factors over Hpρ A , Bq, this summand does not contribute to the morphism between the kernels. It follows that our construction is well-defined, and its functoriality and bilinearity are easy to see. Theorem 6.14. Let P be an additive category equipped with a B-homomorphism structure p1, H, νq. If B is abelian and if 1 P B is a projective object, then the functor H A of Construction 6.13 fits into a B-homomorphism structure p1, H A , ν A q for ApPq.
Proof. We are using the notation of Construction 6.13. Since 1 is projective, Hom B p1,´q is exact and thus commutes with all abelian constructions. From this, it follows that Hom B`1 , kerpHpρ A , Bqq˘is naturally isomorphic to the kernel of the morphism between abelian groups Hom P pA,Bq impHom P pA,ρ B qq Corollary 6.15. Let P be an additive category equipped with a B-homomorphism structure p1, H, νq. If B is abelian and if 1 P B is a projective object, then all iterated Freyd categories X of P can be equipped with a B-homomorphism structure.
Proof by induction. The case X " P is trivial. The case X op follows from Example 6.8. The case ApXq is Theorem 6.14.
We summarize the computationally best case for rings. Corollary 6.16. Let R be a left coherent ring that is finitely presented as a module over its center C. If C is computable, then all iterated Freyd categories X of ApRows R q are computable abelian, have decidable linear systems (in particular lifts and colifts), and have an ApRows C q-homomorphism structure.
Proof. Use Corollary 6.10, Corollary 6.15, and Theorem 4.6. Also note that the assumptions imply that R is in fact a left computable ring.
We close this section with an example of a ring that does not meet the assumptions of Corollary 6.16. Theorem 6.17. Let k be a field with decidable equality and set Then R has decidable lifts, is not left coherent, but ApApRows R q op q is a computable abelian category that has decidable linear systems.
Proof. R is not left coherent since the the kernel (in R-Mod) of R 1ˆ1 pzq ÝÑ R 1ˆ1 is given by xx i | i P Ny ď R 1ˆ1 and a simple degree argument shows that it cannot be generated by finitely many elements. Next, we show that Rows R has decidable lifts. For any finite subset M Ď tx i | i P Nu of variables, define R M :" krz, m | m P Ms{xzm | m P My. The following ring homomorphisms x i x i P M 0 else id give rise to the functor´b R M R : Rows R M Ñ Rows R that interprets entries in R M as entries in R, and to the functor´b R R M : Rows R Ñ Rows R M that replaces every Since R M is a computable ring (by means of Gröbner bases [GP02]), Rows R has decidable lifts.
It follows from Example 6.11 that ApRows R q op and ApApRows R q op q have decidable linear systems. Furthermore, ApRows R q op has kernels since ApRows R q has cokernels (by Construction 3.6). Now, it follows from Corollary 3.16 that ApApRows R q op q is a computable abelian category. Example 7.1. Let A be an abelian category with enough projectives. Then for all A P A and i ě 0, the functors Ext i pA,´q are finitely presented [Aus66]. We describe a way to construct them as objects in ApA op q. To any chain complex

Applications to finitely presented functors
in A, we can associate the object pkerpd A i q ãÑ A i q P ApA op q and this association is easily seen to define a contravariant functor ker i from the category of chain complexes modulo homotopy K ‚ pAq to ApA op q. Now, let ProjRes : A Ñ K ‚ pAq denote the functor sending an object A P A to its projective resolution pP ‚ , d P ‚ q (which is uniquely determined up to homotopy). Then the functor A op ÝÑ fppA, Abq : A Þ Ñ Ext i pA,´q corresponds to ker i˝P rojRes op : A op ÝÑ ApA op q : A Þ Ñ pΩ i A ãÑ P i´1 q via the equivalence (19), where Ω i A :" kerpd P i´1 q denotes the i-th syzygy object. Note that this correspondence is simply given by the description of Ext i in terms of an i-th right satellite: [CE99,Chapter 3] for an explanation of satellites).
Example 7.2. Let R be a ring and M be a right R-module. Then it is shown in [Aus66, Lemma 6.1] that the functor pM b R´q : R-Mod Ñ Ab is finitely presented if and only if M is a finitely presented module. Concretely, if 0 ÐÝ M ÐÝ P 0 ÐÝ P 1 is a presentation with P 0 , P 1 finitely presented projective modules, then right exactness of the tensor product implies exactness of the rows in where p´q _ denotes the dualization Hom R p´, Rq. Thus, pM b R´q corresponds via (19) to pP _ 0 ÝÑ P _ 1 q P ApR-Mod op q. Next, we discuss the Tor functors. We set TrpMq :" cokerpP _ 0 ÝÑ P _ 1 q.
It follows that the natural transformation pTrpMq,´q ÐÝ pTrpMq _ b R´q is induced by the universal property of the cokernel of pQ _ 0 ,´q ÐÝ pQ _ 1 ,´q. But the computation of such a morphism is a task that we can easily translate to ApR-Mod op q using the methods of Section 3. We end up with the following translation: 0 Tor 1 pM,´q pTrpMq,´q Note that since we work with ApPq for P " R-Mod op , the arrows in the second sequence point to the right. For higher Tors, we can use the isomorphism Tor i pM,´q » Tor 1 pΩ i´1 M,´q for i ě 1 whenever Ω i´1 M is a finitely presented left module and TrpΩ i´1 Mq _ is a finitely presented right module (for example in the case where R is both left and right coherent).
Alternatively, we can represent Tor i pM,´q as a finitely presented functor in terms of left satellites: for N P R-Mod, we have where Ω i M ãÑ P i´1 denotes the embedding of the i-th syzygy object in the pi´1q-th object of a projective resolution of M. If Ω i M and P i´1 are finitely presented as modules, then so is Tor i pM,´q » ker`pΩ i M b´q ÝÑ pP i´1 b´qȃ s a functor (see also [Pre09, Theorem 10.2.35]).
Remark 7.3. Let R be a ring. Then fppR-fpmod, Abq can be seen as a full and exact subcategory of fppR-Mod, Abq by mapping a finitely presented functor on R-fpmod to its colimit extension (see, e.g., the discussion in [MR17, Section 4]). Thus, if we use our model R-fpmod » ApRows R q described in Example 4.2, then ApApRows R q op q » fppR-fpmod, Abq Ď fppR-Mod, Abq gives a model for explicit computations with those finitely presented functors on R-Mod that commute with filtered colimits. 7.2. Computing sets of natural transformations. If R is a left coherent ring that is finitely presented as a module over its computable center C, then due to Corollary 6.16, ApApRows R q op q » fppR-fpmod, Abq has an ApRows C q » C-fpmod-homomorphism structure H. This enables us to explicitly compute sets of natural transformations. For example, let A be a finitely presented left module, M a finitely presented right module such that TrpMq _ is also finitely presented (where we use the notation of Example 7.1 and Example 7.2). Then we may determine for i ě 0 (in a possibly new way) Hom fppR-fpmod,Abq`T or 1 pM,´q, Ext i pA,´qb y computing qȃ s an object pC 1ˆm ÐÝ C 1ˆn q in ApRows C q, where m, n P N 0 . This tells us that as a Cmodule, Hom fppR-fpmod,Abq pTor 1 pM,´q, Ext i pA,´qq can be presented by m generators and n relations. Using the definition of an ApRows C q-homomorphism structure, we can explicitly determine the m morphisms in ApApRows R q op q that correspond to our generators.
Thus, we have realized the idea of Hom-computability for ApApRows R q op q in the sense of finding a way to "oversee" a Hom-group in that category. All we needed for the realization of that idea was the notion of a homomorphism structure, which is much easier to implement on a computer than the creation of a constructive setup for arbitrary enriched categories as it is suggested in [BLH14b,Appendix] is an isomorphism in ApAq, where ε : A Ñ coker ρ A denotes the cokernel projection.
Proof. Let F :" cokerpp´, Aq p´,ρ A q ÐÝ p´, R A qq. In [Aus66, Section 3], it is shown that F ÝÑ p´, coker ρ A q is the universal left exact approximation of F , i.e., for any left exact G : A op Ñ Ab and natural transformation F Ñ G, there exists exactly one natural transformation making the diagram F p´, coker ρ A q G commutative. From this and the fact that any left exact functor is its own universal left exact approximation, the claim follows.
Remark 7.5. Deciding if a given morphism ϕ in ApAq is an isomorphism can be done by deciding whether id kerpϕq " 0 and id cokerpϕq " 0, which can be constructively realized with the methods provided by Section 3 and 6. 7.4. Computing injective resolutions.
Theorem 7.6. Let A be an abelian category having enough projectives. Let furthermore pA ρ A ÝÑ R A q P ApA op q, ε Q : Q ։ R A an epimorphism with Q projective, ε P : P ։ AˆR A Q an epimorphism with P projective. Set ρ P :" ε P¨" 0 1 We have also seen (Corollary 6.16) that ApApRows R q op q has decidable colifts provided that R is a left coherent ring that is finitely presented as a module over its computable center C.

Appendix A. Axioms of categories
We give complete definitions of various kinds of categories in a constructive context. We also hint at important differences to the corresponding list in [BLH14a, Appendix B].
Definition A.1. A category A consists of the following data: (1) A data type Obj A (objects).
(2) Depending on A, B P Obj A , a data type Hom A pA, Bq (morphisms), each equipped with an equivalence relation " (equality). (3) An algorithm that computes for given A, B, C P Obj A , α P Hom A pA, Bq, β P Hom A pB, Cq a morphism α¨β P Hom A pA, Cq (composition). If D P Obj A and γ P Hom A pC, Dq, then pα¨βq¨γ " α¨pβ¨γq (associativity).
Definition A.4. An additive category is an Ab-category A for which we have: (10) An algorithm that computes for a given finite (possibly empty) list of objects A 1 , . . . , A n in Obj A (for n P N 0 ) an object À n i"1 A i P Obj A (direct sum). If we are additionally given an integer i P t1 . . . nu, we furthermore have algorithms for computing morphisms π i P Hom A p À n i"1 A i , A i q (direct sum projection) and ι i : Hom A pA i , À n i"1 A i q (direct sum injection). (11) The identities ř n i"1 π i¨ιi " id À n i"1 A i , ι i¨πi " id A i , and ι i¨πj " 0, hold for all i, j " 1, . . . , n, i " j.
Definition A.5. A preabelian category is an additive category A for which we have: