\section{Background} The starting point for the development of algebraic invariants in topological data analysis is the classification of finite persistence modules over a field $k$: that any such module decomposes into a direct sum of indecomposable interval modules; moreover, the decomposition is unique up to reordering. The barcodes associated to the original module correspond to these interval submodules, which are indexed by the set of connected subgraphs of the finite directed graph associated to the finite, totally ordered indexing set of the module. Modules that decompose in such a fashion are conventionally referred to as {\it tame}.
\vskip.2in
A central problem in the subject has been to determine what, if anything, holds true for more complex types of poset modules (ps-modules) - those indexed on finite partially ordered sets; most prominent among these being $n$-dimensional persistence modules \cite{cs, cz}. Gabriel's theorem \cite{pg, gr} implies that the only types for which the module is {\it always} tame are those whose underlying graph corresponds to a simply laced Dynkin diagram of type $A_n$, $D_n, n\ge 4$ or one of the exceptional graphs $E_6, E_7$ or $E_8$; a result indicating there is no simple way to generalize the 1-dimensional case.
\vskip.2in

However it is natural to ask whether the existence of some (naturally occuring) additional structure for such modules might lead to an appropriate generalization that is nevertheless consistent with Gabriel's theorem. This turns out to be the case. Before stating our main results, we will need to briefly discuss the framework in which we will be working. We consider finite ps-modules (referred to as $\cal C$-modules in this paper) equipped with i) no additional structure, ii)  a {\it weak inner product} ($\cal WIPC$-module) , iii) an {\it inner product} ($\cal IPC$-module). The ``structure theorem" - in reality a sequence of theorems and lemmas - is based on the fundamental notion of  a {\it multi-flag} of a vector space $V$, referring to a collection of subspaces of $V$ closed under intersections, and the equally important notion of {\it general position} for such an array. Using terminology made precise below, our results may be summarized as follows:
\begin{itemize}
\item Any $\cal C$-module admits a (non-unique) weak inner product structure (can be realized as a $\cal WIPC$-module). However, the obstruction to further refining this to an $\cal IPC$-structure is in general non-trivial, and we give an explicit example of a $\cal C$-module which cannot admit an inner product structure.
\item Associated to any finite $\cal WIPC$-module $M$ is a functor ${\cal F}:{\cal C}\to (multi\mhyphen flags/k)$ which associates to each $x\in obj({\cal C})$ a multi-flag ${\cal F}(M)(x)$ of the vector space $M(x)$, referred to as the {\it local structure} of $M$ at $x$.
\item This local strucure is naturally the direct limit of a directed system of recursively defined multi-flags $\{{\cal F}_n(M), \iota_n\}$, and is called {\it stable} when this directed system stabilizes at a finite stage.
\item In the case $M$ is an $\cal IPC$-module with stable local structure
\begin{itemize}
\item it determines a {\it tame covering} of $M$ - a surjection of $\cal C$-modules $p_M:T(M)\surj M$ with $T(M)$ weakly tame, and with $p_M$ inducing an isomorphism of associated graded local structures. The projection $p_M$ is an isomorphism iff $M$ itself is weakly tame, which happens exactly when the multi-flag ${\cal F}(M)(x)$ is in general position for each object $x$. In this way $T(M)$ is the closest weakly tame approximation to $M$.
\item If, in addition, the category $\cal C$ is {\it holonomy free} (h-free), then each block of $T(M)$ may be non-canonically written as a finite direct sum of GBCs (generalized bar codes); in this case $T(M)$ is tame and $M$ is tame iff it is weakly tame.
\end{itemize}
\item In the case $M$ is equipped only with a $\cal WIPC$-structure, the tame cover may not exist, but one can still define the {\it generalized bar code vector} of $M$ which, in the case $M$ is an $\cal IPC$-module, measures the dimensions of the blocks of $M$. This vector does not depend on the choice of $\cal WIPC$-structure, and therefore is defined for all $\cal C$-modules $M$ with stable local structure.
\item All finite $n$-dimensional zig-zag modules have strongly stable local structure for all $n\ge 1$ (this includes all finite $n$-dimensional persistence modules, and strongly stable implies stable).
\item All finite $n$-dimensional persistence modules, in addition, admit a (non-unique) inner product structure.
\end{itemize}
A distinct advantage to the above approach is that the decomposition into blocks, although dependent on the choice of inner product, is {\it basis-free}; moreover the local structure is derived solely from the underlying structure of $M$ via the iterated computation of successively refined functors ${\cal F}_n(M)$ determined by images, kernels and intersections. For modules with stable local structure, the total dimension of the kernel of $p_M$ - referred to as the {\it excess} of $M$ - is an isomorphism invariant that provides a complete numerical obstruction to an $\cal IPC$-module $M$ being weakly tame. Moreover, the block diagram of $M$, codified by its tame cover $T(M)$, always exists for $\cal IPC$-modules with stable local structure, even when $M$ itself is not weakly tame. It would seem that the computation of the local structure of $M$ in this case should be amenable to algorithmic implementation. And although there are obstructions (such as holonomy) to stability for $\cal WIPC$-modules indexed on arbitrary finite ps-categories, these obstructions vanish for finite zig-zag modules in all dimensions (as indicated by the last bullet point). Additionally, although arbitrary $\cal C$-modules may not admit an inner product, all finite $n$-dimensional persistence modules do (for all dimensions $n\ge 1$), which is our main case of interest.
\vskip.2in

A brief organizational description: in section 2 we make precise the notion of multi-flags, general position, and the local structure of a $\cal WIPC$-module. The {\it excess} of the local structure - a whole number which measures the failure of general position - is defined. In section 3 we show that when $M$ is an $\cal IPC$-module, the associated graded local structure ${\cal F}(M)_*$ defines the blocks of $M$, which in turn can be used to create the tame cover via direct sum. Moreover, this tame cover is isomorphic to $M$ iff the excess is zero. We define the holonomy of the indexing category; for holonomy-free (h-free) categories, we show that this block sum may be further decomposed into a direct sum of generalized bar codes, yielding the desired generalization of the classical case mentioned above. As an illustration of the efficacy of this approach, we use it at the conclusion of section 3.2 to give a 2-sentence proof of the structure theorem for finite 1-dimensional persistence modules. In section 3.3 we show that the dimension vector associated to the tame cover can still be defined in the absence of an inner product structure, yielding an isomorphism invariant for arbitrary $\cal C$ modules. Section 3.4 investigates the obstruction to equipping a $\cal C$-module with an inner product, the main results being that i) it is in general non-trivial, and ii) the obstruction vanishes for all finite $n$-dimensional persistence modules. In section 3.5 we consider the related obstruction to being h-free; using the introduced notion of an elementary homotopy we show all finite $n$-dimensional persistence modules are strongly h-free (implying h-free). We also show how the existence of holonomy can prevent stability of the local structure. Finally section 3.6 considers the stability question; although (from the previous section) the local structure can fail to be stable in general, it is always so for i) finite $n$-dimensional zig-zag modules (which includes persistence modules as a special case) over an arbitrary field, and ii) any $\cal C$-module over a finite field.
\vskip.2in

In section 4 we introduce the notion of geometrically based $\cal C$-modules; those which arise via application of homology to a $\cal C$-diagram of simplicial sets or complexes with finite skeleta. We show that the example of section 3.4 can be geometrically realized, implying that geometrically based $\cal C$-modules need not admit an inner product. However, by a cofibrant replacement argument we show that any geometrically based $\cal C$-module admits a presentation by $\cal IPC$-modules, a result which is presently unknown for general $\cal C$-modules.
\vskip.2in

I would like to thank Dan Burghelea and Fedor Manin for their helpful comments on earlier drafts of this work, and Bill Dwyer for his contribution to the proof of the cofibrancy replacement result presented in section 4.1.
\vskip.5in

\section{$\cal C$-modules}

\subsection{Preliminaries} Throughout we work over a fixed field $k$. Let $(vect/k)$ denote the category of finite dimensional vector spaces over $k$, and linear homomorphisms between such. Given a category $\cal C$, a {\it $\cal C$-module over $k$} is a covariant functor $M:{\cal C}\to (vect/k)$. The category $({\cal C}\mhyphen mod)$ of $\cal C$-modules then has these functors as objects, with morphisms represented in the obvious way by natural transformations.  All functorial constructions on vector spaces extend to the objects of $({\cal C}\mhyphen mod)$ by objectwise application. In particular, one has the appropriate notions of
\begin{itemize}
\item monomorphisms, epimorphisms, short and long-exact sequences;
\item kernel and cokernel;
\item direct sums, Hom-spaces, tensor products;
\item linear combinations of morphisms.
\end{itemize}

With these constructs $({\cal C}\mhyphen mod)$ is an abelian category, without restriction on $\cal C$. By a {\it ps-category} we will mean the categorical representation of a poset $(S,\le)$, where the objects identify with the elements of $S$, while $Hom(x,y)$ contains a unique morphism iff $x\le y$ in $S$. A ps-category is {\it finite} iff it has a finite set of objects, and is {\it connected} if its nerve $N({\cal C})$ is connected. A ps-module is then a functor $F:{\cal C}\to (vect/k)$ from a ps-category $\cal C$ to $(vect/k)$. A morphism $\phi_{xy}:x\to y$ in $\cal C$ is {\it atomic} if it does not admit a non-trivial factorization (in terms of the partial ordering, this is equivalent to saying that if $x\le z\le y$ then either $z=x$ or $z=y$). Any morphism in $\cal C$ can be expressed (non-uniquely) as a composition of atomic morphisms. The {\it minimal graph} of $\cal C$ is then defined as the (oriented) subgraph of the 1-skeleton of $N({\cal C})$ with the same vertices, but whose edges are represented by atomic morphisms (not compositions of such). The minimal graph of $\cal C$ is denoted by $\Gamma({\cal C})$ and will be referred to simply as the graph of $\cal C$. We observe that $\cal C$ is connected iff $\Gamma({\cal C})$ is a connected.
\vskip.2in

In all that follows we will assume $\cal C$ to be a {\it connected, finite ps-category}, so that all $\cal C$-modules are finite ps-modules. If $M$ is a $\cal C$-module and $\phi_{xy}\in Hom_{\cal C}(x,y)$, we will usually denote the linear map $M(\phi_{xy}): M(x)\to M(y)$ simply as $\phi_{xy}$ unless more precise notation is needed. A very special type of ps-category occurs when the partial ordering on the finite set is a total ordering. In this case the resulting categorical representation $\cal C$ is isomorphic to $\underline{n}$, which denotes the category corresponding to $\{1 < 2 < 3\dots < n\}$. A finite persistence module is, by definition, an $\underline{n}$-module for some natural number $n$. So the $\cal C$-modules we consider in this paper occur as natural generalizations of  finite persistence modules.
\vskip.3in

