Sunday, May 28, 2017

Čech (co)homology

In this post we briefly recall the construction of Čech cohomology as well as compute a few examples. Let $X$ be a topological space with a cover $\mathcal U = \{U_i\}$, $\mathcal F$ a $C$-valued sheaf on $X$, and $\widehat{\mathcal F}$ a $C$-valued cosheaf on $X$, for some category $C$ (usually abelian groups).

Definition: The nerve $N$ of $\mathcal U$ is the simplicial complex that has an $r$-simplex $\rho$ for every non-empty intersection of $r+1$ opens of $\mathcal U$. The support $U_\rho$ of $\rho$ is this non-empty intersection. The $r$-skeleton $N_r$ of $N$ is the collection of all $r$-simplices.

Remark: The sheaf $\mathcal F$ and cosheaf $\widehat {\mathcal F}$ may be viewed as being defined either on the opens of $\mathcal U$ over $X$, or on the nerve $N$ of $\mathcal U$. Indeed, the inclusion map $V\hookrightarrow U$ on opens is given by the forgetful map $\partial$. That is, $\partial_i:N_r\to N_{r-1}$ forgets the $i$th open defining $\rho\in N_r$, so if $U_\rho = U_0\cap \cdots \cap U_r$, then $U_{\partial_0\rho} = U_1\cap\cdots \cap U_r$.

The Čech (co)homology will be defined as the (co)homology of a particular complex, whose boundary maps will be induced by, equivalently, the inclusion map on opens or $\partial_i$ on simplices.

Definition: In the context above:
  • a $p$-chain is a finite formal sum of elements $a_{\sigma_i}\in \widehat{\mathcal F}(U_{\sigma_i})$, for every $\sigma_i$ a $p$-simplex,
  • a $q$-cochain is a finite formal sum of elements $b_{\tau_j}\in \mathcal F(U_{\tau_j})$, for every $\tau_j$ a $q$-simplex,
  • the $p$-differential is the map $d_p:\check C_p(\mathcal U,\mathcal F) \to \check C_{p-1}(\mathcal U,\mathcal F)$ given by
\[
d_p(a_\sigma) = \sum_{i=0}^p (-1)^i \widehat{\mathcal F}(\partial_i)(a_\sigma),\]
  • the $q$-codifferential is the map $\delta^q:\check C^q(\mathcal U,\mathcal F) \to \check C^{q+1}(\mathcal U,\mathcal F)$ given by
\[
\delta^q(b_\tau) = \sum_{j=0}^{q+1} (-1)^j \mathcal F(\partial_j)(b_\tau).\]The collection of $p$-chains form a group $\check C_p(\mathcal U,\mathcal F)$ and the collection of $q$-cochains also form a group $\check C^q(\mathcal U,\mathcal F)$, both under the respective group operation in each coordinate. The Čech homology $H_*(\mathcal U,\mathcal F)$ is the homology of the chain complex of $\check C_p$ groups, and the Čech cohomology $H^*(\mathcal U,\mathcal F)$ is the cohomology of the cochain complex of $\check C^q$ groups.

Example: Let $X=S^1$ with a cover $\mathcal U = \{U,V,W\}$ and associated nerve $N_{\mathcal U}$ as below.
The cover is chosen so that all intersections are contractible. Let $k$ be a field. Let $\widehat{\mathcal F}$ be a cosheaf over $N$ and $\mathcal F$ a sheaf over $N$, with $\widehat {\mathcal F}(\text{0-cell})=\mathcal F(\text{1-cell}) = (1,1)\in k^2$ and $\widehat{\mathcal F}(\text{1-cell})=\mathcal F(\text{0-cell})=1\in k$, so that the natural extension and restriction maps work. Then all the degree 0 and 1 chain and cochain groups are $k^3$. Giving a counter-clockwise orientation to $X$, we easily see that
\begin{align*}
d_1\sigma_{U\cap V} & = \sigma_V-\sigma_U, & \delta^0\sigma_U & = \sigma_{U\cap V}-\sigma_{W\cap U}, \\
d_1\sigma_{V\cap W} & = \sigma_W-\sigma_V, & \delta^0\sigma_V & = \sigma_{V\cap W}-\sigma_{U\cap V}, \\
d_1\sigma_{W\cap U} & = \sigma_U-\sigma_W, & \delta^0\sigma_W & = \sigma_{W\cap U}-\sigma_{V\cap W}.\end{align*}If we give an ordered basis of $(\sigma_{U\cap V},\sigma_{V\cap W},\sigma_{W\cap U})$ to $\check C_1(\mathcal U,\widehat{\mathcal F})$ and $\check C^1(\mathcal U,\mathcal F)$, and $(\sigma_U,\sigma_V,\sigma_W)$ to $\check C_0(\mathcal U,\widehat{\mathcal F})$ and $\check C^0(\mathcal U,\mathcal F)$, we find that
\[
d_1 = \begin{bmatrix}
-1 & 0 & 1 \\ 1 & -1 & 0 \\ 0 & 1 & -1
\end{bmatrix}
\sim
\begin{bmatrix}
1 & 0 & -1 \\ 0 & 1 & -1 \\ 0 & 0 & 0
\end{bmatrix},
\hspace{1cm}
\delta^0 = \begin{bmatrix}
-1 & 1 & 0 \\ 0 & -1 & 1 \\ 1 & 0 & -1
\end{bmatrix}
\sim
\begin{bmatrix}
1 & 0 & -1 \\ 0 & 1 & -1 \\ 0 & 0 & 0
\end{bmatrix}.
\]
The Čech chain and cochain complexes are then
\[
0 \to \check C_1(\mathcal U,\widehat{\mathcal F}) \tov{d_1} \check C_0(\mathcal U,\widehat{\mathcal F}) \to 0,
\hspace{1cm}
0 \to \check C^0(\mathcal U,\mathcal F) \tov{\delta^0} \check C^1(\mathcal U,\mathcal F) \to 0,\]for which
\begin{align*}
H_1(\mathcal U,\widehat{\mathcal F}) & = \ker(d_1) = k,
& H^0(\mathcal U,\mathcal F) & = \ker(\delta^0) = k, \\
H_0(\mathcal U,\widehat{\mathcal F}) & = k^3/\im(d_1) = k^3/k^2 = k,
& H^1(\mathcal U,\mathcal F) & = k^3/\im(\delta^0) = k^3/k^2 = k.\end{align*}By the Čech-de Rham theorem, we know that the (co)homology groups should agree with the usual groups for $S^1$, as $\mathcal U$ was a good cover, which they do. Next we compute another example with a view towards persistent homology.

