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)