\subsection{Inner product structures} It will be useful to consider two refinements of the category $(vect/k)$.
\begin{itemize}
\item $(WIP/k)$, the category whose objects are inner product (IP)-spaces $V = (V,<\ ,\ >_V)$ and whose morphisms are linear transformations (no compatibility required with respect to the inner product structures on the domain and range);
\item $(IP/k)$, the wide subcategory of $(WIP/k)$ whose morphisms $L:(V,<\ ,\ >_V)\to (W,<\ ,\ >_W)$ satisfy the property that $\wt{L}: ker(L)^\perp\to W$ is an isometric embedding, where $ker(L)^\perp\subset V$ denotes the orthogonal complement of $ker(L)\subset V$ in $V$ with respect to the inner product $<\ ,\ >_V$, and $\wt{L}$ is the restriction of $L$ to $ker(L)^\perp$.
\end{itemize}

There are obvious transformations
\[
(IP/k)\xrightarrow{\iota_{ip}} (WIP/k)\xrightarrow{p_{wip}} (vect/k)
\]
where the first map is the inclusion which is the identity on objects, while the second map forgets the inner product on objects and is the identity on transformations between two fixed objects.
\vskip.2in

Given a $\cal C$-module $M:{\cal C}\to (vect/k)$ a {\it weak inner product} on $M$ is a factorization
\[
M: {\cal C}\to (WIP/k)\xrightarrow{p_{wip}} (vect/k)
\]
while an {\it inner product} on $M$ is a further factorization through $(IP/k)$:
\[
M: {\cal C}\to (IP/k)\xrightarrow{\iota_{ip}}(WIP/k)\xrightarrow{p_{wip}} (vect/k)
\]
A $\cal WIPC$-module will refer to a $\cal C$-module $M$ equipped with a weak inner product, while an $\cal IPC$-module is a $\cal C$-module that is equipped with an actual inner product, in the above sense. As any vector space admits a (non-unique) inner product, we see that

\begin{proposition} Any $\cal C$-module $M$ admits a non-canonical representation as a $\cal WIPC$-module.
\end{proposition}

The question as to whether a $\cal C$-module $M$ can be represented as an $\cal IPC$-module, however, is much more delicate, and discussed in some detail below.
\vskip.2in

Given a $\cal C$-module $M$ and a morphism $\phi_{xy}\in Hom_{\cal C}(x,y)$, we set $KM_{xy} := \ker(\phi_{xy} : M(x)\to M(y)).$ We note that a $\cal C$-module $M$ is an $\cal IPC$-module, iff
\begin{itemize}
\item for all $x\in obj({\cal C})$, $M(x)$ comes equipped with an inner product $< , >_x$;
\item for all $\phi_{xy}\in Hom_{\cal C}(x,y)$, the map $\wt{\phi}_{xy} : KM_{xy}^\perp\to M(y)$ is an isometry, where $\wt{\phi}_{xy}$ denotes the restriction of $\phi_{xy}$ to $KM_{xy}^\perp = $ the orthogonal complement of $KM_{xy}\subset M(x)$ with respect to the inner product $< , >_x$. In other words,
\[
<\phi({\bf v}), \phi({\bf w})>_y = <{\bf v}, {\bf w}>_x,\qquad \forall\, {\bf v}, {\bf w}\in KM_{xy}^\perp
\]
\end{itemize}

\begin{definition} Let $V = (V, < , >)$ be an inner product (IP) space. If $W_1\subseteq W_2\subset V$, we write $(W_1\subset W_2)^\perp$ for the relative orthogonal complement of $W_1$ viewed as a subspace of $W_2$ equipped with the induced inner product, so that $W_2\cong W_1\oplus (W_1\subset W_2)^\perp$.
\end{definition}
Note that $(W_1\subset W_2)^\perp = W_1^\perp\cap W_2$ when $W_1\subseteq W_2$ and $W_2$ is equipped with the induced inner product.
\vskip.3in

\subsection{Multi-flags and general position} Recall that a {\it flag} in a vector space $V$ consists of a finite sequence of proper inclusions beginning at $\{0\}$ and ending at $V$:
\[
\underline{W} := \{W_i\}_{0\le i\le n} = \left\{\{0\} = W_0\subset W_1\subset W_2\subset\dots\subset W_m = V\right\}
\]
If $\underline{m}$ denotes the totally ordered set $0 < 1 < 2 <\dots < m$ viewed as a category, $Sub(V)$ the category of subspaces of $V$ and inclusions of such, with $PSub(V)\subset Sub(V)$ the wide subcategory whose morphisms are proper inclusions, then there is an evident bijection
\[
\{\text{flags in } V\}\Leftrightarrow \underset{m\ge 1}{\coprod} Funct(\underline{m}, PSub(V))
\]

We will wish to relax this structure in two different ways. First, one may consider a sequence as above where not all of the inclusions are proper; we will refer to such an object as a {\it semi-flag}. Thus a semi-flag is represented by (and corresponds to) a functor $F:\underline{m}\to Sub(V)$ for some $m$. More generally, we define a {\it multi-flag} in $V$ to be a collection ${\cal F} = \{W_\alpha\subset V\}$ of subspaces of $V$ containing $\{0\}, V$, partially ordered by inclusion, and closed under intersection. It need not be finite.
\vskip.2in

Assume now that $V$ is equipped with an inner product. Given an element $W\subseteq V$ of a multi-flag $\cal F$ associated to $V$, let $S(W) := \{U\in {\cal F}\ |\ U\subsetneq W\}$ be the elements of $\cal F$ that are proper subsets of $W$, and set
\begin{equation}\label{eqn:one}
W_{\cal F} := \left(\left(\displaystyle\sum_{U\in S(W)} U\right) \subset W\right)^\perp
\end{equation}

\begin{definition}\label{def:genpos} For an IP-space $V$ and multi-flag $\cal F$ in $V$, the associated graded of $\cal F$ is the set of subspaces ${\cal F}_* := \{W_{\cal F}\ |\ W\in{\cal F}\}$. We say that $\cal F$ is in \underbar{general position} iff  $V$ can be written as a direct sum of the elements of ${\cal F}_*$: $V\cong \displaystyle\bigoplus_{W\in{\cal F}} W_{\cal F}$.
\end{definition}

Note that, as $V\in{\cal F}$, it will always be the case that $V$ can be expressed as a sum of the subspaces in ${\cal F}_*$. The issue is whether that sum is a direct sum, and whether that happens is completely determined by the sum of the dimensions.

\begin{proposition} For any multi-flag $\cal F$ of an IP-space $V$, $\displaystyle\sum_{W\in{\cal F}} dim(W_{\cal F}) \ge dim(V)$. Moreover the two are equal iff $\cal F$ is in general position.
\end{proposition}

\begin{proof} The first claim follows from the fact that $\displaystyle\sum_{W\in{\cal F}} W = V$. Hence the sum of the dimensions on the left must be at least $dim(V)$, and equals $dim(V)$ precisely when the sum is a direct sum.
\end{proof}

\begin{definition} The excess of a multi-flag $\cal F$ of an IP-space $V$ is $e({\cal F}) := \left[\displaystyle\sum_{W\in{\cal F}} dim(W_{\cal F})\right] - dim(V)$.
\end{definition}

\begin{corollary} For any multi-flag $\cal F$, $e({\cal F})\ge 0$ and $e({\cal F}) = 0$ iff $\cal F$ is in general position.
\end{corollary}

Any semi-flag $\cal F$ of $V$ is in general position; this is a direct consequence of the total ordering. Also the multi-flag $\cal G$ formed by a pair of subspaces $W_1, W_2\subset V$ and their common intersection (together with $\{0\}$ and $V$) is always in general position. More generally, we have

\begin{lemma}\label{lemma:2} If ${\cal G}_i$, $i = 1,2$ are two semi-flags in the inner product space $V$ and $\cal F$ is the smallest multi-flag containing ${\cal G}_1$ and ${\cal G}_2$ (in other words, it is the multi-flag generated by these two semi-flags), then $\cal F$ is in general position.
\end{lemma}
\vskip.1in
 Let ${\cal G}_i = \{W_{i,j}\}_{0\le j\le m_i}, i = 1,2$. Set $W^{j,k} := W_{1,j}\cap W_{2,k}$. Note that for each $i$, $\{W^{i,k}\}_{0\le k\le m_2}$ is a semi-flag in $W_{1,i}$, with the inclusion maps $W_{1,i}\hookrightarrow W_{1,i+1}$ inducing an inclusion of semi-flags $\{W^{i,k}\}_{0\le k\le m_2}\hookrightarrow \{W^{i+1,k}\}_{0\le k\le m_2}$. By induction on length in the first coordinate we may assume that the multi-flag of $W := W_{1,m_1-1}$ generated by $\wt{\cal G}_1 := \{W_{1,j}\}_{0\le j\le m_1-1}$ and $\wt{\cal G}_2 := \{W\cap W_{2,k}\}_{0\le k\le m_2}$ are in general position. To extend general position to the multi-flag on all of $V$, the induction step allows reduction to considering the case where the first semi-flag has only one middle term:

\begin{claim} Given $W\subseteq V$, viewed as a semi-flag ${\cal G}'$ of $V$ of length 3, and the semi-flag ${\cal G}_2 = \{W_{2,j}\}_{0\le j\le m_2}$ as above, the multi-flag of $V$ generated by ${\cal G}'$ and ${\cal G}_2$ is in general position.
\end{claim}
\begin{proof} The multi-flag $\cal F$ in question is constructed by intersecting $W$ with the elements of ${\cal G}_2$,  producing the semi-flag ${\cal G}_2^W := W\cap {\cal G}_2 = \{W\cap W_{2,j}\}_{0\le j\le m_2}$ of $W$, which in turn includes into the semi-flag ${\cal G}_2$ of $V$. Constructed this way the direct-sum splittings of $W$ induced by the semi-flag $W\cap {\cal G}_2$ and of $V$ induced by the semi-flag ${\cal G}_2$ are compatible, in that if we write $W_{2,j}$ as $(W\cap W_{2,j})\oplus (W\cap W_{2,j}\subset W_{2,j})^\perp$ for each $j$, then the orthogonal complement of $W_{2,k}$ in $W_{2,k+1}$ is given as the direct sum of the orthogonal complement of $(W\cap W_{2,k})$ in $(W\cap W_{2,k+1})$ and the orthogonal complement of $(W\cap W_{2,k}\subset W_{2,k})^\perp$ in $(W\cap W_{2,k+1}\subset W_{2,k+1})^\perp$, which yields a direct-sum decomposition of $V$ in terms of the associated grade terms of $\cal F$, completing the proof both of the claim and of the lemma.
\end{proof}

On the other hand, one can construct simple examples of multi-flags which are not - in fact cannot be - in general position, as the following illustrates.

\begin{example} Let $\mathbb R\cong W_i\subset\mathbb R^2$ be three 1-dimensional subspaces of $\mathbb R^2$ intersecting in the origin, and the $\cal F$ be the multi-flag generated by this data. Then $\cal F$ is not in general position.
\end{example}
\vskip.2in
Given an arbitrary collection of subspaces $T = \{W_\alpha\}$ of an IP-space $V$, the multi-flag generated by $T$ is the smallest multi-flag containing each element of $T$. It can be constructed as the closure of $T$ under the operations i) inclusion of $\{0\}, V$ and ii) taking finite intersections.
\vskip.2in