Definition: Let $X$ be a topological space and $f:X\to Y$ a map with $\mathcal U$ covering $f(X)$. The Leray sheaf $L^i$ of degree $i$ over $N_{\mathcal U}$ is defined by $L^i(\sigma) = H^i(f^{-1}(U_\sigma))$ and $L^i(\sigma\hookrightarrow \tau) = H^i(f^{-1}(U_\tau)\hookrightarrow f^{-1}(U_\sigma))$, whenever $\sigma$ is a face of $\tau$.

Theorem (Curry, Theorem 8.2.21): In the context above, if $N_{\mathcal U}$ is at most 1-dimensional, then for any $t\in \R$,
\[
H^i(f^{-1}(-\infty,t])\cong H^0((-\infty,t],L^i)\oplus H^1((-\infty,t],L^{i-1}).\]
The idea is to apply this theorem in a filtration, for different values of $t$, but in the example below we will have $t$ large enough so that $X\subset f^{-1}(-\infty,t]$.

Example: Let $f:S^1\to \R$ be a projection map, and let $X = f(S^1)$ with a cover $\mathcal U = \{U,V\}$ as below.
Note that although $f^{-1}(U)\cap f^{-1}(V)$ is not contractible, $U\cap V$ is, and the Čech cohomology will be over $\mathcal U\subset \R$, so we are fine in applying the Čech-de Rham theorem. It is immediate that the only non-zero Leray sheaves are $L^0$, for which
\[
L^0(\sigma_U) = k,\hspace{1cm}
L^0(\sigma_V) = k,\hspace{1cm}
L^0(\sigma_{U\cap V}) = k^2,\]hence $\check C^0(\mathcal U,L^0)=\check C^1(\mathcal U,L^0) = k^2$. Giving $\check C^0(\mathcal U,L^0)$ the ordered basis $(\sigma_U,\sigma_V)$ and noting the homology maps $H^0(f^{-1}(U)\hookrightarrow f^{-1}(U\cap V))$ and $H^0(f^{-1}(V)\hookrightarrow f^{-1}(U\cap V))$ are simply $1\mapsto (1,1)$, the \v Cech complex is
\[
0 \to \check C^0(\mathcal U,L^0) \tov{\left[\begin{smallmatrix}-1 & -1 \\ 1 & 1 \end{smallmatrix}\right]} \check C^1(\mathcal U,L^0) \to 0.
\]
Hence $H^0(\mathcal U,L^0)=\ker(\delta^0)=k$ and $H^1(\mathcal U,L^0)=k^2/\im(\delta^0)=k^2/k=k$, allowing us to conclude, using Curry's and the Čech--de Rham theorems, that
\begin{align*}
H^0(S^1) & \cong H^0(\mathcal U,L^0) \oplus H^1(\mathcal U,L^{-1}) = k\oplus 0 = k, \\
H^1(S^1) & \cong H^0(\mathcal U,L^1) \oplus H^1(\mathcal U,L^0) = 0\oplus k = k, \\
H^2(S^1) & \cong H^0(\mathcal U,L^2) \oplus H^1(\mathcal U,L^1) = 0\oplus 0=0,\end{align*}as expected.

References: Bott and Tu (Differential forms in algebraic topology, Section 10), Bredon (Sheaf theory, Section VI.4), Curry (Sheaves, cosheaves, and applications, Section 8)

Sunday, May 21, 2017

Categories and the TDA pipeline

 Conference topic

This post contains topics and ideas from ACAT at HIM, April 2017, as presented by Professor Ulrich Bauer (see slide 11 of his presentation, online at ulrich-bauer.org/persistence-bonn-talk.pdf). The central theme is to assign categories and functors to analyze the process
\[
\text{filtration}\ \longrightarrow\ \text{(co)homology}\ \longrightarrow\ \text{barcode.}
\hspace{3cm}(\text{pipe}) \] Remark: The categories we will use are below. For filtrations, we have the ordered reals (though any poset $P$ would work) and topological spaces:
\begin{align*}
R\ :\ & \Obj(R) = \R,  & \Top\ :\ & \Obj(\Top) = \{\text{topological spaces}\}, \\[5pt]
& \Hom(r,s) = \begin{cases}
\{r \mapsto s\}, & \text{ if } r\leqslant s, \\ \emptyset, & \text{ else,}
\end{cases} && \Hom(X,Y) = \{\text{functions }f:X\to Y\}.
\end{align*}
For (co)homology groups, we have the category of (framed) vector spaces. We write $V^n$ for $V^{\oplus n} = V\oplus V\oplus \cdots \oplus V$, and $e_n$ for a frame of $V^n$ (see below).
\begin{align*}
\Vect\ :\ & \Obj(\Vect) = \{V^{\oplus n}\ :\ 0\leqslant n< \infty\},\\
& \Hom(V^n,V^m) = \{\text{homomorphisms }f:V^n\to V^m\}, \\[5pt]
\Vect^{fr}\ :\ & \Obj(\Vect^{fr}) = \{V^n\times e^n\ :\ 0\leqslant n<\infty\}, \\
& \Hom(V^n\times e^n,V^m\times e^m) = \{\text{hom. }f:V^n\to V^m,\ g:e^n\to e^m,\ g\in \Mat(n,m)\}.
\end{align*}
Finally for barcodes, we have $\Delta$, the category of finite ordered sets, and its variants. A partial injective function, or matching $f:A\nrightarrow B$ is a bijection $A'\to B'$ for some $A'\subseteq A$, $B'\subseteq B$.
\begin{align*}
\Delta\ :\ & \Obj(\Delta) = \{[n]=(0,1,\dots,n)\ :\ 0\leqslant n<\infty\},\\
& \Hom([n],[m]) = \{ \text{order-preserving functions }f:[n]\to [m]\}, \\[5pt]
\Delta'\ :\
& \Obj(\Delta')= \{a=(a_0<a_1<\cdots<a_n)\ :\ a_i\in \Z_{\geqslant 0}, 0\leqslant n<\infty\},\\ & \Hom(a,b) = \{\text{order-preserving functions }f:a\to b\}, \\[5pt]
\Delta''\ :\
& \Obj(\Delta'')= \{a=(a_0<a_1<\cdots<a_n)\ :\ a_i\in \Z_{\geqslant 0}, 0\leqslant n<\infty\},\\ & \Hom(a,b) = \{\text{order-preserving partial injective functions }f:a\nrightarrow b\}.
\end{align*}

