{'fraction_non_alphanumeric': 0.048105962550694624, 'fraction_numerical': 0.009750625593234964, 'mean_word_length': 4.017099567099567, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Invertibility in Category Representations

Inverse categories are categories in which every morphism x has a unique pseudo-inverse y in the sense that xyx=x and yxy=y. Persistence modules from topological data analysis and similarly decomposable category representations factor through inverse categories. This paper gives a numerical condition, decidable when the indexing category is finite, characterizing when a representation of a small category factors through an inverse category.


Introduction
Geometric data is often encoded in a diagram of vector spaces, a representation (1) ∇ : X → Vec k of a small category X in the category Vec k of finite dimensional vector spaces over a field k. Examples include n-dimensional persistence modules in topological data analysis (X is a rank n poset), quiver representations (X is a free category on a directed graph), cellular sheaves of vector spaces (X is a poset of cells in a cell complex) [16], and parallel transport for a flat vector bundle (X is the fundamental groupoid of a manifold). In order to better understand the data, we often wish to decompose the diagram ∇ into a direct sum of simpler such diagrams. All 1-dimensional persistence modules and quiver representations over simply laced Dynkin diagrams decompose into what we call blockcodes, isomorphisms on their supports, that are irreducible. These decompositions give a concise description of the data that is then amenable, say, to efficient storage and statistical analyses (eg. [8]). General representations of small categories, even those of interest in data analysis [2], generally do not decompose into (irreducible) blockcodes. However, obstructions to decomposability into blockcodes are themselves informative invariants about the data. It is therefore useful to describe special properties of direct sums of blockcodes. One is the existence of metric structure of some sort.
Metric structures make it possible to split off sub-representations of ∇ when k = C. In the case where X is a group, metric structure on ∇ amounts to a lift to a category of inner product spaces and isometries. The existence of such a lift in this case is characterized by precompactness for the image of ∇ when regarded as a homomorphism to GL(n), because U (n) is the maximal compact subgroup unique up to conjugacy in GL(n). An immediate consequence is that ∇ decomposes into irreducible blockcodes when X is a finite group (Maschke's Theorem). In the general case, metric structure on ∇ amounts to a lift to a category of inner product spaces and partial isometries, isometries on orthogonal complements of kernels. Such a lift exists if X is a commutative, idempotent monoid [ Lemma 3.5]. Such a lift also exists if ∇ is a 1-dimensional persistence module. However, it is difficult to completely characterize the existence of such lifts (cf. [11].) Part of the problem is that there is no clear analogue of U (n): partial isometries do not generally compose to collectively form a single, concrete category (cf. [6]).
Whenever some collection of partial isometries does happen to form the morphisms of some category, the closure of that category under adjoints has a special dagger structure. An inverse category X is a category in which every morphism ζ admits a unique pseudoinverse ζ † in the sense that ζζ † ζ = ζ, ζ † ζζ † = ζ † [6]. One class of examples consists of groupoids, say of vector spaces and isomorphisms. Another class of examples consists of adjoint-closed categories of inner product spaces and partial isometries. For the special case k = C, representations of inverse categories interpolate between diagrams in the first and second classes [Proposition 3.9]. Representations of finite inverse categories whose endomorphisms are all idempotent decompose into blockcodes, as a straightforward consequence of a larger structure theorem for finite inverse categories [9,Theorem 4.1]. Conversely, direct sums of blockcodes factor through inverse categories [Proposition 3.13]. Mackey functors [5] can be characterized by their factorizability through certain inverse categories [9, §6.4]. Thus motivated, the goal is to characterize factorizability of representations through inverse categories.
The idea behind the result [Theorem 3.16] is that the salient structure of a representation ∇ is abstractly captured by a diagram F l ∇ [Definition 3.14] of posets, of subspaces generated by the operations of taking kernels, images, intersections, and inverse images in ∇. This diagram F l ∇ functions as generalized sort of flag, in a sense expounded elswhere [12] that a decomposition of ∇ into simpler representations can be constructed as some sort of associated graded of F l ∇ under a general position condition on F l ∇ and the presence of metric structure on ∇. The factorizability problem of this paper can be numerically characterized as follows. Let µ P denote the Möbius function P → Z of a finite poset P having all infima, recursively defined by µ P (min P ) = 1 and µ P (y) = − x<P y µ P (x) for all y = min P . (1) ∇ factors through an inverse category Representations of finite quivers without cycles that factor through inverses categories factor through finite inverse categories whose endomorphisms are all idempotent [Lemma 2.9]. A consequence is the following sufficient condition for representations of such finite quivers without cycles to decompose into blockcodes.
Corollary 3.17. The following are equivalent for a representation ∇ : X → Vec k of a free category X on a directed graph having no undirected cycles.
(1) ∇ factors through an inverse category (2) ∇ factors through a finite inverse category whose submonoids are all idempotent (3) ∇ is a direct sum of blockcodes (4) For each X-object o and b, c ∈ F l ∇ (o), a⊂b µ P (a)(dim a − dim(a ∩ c)) 0.
Organization. Some conventions are established in §1. for the domain and codomain, respectively, of a morphism ζ in a given category. A monoid will be regarded at once as a set equipped with an associative, unital multiplication as well as a small category with a unique object by identifying the former as the set of all (endo)morphisms of an associated category. An idempotent in a monoid M is a morphism ζ in M such that ζ 2 = ζ. A monoid is idempotent if all of its morphisms are idempotent in it. Let Cat denote the category of all small categories and functors between them.
1.1.2. Order-theoretic. Fix a poset P . Write P for the partial order associated to P ; write x < P y if x P y and x = p. A poset P will be identified with the small category whose arrowss x → y corresond to relations x P y. For a poset with a minimum, write min P for this (necessarily unique) minimum. Let µ P denote the Möbius function µ P : P → Z for a finite poset having all infima, recursively defined by µ P (y) = 1 if y = min P and − x<P y µ P (x) for y = min P .
1.1.3. Algebraic. Let k denote an arbitrary field. A ring will be taken to mean a commutative ring. Let Vec k denote the category of finite-dimensional vector spaces over a field k and linear maps between them. Write 0 for the trivial vector space, over a field understood from context. Write a b if a is a vector subspace of a vector space b and a < b if additionally a = b. Let C denote the complex field. Write im φ, ker φ for the image and kernel, respectively, of a linear map φ.

Inverse categories
Fix a category X . Straightforwardly extending terminology for matrices, define a pseudoinverse to a X -morphism α : x → y to be a X -morphism β : y → x such that βαβ = β and αβα = α. If β is pseudo-inverse to α in X , then α is pseudo-inverse to β in X and αβ, βα are idempotent endomorphisms in X . Functors preserve pseudo-inverses. A category is inverse if each of its morphisms admits a unique pseudo-inverse. In an inverse category, denote the unique pseudo-inverse of a morphism ζ by ζ † . Proof. Consider a collection {X i } i∈I of small inverse categories, indexed by a set I. Let i, j denote elements in I. Let X = i X i . For each j, let π j denote the projection morphism of the form X → X j .
The proof, almost word-for-word taken from a proof for the inverse monoid case [3,Theorem 7.4], is included for completeness.
All endomorphism monoids of inverse categories are inverse monoids. In an inverse monoid M , every idempotent is of the form xx † . Inverse monoids are exactly the monoids whose morphisms admit pseudo-inverses and whose idempotents commute [7, Theorem 5.1.1]. The following characterization of inverse categories straightforwardly generalizes this latter characterization of inverse monoids.
Lemma 2.4. The following are equivalent for a category X .
While not obvious from the definition or even the above characterization, images of inverse categories are inverse. The proof, almost word-for-word taken from a proof for the inverse monoid case [3, Theorem 7.6], is included for completeness.
Lemma 2.7. Consider an inverse category X . Each functor X → Y that is surjective on objects and morphisms has inverse codomain Y .
Each Y -morphism has a pseudo-inverse by F preserving pseudo-inverses and surjective.
, with the third and sixth equalities by There exists an equivalence between the category of small inverse categories and a category of certain double categories [4]. This paper just gives the horizontal groupoid part of this construction. Fix an inverse category X . Define a groupoid gpd X as follows: (1) the objects of gpd X are all idempotents in submonoids of X (2) gpd X (e 1 , e 2 ) is the set of all X -morphisms ζ for which ζ † ζ = e 1 and ζζ † = e 2 (3) composition in gpd X is defined by composition in X (4) the inverse of a gpd X -morphisms ζ is the pseudo Lemma 2.8. Fix an inverse category X . For each factorization γ = βα in X , A finite collection of morphisms in an inverse category need not generate a finite inverse subcategory. The following lemma gives a sufficient condition for when that happens. Lemma 2.9. Consider the following data.
(1) finite directed graph Q having no undirected cycles (2) inverse category Y (3) functor F : Q * → Y from the free category Q * on Q that is injective on objects Then F factors through a finite inverse category whose submonoids are all idempotent.
Proof. It suffices to take F to be faithful and surjective on objects without loss of generality [ Lemma 2.7]. Let X denote the minimal subcategory of Y containing the image of F and closed under taking pseudo-inverses. It suffices to show the following: The class of all X -morphisms is the union of images of finitely many finite groupoids For then X would be inverse and finite [Lemma 2.4]. Moreover, each connected subgroupoid of gpd X would be freely generated by a tree isomorphic to a subtree of the underlying graph of Q, so that [ζ] is an identity and hence ζ = ζζ † for each X -endomorphism ζ. (1). Let Q ζ be the directed subgraph of Q whose edges are e 1 , . . . , e 2n . There exist X - Thus [G−] uniquely extends to a functor [G] from the groupoid-completion of Q * ζ to gpd X , by universal properties of groupoid-completion. Then Thus (2) because the groupoid-completion of Q * ζ is finite by our assumption on Q.

Representations
Representations will mean diagrams in Vec k . Representations of posets P in the sense of this paper are more general than representations of posets studied elsewhere, which are often taken to mean diagrams P → Vec k sending each morphisms to an inclusion (eg. [15]). A direct sum of representations of the same category is an object-wise direct sum. A representation ∇ : X → Vec k of a small category X factors through a category Y if there exist dotted functors making the following diagram commute: We make one general observation about representations of pseudo-inverses. Proof. To prove im α = im αβ, note that the left side is contained in the right side by α = αβα and the right side is contained in the left side. The equality ker α = ker βα similarly follows. The other equalities follow by switching the roles of α, β, as α is a pseudoinverse to β.
We make one non-standard definition.
2. An (X-shaped) blockcode is a representation X → Vec k sending each X-morphism to a 0-map or an isomorphism.
The goal is to investigate and then characterize special properties of blockcodes and their direct sums.
3.1. Idempotent monoids. Representations of idempotent monoids send endomorphisms to projection operators. The following characterization for when representations of idempotent monoid factor through commutative, idempotent monoids resembles an existing characterization in the literature for when projections commute [13, (3.4)], but without any assumption about the existence of an inner product. Proof. Let α, β denote morphisms in M . Take ∇ to be an inclusion without loss of generality, so that M is a monoid of operators on a fixed vector space.
We then show that every representation of a commutative, idempotent monoid lifts to a category of inner product spaces and partial isometries. Proof. Take ∇ to be inclusion without loss of generality, so that M is a monoid of operators on a fixed vector space denoted by v.
Let α, β, γ denote M -morphisms. Further assume all operators of the form 1 v − γ are M -morphisms because otherwise we can replace M with the submonoid of Vec C generated by all operators of the form γ or 1 v − γ; such a monoid is commutative because it has mutually commuting generators: for all α, β; such a commutative monoid is idempotent because it has idempotent generators: γ 2 = γ by assumption and (1 v Let D be the poset of all decompositions of v into direct sums of images of M -morphisms ordered by refinement of decompositions. The poset D is non-empty because it contains the minimum decomposition v = im 1 v . Every chain in D is finite by v finite-dimensional. Thus D has a maximal such decomposition of the form v = ⊕ φ∈I im φ. Equip v with a Hermitian inner product so that (im α) ⊥ (im β) for distinct α, β ∈ I. For each M -morphism ζ, maximality implies the two decompositions of v are the same up to reordering of the summands so that im ζ ⊥ im (1 v − ζ) = ker ζ and hence ζ is unitary.  (1) For all P -objects b, c, a P b µ P (a)(dim a − dim(a ∩ c)) 0.
(2) There exists a representation Π : Σ P → Vec k such that im Π = ∇, where Σ P is the commutative, idempotent monoid whose morphisms are the objects of P and whose multiplication is defined by binary infima.
Proof. Take ∇ to be inclusion without loss of generality. Let a, b, c denote P -objects. Let  (2) =⇒ (1): Conversely, suppose (2). The smallest poset P + containing P as a sub-poset and all finite sums of P -objects is also finitely complete. And Π extends to a representation Π + of Σ P + by recursively defining Π + (d + e) = Π + (d) + Π + (e) − Π + (d ∩ e) and noting that linear combinations of commuting operators commute. For all P + -objects d, e, and hence for all b, c, let d = a<b a and note and hence (1). Lemma 3.7. For morphisms α, β in an inverse subcategory of Vec k with cod α = cod β, Thus the left side is contained in the right side.
Thus the right side is contained in the left side.
Every adjoint-closed category of inner product spaces and partial isometries is inverse. However, not every complex representation of a small category that factors through an inverse category lifts to a category of inner product spaces and partial isometries. Then ∇ factors through a groupoid and hence an inverse category, but does not lift to a category of inner product spaces and partial isometries.
The following proposition shows the next best thing: that every complex representation of a small inverse category lifts to a category of inner product spaces and partial isometries up to isomorphism in the following sense. Fix a Hermitian vector space c with Hermitian inner product q. For each vector subspace b c, b ⊥q will denote the orthgonal complement of b in c with respect to q. A q-unitary projection is a projection φ : c → c with ker φ ⊥ im φ with respect to q; q-unitary projections on c are exactly the idempotent partial isometries on c. Proposition 3.9. Consider an inverse category X and functor There exists a choice of Hermitian inner product q(o) on ∇(o) for each X-object o such that for each X-morphism ζ : x → y, ∇(ζζ † ) is q(x)-unitary projection onto (ker ∇(ζ)) ⊥ q(x) and ∇(ζ † ζ) is q(y)-unitary projection onto im ∇(ζ).
Proof. Take ∇ to be inclusion without loss of generality [Lemma 2.7].
Consider an X-object v. Let Λ v denote the submonoid of the inverse endomorphism monoid of all linear operators on v consisting of the projections. Then Λ v is a commutative, idempotent monoid because it is an idempotent inverse monoid [Lemma 2.4]. Hence there exists an inner product q(v) on v such that every linear operator on v of the form ψ † ψ is a q(v)-unitary projection [Lemma 3.5].
Every faithful representation of an inverse monoid as partial isometries extends to a faithful representation of an inverse monoid as partial isometries whose unitary projections form Boolean lattices [1, Theorem 2.5]. The following lemma is an analogue, where inverse monoids are generalized to inverse categories and no metric structure is assumed.
Lemma 3.10. Consider an inverse category X that is a subcategory Let Y be the minimal subcategory of Vec k containing X and, for each X-objects V , all idempotent k-linear combinations of idempotent operators on V in X. Then Y is inverse.
Proof. Fix an X-object v. Let Λ v denote the set of all idempotent k-linear combinations of projection operators on an X-object v. The elements in Λ v commute because idempotents in Let ζ denote an X-morphism.
Fix finite inverse category X and ring R. There exists an R-algebra isomorphism from the associated category R-algebra R[X] to the groupoid R-algebra R[gpd X ], sending each X-morphism ζ to an R-linear sum of gpd X -morphisms of the form [ζπ] with π an idempotent endomorphism [9,Theorem 4.1]. Specialize now to the case where each submonoid of X is idempotent. For each X-endomorphism ζ, ζ = ζ † = ζζ † = ζ † ζ by uniqueness of pseudo-inverses and hence [ζ] is an identity. Thus the aforementioned isomorphism (2) sends each X-morphism ζ ∈ X(x, y) to an R-linear sum of identities or an R-linear sum of isomorphisms whose preimages under (2) are isomorphisms between distinct objects. We further specialize to the case R = k to conclude the following observation.
Proposition 3.11. Consider the following data.
(1) finite inverse category X whose submonoids are all idempotent (2) representation ∇ : X → Vec k Then ∇ is a direct sum of blockcodes.

3.4.
Categories. This section investigates the property of factorizability of a general representation through an inverse category. This kind of factorizability is stable under direct sums.
Lemma 3.12. Consider a sequence of representations ∇ 1 , ∇ 2 , . . . , ∇ n : X → Vec k that each factor through (possibly different) inverse categories. Then i ∇ i factors through an inverse category.
Proof. Suppose for each i, Let ∇ ′ be the representation Y → Vec k naturally sending an object (y 1 , y 2 ., . . . , y n ) to i ∇ ′ i (y i ).
This kind of factorizability generalizes direct sums of blockcodes. Consider an X-morphism ψ. Either ψ is a 0-map or an isomorphism. In the former case, take ψ † to be the 0-map cod(ψ) → dom(ψ). In the latter case, take ψ † = ψ −1 .
Let Y be the category generated by all maps of the form ψ and ψ † for ψ an X-morphism. Every Y -morphism is then either a 0-map or a composite of isomorphisms in Y whose inverses are in Y . In either case, each Y -morphism admits a pseudo-inverse in Y . Moreover, the idempotent endomorphisms in Y are 0-maps and hence commute. Thus Y is inverse [Lemma 2.4].
The salient structure needed to determine factorizability of a representation through an inverse category is the data of all associated kernels, images, and intersections thereof in a diagram. Concretely, F l ∇ can be iteratively constructed from ∇ by starting with the minimal function from the objects of X to the objects of Cat satisfying (1) and iteratively adding objects to make (2) and (3) hold. For certain representations ∇ of inverse categories, F l ∇ is just the data of all possible images of maps in the diagram ∇.
Lemma 3.15. Consider an inverse category X that is a subcategory X ⊂ Vec k such that all k-linear combinations of projections operators in X on a fixed X-object that are themselves projections are in X. The underlying set of F l X֒→Vec k (v) consists of all images of all X-morphisms having codomain v.
Proof. Let a, b denote X-objects and ζ denote an X-morphism. Let . It therefore suffices to show F satisfies (1)-(2) of Definition 3.14, and in particular also defines a functor X → Cat. The result then follows from the initality of F l X֒→Vec k .
Fix an X-object v. Let M v denote the set of all idempotent k-linear combinations of projections of the form π c for c ∈ F l ∇ (v). The operators in M v commute because klinear combinations of commuting operators commute. The operators in M v are closed under composition [ Lemma 3.3]. Hence M v can be regarded henceforth as a commutative, idempotent monoid. Let Y denote the class of all linear maps ζ between X-objects with ker ζ the kernel of an operator π ′ ∈ M dom ψ and im ζ the image of an operator π ′′ ∈ M cod ψ satisfying ζ = π ′′ ζπ ′ .
A partial isometry is a linear map between inner product spaces whose restriction to the orthogonal complement of the kernel is an isometry. (1) ∇ factors through an inverse category (2) ∇ factors through a finite inverse category whose submonoids are all idempotent (3) ∇ is a direct sum of blockcodes (4) For each X-object o and b, c ∈ F l ∇ (o), a⊂b µ P (a)(dim a − dim(a ∩ c)) 0. Assume (2). Then there exists a finite inverse category Y and functors F : X → Y and ∇ ′ : Y → Vec k such that ∇ = ∇ ′ F . In that case ∇ ′ is a direct sum, and hence objectwise product, of finitely many blockcodes [Proposition 3.11]. Pullbacks along F of finite object-wise products are finite object-wise products, direct sums. Hence (3). z →(z,0) z →(0,z) The Hasse diagram for F l ∇ (C 2 ) is depicted on the right. Then µ F l∇(C 2 ) (C 2 ) = 1 µ F l∇(C 2 ) (∆ C ) = µ F l∇(C 2 ) (C × 0) = µ F l∇(C 2 ) (0 × C) = −1 µ F l∇(C 2 ) (0) = 1 Therefore since 1 × 2 − 1 × 1 − 1 × 1 − 1 × 1 + 1 × 0 = −1 < 0, ∇ does not factor through an inverse category, and in particular there exist no choices of inner products on the vector spaces making ∇ a diagram of inner product spaces and partial isometries much less a decomposition of ∇ into a direct sum of blockcodes.
Example 3.19. Consider the following faithful diagram ∇ on the left: The Hasse diagram for F l ∇ (C 2 ) is depicted on the right. Then Then 1 × 2 − 1 × 1 − 1 × 1 + 1 × 0 = 0 0. The other requisite sums in the factorizability criterion in Theorem 3.16 are trivially seen to be non-negative. Thus ∇ does factor through an inverse category. In fact, this inverse category can be realized as a category of partial isometries, since the above endomorphism is a partial isometry when C 2 is equipped with its standard Hermitian product. However, ∇ is indecomposable and does not decompose into a direct sum of blockcodes.