[Note: Example 1 also illustrates the important distinction between a configuration of subspaces being of {\it finite type} (having finitely many isomorphism classes of configurations), and the stronger property of {\it tameness} (the multi-flag generated by the subspaces is in general position).]
\vskip.2in
A multi-flag $\cal F$ of $V$ is a poset in a natural way; if $V_1,V_2\in {\cal F}$, then $V_1\le V_2$  as elements in $\cal F$ iff $V_1\subseteq V_2$ as subspaces of $V$.  If $\cal F$ is a multi-flag of $V$, $\cal G$ a multi-flag of $W$, a {\it morphism} of multi-flags $(L,f):{\cal F}\to {\cal G}$ consists of
\begin{itemize}
\item a linear map from $L:V\to W$ and
\item a map of posets $f:{\cal F}\to {\cal G}$ such that
\item for each $U\in {\cal F}$, $L(U)\subseteq f(U)$.
\end{itemize}
Then $\{multi\mhyphen flags\}$ will denote the category of multi-flags and morpisms of such.
 \vskip.2in
If $L:V\to W$ is a linear map of vector spaces and $\cal F$ is a multi-flag of $V$, the multi-flag generated by $\{L(U)\ |\ U\in {\cal F}\}\cup \{W\}$ is a multi-flag of $W$ which we denote by $L({\cal F})$ (or $\cal F$ pushed forward by $L$). In the other direction, if $\cal G$ is a multi-flag of $W$, we write $L^{-1}[{\cal G}]$ for the multi-flag $\{L^{-1}[U]\ |\ U\in {\cal G}\}\cup \{\{0\}\}$ of $V$ (i.e., $\cal G$ pulled back by $L$; as intersections are preserved under taking inverse images, this will be a multi-flag once we include - if needed - $\{0\}$). Obviously $L$ defines morphisms of multi-flags ${\cal F}\xrightarrow{(L,\iota)} L({\cal F})$, $L^{-1}[{\cal G}]\xrightarrow{(L,\iota')} {\cal G}$.
\vskip.3in

\subsection{The local structure of $\cal C$-modules}
Assume first that $M$ is an $\cal WIPC$-module. A {\it multi-flag of $M$} or {\it $M$-multi-flag} is a functor $F:{\cal C}\to \{multi\mhyphen flags\}$ which assigns
\begin{itemize}
\item to each $x\in obj({\cal C})$ a multi-flag $F(x)$ of $M(x)$;
\item to each $\phi_{xy}:M(x)\to M(y)$ a morphism of multi-flags $F(x)\to F(y)$
\end{itemize}
To any $\cal WIPC$-module $M$ we may associate the multi-flag $F_0$ which assigns to each $x\in obj({\cal C})$ the multi-flag $\{\{0\}, M(x)\}$ of $M(x)$. This is referred to as the {\it trivial} multi-flag of $M$.
\vskip.2in

A $\cal WIPC$-module $M$ determines a multi-flag on $M$. Precisely, the {\it local structure} ${\cal F}(M)$ of $M$ is defined recursively at each $x\in obj({\cal C})$ as follows: let $S_1(x)$ denote the set of morphisms of $\cal C$ originating at $x$, and $S_2(x)$ the set of morphisms terminating at $x$, $x\in obj({\cal C})$ (note that both sets contain $Id_x:x\to x$). Then
\vskip.05in
\begin{enumerate}
\item[\underbar{LS1}] ${\cal F}_0(M)(x) =$ the multi-flag of $M(x)$ generated by
\[
\{\ker(\phi_{xy}:M(x)\to M(y))\}_{\phi_{xy}\in S_1(x)}\cup \{im(\phi_{zx} : M(z)\to M(x)\}_{\phi_{zx}\in S_2(x)};
\]
\item[\underbar{LS2}]  For $n\ge 0$, ${\cal F}_{n+1}(M)(x) =$ the multi-flag of $M(x)$ generated by
\begin{itemize}
\item[{LS2.1}] $\phi_{xy}^{-1}[W]\subset M(x)$, where $W\in{\cal F}_n(M)(y)$ and $\phi_{xy}\in S_1(x)$;
\item [{LS2.2}] $\phi_{zx}[W]\subset M(x)$, where $W\in{\cal F}_n(M)(z)$ and $\phi_{zx}\in S_2(x)$;
\end{itemize}
\item [\underbar{LS3}]${\cal F}(M)(x) = \varinjlim {\cal F}_n(M)(x)$.
\end{enumerate}

More generally, starting with a multi-flag $F$ on $M$, the local structure of $M$ relative to $F$ is arrived at in exactly the same fashion, but starting in LS1 with the multi-flag generated (at each object $x$) by ${\cal F}_0(M)(x)$ and $F(x)$. The resulting direct limit is denoted ${\cal F}^F(M)$. Thus the local structure of $M$ (without superscript) is the local structure of $M$ relative to the trivial multi-flag on $M$. In almost all cases we will only be concerned with the local structure relative to the trivial multi-flag on $M$.

\begin{proposition}\label{prop:invimage} For all $k\ge 1$, $W\in {\cal F}_k(M)(x)$, and $\phi_{zx}:M(z)\to M(x)$, there is a unique maximal element of $W'\in {\cal F}_{k+1}(M)(z)$ with $\phi_{zx}(W') = W$.
\end{proposition}

\begin{proof} This is an immediate consequence of property (LS2.1).
\end{proof}

\begin{definition} The local structure of a $\cal WIPC$-module $M$ is the functor ${\cal F}(M)$, which associates to each vertex $x\in obj({\cal C})$ the multi-flag ${\cal F}(M)(x)$.
\end{definition}

A key question arises as to whether the direct limit used in defining ${\cal F}(M)(x)$ stablizes at a finite stage. For infinite fields $k$ it turns out that this property is related the existence of {\it holonomy}, as we will see below. For now, we include it as a definition.

\begin{definition} The local structure on $M$ is \underbar{locally stable} at $x\in obj({\cal C})$ iff there exists $N = N_x$ such that ${\cal F}_n(M)(x)\inj {\cal F}_{n+1}(M)(x)$ is the identity map whenever $n\ge N$. It is \underbar{stable} if it is locally stable at each object. It is \underbar{strongly stable} if for all \underbar{finite} multi-flags $F$ on $M$ there exists $N = N(F)$ such that ${\cal F}^F(M)(x) = {\cal F}^F_N(M)(x)$ for all $x\in obj({\cal C})$.
\end{definition}

In almost all applications of this definition we will only be concerned with stability, not the related notion of strong stability. The one exception occurs in the statement and proof of Theorem \ref{thm:6} below.
\vskip.2in

For each $0\le k\le \infty$ and at each object $x$ we may consider the associated graded ${\cal F}_k(M)_*(x)$ of ${\cal F}_k(M)(x)$.  Stabilization via direct limit in the construction of ${\cal F}(M)$ yields a multi-flag structure that is preserved under the morphisms of the $\cal C$-module $M$. The following result identifies the effect of a morphism on the associated graded limit ${\cal F}(M)_*$, under the more restrictive hypothesis that $M$ is equipped with an inner product structure (which guarantees that the relative orthogonal complements coming from the associated graded are compatible under the morphisms of $M$).

\begin{theorem}\label{thm:1} Let $M$ be an $\cal IPC$-module with stable local structure. Then for all $k\ge 0$, $x,y,z\in obj({\cal C})$, $W\in {\cal F}(M)(x)$, $\phi_{zx}:M(z)\to M(x)$, and $\phi_{xy}:M(x)\to M(y)$
\begin{enumerate}
\item The morphisms of $M$ and their inverses induce well-defined maps of associated graded sets
\begin{gather*}
\phi_{xy}:{\cal F}(M)_*(x)\to {\cal F}(M)_*(y)\\
\phi_{zx}^{-1}: {\cal F}(M)_*(x)\to {\cal F}(M)_*(z)
\end{gather*}
\item $\phi_{xy}(W)\in {\cal F}(M)(y)$, and either $\phi_{xy}(W_{\cal F}) = \{0\}$, or $\phi_{xy}:W_{\cal F}\xrightarrow{\cong}\phi_{xy}(W_{\cal F}) = \left(\phi_{xy}(W_{\cal F})\right)_{\cal F}$ where $\phi_{xy}(W_{\cal F})$ denotes the element in the associated graded ${\cal F}(M)_*(y)$ induced by $\phi_{xy}(W)$;
\item either $im(\phi_{zx})\cap W_{\cal F} = \{0\}$, or there is a canonically defined element $U_{\cal F} = \left(\phi_{zx}^{-1}[W_{\cal F}]\right)_{\cal F} = \left(\phi_{zx}^{-1}[W]\right)_{\cal F}\in {\cal F}(M)_*(z)$ with $\phi_{zx}:U_{\cal F}\xrightarrow{\cong} W_{\cal F}$.
\end{enumerate}
\end{theorem}

\begin{proof} Stabilization with respect to the operations (LS.1) and (LS.2), as given in (LS.3), implies that for any object $x$, morphisms $\phi_{xy},\phi_{zx}$, and $W\in {\cal F}(M)(x)$, that $\phi(W)\in {\cal F}(M)(y)$ and $\phi^{-1}[W]\in {\cal F}(M)(z)$, verifying the first statement. Let $K = \ker(\phi_{xy})\cap W$. Then either $K=W$ or is a proper subset of $W$. If the former case, $\phi_{xy}(W_{\cal F}) = \{0\}$, while if the latter we see (again, by stabilization) that $K\in S(W)$ and so $K\cap W_{\cal F} = \{0\}$, implying that $W_{\cal F}$ maps isomorphically to its image under $\phi_{xy}$. Moreover, in this last case $\phi_{xy}$ will map $S(W)$ surjectively to $S(\phi_{xy}(W))$, implying the equality $\phi_{xy}(W_{\cal F}) = \left(\phi_{xy}(W_{\cal F})\right)_{\cal F}$.
\vskip.2in
Now given $\phi_{zx}:M(z)\to M(x)$, let $U = \phi_{zx}^{-1}[W]\in {\cal F}(M)(z)$. As before, the two possibilities are that $\phi_{zx}(U) = W$ or that $T := \phi_{zx}(U)\subsetneq W$. In the first case, $\phi_{zx}$ induces a surjective map of sets $S(U)\surj S(W)$, and so will map $U_{\cal F}$ surjectively to $W_{\cal F}$. By statement 2. of the theorem, this surjection must be an isomorphism. In the second case we see that the intersecton $im(\phi_{zx})\cap W$ is an element of $S(W)$ (as ${\cal F}(M)(x)$ is closed under intersections), and so $W_{\cal F}\cap im(\phi_{zx}) = \{0\}$ by the definition of $W_{\cal F}$.
\end{proof}
\vskip.1in

Using the local structure of $M$, we define the {\it excess} of a $\cal WIPC$-module $M$ as
\[
e(M) = \sum_{x\in obj({\cal C})} e({\cal F}(M)(x))
\]
We say ${\cal F}(M)$ is {\it in general position} at the vertex $x$ iff ${\cal F}(M)(x)$ is in general position as defined above; in other words if $e({\cal F}(M)(x)) = 0$ . Thus ${\cal F}(M)$ is {\it in general position} (without restriction) iff $e(M) = 0$. The previous theorem implies

\begin{corollary}\label{cor:2} ${\cal F}(M)$ is {\it in general position} at the vertex $x$ if and only if $e({\cal F}(M)(x)) = 0$. It is in general position (without restriction) iff $e(M) = 0$.
\end{corollary}

Note that as $M(x)$ is finite-dimensional for each $x\in obj({\cal C})$, ${\cal F}(M)(x)$ must be locally stable at $x$ if it is in general position (in fact, general position is a much stronger requirement).
\vskip.2in

Now assume given a $\cal C$-module $M$ without any additional structure. A multi-flag on $M$ is then defined to be a multi-flag on $M$ equipped with an arbitrary $\cal WIPC$-structure. Differing choices of weak inner product on $M$ affect the choice of relative orthogonal complements appearing in the associated graded at each object via equation (\ref{eqn:one}). However the constructions in LS1, LS2, and LS3 are independent of the choice of inner product, as are the definitions of excess and stability at an object and also for the module as a whole. So the results stated above for $\cal WIPC$-modules may be extended to $\cal C$-modules. The only result requiring an actual $\cal IPC$-structure is Theorem \ref{thm:1}.
\vskip.5in

\section{Statement and proof of the main results} In discussing our structural results, we first restrict to the case $M$ is an $\cal IPC$-module, and then investigate what properties still hold for more general $\cal WIPC$-modules.

\subsection{Blocks, generalized barcodes, and tame $\cal C$-modules} To understand how blocks and generalized barcodes arise, we first need to identify the type of subcategory on which they are supported. For a connected poset category $\cal C$,  its oriented (minimal) graph $\Gamma = \Gamma({\cal C})$ was defined above. A subgraph $\Gamma'\subset\Gamma$ will be called {\it admissible} if
\begin{itemize}
\item it is connected;
\item it is pathwise full: if $v_1e_1v_2e_2\dots v_{k-1}e_{k-1}v_k$ is an oriented path in $\Gamma'$ connecting $v_1$ and $v_k$, and $(v_1=w_1)e'_1w_2e'_2\dots w_{l-1}e'_{l-1}(w_l = v_k)$ is any other path in $\Gamma$ connecting $v_1$ and $v_k$ then the path $v_1=w_1e'_1w_2e'_2\dots w_{l-1}e'_{l-1}w_l$ is also in $\Gamma'$.
\end{itemize}
Any admissible subgraph $\Gamma'$ of $\Gamma$ determines a unique subcategory ${\cal C}'\subset {\cal C}$ for which $\Gamma({\cal C}') = \Gamma'$, and we will call a subcategory ${\cal C}'\subset {\cal C}$ admissible if $\Gamma({\cal C}')$ is an admissible subgraph of $\Gamma({\cal C})$. If $M'\subset M$ is a sub-$\cal C$-module of the $\cal C$-module $M$, its {\it support} will refer to the full subcategory ${\cal C}(M')\subset {\cal C}$ generated by $\{x\in obj({\cal C})\ |\ M'(x)\ne \{0\} \}$. It is easily seen that being a submodule of $M$ (rather than just a collection of subspaces indexed on the objects of $\cal C$) implies that the support of $M'$, if connected, is an admissible subcatgory of $\cal C$ in the above sense. A {\it block} will refer to a sub-$\cal C$-module $M'$ of $M$ for which $\phi_{xy}:M'(x)\xrightarrow{\cong} M'(y)$ whenever $x,y\in obj({\cal C}(M'))$ (any morphism between non-zero vertex spaces of $M'$ is an isomorphism). Finally, $M'$ is a {\it generalized barcode} (GBC) for $M$ if it is a block where $dim(M'(x) ) = 1$ for all $x\in obj({\cal C}(M'))$.
\vskip.2in