Definition: A frame $e$ of a vector space $V^n$ is equivalently:
  • an ordered basis of $V^n$,
  • a linear isomorphism $V^n\to V^n$, or
  • an element in the fiber of the principal rank $n$ frame bundle over a point.
Frames (of possibly different sizes) are related by full rank elements of $\Mat(n,m)$, which contains all $n\times m$ matrices over a given field.

Definition: Let $(P,\leqslant)$ be a poset. A (indexed topological) filtration is a functor $F:P\to \Top$, with
\[
\Hom(F(r),F(s)) = \begin{cases}
\{\iota:F(r) \hookrightarrow F(s)\}, & \text{ if }r\leqslant s, \\ \emptyset, & \text{ else,}
\end{cases}
\]
where $\iota$ is the inclusion map. That is, we require $F(r)\subseteq F(s)$ whenever $r\leqslant s$.

Definition: A persistence module is the composition of functors $M_i:P \tov{F} \Top \tov{H_i} \Vect$.

Homology will be taken over some field $k$. A framed persistence module is the same composition as above, but mapping into $\Vect^{fr}$ instead. The framing is chosen to describe how many different vector spaces have already been encountered in the filtration.

Definition: A barcode is a collection of intervals of $\R$. It may also be viewed as the composition of functors $B_i:P\tov{F}\Top\tov{H_i}\Vect \tov{\dim}\Delta$.