It is evident that if $M'\subset M$ is a GBC, it is an indecomposeable $\cal C$-submodule of $M$. If $\Gamma$ represents an oriented graph, we write $\ov{\Gamma}$ for the underlying unoriented graph. Unlike the particular case of persistence (or more generally zig-zag) modules, blocks occuring as $\cal C$-modules for an arbitrary ps-category may not decompose into a direct sum of GBCs. The following two simple oriented graphs illustrate the obstruction.
\vskip.5in
({\rm D1})\vskip-.4in
\centerline{
\xymatrix{
\bullet\ar[rr]\ar[dd] && \bullet\ar[dd] &&&& \bullet && \bullet\ar[dd]\ar[ll]\\
& \Gamma_1 & &&&& & \Gamma_2 &\\
\bullet\ar[rr] && \bullet &&&& \bullet\ar[uu]\ar[rr] && \bullet
}}
\vskip.2in

For a block represented by the graph $\Gamma_1$ on the left, the fact $\cal C$ is a poset category implies that, even though the underlying unoriented graph is a closed loop, going once around the loop yields a composition of isomorphisms which is the identity. As a consequence, it is easily seen that a block whose support is an admissible category ${\cal C}'$ with graph $\Gamma({\cal C}') = \Gamma_1$ can be written as a direct sum of GBCs indexed on ${\cal C}'$ (see the lemma below). However, if the graph of the supporting subcategory is $\Gamma_2$ as shown on the right, then the partial ordering imposes no restrictions on the composition of isomorphisms and their inverses, starting and ending at the same vertex. For such a block with base field $\mathbb R$ or $\mathbb C$, the moduli space of isomorphism types of blocks of a given vertex dimension $n$ is non-discrete for all $n>1$ and can be identified with the space of $n\times n$ Jordan normal forms. The essential difference between these two graphs lies in the fact that the category on the left exhibits one initial and one terminal object, while the category on the right exhibits two of each. Said another way, the zig-zag length of the simple closed loop on the left is two, while on the right is four. We remark that the obstruction here is not simply a function of the underlying unoriented graph, as $\ov{\Gamma}_1 = \ov{\Gamma}_2$ in the above example. A closed loop in $\Gamma({\cal C})$ is an {\it h-loop} if it is able to support a sequence of isomorphsms whose composition going once around, starting and ending at the same vertex, is other than the identity map (``h'' for holonomy). Thus $\Gamma_2$ above exhibits an h-loop. Note that the existence of an h-loop implies the existence of a simple h-loop.
\vskip.2in
We wish explicit criteria which identify precisely when this can happen. One might think that the zig-zag length of a simple closed loop is enough, but this turns out to not be the case. The following illustrates what can happen.
\vskip.5in
({\rm D2})\vskip-.4in
\centerline{
\xymatrix{
& \bullet\ar[rr]\ar[dd] && \bullet\ar[rr]\ar@{-->}[dd] && \bullet\ar[dd]\\
\\
\Gamma({\cal C}'): & \bullet\ar[dd]\ar@{-->}[rr] && \bullet\ar[rr]\ar[dd] && \bullet\\
\\
&\bullet\ar[rr] && \bullet &&
}}
\vskip.2in

Suppose $\cal C$ indexes $3\times 3$ two-dimensional persistance modules (so that $\Gamma({\cal C})$ looks like an oriented two-dimensonal $3\times 3$ lattice, with arrows pointing down and also to the right). Suppose ${\cal C}'\subset {\cal C}$ is an admissible subcategory of $\cal C$ with $\Gamma({\cal C}')$ containing the above simple closed curve indicated by the solid arrows. The zig-zag length of the curve is four, suggesting that it might support holonomy and so be a potential h-loop. However, the admissibility condition forces ${\cal C}'$ to also contain the morphisms represented by the dotted arrows, resulting in three copies of the graph $\Gamma_1$ above. Including these morphisms one sees that holonomy in this case is not possible.
\vskip.2in