Similarly as above, we may talk about a framed barcode by instead mapping into $\Vect^{fr}$ and then to $\Delta''$, keeping track of which vector spaces we have already encountered. This allows us to interpret the process $(\text{pipe})$ in two different ways. First we have the unframed approach
\[
\begin{array}{r c c c l}
\Top & \to & \Vect & \to & \Delta, \\
X_t & \mapsto & H_i(X_t;k) & \mapsto & [\dim(H_i(X_t;k))].
\end{array}
\]
The problem here is interpreting the inclusion $X_t\hookrightarrow X_{t'}$ as a map in $\Delta$, for instance, in the case when $H_i(X_t;k)\cong H_i(X_{t'};k)$, but $H_i(X_t\hookrightarrow X_{t'}) \neq \id$. To fix this, we have the framed interpretation of $(\text{pipe})$
\[
\begin{array}{r c c c l}
\Top & \to & \Vect^{fr} & \to & \Delta'', \\
X_t & \mapsto & H_i(X_t;k)\times e & \mapsto & [e].
\end{array}
\]
The first map produces a frame $e$ of size $n$, where $n$ is the total number of different vector spaces encountered over all $t'\leqslant t$, by setting the first $\dim(H_i(X_t;k))$ coordinates to be the appropriate ones, and then the rest. This is done with the second map to $\Delta''$ in mind, as the size of $[e]$ is $\dim(H_i(X_t;k))$, with only the first $\dim(H_i(X_t;k))$ basis vectors taken from $e$. As usual, these maps are best understood by example.

Example: Given the closed curve $X$ in $\R^2$ below, let $\varphi:X\to \R$ be the height map from the line 0, with $X_i=\varphi^{-1}(-\infty,i]$, for $i=r,s,t,u,v$. Let $e_i$ be the standard $i$th basis vector in $\R^N$.


Remark: This seems to make $(\text{pipe})$ functorial, as the maps $X_t\hookrightarrow X_{t'}$ may be naturally viewed as partial injective functions in $\Delta''$, to account for the problem mentioned with the unframed interpretation. However, we have traded locality for functoriality, as the image of $X_t$ in $\Delta''$ can not be calculated without having calculated $X_{t'}$ for all $t'<t$.

References: Bauer (Algebraic perspectives of persistence), Bauer and Lesnick (Induced matchings and the algebraic stability of persistence barcodes)

Sunday, April 9, 2017

Distance and persistence diagrams

We assume we have a Morse-type function $f:X\to \R$, whose associated persistence diagram is $D(f) = \{f_1,\dots,f_n\}$, which we will think of as a collection of persistence birth-death pairs $f_i$ in the extended real plane $(\R^*)^2$. If the topological space $X$ was filtered without such a function, define one by $x\mapsto i$ where $i$ is the smallest index such that $x\in X_i$.

Definition: Let $f,g:X\to \R$ be two Morse-type functions with associated persistence diagrams $D(f)$, $D(g)$. The (Wasserstein) $q$-distance between $f$ and $g$ is defined as
\[
W_q(f,g) := \inf_{\sigma\in S_n} \left(\sum_{i=1}^n ||f_i-g_{\sigma(i)}||^q_\infty\right)^{1/q}.\]The bottleneck distance between $f$ and $g$ is
\begin{align*}
W_\infty(f,g) & := \lim_{q\to\infty} \left\{W_q(f,g)\right\} & (\text{limit of $q$-distances}) \\
& = \max_i\left\{||f_i-g_{\sigma(i)}||_\infty\ :\ \sigma = \arg W_q(f,g)\right\}. & (\text{length of longest edge in best matching})
\end{align*}
Example: Consider the torus of inner and outer radius 1 embedded in the natural way. Left $f,g:T^2\to \R$ be height functions of the torus, but projecting to the planes $z=-2$ and $z=x-4$, respectively. Note all critical points occur on the plane $y=0$. Below, the slice at this plane is given (distances along planes from the first critical point are shown), as well as $D(f), D(g)$ on the same diagram (degrees of homology classes are shown).
For $D(f) = \{(0,\infty),(2,\infty),(4,\infty),(6,\infty)\}$ and $D(g) = \{(0,\infty), (2,\infty),(2\sqrt 2,\infty),(2+2\sqrt 2,\infty)\}$, it is clear that $\sigma=\id$ will be the best matching. The $q$-distance between $f$ and $g$ is then given by
\[
W_q(f,g) = \left(||(4,\infty)-(2\sqrt 2,\infty)||^q_\infty+||(6,\infty)-(2+2\sqrt 2,\infty)||^q_\infty\right)^{1/q} = 2^{1/q}(4-2\sqrt 2),\]with bottleneck distance $4-2\sqrt2$. However, we would like to say that these two functions are the same in some way, as no critical points are switched, and extended persistence allows us to do that. The decomposed extended persistence module is given below.
The extended persistence classes have length 3 ($(1,4)$ for the 0-class, $(4,1)$ for the 2-class) and 1 ($(2,3)$ and $(3,2)$ for the 1-classes), no matter if we use $f$ or $g$ to define the $X_i$ and $X^j$.

Remark: An interesting question to ask is how long does it take for an essential homology class to be built? Some things to keep in mind while resolving this question:
  • The 0-class case should be treated spearately because of reduced homology
  • A class may be encountered several times (like the first 1-class in the example above)
  • What does it mean for a class to be "begin being built" (this is probably the key)
  • A class is certainly "done being built" (the first time) when it first appears in the persistence module
It seems that the extended persistence pair gives the length between when the class is "done being built" the first time $f$ encounters it fully and when it "begins to be built" the last time $f$ encounters it.

The bottleneck distance satisfies a nice stability condition for tame functions $f:X\to \R$, which have finite dimensional homology groups $H_k(f^{-1}(-\infty,a])$ for all $a\in \R$.

Theorem (Cohen-Steiner, Edelsbrunner, Harer 2007): Let $f,g:X\to \R$ be tame. Then $W_\infty(f,g) \leqslant ||f-g||_\infty$.

This bound is reached when $g=f+c$ for some constant $c$, and the Wasserstein distance is 0 when $g(p_i)=f(p_i)$ for all critical values. Hence it seems without stronger assumptions about $f$ and $g$, this bound is as good as we can get.

References: Edelsbrunner and Morozov (Persistent homology: theory and practice), Cohen-Steiner, Edelsbrunner and Harer (Stability of persistence diagrams)

Monday, March 27, 2017

Revisiting persistent homology

Here we revisit and expand on persistent homology, previously in the post "Persistent homology (an example)," 2016-05-19. All homology, except where noted, will be over a field $k$, and $X$ will be a topological space. Often a Morse-type function $f:X\to \R$ is introduced along with $X$, but we will try to take a more abstract view.

Definition: The space $X$ may be described as a filtered space with a filtration of sublevel sets
\[ \emptyset = X_0 \subseteq X_1\subseteq \cdots \subseteq X_m = X, \] whose persistence module is the (not necessarily exact) sequence
\[ 0 = H(X_0) \to H(X_1)\to\cdots \to H(X_m) = H(X) \] of homology groups of the filtration.

Remark: Every persistence module may be uniquely decomposed as a direct sum of sequences $0\to k\to \cdots\to k\to 0$, where every map is $\id$, except the first and last. The indices at which each sequence in the summand has its first and last non-zero map are called the birth and death of the homology class represented by the sequence.

In some cases a homology class may not die, so we consider the extended persistence module to make everything finite. We introduce the superlevel sets $X^i = X\setminus X_i$. If $f$ was our Morse-type function for $X$, with critical points $p_1<\cdots<p_m$, then for $t_0<p_1<t_1<\cdots<p_m<t_m$, we set $X_i = f^{-1}(-\infty,t_i]$ and $X^i = f^{-1}[t_i,\infty)$. The extended persistence module of $X$ is
\[
0 = H_k(X_0) \to H_k(X_1)\to\cdots \to H_k(X_m) \to H_k(X,X^m) \to H_k(X,X^{m-1}) \to \cdots \to H_k(X,X^0)=0.
\]
Definition: The persistence of a homology class in a persistence module conveys the idea of how long it is alive, presented by a persistence pair.
The persistence of all homology classes in a persistence module is often presented in a persistence diagram, the collection of persistence pairs $(i,j)$, or $(p_i,p_j)$ or $(f(p_i),f(p_j))$, as desired; or a linear barcode, the collection of persistence pairs $(i,j)$ as intervals $[i,j]$, ordered vertically. 

Example: Let $X = T^n=(S^1)^n$ be the $n$-torus. One filtration of $X$ is $X_0=\emptyset$ and $X_i = T^i$ for $1\leqslant i\leqslant n$. Note that $H_k(T^n,T^n\setminus X_n)=H_k(T^n)$ and $H_k(T^n,T^n\setminus X_0)=H_k(\emptyset)$. The first $n+1$ modules of the extended persistence module at level $k$ split into $\binom nk$ sequences, as $H_k(T^n) = \Z^{\binom nk}$. Geometric considerations allow $X^i = T^n\setminus T^i$ to be simplified in some cases. For instance, when $n=3$ and $k=0,1$ we have that $\widetilde H_k(T^3,T^3\setminus T^2)\cong \widetilde H_k(T^3,T^2) \cong \widetilde H_k(T^3/T^2)$, and knowing that $X^1=T^3\setminus T^1\simeq (S^1\vee S^1)\times S^1$, the relevant part of the long exact sequence for relative homology is

The two 1-cycles from $S^1\vee S^1\subset X^1$ map via $f$ to the same 1-cycle in $T^3$, hence $\text{im}(g)=\Z^2$. By exactness, $\text{ker}(g)=\Z^2$, and as $g$ is surjective, $A=\Z$.  Hence the extended persistence $k$-modules decompose as 
The persistence pairs are $(1,3)$ with multiplicity 2 and $(2,3)$, $(3,1)$ with multiplicity 1. The persistence diagrams and barcodes of the degree 0 and 1 homology classes are given below.
The diagonal $y=x$ is often given to indicate how short a lifespan a class has. Barcodes are usually not given for extended persistence diagrams, as length of a class (birth to death) is less important than position (above or below the diagonal).

Now we consider some generalizations of the ideas presented above.

Remark: A filtration can also be viewed as a diagram $X_0 \to X_1 \to \cdots \to X_m$, where each arrow is the inclusion map. We could generalize and consider a zigzag diagram, a sequence $X_0 \leftrightarrow X_1 \leftrightarrow \cdots \leftrightarrow X_m$, where $\leftrightarrow$ represents either $\to$ or $\leftarrow$. Homology can be applied and the resulting seuquence can also be uniquely decomposed into summands $k \leftrightarrow \cdots \leftrightarrow k$ where every arrow is the identity, giving zigzag persistent homology.

Remark: A filtration could also be viewed as a functor $F:\{0,\dots,m\}\to \text{Top}$, where $F(i)=X_i$ and $F(i\to j)$, for $j\>i$, is the composition of maps $X_i\to \cdots \to X_j$. Hence the degree-$k$ persistent homology of $X_i$ can be defined as the image of the maps $H_kF(i\to j)$, for all $j\>i$, and the functor $H_kF:\{0,\dots,m\}\to \text{Vec}$ may be viewed as the $k$th persistence module. This is a categorification of persistent homology.

Remark: A space $X$ can be filtered in several different ways. A multifiltration $X_\alpha$, for $\alpha$ a multi-index, is a collection of filtrations such that fixing all but one of the indices in $\alpha$ gives a (one-dimensional) filtration of $X$. The multidimensional persistence of $X_\alpha$ is a $|\alpha|$-dimensional grid of homology groups, with the barcode generalizing to the rank invariant, a map on the grid.

Another generalization, viewing filtrations as quivers, will not be discussed here, but rather presented as a separate post later.

References: Edelsbrunner and Morozov (Persistent homology: theory and practice), Carlsson, de Silva, and Morozov (Zigzag persistent homology and real-valued functions), Bubenik and Scott (Categorification of persistent homology), Carlsson and Zomorodian (The theory of multidimensional persistence)

Wednesday, March 15, 2017

Lengths of paths on projective varieties

This post contains calculations that continue on the ideas from the previous post "Fubini--Study metric," 2017-03-05. First we suppose that $\gamma$ lies on a curve $C\subset \P^2$, with the curve defined as the zero locus of a polynomial $P$. Taking the derivative of $P$ on $\C^2$ gives $P_{z_1}dz_1 + P_{z_2}dz_2=0$, which can be manipulated to give
\begin{align*}
dz_2 & = \frac{-P_{z_1}}{P_{z_2}}dz_1, & \frac\dy{\dy z_2} & = \frac{-P_{z_2}}{P_{z_1}} \frac\dy{\dy z_1},\\
d\overline{z_2} & = \frac{-\overline{P_{z_1}}}{\overline{P_{z_2}}}d\overline{z_1}, & \frac\dy{\dy \overline{z_2}} & = \frac{-\overline{P_{z_2}}}{\overline{P_{z_1}}} \frac\dy{\dy \overline{z_1}}.
\end{align*}
Using the above and an equation from the mentioned post, for $e = \frac\dy{\dy z_1} + \frac\dy{\dy \overline {z_1}} + \frac\dy{\dy z_2} + \frac\dy{\dy \overline{z_2}}$, we get
\begin{align*}
\frac{d \gamma}{dt} & = \left(\overline\gamma_1'-\frac{P_{z_2}}{P_{z_1}}\overline \gamma_2'\right)\frac\dy{\dy z_1} + \left(\gamma_1' - \frac{\overline{P_{z_2}}}{\overline{P_{z_1}}}\gamma_2'\right)\frac\dy{\dy \overline{z_1}} \\
\left(\sum_{k,\ell=1}^2\chi_{k\ell}(\gamma)dz_k\wedge d\overline{z_\ell}\right)(e,e) & = 1+|\gamma_2|^2 + \frac{\overline{P_{z_1}}}{\overline{P_{z_2}}} \overline \gamma_1\gamma_2 + \frac{P_{z_1}}{P_{z_2}}\gamma_1\overline\gamma_2 + \left|\frac{P_{z_1}}{P_{z_2}}\right|^2 \left(1+|\gamma_1|^2\right) = 1 +\left|\frac{P_{z_1}}{P_{z_2}}\right|^2 + \left|\frac{P_{z_1}}{P_{z_2}}\gamma_1+\gamma_2\right|^2, \\
(dz_1\wedge d\overline{z_1})\left(\frac{d\gamma}{dt},I\frac{d\gamma}{dt}\right) & = \det
\begin{bmatrix}
\overline\gamma_1'-\frac{P_{z_2}}{P_{z_1}}\overline \gamma_2' & i\left(\overline\gamma_1'-\frac{P_{z_2}}{P_{z_1}}\overline \gamma_2'\right) \\[5pt]
\gamma_1' - \frac{\overline{P_{z_2}}}{\overline{P_{z_1}}}\gamma_2' & -i\left(\gamma_1' - \frac{\overline{P_{z_2}}}{\overline{P_{z_1}}}\gamma_2'\right)
\end{bmatrix} = -2i \left|\gamma_1' - \frac{\overline{P_{z_2}}}{\overline{P_{z_1}}}\gamma_2'\right|^2.
\end{align*}
Hence
\[
g\left(\frac{d\gamma}{dt},\frac{d\gamma}{dt}\right) = \frac{\left(1 +\left|\frac{P_{z_1}}{P_{z_2}}\right|^2 + \left|\frac{P_{z_1}}{P_{z_2}}\gamma_1+\gamma_2\right|^2\right)\left|\gamma_1' - \frac{\overline{P_{z_2}}}{\overline{P_{z_1}}}\gamma_2'\right|^2}{\pi\left(1+|\gamma_1|^2+|\gamma_2|^2\right)^2}.
\]

Now we move to $\P^n$, and consider $X\subset \P^n$ a complete intersection of codimension $r$, or the zero set of polynomials $P_1=0,\dots,P_r=0$. Expressing some covectors in terms of others reduces the number of determinants we calculated above from $2n$ to $2(n-r)$. Then
\begin{align*}
P_{1,z_1}dz_1 + \cdots + P_{1,z_n}dz_n & = 0, & dz_n & = c_{n,1}dz_1 + \cdots + c_{n,n-r}dz_{n-r}, \\
& \ \ \vdots & & \ \ \vdots \\
P_{r,z_1}dz_1 + \cdots + P_{r,z_n}dz_n & = 0, & dz_{n-r+1} & = c_{n-r+1,1}dz_1 + \cdots + c_{n-r+1,n-r}dz_{n-r},
\end{align*}
for the $c_{i,j}$ some combinations of the $P_{k,z_\ell}$. By orthonormality of the basis vectors, and assuming that the $c_{i,j}$ are all non-zero, we find
\[
\frac\dy{\dy z_i} = \sum_{j=1}^{n-r} \frac1{(n-r)c_{i,j}}\frac\dy{\dy z_j},\hspace{2cm}
\frac\dy{\dy \overline{z_i}} = \sum_{j=1}^{n-r} \frac1{(n-r)\overline{c_{i,j}}}\frac\dy{\dy \overline{z_j}},
\]
for all integers $n-r<i\leqslant n$. This allows us to rewrite the path derivative as
\begin{align*}
\frac{d\gamma}{dt} & = \sum_{i=1}^n \overline \gamma_i'\frac\dy{\dy z_i} +\gamma_i'\frac\dy{\dy \overline{z_i}} \\
& = \sum_{i=1}^{n-r} \left(\overline \gamma_i'\frac\dy{\dy z_i} +\gamma_i'\frac\dy{\dy \overline{z_i}}\right) +\sum_{i=n-r+1}^n \left(\sum_{j=1}^{n-r} \frac{\overline \gamma_i'}{(n-r)c_{i,j}}\frac\dy{\dy z_j} + \sum_{j=1}^{n-r} \frac{\gamma_i'}{(n-r)\overline{c_{i,j}}}\frac\dy{\dy \overline{z_j}}\right) \\
& = \sum_{i=1}^{n-r}\left(\overline\gamma_i' + \sum_{j=n-r+1}^n \frac{\overline\gamma_j'}{(n-r)c_{j,i}}\right)\frac\dy{\dy z_i} + \left(\gamma_i'+\sum_{j=n-r+1}^n \frac{\gamma_j'}{(n-r)\overline{c_{j,i}}}\right)\frac\dy{\dy \overline{z_i}}.
\end{align*}

In the case of a curve in $\P^n$, when $r=n-1$, let $c_{1,1}=1$ and  $e = \frac\dy{\dy z_1} + \frac\dy{\dy \overline {z_1}} + \cdots + \frac\dy{\dy z_n} + \frac\dy{\dy \overline{z_n}}$ to get
\begin{align*}
 \frac{d\gamma}{dt} & = \left(\sum_{j=1}^n \frac{\overline\gamma_j'}{c_{j1}}\right)\frac\dy{\dy z_1} + \left(\sum_{j=1}^n \frac{\gamma_j'}{\overline{c_{j1}}}\right)\frac\dy{\dy \overline{z_1}},\\
 \left(\sum_{k,\ell=1}^n\chi_{k\ell}(\gamma)dz_k\wedge d\overline{z_\ell}\right)(e,e) & = \sum_{k,\ell=1}^n \left(1+\sum_{i=1}^n |\gamma_i|^2\right)\delta_{k\ell} - \overline{\gamma_kc_{\ell1}}\gamma_\ell c_{k1}, \\
(dz_1\wedge d\overline{z_1})\left(\frac{d\gamma}{dt},I\frac{d\gamma}{dt}\right) & = \det
\begin{bmatrix}
\sum_{j=1}^n \frac{\overline\gamma_j'}{c_{j1}} & i \sum_{j=1}^n \frac{\overline\gamma_j'}{c_{j1}} \\[5pt]
\sum_{j=1}^n \frac{\gamma_j'}{\overline{c_{j1}}} & -i\sum_{j=1}^n \frac{\gamma_j'}{\overline{c_{j1}}}
\end{bmatrix} = -2i \left|\sum_{j=1}^n \frac{\gamma_j'}{\overline{c_{j1}}}\right|^2.
\end{align*}
Hence
\[
g\left(\frac{d\gamma}{dt},\frac{d\gamma}{dt}\right) = \frac{\left(\sum_{k,\ell=1}^n \left(1+\sum_{i=1}^n |\gamma_i|^2\right)\delta_{k\ell} - \overline{\gamma_kc_{\ell1}}\gamma_\ell c_{k1}\right)\left|\sum_{j=1}^n \frac{\gamma_j'}{\overline{c_{j1}}}\right|^2}{\pi \left(1+\sum_{i=1}^n |\gamma_i|^2\right)^2}.
\]
The terms $\overline{\gamma_kc_{\ell1}}\gamma_\ell c_{k1}$ may be rearranged into terms $|\gamma_kc_{\ell1}-\gamma_\ell c_{k1}|^2$, but it does not provide any enlightening results, similarly to the rest of this post.

Sunday, March 12, 2017

Optimal sampling and arrangement on an n-sphere

The goal of this post is to create a "good" algorithm for sampling and arranging points on the $n$-sphere. We find the $\epsilon$-covering number of the $n$-sphere and arrange the points in a Hamiltonian path of small pairwise consecutive distance. This post relates to several previous posts:
Thanks to Professor Cheng Ouyang for a helpful discussion.
Although rejection sampling is a standard method to sample points uniformly on the $n$-sphere (sample points uniformly on the $(n+1)$-cube, check if the norm is less than or equal to 1, if it is, normalize the point to the $n$-sphere), this is not best for our scenario (the arranging part). A better suited approach is to take a parametrization $f$ from an $n$-cube into $\R^{n+1}$ of the unit $n$-sphere. We use
\[
\begin{array}{r c l}
f\ :\ [0,2\pi]^{n-1}\times[0,\pi) & \to & \R^{n+1}, \\
(\alpha_1,\dots,\alpha_n) & \mapsto & \big(\cos(\alpha_1), \\ && \sin(\alpha_1)\cos(\alpha_2),\\ && \vdots\\ && \sin(\alpha_1)\cdots\sin(\alpha_{n-1})\cos(\alpha_n), \\ && \sin(\alpha_1)\cdots\sin(\alpha_{n-1})\sin(\alpha_n)\big).
\end{array}
\]
Adapting the main Proposition from the "Sampling points" post, we have following proposition.

Proposition: The probability density function $g_n:[0,2\pi]^{n-1}\times[0,\pi] \to \R_{\geqslant0}$, defined as
\[
g_n(\alpha_1,\dots,\alpha_n)=\frac{\prod_{k=1}^{n-1}|\sin^{n-k}(\alpha_k)|}{2^{n-1}\pi\prod_{k=1}^{n-1}\int_0^\pi \sin^{n-k}(\alpha_k)\ d\alpha_k},
\]
is uniform on the natural embedding of the unit $n$-sphere $S^n$ in $\R^{n+1}$.

The denominator of $g_n$ does not seem to have closed form, though the ratios between consecutive terms are given by the denominators of $\Gamma(\frac{\ell+3}2)/\Gamma(\frac{\ell+2}2)$ and $\ell!!/(\ell+1)!!$, with appropriate powers of $\pi$. The first few terms of this sequence are
\[
4\pi,4\pi^2,\frac{32}3\pi^2,8\pi^3,\frac{256}{15}\pi^3,\frac{32}3\pi^4,\frac{2048}{105}\pi^4,\dots.
\]
Next, recall the $n$-surface of an $n$-sphere and $k$-volume of a $k$-ball are
\[
\text{surf}(n,r) = \frac{2\pi^{(n+1)/2}r^n}{\Gamma((n+1)/2)},\hspace{2cm}
\text{vol}(k,r) = \frac{\pi^{k/2}r^k}{\Gamma((k+2)/2)}.
\]
Adapting Proposition 3.2 of Niyogi, Smale and Weinberger, similarly to the "Reconstructing a manifold" post, we have the following proposition.

Proposition: A collection of $N$ points sampled uniformly from $S^n$ is $\epsilon$-dense in $S^n$ with certainty $1-\delta$, given
\[
N \geqslant \frac{\text{surf}(n,1)}{(1-\frac{\epsilon^2}{16})^{n/2}\text{vol}(n,\frac\epsilon2)}\log\left(\frac{\text{surf}(n,1)}{\delta(1-\frac{\epsilon^2}{64})^{n/2}\text{vol}(n,\frac\epsilon4)}\right).
\] Bauer and Polthier sample points "evenly" on the 2-hemisphere and then connect them with a winding path, which winds around the hemisphere 6 times. Generalizing this approach, suppose we wanted to have a path that wind around the $n$-sphere $\ell$ times and has a small distance between consecutive vertices of the path. The following algorithm describes one way of doing this.

Algorithm: SpherePathFinder
Input: Positive integers $n,\ell$ and real numbers $\epsilon,\delta\in (0,1)$
Output: A path on $S^n$ that winds around $\ell$ times, whose vertices are $\epsilon$-dense on $S^n$ with certainty $1-\delta$

Sample $\lceil N\rceil$ points on $[0,2\pi]^{n-1}\times[0,\pi]$ according to $g_n$ in a set $X$
Initiate an empty path $P=()$
for $k_n\in\{1,\dots,\ell\}$:
    for $k_{n-1}\in\{1,\dots,2\ell\}$:
       $\vdots$
           for $k_2\in\{1,\dots,2\ell\}$:
               Set $L=\{\alpha\in X\ :\ \alpha_n\in[(k_n-1)\frac\pi\ell,k_n\frac\pi\ell], \alpha_{n-t}\in[(k_{n-t}-1)\frac{2\pi}{2\ell},k_{n-t}\frac{2\pi}{2\ell}],1<t<n-1\}$
               Order $L$ by increasing values of $\alpha_1$
               Append $L$ to the end of $P$ and set $X=X\setminus L$
Return $P$

Since the sample space is $[0,2\pi]^{n-1}\times[0,\pi]$, finding the appropriate points in the nested for loop is very easy. We conclude with an experimental example with $n=2$, $\ell=12$, $\epsilon=.1$, and $\delta=.01$. We must sample at least 87 points, and we do so below.

Example: To demonstrate the results of the SpherePathFinder algorithm, we sample 100, 300, and 600 points on the 2-sphere. Only the paths are shown, which wind around 12 times. The range of distances $d$ between consecutive ordered points is also given, with an average $\widetilde d$.


As $N$ increases and the winding number stays the same, the path gets more and more jagged. To make the path smoother, we would need to increase the number of times the path winds around the sphere.

References: Bauer and Polthier (Detection of Planar Regions in Volume Data for Topology Optimization), Niyogi, Smale, and Weinberger (Finding the homology of submanifolds with high confidence from random samples), Sloane (OEIS A036069, A004731), Wikipedia (article "N-sphere")

Sunday, March 5, 2017

The Fubini-Study metric and length in projective space

In this post we inspect how the Fubini-Study metric works and compute an example. Professor Mihai Paun for helpful discussions. Recall that from projective space $\P^n$ there are natural maps
\[
[x_0:x_1:\cdots:x_n]\tov{\vp_i}\left(\frac{x_0}{x_i},\dots,\widehat{\frac{x_i}{x_i}},\dots,\frac{x_n}{x_i}\right)
\]
for $i=0,\dots,n$. The maps land in $\C^n$ with coordinates $(z_1,z_2,\dots,z_n)$. We use $\vp_0$ as the main map, and conflate notation for objects in $\P^n$ and in $\C^n$ under $\vp_0$. Most of this post deals with the $n=2$ case.


The metric


The metric used on $\P^n$ is the Fubini-Study metric. Directly from Section 3.1 of Huybrechts, for $n=2$ the associated differential 2-form and its image in $\C^2$ are
\begin{align*}
\omega & = \frac i{2\pi}\partial \bar\partial \log\left(1+\left|\frac{x_1}{x_0}\right|^2+\left|\frac{x_2}{x_0}\right|^2\right), \\
\vp_0(\omega) & = \frac i{2\pi}\partial \bar\partial \log\left(1+\left|z_1\right|^2+\left|z_2\right|^2\right) \\
& =  \underbrace{\frac{i}{2\pi (1+|z_1|^2+|z_2|^2)^2}}_{\lambda_2}\sum_{k,\ell=1}^2\underbrace{(1+|z_1|^2+|z_2|^2)\delta_{k\ell} -\overline{z_k}z_\ell}_{\chi_{k\ell}}dz_k\wedge d\overline{z_\ell}. \hspace{1cm} (1)
\end{align*}
A Hermitian metric on a complex manifold $X$ may be described as a 2-tensor $h=g-i\omega$, where $g$ is a Riemannian metric (also a 2-tensor) on the underlying real manifold and $\omega$ is a Kahler form, a 2-form. As in Lemma 3.3 of Voisin, the relationship between $g$ and $\omega$ is given by
\[
g(u,v)=\omega(u,Iv)=\omega(Iu,v), \hspace{1cm} (2)
\]
where $I:T_xX\to T_xX$ is a tangent space endomorphism defined by
\[
\begin{array}{r c l}
I|_{T^{1,0}_xX} & = & i\cdot \id, \\
\frac{\dy}{\dy z_i} & \mapsto & i\frac{\dy}{\dy z_i},
\end{array}
\hspace{1cm}
\begin{array}{r c l}
I|_{T^{0,1}_xX} & = & -i\cdot \id, \\
\frac{\dy}{\dy \overline{z_i}} & \mapsto & -i\frac{\dy}{\dy \overline{z_i}},
\end{array}
\]
as in Proposition 1.3.1 of Huybrechts.

An application


Let $\gamma:[0,1]\to \C^2$ be a path, described as $\gamma(t)=(\gamma_1(t),\gamma_2(t))$. The derivative of $\gamma$ with respect to $t$, in the basis $\frac{\dy}{\dy z_1}$, $\frac{\dy}{\dy \overline{z_1}}$, $\frac{\dy}{\dy z_2}$, $\frac{\dy}{\dy \overline{z_2}}$ is given by
\[
\frac{d\gamma_1}{dt} = \frac{du_1}{dt}\frac\dy{\dy x_1} + i\frac{dv_1}{dt}\frac\dy{\dy y_1} = \frac{du_1}{dt}\left(\frac\dy{\dy \overline{z_1}}+\frac\dy{\dy z_1}\right) + i\frac{dv_1}{dt}\left(\frac\dy{\dy \overline{z_1}} -\frac{\dy}{\dy z_1}\right) = \underbrace{\left(\frac{du_1}{dt} + i\frac{dv_1}{dt}\right)}_{\gamma_1'}\frac\dy{\dy \overline {z_1}} + \underbrace{\left(\frac{du_1}{dt}-i\frac{dv_1}{dt}\right)}_{\overline \gamma_1'}\frac\dy{\dy z_1},\]
and analogously for $\gamma_2$. Hence
\[
\frac{d\gamma}{dt} =
\overline \gamma_1'\frac\dy{\dy z_1} + \gamma_1'\frac\dy{\dy \overline{z_1}} + \overline \gamma_2' \frac\dy{\dy z_2} + \gamma_2' \frac{\dy}{\dy \overline{z_2}}. \hspace{1cm} (3)
\]
The length of $\gamma$ is
\[
\int_0^1\sqrt{g\left(\frac{d\gamma}{dt},\frac{d\gamma}{dt}\right)}\ dt = \int_0^1\sqrt{\omega\left(\frac{d\gamma}{dt},I\frac{d\gamma}{dt}\right)}\ dt,
\]
using equation (2). Recall that the pairing of vectors with covectors is given by\[
\left(d\alpha_1\wedge \cdots \wedge d\alpha_n\right)\left(\frac\dy{\dy \beta_1},\dots,\frac\dy{\dy \beta_n}\right) = \det\begin{bmatrix}
d\alpha_1\frac\dy{\dy \beta_1} & d\alpha_1\frac{\dy}{\dy \beta_2} & \cdots & d\alpha_1\frac\dy{\dy \beta_n} \\
d\alpha_2\frac\dy{\dy \beta_1} & d\alpha_2\frac{\dy}{\dy \beta_2} & \cdots & d\alpha_2\frac\dy{\dy \beta_n} \\
\vdots & \vdots & \ddots & \vdots \\
d\alpha_n\frac\dy{\dy \beta_1} & d\alpha_n\frac{\dy}{\dy \beta_2} & \cdots & d\alpha_n\frac\dy{\dy \beta_n}
\end{bmatrix}
 \ \ = \ \
\det\left(d\alpha_i\frac\dy{\dy \beta_j}\right),
\]
for $\alpha_i,\beta_j$ a basis of the underlying real manifold (as in the previous post "Vector fields," 2016-10-10). The components of the vector (3) may be viewed as given in directions $z_1,\overline{z_1}, z_2,\overline{z_2}$, respectively, which also indicates how the coefficient functions $\chi_{k\ell}$ act on (3). Apply the definition of $\omega$ from equation (1), and note that we are always at the tangent space to the point $\gamma(t)=(\gamma_1(t),\gamma_2(t))$, to get that
\begin{align*}
& \omega\left(\frac{d \gamma}{dt},I\frac{d\gamma}{dt}\right) \\
& = \lambda_2(\gamma(t)) \sum_{k,\ell=1}^2 \chi_{k\ell}(\gamma(t)) dz_k\wedge d\overline{z_\ell}\left(\overline \gamma_1'\frac\dy{\dy z_1} + \gamma_1'\frac\dy{\dy \overline{z_1}} + \overline \gamma_2' \frac\dy{\dy z_2} + \gamma_2' \frac{\dy}{\dy \overline{z_2}}, i\overline \gamma_1'\frac\dy{\dy z_1} - i\gamma_1'\frac\dy{\dy \overline{z_1}} + i\overline \gamma_2' \frac\dy{\dy z_2} -i\gamma_2' \frac{\dy}{\dy \overline{z_2}}\right) \\
& = \lambda_2(\gamma(t)) \sum_{k,\ell=1}^2 \chi_{k\ell}(\gamma(t))\det
\begin{bmatrix}
\overline \gamma_k'(t) & i\overline \gamma_k'(t) \\[5pt] \gamma_\ell'(t) & -i\gamma_\ell'(t)
\end{bmatrix} \\
& = \frac{(1+|\gamma_2(t)|^2)|\gamma_1'(t)|^2 - \overline\gamma_1(t)\gamma_2(t)\overline\gamma_1'(t)\gamma_2'(t) - \overline\gamma_2(t)\gamma_1(t)\overline \gamma_2'(t)\gamma_1'(t) + (1+|\gamma_1(t)|^2) |\gamma_2'(t)|^2}{\pi\left(1+\left|\gamma_1(t)\right|^2+\left|\gamma_2(t)\right|^2\right)^2}.\end{align*}
Unfortunately this expression does not simplify too much. In $\P^n$, with $\gamma = (\gamma_1,\dots,\gamma_n):[0,1]\to \C^n$, we have that
\[
g\left(\frac{d \gamma}{dt},\frac{d\gamma}{dt}\right) = \lambda_n(\gamma(t)) \sum_{k,\ell=1}^n \chi_{k\ell}(\gamma(t))\det
\begin{bmatrix}
\overline \gamma_k'(t) & i\overline \gamma_k'(t) \\[5pt] \gamma_\ell'(t) & -i\gamma_\ell'(t)
\end{bmatrix}.
\]

An example


Here we compute the distance between two points in $\P^2$. Let $\gamma$ be the straight line segment connecting $p=[p_0:p_1:p_2]$ and $q=[q_0:q_1:q_2]$. The word "straight" is used loosely, and means the segment may be parametrized as
\[
\gamma(t) = [(1-t)p_0+tq_0:(1-t)p_1+tq_1:(1-t)p_2+tq_2],
\]
so $\gamma(0)=p$ and $\gamma(1)=q$. The image of $\gamma$ under $\vp_0$ and its derivative are given by
\[
\vp_0(\gamma(t)) = \left(\frac{(1-t)p_1+tq_1}{(1-t)p_0+tq_0}, \frac{(1-t)p_2+tq_2}{(1-t)p_0+tq_0}\right) = (\gamma_1,\gamma_2),
\hspace{2cm}
\gamma_i' = \frac{q_ip_0-q_0p_i}{((1-t)p_0+tq_0)^2}.
\]
If, for example, $p=[1:1:0]$ and $q=[1:0:1]$, then
\[
\text{length}(\gamma) = \frac{3}{4\pi}\int_0^1\frac1{(t^2-t+1)^2}\ dt = \frac{9+2\pi\sqrt 3}{18\pi}.
\]

A further goal is to consider the path $\gamma$ as lying on a projective variety, beginning with a complete intersection. This would allow some of the $dz_i$ to be expressed in terms of other $dz_j$.

References: Huybrechts (Complex geometry, Section 3.1), Voisin (Hodge theory and complex algebraic geometry 1, Chapter 3.1), Wells (Differential analysis on complex manifolds, Chapter V.4)