Given an admissible subcategory ${\cal C}'$ of $\cal C$, we will call ${\cal C}'$ {\it h-free} if $\Gamma({\cal C}')$  does not contain any simple closed h-loops (and therefore no closed h-loops).

\begin{lemma}\label{lemma:3} Any block $M'$ of $M$ whose support ${\cal C}'$ is h-free can be written (non-uniquely) as a finite direct sum of GBCs all having the same support as $M'$.
\end{lemma}

\begin{proof} Fix $x\in obj(supp(M'))$ and a basis $\{\bf{v}_1,\dots,\bf{v}_n\}$ for $M'(x)$. Let $y\in obj(supp(M'))$, and choose a path $xe_1x_1e_2x_2\dots x_{k-1}e_ky$ from $x_0 = x$ to $x_k = y$ in $\ov{\Gamma}(M')$. Each edge $e_j$ is represented by an invertible linear map $\lambda_j = (\phi_{x_{j-1}x_j})^{\pm 1}$, with
\[
\lambda := \lambda_k\circ\lambda_{k-1}\circ\dots\circ\lambda_1:M'(x)\xrightarrow{\cong} M'(y)
\]
As ${\cal C}' = supp(M')$ is h-free, the isomorphism between $M'(x)$ and $M'(y)$ resulting from the above construction is independent of the choice of path in $\ov{\Gamma}(M')$ from $x$ to $y$, and is uniquely determined by the ${\cal C}'$-module $M'$. Hence the basis $\{\bf{v}_1,\dots,\bf{v}_n\}$ for $M'(x)$ determines one for $M'(y)$ given as $\{\lambda(\bf{v}_1),\dots,\lambda(\bf{v}_n)\}$ which is independent of the choice of path connecting these two vertices. In this way the basis at $M'(x)$ may be compatibly extended to all other vertices of ${\cal C}'$, due to the connectivity hypothesis. The result is a system of {\it compatible bases} for the ${\cal C}'$-module $M'$, from which the splitting of $M'$ into a direct sum of GBCs each supported by ${\cal C}'$ follows.
\end{proof}

A $\cal C$-module $M$ is said to be {\it weakly tame} iff it can be expressed as a direct sum of blocks. It is {\it strongly tame} or simply {\it tame} if, in addition, each of those blocks may be further decomposed as a direct sum of GBCs.
\vskip.3in

\subsection{The main results} We first establish the relation between non-zero elements of the associated graded at an object of $\cal C$ and their  corresponding categorical support. We assume throughout this section that $M$ is an $\cal IPC$-module with stable local structure.
\vskip.2in

Suppose $W\in {\cal F}(M)(x)$ with $0\ne W_{\cal F}\in {\cal F}(M)_*(x)$. Then $W_{\cal F}$ uniquely determines a subcategory ${\cal C}(W_{\cal F})\subset {\cal C}$ satisfying the following three properties:
\begin{enumerate}
\item $x\in obj({\cal C}(W_{\cal F}))$;
\item For each path $xe_1x_1e_2\dots x_{k-1}e_ky$ in $\Gamma({\cal C}(W_{\cal F}))$ beginning at $x$, with each edge $e_j$ represented by $\lambda_j = (\phi_{x_{j-1}x_j})^{\pm 1}$ ($\phi_{x_{j-1}x_j}$ a morphism in $\cal C$), $W_{\cal F}$ maps isomorphically under the composition $\lambda = \lambda_k\circ\lambda_{k-1}\circ\dots\circ\lambda_1$ to $0\ne \lambda(W_{\cal F})\in  W_{\cal F}(M)_*(y)$;
\item ${\cal C}(W_{\cal F})$ is the largest subcategory of $\cal C$ satisfying properties 1. and 2.
\end{enumerate}

We refer to ${\cal C}(W_{\cal F})$ as the {\it block category} associated to $W_{\cal F}$. It is easy to see that $\varnothing\ne {\cal C}(W_{\cal F})$, and moreover that ${\cal C}(W_{\cal F})$ is admissible as defined above. Now let ${\cal S}({\cal C})$ denote the set of admissible subcategories of $\cal C$. If $x\in obj({\cal C})$ we write ${\cal S}_x{\cal C}$ for the subset of ${\cal S}({\cal C})$ consisting of those admimissible ${\cal C}'\subset {\cal C}$ with $x\in obj({\cal C}')$.

\begin{lemma}\label{lemma:4}  For each $x\in obj({\cal C})$ and $\cal IPC$-module $M$, the assignment
\begin{gather*}
{\cal A}_x: {\cal F}(M)_*(x)\backslash\{0\}\longrightarrow {\cal S}_x{\cal C}\\
0\ne W_{\cal F}\mapsto {\cal C}(W_{\cal F})
\end{gather*}
defines an injection from ${\cal F}(M)_*(x)\backslash\{0\}$ to the set of admissible subcategories of $\cal C$ which occur as the block category of a non-zero element of ${\cal F}(M)_*(x)$.
\end{lemma}

\begin{proof} The fact that ${\cal C}(W_{\cal F})$ is uniquely determined by $W_{\cal F}$ ensures the map is well-defined. To see that the map is 1-1, we observe that corresponding to each ${\cal C}'\in {\cal S}_x{\cal C}$ is a unique maximal $W\in {\cal F}(M)(x)$ with image-kernel-intersection data determined by the manner in which each vertex $y\in obj({\cal C}')$ connects back to $x$. More precisely, the subspace $W$ is the largest element of ${\cal F}M(x)$ satisfying the property that for every
\begin{itemize}
\item $y\in obj({\cal C}')$;
\item zig-zag sequence $p$ of morphisms in ${\cal C}'$ connecting $x$ and $y$;
\item morphism $\phi_{yz}$ in $\cal C$ from $y$ to $z\in obj({\cal C})\backslash obj({\cal C}')$;
\end{itemize}
the pull-back and push-forward of $ker(\phi_{xz})$ along the path back from $M(z)$ to $M(x)$ yields a subspace of $M(x)$ containing $W$. This clearly determines $W$ uniquely; note that the conditions may result in $W = \{0\}$. Restricting to the image of ${\cal A}_x$ we arrive at the desired result.
\end{proof}

Write ${\cal AS}({\cal C})$ for the subset of ${\cal S}({\cal C})$ consisting of those admissible subcategories for which there exists $x\in obj({\cal C})$ with $\{0\}\ne im({\cal A}_x)\subset {\cal S}_x{\cal C}$. This lemma, in conjunction with Theorem \ref{thm:1}, implies

\begin{theorem}\label{thm:2} Let $M$ be an $\cal IPC$-module. Each ${\cal C}'\in {\cal AS}({\cal C})$ uniquely determines a block  $\cal C$-submodule $M({\cal C}')$ of $M$, where $M({\cal C}')(x) = $ the unique non-zero element $W_{\cal F}$ of ${\cal F}(M)_*(x)$ for which ${\cal C}(W_{\cal F}) = {\cal C}'$.
\end{theorem}

\begin{proof} Fix ${\cal C}'\in {\cal AS}({\cal C})$ and $x\in obj({\cal C}')$. By Theorem \ref{thm:1} and Lemma \ref{lemma:4}, for any $\phi_{xy'}\in Hom({\cal C}')$, $W_{\cal F} := {\cal A}^{-1}({\cal C}'\in {\cal S}_x{\cal C})$ maps isomorphically under $\phi_{xy'}$ to $\phi_{xy'}(W_{\cal F})\in {\cal F}(M)_*(y')$.
\vskip.1in

Now any other vertex $y\in\Gamma({\cal C}')$ is connected to $x$ by a zig-zag path of oriented edges. Let $\lambda_{xy}$ represent such a path, corresponding to a composition sequence of morphisms and their inverses. As $M$ is not required to be h-free, the resulting isomorphism between $W_{\cal F}$ and $\lambda_{xy}(W_{\cal F})$ is potentially dependent on the choice of path $\lambda_{xy}$ in $\Gamma({\cal C}')$. However the space itself is not. Moreover the same lemma and theorem also imply that for any $\phi_{xz}\in Hom({\cal C})$ with $z\in obj({\cal C})\backslash obj({\cal C}')$, $W_{\cal F}$ maps to $0$ under $\phi_{xz}$. This is all that is needed to identify an actual submodule of $M$ by the assignments
\begin{itemize}
\item $M({\cal C}')(y) = \lambda_{xy}(W_{\cal F})$ for $\lambda_{xy}$ a zig-zag path between $x$ and $y$ in $\Gamma({\cal C}')$;
\item $M({\cal C}')(z) = 0$ for $z\in obj({\cal C})\backslash obj({\cal C}')$
\end{itemize}
As defined, $M({\cal C}')$ is a block, completing the proof.
\end{proof}

We define the {\it (weakly) tame cover} of $M$ as
\begin{equation}
T(M)(x) = \underset{{\cal C}'\in {\cal AS}({\cal C})}{\bigoplus} M({\cal C}')
\end{equation}
with the projection $p_M:T(M)\surj M$ given on each summand $M({\cal C}')$ by the inclusion provided by the previous theorem. We are now in a position to state the main result.

\begin{theorem}\label{thm:3} An $\cal IPC$-module $M$ is weakly tame iff its excess $e(M) = 0$. In this case the decomposition into a direct sum of blocks is basis-free, depending only on the underlying $\cal IPC$-module $M$, and is unique up to reordering. If in addition $\cal C$ is h-free then $M$ is tame, as each block decomposes as a direct sum of GBCs, uniquely up to reordering after fixing a choice of basis at a single vertex.
\end{theorem}

\begin{proof} The excess at a given vertex $x$ is zero iff the projection map at that vertex is an isomorphism, as the excess is equal to the dimension of the kernel of $p_M$ at $x$. Moreover, if $\cal C$ is h-free then each block further decomposes in the manner described by Lemma \ref{lemma:3}; the precise way in which this decomposition occurs will depend on a choice of basis at a vertex in the support of that block, but once that has been chosen, the basis at each other vertex is uniquely determined. All that remains is to decide the order in which to write the direct sum.
\end{proof}

Note that the excess of $M$ need not be finite. If $\cal C$ is not h-free and $M$ exhibits holonomy at a vertex x, then the tame cover of $M$ might be infinite dimensional at $x$, which will make the overall excess infinite. Nevertheless, $T(M)$ in all cases should be viewed as the ``closest" weakly tame approximation to $M$, which equals $M$ if and only if $M$ itself is weakly tame. Another way to view this proximity is to observe that $T(M)$ and the projection to $M$ are constructed in such a way that $p_M$ induces a global isomorphism of associated graded objects
\[
p_M: {\cal F}(T(M))_*\xrightarrow{\cong} {\cal F}(M)_*
\]
so that $T(M)$ is uniquely characterized up to isomorphism as the weakly tame $\cal C$-module which maps to $M$ by a map which induces an isomorphism of the associated graded local structure.
\vskip.2in

To conclude this subsection we illustrate the efficiency of this approach by giving a geodesic proof of the classical strucuture theorem for finite 1-dimensional persistence modules. Let us first observe that such a module $M$ may be equipped with an inner product structure; the proof follows easily by induction on the length of $M$. So for the following theorem we may assume such an IP-structure has been given.

\begin{theorem}\label{thm:4} If ${\cal C} \cong \underline{n}$ is the categorical representation of a finite totally ordered set, then any $\cal C$-module $M$ is tame.
\end{theorem}

\begin{proof} By Lemma \ref{lemma:2}, the multiflag ${\cal F}(M)(x)$ is in general position for each object $x$, implying the excess $e(M) = 0$, so $M$ is weakly tame by the previous theorem. But there are no non-trivial closed zig-zag loops in $\Gamma({\cal C})$, so $\cal C$ is h-free and $M$ is tame.
\end{proof}
\vskip.3in

\subsection{The GBC vector for $\cal C$-modules} In the absence of an $\cal IP$-structure on the $\cal C$-module $M$,  assuming only that $M$ is a $\cal WIP$-module, we may not necessarily be able to construct a weakly tame cover of $M$ but can still extract useful numerical information. By the results of Proposition \ref{prop:invimage} and the proof of Theorem \ref{thm:1}, we see that the results of that theorem still hold for the assoicated graded ${\cal F}_*(M)$, assuming only a $\cal WIPC$-module structure. Moreover, a slightly weaker version of the results of Theorem \ref{thm:2} still apply for this weaker $\cal WIPC$-structure. Summarizing,

\begin{theorem}\label{thm:wipc} Let $M$ be an $\cal WIPC$-module with stable local structure. Then for all $k\ge 0$, $x,y,z\in obj({\cal C})$, $\phi_{zx}:M(z)\to M(x)$, and $\phi_{xy}:M(x)\to M(y)$, the morphisms of $M$ and their inverses induce well-defined maps of associated graded sets
\begin{gather*}
\phi_{xy}:{\cal F}(M)_*(x)\to {\cal F}(M)_*(y)\\
\phi_{zx}^{-1}: {\cal F}(M)_*(x)\to {\cal F}(M)_*(z)
\end{gather*}
Moreover, if $W\in {\cal F}(M)_*(x)$, viewed as a subquotient space of $M(x)$, then either $dim(\phi_{xy}(W)) = dim(W)$ or $dim(\phi_{xy}(W)) = 0$. Similarly, either $dim(\phi_{zx}^{-1}(W)) = dim(W)$ or $dim(\phi_{zx}^{-1}(W)) = 0$. In this way we may, as before, define the support ${\cal C}(W)$ of $W$, which will be an admissible subcategory of $\cal C$. Each ${\cal C}'\in {\cal AS}({\cal C})$ uniquely determines a block $\cal C$-module $M({\cal C}')$, where $M({\cal C}')(x) = $ the unique non-zero element $W$ of ${\cal F}(M)_*(x)$ for which ${\cal C}(W) = {\cal C}'$.
\end{theorem}

The lack of IP-structure means that, unlike the the statement of Theorem \ref{thm:2}, we cannot identify the $\cal C$-module $M({\cal C}')$ as an actual submodule of $M$, or even construct a map of $\cal C$ modules $M({\cal C}')\to M$, as $M({\cal C}')$ is derived purely from the associated graded local structure ${\cal F}_*(M)$.
\vskip.2in

Nevertheless, Theorem \ref{thm:wipc} implies the dimension of each of these blocks - given as the dimension at any element in the support - is well-defined, as $dim(M({\cal C}')(x)) = dim(M({\cal C}')(y))$ for any pair $x,y\in obj({\cal C}')$ by the theorem above. The {\it generalized bar code dimension} of $M$ is the vector ${\cal S}({\cal C})\to \mathbb W$ given by
\[
GBCD(M)({\cal C}') =
\begin{cases}
dim(M({\cal C}')) := dim\big(M({\cal C}')(x)\big), x\in obj({\cal C}')\qquad\text{if }{\cal C}'\in {\cal AS}({\cal C})\\
0 \hskip2.68in\text{if }{\cal C}'\notin {\cal AS}({\cal C})
\end{cases}
\]
Finally if $M$ is simply a $\cal C$-module, let $M'$ denote $M$ with a fixed weak inner product structure. Setting
\[
GBCD(M) := GBCD(M')
\]
yields a well-defined function $GBCD:\{{\cal C}$-$ modules\}\to \mathbb W$, as one easily sees that $GBCD(M')$ is independent of the choice of lift of $M$ to a $\cal WIPC$-module; moreover this is an isomorphism invariant of $M$.
\vskip.3in

\subsection{Obstructions to admitting an inner product} The obstruction to imposing an IP-structure on a $\cal C$-module is, in general, non-trivial.

\begin{theorem}\label{thm:obstr} Let ${\cal C} = {\cal C}_2$ be the poset category for which $\Gamma({\cal C}_2) = \Gamma_2$, as given in diagram (D1). Then there exist ${\cal C}_2$-modules $M$ which do not admit an inner product structure.
\end{theorem}

\begin{proof} Label the initial objects of $\cal C$ as $x_1, x_2$, and terminal objects as $y_1, y_2$, with morphisms $\phi_{i,j}:x_i\to y_j$, $1\le i,j\le 2$. For each $(i,j)$ fix an identification $M(x_i) = M(y_j) = \mathbb R$. In terms of this identification, let
\[
M(\phi_{i,j})({\bf v}) =
\begin{cases}
2{\bf v}\quad\text{if } (i,j) = (1,1)\\
{\bf v}\quad\ \text{otherwise}
\end{cases}
\]
The self-map $M(\phi_{1,2})^{-1}\circ M(\phi_{2,2})\circ M(\phi_{2,1})^{-1}\circ M(\phi_{1,1}): M(x_1)\to M(x_1)$ is given as scalar multiplication by $2$. There is no norm on $\mathbb R$ for which this map is norm-preserving; hence there cannot be any collection of inner products $<_-,_->_{i,j}$ on $M_{i,j}$ giving $M$ the structure of an $\cal IPC$-module.
\end{proof}
More generally, we see that

\begin{theorem} If $\cal C$ admits holonomy, then there exist $\cal C$-modules which do not admit the structure of an inner product. Moreover, the obstruction to admitting an inner product is an isomorphism invariant.
\end{theorem}

However, for an important class of $\cal C$-modules the obstruction vanishes. An $n$-dimensional persistence module is defined as a $\cal C$-module where $\cal C$ is an $n$-dimensional {\it persistence category}, i.e., one isomorphic to $\underline{m_1}\times\underline{m_2}\times\dots\times\underline{m_n}$ where $m_p$ is the categorical representation of the totally ordered set $\{1 < 2 < \dots < p\}$.

\begin{theorem} Any (finite) n-dimensional persistence module admits an IP-structure.
\end{theorem}

\begin{proof} It was already observed above that the statement is true for ordinary 1-dim.~persistence modules. So we may proceed by induction, assuming $n > 1$ and that the statement holds in dimensions less than $n$. Before proceeding we record the following useful lemmas. Let ${\cal C}[1]$ denote the categorical representation of the poset $\{0 < 1\}$, and let ${\cal C}[m] = \prod_{i=1}^m{\cal C}[1]$. This is a poset category with objects $m$-tuples $(\varepsilon_1,\dots,\varepsilon_m)$ and a unique morphism $(\varepsilon_1,\dots,\varepsilon_m)\to (\varepsilon'_1,\dots,\varepsilon'_m)$ iff $\varepsilon_j\le \varepsilon'_j, 1\le j\le m$. The oriented graph $\Gamma({\cal C}[m])$ may be viewed as the oriented 1-skeleton of a simplicial $m$-cube. Write $t$ for the terminal object $(1,1,\dots,1)$ in ${\cal C}[m]$, and let ${\cal C}[m,0]$ denote the full subcategory of ${\cal C}[m]$ on objects $obj({\cal C}[m])\backslash \{t\}$.

\begin{lemma} Let $M$ be a ${\cal C}[m]$ module, and let $M(0) = M|_{{\cal C}[m,0]}$ be the restriction of $M$ to the subcategory ${\cal C}[m,0]$. Then any inner product structure on $M[m,0]$ may be extended to one on $M$.
\end{lemma}

\begin{proof}  Let $M'$ be the ${\cal C}[m]$-module defined by
\begin{align*}
M'|_{{\cal C}[m,0]} &= M|_{{\cal C}[m,0]}\\
M'(t) &= \underset{{\cal C}[m,0]}{colim}\  M'
\end{align*}
with the map $M'(\phi_{xt})$ given by the unique map to the colimit when $x\in obj({\cal C}[m,0])$. The inner product on $M(0)$ extends to a unique inner product on $M'$. We may then choose an inner product on $M(t)$ so that the unique morphism $M'(t)\to M(t)$ (determined by $M$) lies in $(IP/k)$. Fixing this inner product on $M(t)$ gives $M$ an IP-structure compatible with the given one on $M(0)$.
\end{proof}
For evident reasons we will refer to this as a {\it pushout extension} of the inner product. More generally, iterating the same line of argument yields

\begin{lemma}\label{lemma:5} Let $M$ be a ${\cal C}[m]$-module and $\wt{M} = M|_{{\cal C}'}$ where ${\cal C}'$ is an admissible subcategory of ${\cal C}[m]$ containing the initial object. Then any IP-structure on $\wt{M}$ admits a compatible extension to $M$.
\end{lemma}

Continuing with the proof of the theorem, let ${\cal C} = \underline{m_1}\times\underline{m_2}\times\dots\times\underline{m_n}$ with $m_p = \{1 < 2 < \dots < p\}$ as above. Let ${\cal C}_q = \underline{m_1}\times\underline{m_2}\times\dots\times\underline{m_{n-1}}\times \{1 < 2 < \dots < q\}$, viewed as a full subcategory of $\cal C$. Given a $\cal C$-module $M$, let $M_i$ be the ${\cal C}_i$-module constructed as the restriction of $M$ to ${\cal C}_i$. By induction on dimension, we may assume $M_1$ has been equipped with an IP-structure. By induction on the last index, assume that this IP-structure has been compatibly extended to $M_i$. Now $\Gamma({\cal C}_{i+1})$ can be viewed as being constructed from $\Gamma({\cal C}_i)$ via a sequence of $m = m_1m_2\dots m_{n-1}$ concatenations, where each step concatenates the previous graph with the graph $\Gamma({\cal C}[n])$ along an admissible subgraph of $\Gamma({\cal C}[n])$ containing the initial vertex. Denote this inclusive sequence of subgraphs by $\{\Gamma_\alpha\}_{1\le \alpha\le m}$; for each $\alpha$ let ${\cal C}_{\alpha}$ be the subcategory of ${\cal C}_{i+1}$ with $\Gamma({\cal C}_\alpha) = \Gamma_\alpha$. Finally, let $N_\alpha$ denote the restriction of $M$ to ${\cal C}_\alpha$, so that $N_1 = M_i$ and $N_m = M_{i+1}$. Then $N_1$ comes equipped with an IP-structure, and by Lemma \ref{lemma:5} an IP-structure on $N_j$ admits a pushout extension to one on $N_{j+1}$ for each $1\le j\le (m-1)$. Induction in this coordinate then implies the IP-structure on $M_i$ an be compatibly extended (via iterated pushouts) to one on $M_{i+1}$, completing the induction step. As $M_{m_n} = M$, this completes the proof of the theorem.
\end{proof}
\vskip.3in

\subsection{h-free modules} When is an indexing category $\cal C$ h-free? To better understand this phenomenon, we note that the graph $\Gamma_1$ in diagram (D1) - and the way it appears again in diagram (D2) - suggests it may be viewed from the perspective of homotopy theory: define an {\it elementary homotopy} of a closed zig-zag loop $\gamma$ in $\Gamma({\cal C})$ to be one which performs the following replacements in either direction
\vskip.5in
({\rm D3})\vskip-.4in
\centerline{
\xymatrix{
A\ar[rr]\ar[dd] && B && && && B\ar[dd]\\
&& & \ar@{<=>}[rr]& && &&\\
C && && && C\ar[rr] && D
}}
\vskip.2in
In other words, if $C\leftarrow A\rightarrow B$ is a segment of $\gamma$, we may replace $\gamma$ by $\gamma'$ in which the segment $C\leftarrow A\rightarrow B$ is replaced by $C\rightarrow D\leftarrow B$ with the rest of $\gamma$ remaining intact; a similar description applies in the other direction. We do not require the arrows in the above diagram to be represented by atomic morphisms, simply oriented paths between vertices.

\begin{lemma} If a zig-zag loop $\gamma$ in $\Gamma({\cal C})$ is equivalent, by a sequence of elementary homotopies, to a collection of simple closed loops of type $\Gamma_1$ as appearing in (D1), then $\gamma$ is h-free. If this is true for all zig-zag loops in $\Gamma({\cal C})$ then $\cal C$ itself is h-free.
\end{lemma}

\begin{proof} Because $\Gamma_1$ has no holonomy, replacing the connecting segment between B and C by moving in either direction in diagram (D3) does not change the homonomy of the closed path. Thus, if by a sequence of such replacements one reduces to a connected collection of closed loops of type $\Gamma_1$, the new loop - hence also the original loop - cannot have any holonomy.
\end{proof}

Call $\cal C$ {\it strongly h-free} if every zig-zag loop in $\Gamma({\cal C})$ satisfies the hypothesis of the above lemma. Given $n$ ps-categories ${\cal C}_1, {\cal C}_2,\dots,{\cal C}_n$, the graph of the $n$-fold cartesian product is given as
\[
\begin{split}
\Gamma({\cal C}_1\times{\cal C}_2\times\dots\times{\cal C}_n) = N_1({\cal C}_1\times{\cal C}_2\times\dots\times{\cal C}_n)
= diag(N({\cal C}_1)\times N({\cal C}_2)\times\dots N({\cal C}_n))_1\\
= diag(\Gamma({\cal C}_1)\times\Gamma({\cal C}_2)\times\dots\times\Gamma({\cal C}_n))
\end{split}
\]
the oriented 1-skeleton of the diagonal of the product of the oriented graphs of each category. Of particular interest are $n$-dimensional persistence categories, as defined above.

\begin{theorem}\label{thm:5} Finite $n$-dimensional persistence categories are strongly h-free.
\end{theorem}

\begin{proof}  The statement is trivially true for $n=1$ (there are no simple closed loops), so assume $n\ge 2$. Let ${\cal C}_i = \underline{m_i}$, $1\le i\le n$.

\begin{claim} The statement is true for $n=2$.
\end{claim}

\begin{proof} Given a closed zig-zag loop $\gamma$ in $\Gamma({\cal C}_1\times {\cal C}_2)$, we may assume ${\bf a} = (a_1,a_2)$ are the coordinates of an initial vertex of the loop. We orient $\Gamma({\cal C}_1\times {\cal C}_2)$ so that it moves to the right in the first coordinate and downwards in the second coordinate, viewed as a lattice in $\mathbb R^2$. As it is two-dimensional, we may assume that $\gamma$ moves away from $\bf a$ by a horizontal path to the right of length at least one, and a vertical downwards path of length also at least one. That means we may apply an elementary homotopy to the part of $\gamma$ containing $\bf a$ as indicated in diagram (D3) above, identifying $\bf a$ with the vertex ``A" in the diagram, and replacing $C\leftarrow A\rightarrow B$ with $C\rightarrow D\leftarrow B$. If $D$ is already a vertex in $\gamma$, the  result is a single simple zig-zag loop of type $\Gamma_1$, joined at $D$ with a closed zig-zag-loop of total length less than $\gamma$. By induction on total length, both of these loops are h-free, hence so the original $\gamma$. In the second case, $D$ was not in the original loop $\gamma$. In this case the total length doesn't change, but the total area enclosed by the curve (viewed as a closed curve in $\mathbb R^2$) does. By induction on total bounded area, the curve is h-free in this case as well, completing the proof of the claim.
\end{proof}

Continuing with the proof of the theorem, we assume $n > 2$, and that we are given a zig-zag path $\gamma$ in $\Gamma({\cal C}_1\times{\cal C}_2\times\dots\times{\cal C}_n)$.  From the above description we may apply a sequence of elementary homotopies in the first two coordinates to yield a zig-zag loop $\gamma'$ in $\Gamma({\cal C}_1\times{\cal C}_2\times\dots\times{\cal C}_n)$ with the same degree of h-freeness as $\gamma$, but where the first two coordinates are constant. The theorem follows by induction on $n$.
\end{proof}

We conclude this subsection with an illustration of how holonomy can prevent stability of the local structure over an infinite field. Consider the indexing category $\cal C$ whose graph $\Gamma({\cal C})$ is
\vskip.5in
({\rm D4})\vskip-.4in
\centerline{
\xymatrix{
 \bullet && y\ar[dd]\ar[ll] && x\ar[ll]\\
& \Gamma_2 & &&\\
 \bullet\ar[uu]\ar[rr] && \bullet &&
}}
\vskip.2in

where the part of the graph labeled $\Gamma_2$ is as in (D1). Suppose the base field to be $k = \mathbb R$ and $M$ the $\cal C$-module which assigns the vector space $\mathbb R^2$  to each vertex in $\Gamma_2$, and assigns $\mathbb R$ to $x$. Each arrow in the $\Gamma_2$-part of the graph is an isomorphism, chosen so that going once around the simple closed zig-zag loop is represented by an element of $SO(2)\cong S^1$ of infinite order (i.e., and irrational rotation). Let $M(x)$ map to $M(y)$ by an injection. In such an arrangement, the local structure of $M$ at the vertex $y$, or the other three vertices of $\cal C$ lying in the graph $\Gamma_2$, never stabilizes.
\vskip.3in

\subsection{Modules with stable local structure} Stability of the local structure can be verified directly in certain important cases. We have given the definition of an $n$-dimensional persistence category above. This construction admits a natural zig-zag generalization. Write \underbar{zm} for any poset of the form $\{1\ R_1\ 2\ R_2\ 3\dots (m-1)\ R_{m-1}\ m\}$ where $R_i = $ ``$\le$" or ``$\ge$" for each $i$. A zig-zag module of length $m$, as defined in \cite{cd}, is a functor $M:$ \underbar{zm}$\to (vect/k)$ for some choice of zig-zag structure on the underlying set of integers $\{1,2,\dots,m\}$. More generally, an $n$-dimensional zig-zag category $\cal C$ is one isomorphic to ${\rm \underline{zm_1}}\times{\rm \underline{zm_2}}\times\dots{\rm \underline{zm_n}}$ for some choice of $\rm \underline{zm_i}$, $1\le i\le n$, and a finite $n$-dimensional zig-zag module is defined to be a functor
\[
M : {\rm \underline{zm_1}}\times{\rm \underline{zm_2}}\times\dots{\rm \underline{zm_n}}\to (vect/k)
\]
for some sequence of positive integers $m_1,m_2,\dots,m_n$ and choice of zig-zag structure on each correpsonding underying set. As with $n$-dimensional persistence modules, $n$-dimensional zig-zag modules may be viewed as a zig-zag diagram of $(n-1)$-dimensional zig-zag modules in essentially $n$ different ways. The proof of the next theorem illustrates the usefulness of strong stability.

\begin{theorem}\label{thm:6} Finite $n$-dimensional zig-zag modules have strongly stable local structure for all $n\ge 0$.
\end{theorem}

\begin{proof} We will first consider the case of $n$-dimensional persistence modules. We say an $n$-dimensional persistence category $\cal C$ has multi-dimension $(m_1,m_2,\dots,m_n)$ if $\cal C$ is isomorphic to $\underline{m_1}\times\underline{m_2}\times\dots\times\underline{m_n}$; note that this $n$-tuple is a well-defined invariant of the isomorphism class of $\cal C$, up to reordering. We may therefore assume the dimensions $m_i$ have been arranged in non-increasing order. We assume the vertices of $\Gamma({\cal C})$ have been labeled with multi-indices $(i_1,i_2,\dots,i_n), 1\le i_j\le m_j$, so that an oriented path in $\Gamma({\cal C})$ from $(i_1,i_2,\dots,i_n)$ to $(j_1,j_2,\dots,j_n)$ (corresponding to a morphism in $\cal C$) exists iff $i_k\le j_k, 1\le k\le n$. We will reference the objects of $\cal C$ by their multi-indices. The proof is by induction on dimension; the base case $n=0$ is trivially true as there is nothing to prove.
\vskip.2in
Assume then that $n\ge 1$. For $1\le i\le j\le m_n$, let ${\cal C}[i,j]$ denote the full subcategory of $\cal C$ on objects $(k_1,k_2,\dots,k_n)$ with $i\le k_n\le j$, and let $M[i,j]$ denote the restriction of $M$ to ${\cal C}[i,j]$. Let ${\cal F}_1$ resp.~${\cal F}_2$ denote the local structures on $M[1,m_n-1]$ and $M[m_n]$ respectively; by induction on the cardinality of $m_n$ we may assume these local structures are stable with stabilization indices $N_1,N_2$. Let $\phi_i:M[i]\to m[i+1]$ be the structure map from level $i$ to level $(i+1)$ in the $n$th coordinate. Then define $\phi_\bullet : M[1,m_n-1]\to M[m_n]$ be the morphism of $n$-dimensional persistence modules which on $M[i]$ is given by the composition
\[
M[i]\xrightarrow{\phi_i} M[i+1]\xrightarrow{\phi_{i+1}}\dots M[m_n-1]\xrightarrow{\phi_{m_n-1}} M[m_n]
\]
Define a multi-flag on $M[1,m_n-1]$ by ${\cal F}_1^* := \phi_\bullet^{-1}[{\cal F}_2]$ and on $M[m_n]$ by ${\cal F}_2^* := \phi_\bullet ({\cal F}_1)$. By induction on length and dimension we may assume that $M[1,m_n-1]$ and $M[m_n]$ have local structures which stabilize strongly (we note that $M[m_n]$ is effectively an $(n-1)$-dimensional persistence module). As these multi-flags are finite, we have that
\begin{itemize}
\item the restricted local structures ${\cal F}_i$ are stable (noted above);
\item the local structure of $M[1,m_n-1]$ is stable relative to ${\cal F}_1^*$;
\item the local structure of $M[m_n]$ is stable relative to ${\cal F}_2^*$.
\end{itemize}
We may then choose $N$ so that in each of the three itemized cases, stabilization has been achieved by the $N^{th}$ stage. Let $\cal G$ be the multi-flag on $M$ which on $M[1,m_n-1]$ is the local structure relative to ${\cal F}_1^*$ and on $M[m_n]$ is the local structure relative to ${\cal F}_2^*$. Then $\cal G$ is the local structure on $M$, and has been achieved after at most $2N$ stages starting with the trivial semi-flag on $M$. This implies $M$ has stable local structure. To verify the induction step for the statement that $M$ has srongly stable local structure, let $F$ be a finite multi-flag on $M$. Let $F_1$ be its restriction to $M[1,m_n-1]$, and $F_2$ its restriction to $M[m_n]$. Then let ${\cal F}_i^{**}$ denote the multi-flag generated by ${\cal F}_i^*$ and $F_i$. Proceeding with the same argument as before yields a multi-flag ${\cal G}^*$ achieved at some finite stage which represents the local structure of $M$ relative to $F$, completing the induction step for persistence modules.
\vskip.2in
In the more general case that one starts with a finite, $n$-dimensional zig-zag module $M$, the argument is esssentially identical but with one adjustment. Representing $M$ as
\[
M[1]\leftrightarrow M[2]\leftrightarrow \dots M[m_n-1]\leftrightarrow M[m_n]
\]
 where ``$\leftrightarrow$" indicates either ``$\leftarrow$" or ``$\rightarrow$", the multi-flags ${\cal F}_i^*$ are defined on $M[1,m_n-1]$ and $M[m_n]$ respectively by starting with the stabilized local structure on the other submodule, and then extending by either pulling back or pushing forward as needed to the other. The rest of the induction step is the same, as is the basis step when $n=0$ and there are no morphisms.
\end{proof}
\vskip.2in

The above discussion applies to arbitrary fields; in this case, as we have seen, it is possible that the local structure fails to be stable. However, if the base field $k$ is finite, then the finiteness of $\cal C$ together with the finite dimensionality of a $\cal C$-module $M$ at each vertex implies that any $\cal C$-module $M$ over $k$ is a finite set. In this case, the infinite refinement of ${\cal F}(M)$ that must occur in order to prevent stabilization at some finite stage is no longer possible. Hence

\begin{theorem} Assume the base field $k$ is finite. Then for all (finite) poset categories $\cal C$ and $\cal C$-modules $M$, $M$ has stable local structure.
\end{theorem}
\vskip.5in

\section{Geometrically based $\cal C$-modules} A $\cal C$-module $M$ is said to be  {\it geometrically based} if $M = H_n(F)$ for some positive integer $n$, where $F:{\cal C}\to {\cal D}$ is a functor from $\cal C$ to a category $\cal D$, equalling either
\begin{itemize}
\item {\bf f-s-sets} - the category of simplicial sets with finite skeleta and morphisms of simplicial sets, or
\item {\bf f-s-com} - the category of finite simplicial complexes and morphisms of simplicial complexes.
\end{itemize}

Almost all $\cal C$-modules that arise in applications are of this type. A central question, then, is whether or not such modules admit an inner product structure of the type needed for the above structure theorems to hold. We show that the obstruction to imposing an IP-structure on geometrically based modules is in general non-trivial, by means of an explicit example given below. On the other hand, all geometrically based $\cal C$-modules admit a presentation by $\cal IPC$-modules. In what follows we will restrict ourselves to the category {\bf f-s-sets}, as it is slightly easier to work in (although all results carry over to {\bf f-s-complexes}).

\subsection{Cofibrant replacement} Any $\cal C$-diagram in {\bf f-s-sets} can be cofibrantly replaced, up to weak homotopical transformation. Precisely,

\begin{theorem} If $F:{\cal C}\to$ {\bf f-s-sets}, then there is a $\cal C$-diagram $\wt{F}:{\cal C}\to$ {\bf f-s-sets} and a natural transformation $\eta:\wt{F}\xrightarrow{\simeq} F$ which is a weak equivalence at each object, where $\wt{F}(\phi_{xy})$ is a closed cofibration (inclusion of simplicial sets) for all morphisms $\phi_{xy}$\footnote{The proof following is a minor elaboration of an argument communicated to us by Bill Dwyer \cite{bd}.}.
\end{theorem}

\begin{proof} The simplicial mapping cylinder construction $Cyl(_-)$ applied to any morphism in {\bf f-s-sets} verifies the statement of the theorem in the simplest case $\cal C$ consists of two objects and one non-identity morphism. Suppose $\cal C$ has $n$ objects; we fix a total ordering on $obj({\cal C})$ that refines the partial ordering: $\{x_1 \prec x_2 \prec \dots \prec x_n\}$ where if $\phi_{x_i x_j}$ is a morphism in $\cal C$ then $i\le j$ (but not necessarily conversely). Let ${\cal C}(m)$ denote the full subcategory of $\cal C$ on objects $x_1,\dots,x_m$, with $F_m = F|_{{\cal C}(m)}$. By induction, we may assume the statement of the theorem for $F_m:{\cal C}(m)\to$ {\bf f-s-sets}, with cofibrant lift denoted by $\wt{F}_m$; with $\eta_m:\wt{F}_m\xrightarrow{\simeq} F_m$.
\vskip.2in

Now let ${\cal D}(m)$ denote the slice category ${\cal C}/x_{m+1}$; as ``$\prec$" is a refinement of the poset ordering ``$<$", the image of the forgetful functor $P_m:{\cal D}(m)\to {\cal C}; (y\to x_{m+1})\mapsto y$ lies in ${\cal C}(m)$. And as $\cal C$ is a poset category, the collection of morphisms $\{\phi_{y x_{m+1}}\}$ uniquely determine a map
\[
f_m : \underset{{\cal D}(m)}{colim}\ \wt{F}_m\circ P_m\xrightarrow{\eta_m} \underset{{\cal D}(m)}{colim}\  F_m\circ P_m \to F(x_{m+1})
\]
Define $\wt{F}_{m+1}:{\cal C}(m+1)\to$ {\bf f-s-sets} by
\begin{itemize}
\item $\wt{F}_{m+1}|_{{\cal C}(m)} = \wt{F}_m$;
\item $\wt{F}_{m+1}(x_{m+1}) = Cyl(f_m)$;
\item If $\phi_{x x_{m+1}}$ is a morphism from $x\in obj({\cal C}(m))$ to $x_{m+1}$, then
\[
\wt{F}_{m+1}(\phi_{x x_{m+1}}):\wt{F}_{m}(x) = \wt{F}_{m+1}(x)\to \wt{F}_{m+1}(x_{m+1})
\]
 is given as the composition
 \[
 \wt{F}_{m}(x) = \wt{F}_m\circ P_m(x\xrightarrow{\phi_{x x_{m+1}}} x_{m+1})\hookrightarrow
 \underset{{\cal D}(m)}{colim}\ \wt{F}_m\circ P_m\hookrightarrow Cyl(f_m) = \wt{F}_{m+1}(x_{m+1})
 \]
\end{itemize}
where the first inclusion into the colimit over ${\cal D}(m)$ is induced by the inclusion of the object \newline
$(x\xrightarrow{\phi_{x x_{m+1}}} x_{m+1})\hookrightarrow obj({\cal D}(m))$. As all morphisms in ${\cal D}(m)$ map to simplicial inclusions under $\wt{F}_m\circ P_m$ the resulting map of $\wt{F}_m(x)$ into the colimit will also be a simplicial inclusion. Finally, the natural transformation $\eta_m:\wt{F}_m\to F_m$ is extended to $\eta_{m+1}$ on $\wt{F}_{m+1}$ by defining $\eta_{m+1}(x_{m+1}): \wt{F}_{m+1}(x_{m+1})\to F_{m+1}(x_{m+1})$ as the natural collapsing map $Cyl(f_m)\surj F(x_{m+1})$, which has the effect of making the diagram

\centerline{
\xymatrix{
\wt{F}_{m+1}(x)\ar[rr]^{\wt{F}_{m+1}(\phi_{xy})}\ar[dd]^{\eta_{m+1}(x)} && \wt{F}_{m+1}(y)\ar[dd]^{\eta_{m+1}(y)}\\
\\
F_{m+1}(x)\ar[rr]^{F_{m+1}(\phi_{xy})} && F_{m+1}(y)
}}
\vskip.2in

commute for morphisms $\phi_{xy}\in Hom({\cal C}_{m+1})$. This completes the induction step, and the proof.
\end{proof}

\begin{corollary}\label{cor:pres} Any geometrically based $\cal C$-module $M$ admits a presentation by $\cal C$-modules $N_1\inj N_2\surj M$ where $N_i$ is an $\cal IPC$-module and $N_1\inj N_2$ is an isometric inclusion of $\cal IPC$-modules.
\end{corollary}

\begin{proof} By the previous result and the homotopy invariance of homology, we may assume $M = H_n(F)$ where $F :{\cal C}\to$ {\bf i-f-s-sets}, the subcategory of {\bf f-s-sets} on the same set of objects, but where all morphisms are simplicial set injections. In this case, for each object $x$, $C_n(F(x)) = C_n(F(x);k)$ admits a canonical inner product determined by the natural basis of $n$-simplices $F(x)_n$, and each morphism $\phi_{xy}$ induces an injection of basis sets $F(x)_n\inj F(y)_n$, resulting in an isometric inclusion $C_n(F(x))\inj C_n(F(y))$. In this way the functor $C_n(F) := C_n(F;k):{\cal C}\to (vect/k)$ inherits a natural $\cal IPC$-module structure. If $Q$ is an $\cal IPC$-module where all of the morphisms are isometric injections, then any $\cal C$-submodule $Q'\subset Q$, equipped with the same inner product, is an $\cal IPC$-submodule of $Q$. Now $C_n(F)$ contains the $\cal C$-submodules $Z_n(F)$ ($n$-cycles) and $B_n(F)$ ($n$-boundaries); equipped with the induced inner product the inclusion $B_n(F)\hookrightarrow Z_n(F)$ is an isometric inclusion of $\cal IPC$-modules, for which $M$ is the cokernel $\cal C$-module.
\end{proof}

[Note: The results for this subsection have been stated for {\bf f-s-sets}; similar results can be shown for {\bf f-s-complexes} after fixing a systematic way for representing the mapping cyclinder of a map of simplicial complexes as a simplicial complex; this typically involves barycentrically subdividing.]

\vskip.3in

\subsection{Geometrically realizing an IP-obstruction} As we saw in Theorem \ref{thm:obstr}, the ${\cal C}_2$-module
\vskip.5in
({\rm D5})\vskip-.4in
\centerline{
\xymatrix{
\mathbb R && \mathbb R\ar[dd]^{1}\ar[ll]_{2}\\
\\
\mathbb R\ar[uu]^{1}\ar[rr]_{1} && \mathbb R
}}
\vskip.2in

does not admit an IP-structure. We note the same diagram can be formed with $S^1$ in place of $\mathbb R$:
\vskip.5in
({\rm D6})\vskip-.4in
\centerline{
\xymatrix{
\mathbb S^1 && S^1\ar[dd]^{1}\ar[ll]_{2}\\
\\
S^1\ar[uu]^{1}\ar[rr]_{1} && S^1
}}
\vskip.2in
Here ``$2:S^1\to S^1$" represents the usual self-map of $S^1$ of degree $2$. This diagram can be realized up to homotopy by a digram of simplicial complexes and simplicial maps as follows: let $T_1 = \partial(\Delta^2)$ denote the standard triangulation of $S^1$, and let $T_2$ be the  barycentric subdivision of $T_1$. We may form the ${\cal C}_2$-diagram in {\bf f-s-com}
\vskip.5in
({\rm D7})\vskip-.4in
\centerline{
\xymatrix{
T_1 && T_2\ar[dd]^{f_1}\ar[ll]_{f_2}\\
\\
T_1\ar[uu]^{1}\ar[rr]_{1} && T_1
}}
\vskip.2in
The map $f_2$ is the triangulation of the top map in (D6), while $f_1$ is the simplicial map which collapses every other edge to a point. The geometric realization of (D7) agrees up to homotopy with (D6). Of course this diagram of simplicial complexes can also be viewed as a diagram in {\bf f-s-sets}. Applying $H_1(_-;\mathbb Q)$ to diagram (D7) we have

\begin{theorem} There exist geometrically based $\cal C$-modules with domain category {\bf f-s-com} (and hence also {\bf f-s-sets}) which do not admit an IP-structure.
\end{theorem}

In this way we see that the presentation result of Corollary \ref{cor:pres} is, in general, the best possible in terms of representing a geometrically based $\cal C$-module in terms of modules equipped with an $\cal IPC$-structure.

\vskip.5in

\section*{Open questions}

\subsubsection*{If $\cal C$ is h-free, does every $\cal C$-module admit an inner product structure?} More generally, what are necessary and sufficient conditions on the indexing category $\cal C$ that guarantee the existence of an inner product (IP) structure on any $\cal C$-module $M$?

\subsubsection*{If $\cal C$ is h-free, does every $\cal C$-module $M$ have stable local structure?} In other words (as with IP-structures), is holonomy the only obstruction to ${\cal F}(M)$ stabilizing at some finite stage? One is tempted to conjecture that the answer is ``yes", however the only evidence so far is the lack of examples of non-stable local structures occuring in the absence of holonomy, or even imagining how this could happen.
\vskip.3in

\subsubsection*{Does h-free imply strongly h-free?} Again, this question is based primarily on the absence, so far, of any counterexample illustrating the difference between these two properties.
\vskip.3in

\subsubsection*{If $M$ has stable local structure, does it have strongly stable local structure?} Obviously, strongly stable implies stable. The issue is whether these conditions are, for some reason, equivalent. If not, then a more refined version of the question would be: under what conditions (on either the indexing category $\cal C$ or the $\cal C$-module $M$) are they equivalent?

\vskip.5in