# On a Subset Metric

Richard Castro  Richard Castro
Department of Mathematics and Statistics
San Diego State University
5500 Campanile Drive, San Diego, 92182, CA, USA<EMAIL_ADDRESS>,
Zhibin Chang  Zhibin Chang
Department of Mathematics and Statistics
San Diego State University
5500 Campanile Drive, San Diego, 92182, CA, USA<EMAIL_ADDRESS>,  Ethan Ha
Ethan Ha
Department of Mathematics and Statistics
San Diego State University
5500 Campanile Drive, San Diego, 92182, CA, USA<EMAIL_ADDRESS>,
Evan Hall  Evan Hall
Department of Mathematics and Statistics
San Diego State University
5500 Campanile Drive, San Diego, 92182, CA, USA<EMAIL_ADDRESS>and  Hiren
Maharaj  Hiren Maharaj
Department of Mathematics and Statistics
San Diego State University
5500 Campanile Drive, San Diego, 92182, CA, USA<EMAIL_ADDRESS>
###### Abstract.

For a bounded metric space $X$, we define a metric on the set of all finite
subsets of $X$. This generalizes the sequence-subset distance introduced by
Wentu Song, Kui Cai and Kees A. Schouhamer Immink [7] to study error
correcting codes for DNA based data storage. This work also complements the
work of Eiter and Mannila [3] where they study extensions of distance
functions to subsets of a space in the context of various applications.

##  1\. Introduction

To design error correcting codes for DNA storage channels, a new metric,
called the sequence-subset distance, was introduced in [7]. This metric
generalizes the Hamming distance to a distance function defined between any
two sets of unordered vectors. The definition is as follows. Let $\mathbb{A}$
be a fixed finite alphabet and $L\geq 1$ an integer. For any
$x_{1},x_{2}\in\mathbb{A}^{L}$, the Hamming distance $d_{H}(x_{1},x_{2})$
between $x_{1}$ and $x_{2}$ is the number of coordinates in which $x_{1}$ and
$x_{2}$ differ. For two subsets $X_{1},X_{2}\subset\mathbb{A}^{L}$, with
$|X_{1}|\leq|X_{2}|$, and any injection $\chi:X_{1}\to X_{2}$, the $\chi-$
distance between $X_{1}$ and $X_{2}$ is defined to be

$d_{\chi}(X_{1},X_{2})=\sum_{x\in X_{1}}d_{H}(x,\chi(x))+L(|X_{2}|-|X_{1}|).$
(1)

The sequence-subset distance between $X_{1}$ and $X_{2}$ is defined to be

$d_{S}(X_{1},X_{2})=d_{S}(X_{2},X_{1})=\min\\{d_{\chi}(X_{1},X_{2})|\chi:X_{1}\to
X_{2}\text{ is an injection}\\}.$

In [7] it is shown that $d_{S}$ is in fact a metric on the set of subsets of
$\mathbb{A}^{L}$.

In this note we generalize the sequence-subset distance as follows. Let $X$ be
a bounded metric space. For each $y\in X$, let $M:X\to\mathbb{R}$ be a
function such that

$d(x,y)\leq M(x)\leq d(x,z)+M(z)$ (2)

for all $x,y,z\in X$. Put $Y:=\mathcal{F}(X)$, the set of all finite subsets
of $X$. For $A,B\in Y$, with $|A|\leq|B|$, and any injection $\chi:A\to B$,
the $\chi-$ distance between $A$ and $B$ to defined to be

$d_{\chi}(A,B):=\sum_{x\in A}d(x,\chi(x))+\sum_{y\in B\setminus\chi(A)}M(y).$

Now the distance between $A$ and $B$ is defined to be

$d_{S}(A,B)=d_{S}(B,A):=\min\\{d_{\chi}(A,B)|\ \chi:A\to B\ \text{is an
injection}\\}.$ (3)

We show in Section 2 that $d_{S}$ is indeed a metric on $\mathcal{F}(X)$. We
will refer to this distance function simply as a subset metric.

There is some flexibility in the choice of the function $M$. Since $X$ is a
bounded metric space, we can select the function $M$ to have constant value
$D:=\sup\\{d(x,y):x,y\in X\\}$. In the case of the Hamming metric $d=d_{H}$ on
$X=\mathbb{A}^{L}$, this is tantamount to choosing $M(y)$ to be the constant
$L$ for all $y\in X$ and the subset-sequence metric of [7] is recovered. In
fact $M$ could be be any constant valued function whose value is an upper
bound for the metric $d$ on $X$. Alternatively, one could define $M$ as
follows: for each $x\in X$, let

$M(x)=\sup\\{d(x,y):y\in X\\}.$ (4)

Condition (2) is satisfied: for all $y\in X$, $d(x,y)\leq d(x,z)+d(z,y)\leq
d(x,z)+M(z)$ whence $M(x)\leq d(x,z)+M(z)$.

As for the sequence-subset distance of [7], the subset distance between $A$
and $B$ can be computed from a minimum weight perfect matching of the
bipartite graph whose partite sets are $A$ and $B$; the edge joining $a\in A$
with $b\in B$ is assigned weight $d(a,b)$. The Kuhn-Munkres algorithm does
this in time $O(|B|^{3})$ [4].

The generalized metric could potentially have more applications. For example,
take $X$ to be the vertex set of a finite connected graph and $d(x,y)$ the
length of the shortest path between $x$ and $y$. Then $d_{S}$ is a metric on
the power set $2^{X}$ and provides a measure of distance between collections
of vertices.

Another example is image recognition. In this case take $X$ to be a bounded
subset of the standard Euclidean plane (for example, corresponding to a raster
of pixels). For simplicity we take $X=[0,1]\times[0,1]$ the unit square as an
example and $d(p,q)=||p-q||$ is the standard Euclidian distance. Each finite
subset of $X$ would correspond to an image. Using (4) to define the function
$M(p)$, we have
$M(p):=\max\\{||p-c_{1}||,||p-c_{2}||,||p-c_{3}||,||p-c_{4}||\\}$ where
$c_{1},c_{2},c_{3},c_{4}$ are the four corners of $X$. Alternatively, $M$
could be replaced by the constant function whose value is $D=\sqrt{2}$.

Distance functions between subsets of a metric space and also measure spaces
have been widely studied, see [1] for a survey of such distances; see also
[2]. One of the most widely used subset metrics is the Hausdorff metric [1].
This metric has many variations, but we state one version for comparison. Let
$X$ be a bounded metric space with metric $d$. For non-empty compact subsets
$A,B$ of $X$, define

$h(A,B):=\max\\{\max_{a\in A}d(a,B),\max_{b\in B}d(b,A)\\}$

where $d(a,B):=\min_{a\in A}d(x,a)$ and $d(b,A)$ is defined likewise. The
function $h$ gives a metric on the set of all compact subsets of $X$ that
generalizes $d$: $h(\\{a\\},\\{b\\})=d(a,b)$ for all $a,b\in X$. If $X$ is
finite, the Hausdorff metric is computable in polynomial time and does have
theoretical benefits, for example, it is complete if $X$ is complete with
respect to $d$. However, as pointed out in [3], it may not be appropriate for
some applications since the metric does not take into account the entire
configuration of some finite sets. On the other hand, the subset-sequence
metric formulated in [7] for the purpose of comparing of DNA sequences
provides a finer comparison between two collections of sequences and is thus a
more appropriate distance measure in that situation. Each term involving $L$
on the right side of (1) expresses a natural worst case weight for a DNA
strand that is too far away from the other set. While the authors of this work
were primarily motivated by generalizing the work of [7], this work also
complements that of [3] where they study extensions of distance measures to
subsets more generally. For comparison, we briefly recall some of the main
results from [3]. A distance function $\Delta$ on a non-empty set $B$ is one
that satisfies all of the axioms to be a metric, except possibly the triangle
inequality. In [3], the authors consider the problem of extending a distance
function to the set of non-empty finite subsets of $B$. They also discuss
algorithms for computing such extensions. To measure a distance between two
non-empty subsets $S_{1},S_{2}$ of $B$, they discuss four distance functions:
the sum of minimum distances [5]

$d_{md}(S_{1},S_{2}):=\frac{1}{2}\left(\sum_{e\in
S_{1}}\Delta(e,S_{2})+\sum_{e\in S_{2}}\Delta(e,S_{1})\right),$

the surjective distance

$d_{s}(S_{1},S_{2}):=\min_{\eta}\sum_{(e_{1},e_{2})\in\eta}\Delta(e_{1},e_{2})$

where the minimum is over all surjections $\eta$ from the larger set to the
smaller set (due to G. Oddie in [6]), the Fair surjection distance

$d_{fs}(S_{1},S_{2}):=\min_{\eta}\sum_{(e_{1},e_{2})\in\eta}\Delta(e_{1},e_{2})$

where the minimum is over all fair surjections $\eta$ from the larger set to
the smaller set (a surjection $\eta:S_{1}\to S_{2}$ is called fair if
$\left\lvert|\eta^{-1}(x)|-|\eta^{-1}(y)|\right\rvert\leq 1$ for all $x,y\in
S_{1}$; this is also due to G. Oddie in [6]) and they introduce the Link
distance

$d_{l}(S_{1},S_{2}):=\min_{R}\sum_{(e_{1},e_{2})\in R}\Delta(e_{1},e_{2})$

where the minimum is over all linking relations $R$ between $S_{1}$ and
$S_{2}$ (a subset $R\subset S_{1}\times S_{2}$ is called a linking relation if
for all $e_{1}\in S_{1}$, there exists $e_{2}\in S_{2}$ such that
$(e_{1},e_{2})\in R$ and also if for all $e_{2}\in S_{2}$, there exists
$e_{1}\in S_{1}$ such that $(e_{1},e_{2})\in R$). While they show that these
distance functions fail to be a metric in the case that $B$ is a finite subset
of the integral plane and $\Delta$ is the Manhattan metric, Eiter and Mannila
present an elegant construction, called the metric infimum method, that
produces a metric $\Delta^{\omega}$ from a given distance function $\Delta$.
Interestingly, they demonstrate that
$d_{s}^{\omega}=d_{fs}^{\omega}=d_{l}^{\omega}$. The authors in [3] argue that
the link metric is very intuitive in some contexts. It would interesting to
also study this metric in the context of error correcting codes for DNA data
storage.

The rest of the paper is devoted to proving that (3) is indeed a metric.

##  2\. Proofs

Thoughout this section $X$ is a bounded metric space with metric $d$, the
function $M:X\to\mathbb{R}$ is one that satisfies the condition (2), $d_{S}$
is the function defined by (3) and $\mathcal{F}(X)$ is the set of all finite
subsets of $X$. In this section we prove that the function $d_{S}$ is a metric
on $\mathcal{F}(X)$. While the main steps followed here are inspired by [7],
there are differences to account for the presence of the function $M$ in the
definition of $d_{S}$.

######  Lemma 1.

For any $X_{1},X_{2}\in\mathcal{F}(X)$, such that $|X_{1}|\leq|X_{2}|$, there
exists an injection $\chi_{0}:X_{1}\to X_{2}$, such that
$d_{S}(X_{1},X_{2})=d_{\chi_{0}}(X_{1},X_{2})$ and $\chi_{0}(x)=x$ for all
$x\in X_{1}\cap X_{2}$.

###### Proof.

If $X_{1}\cap X_{2}=\emptyset$, then the statement is vacuously true. Suppose
that $X_{1}\cap X_{2}\neq\emptyset$. Choose $\chi:X_{1}\to X_{2}$ such that
$d_{S}(X_{1},X_{2})=d_{\chi}(X_{1},X_{2})$. The proof will be in two parts.
First we show that, if necessary, $\chi$ can be redefined on $X_{1}\cap X_{2}$
so that $d_{S}(X_{1},X_{2})=d_{\chi}(X_{1},X_{2})$ and $X_{1}\cap X_{2}$ is
contained in the image of $\chi$. Next we will show that $\chi$ can be further
adjusted to have the desired properties.

Suppose that some $x_{0}\in X_{1}\cap X_{2}$ does not belong to the image of
$\chi$. Then we redefine $\chi$ at $x_{0}$ to form a new embedding
$\nu:X_{1}\to X_{2}$ by setting

$\nu(x)=\left\\{\begin{array}[]{ll}\chi(x)&\hbox{ if }x\neq x_{0}\\\
x_{0}&\hbox{ if }x=x_{0}.\end{array}\right.$

By definition $d_{S}(X_{1},X_{2})\leq d_{\nu}(X_{1},X_{2})$. Note that
$\nu(X_{1})=\left(\chi(X_{1})\setminus\\{\chi(x_{0})\\}\right)\cup\\{x_{0}\\}$
and

$\sum_{x\in X_{1}}d(x,\nu(x))=\sum_{x\in
X_{1}}d(x,\chi(x))\,\,-d(x_{0},\chi(x_{0})).$ (5)

Since $x_{0}\in X_{2}\setminus\chi(X_{1})$, $\chi(x_{0})\not\in
X_{2}\setminus\chi(X_{1})$ and $\chi(x_{0})\in X_{2}\setminus\nu(X_{1})$, it
follows that

$\sum_{y\in X_{2}\setminus\nu(X_{1})}M(y)=\sum_{y\in
X_{2}\setminus\chi(X_{1})}M(y)-M(x_{0})+M(\chi(x_{0})).$ (6)

Combining (5) and (6), we get that

$d_{\nu}(X_{1},X_{2})=d_{\chi}(X_{1},X_{2})+M(\chi(x_{0}))-M(x_{0})-d(x_{0},\chi(x_{0})).$

From the condition (2), it follows that $d_{\nu}(X_{1},X_{2})\leq
d_{\chi}(X_{1},X_{2})=d_{S}(X_{1},X_{2})$. Thus
$d_{S}(X_{1},X_{2})=d_{\nu}(X_{1},X_{2})$ and $\nu(x_{0})=x_{0}$. By
repeatedly applying the above procedure we will obtain an embedding of $X_{1}$
into $X_{2}$, which we also call $\chi$, with the property that $X_{1}\cap
X_{2}\subseteq Im(\chi)$.

Let $x_{1}\in X_{1}\cap X_{2}$. Next we show that if $\chi(x_{1})\neq x_{1}$
then we can adjust the embedding $\chi$ to form a new embedding $\mu:X_{1}\to
X_{2}$ such that we have $\mu(x_{1})=x_{1}$ and still have that
$d_{S}(X_{1},X_{2})=d_{\mu}(X_{1},X_{2})$. From above we know that there
exists $z\in X_{1}$ such that $\chi(z)=x_{1}$. Put $y=\chi(x_{1})$ and define

$\mu(x)=\left\\{\begin{array}[]{ll}\chi(x)&\hbox{ if }x\neq x_{1},z\\\
x_{1}&\hbox{ if }x=x_{1}\\\ y&\hbox{ if }x=z.\end{array}\right.$

Then $\mu:X_{1}\to X_{2}$ is an injection and, by the definition of the subset
distance, $d_{S}(X_{1},X_{2})\leq d_{\mu}(X_{1},X_{2})$. Also we have that

$\displaystyle d_{\chi}(X_{1},X_{2})$ $\displaystyle=$ $\displaystyle
d(x_{1},y)+d(z,x_{1})+\left(d_{\mu}(X_{1},X_{2})-d(x_{1},x_{1})-d(z,y)\right)$
$\displaystyle=$ $\displaystyle
d_{\mu}(X_{1},X_{2})+d(x_{1},y)+d(z,x_{1})-d(z,y)$ $\displaystyle\geq$
$\displaystyle d_{\mu}(X_{1},X_{2})$

where the last inequality follows from the triangle inequality. Thus
$d_{S}(X_{1},X_{2})\geq d_{\mu}(X_{1},X_{2})$ and we see that
$d_{S}(X_{1},X_{2})=d_{\chi}(X_{1},X_{2})=d_{\mu}(X_{1},X_{2})$ and
$\mu(x_{1})=x_{1}$. By repeated application of the above procedure, we obtain
an embedding with the desired property. ∎

######  Corollary 1.

For any $X_{1},X_{2}\in\mathcal{F}(X)$,

$d_{S}(X_{1},X_{2})=d_{S}(X_{1}\setminus X_{2},X_{2}\setminus X_{1}).$

###### Proof.

This is a direct consequence of Lemma 1 and the definition of
$d_{\chi}(\cdot,\cdot)$. ∎

######  Lemma 2.

Suppose that $X_{1},X_{2}\in\mathcal{F}(X)$ with $|X_{1}|\leq|X_{2}|$. Then
for any $b\in X$, $d_{S}(X_{1},X_{2})\leq d_{S}(X_{1},X_{2}\cup\\{b\\})$.

###### Proof.

Suppose $\chi:X_{1}\to X_{2}\cup\\{b\\}$ such that
$d_{S}(X_{1},X_{2}\cup\\{b\\})=d_{\chi}(X_{1},X_{2}\cup\\{b\\})$. If
$\chi(X_{1})\subseteq X_{2}$, then
$d_{\chi}(X_{1},X_{2}\cup\\{b\\})=d_{\chi}(X_{1},X_{2})+M(b)\geq
d_{S}(X_{1},X_{2})+M(b)\geq d_{S}(X_{1},X_{2})$. If $\chi(X_{1})\not\subset
X_{2}$, then $\chi(a)=b$ for some $a\in X_{1}$ and $|X_{2}|>|X_{1}|$. Fix
$c\in X_{2}\setminus\chi(X_{1})$ and define $\eta:X_{1}\to X_{2}$ by

$\eta(x)=\left\\{\begin{array}[]{ll}\chi(x)&\hbox{if }x\neq a\\\ c&\hbox{if
}x=a.\end{array}\right.$

Then $\eta(X_{1})=\left(\chi(X_{1})\setminus\\{b\\}\right)\cup\\{c\\}$ so
$X_{2}\cup\\{b\\}\setminus\chi(X_{1})$ is the disjoint union
$\left(X_{2}\setminus\eta(X_{1})\right)\cup\\{c\\}$ and

$\displaystyle d_{S}(X_{1},X_{2}\cup\\{b\\})$ $\displaystyle=$ $\displaystyle
d_{\chi}(X_{1},X_{2}\cup\\{b\\})$ $\displaystyle=$ $\displaystyle\sum_{x\in
X_{1}}d(x,\chi(x))+\sum_{y\in X_{2}\cup\\{b\\}\setminus\chi(X_{1})}M(y)$
$\displaystyle=$ $\displaystyle d(a,b)+\sum_{x\in
X_{1}}d(x,\eta(x))-d(a,c)+\sum_{y\in X_{2}\setminus\eta(X_{1})}M(y)+M(c)$
$\displaystyle=$ $\displaystyle d(a,b)+M(c)-d(a,c)+\sum_{x\in
X_{1}}d(x,\eta(x))+\sum_{y\in X_{2}\setminus\eta(X_{1})}M(y)$ $\displaystyle=$
$\displaystyle d(a,b)+M(c)-d(a,c)+d_{\eta}(X_{1},X_{2})$ $\displaystyle\geq$
$\displaystyle d_{\eta}(X_{1},X_{2})\geq d_{S}(X_{1},X_{2})$

since $d(a,c)\leq M(c)$ by condition (2). ∎

By repeated application of the above result, we obtain the following
corollary.

######  Corollary 2.

For any $X_{1},X_{2}\in\mathcal{F}(X)$, such that $|X_{1}|\leq|X_{2}|$.
Suppose that $X_{2}^{\prime}\subseteq X_{2}$ such that
$|X_{1}|\leq|X_{2}^{\prime}|$. Then

$d_{S}(X_{1},X_{2}^{\prime})\leq d_{S}(X_{1},X_{2}).$

######  Theorem 1.

$d_{S}(\cdot,\cdot)$ is a metric on $\mathcal{F}(X)$.

###### Proof.

For two finite sets $A$ and $B$ we denote by $\mathscr{X}(A,B)$ the set of
injections $\chi:A\to B$. Let $X_{1},X_{2}\in\mathcal{F}(X)$. By definition of
$d_{S}(\cdot,\cdot)$ we have that $d_{S}(X_{1},X_{2})=d_{S}(X_{2},X_{1})\geq
0$. We show that $d_{S}(X_{1},X_{2})=0$ iff $X_{1}=X_{2}$. We may assume that
$|X_{1}|\leq|X_{2}|$, and let $\nu\in\mathscr{X}(X_{1},X_{2})$ be such that
$d_{S}(X_{1},X_{2})=d_{\nu}(X_{1},X_{2})$. Then
$d_{S}(X_{1},X_{2})=d_{\nu}(X_{1},X_{2})=0$ iff $\displaystyle\sum_{x\in
X_{1}}d(x,\nu(x))+\sum_{y\in X_{2}\setminus\nu(X_{1})}M(y)=0$ iff
$d(x,\nu(x))=0$ for all $x\in X_{1}\text{ and }X_{2}=\nu(X_{1})$ iff
$x=\nu(x)$ for all $x\in X_{1}\text{ and }|X_{2}|=|X_{1}|$ iff $X_{1}=X_{2}$.

Thus, we need only to show that $d_{S}(\cdot,\cdot)$ satisfies the Triangle
Inequality. Let $X_{1},X_{2},X_{3}\in\mathcal{F}(X)$. We will show that
$d_{S}(X_{1},X_{2})\leq d_{S}(X_{1},X_{3})+d_{S}(X_{3},X_{2})$ by considering
various cases. Note that we are still assuming that $|X_{1}|\leq|X_{2}|$, and
that $\nu\in\mathscr{X}(X_{1},X_{2})$ is such that
$d_{S}(X_{1},X_{2})=d_{\nu}(X_{1},X_{2})$.

Case 1: Suppose that $|X_{1}|\leq|X_{3}|\leq|X_{2}|$. Let
$\mu\in\mathscr{X}(X_{3},X_{2})$ and $\eta\in\mathscr{X}(X_{1},X_{3})$, be
such that $d_{S}(X_{3},X_{2})=d_{\mu}(X_{3},X_{2})$ and
$d_{S}(X_{1},X_{3})=d_{\eta}(X_{1},X_{3})$. We may assume that

$\displaystyle X_{1}=$ $\displaystyle\\{x_{1},\ldots,x_{n}\\}$ $\displaystyle
X_{3}=$ $\displaystyle\\{y_{1},\ldots,y_{n},y_{n+1},\ldots,y_{n+s}\\}$
$\displaystyle X_{2}=$
$\displaystyle\\{z_{1},\ldots,z_{n},z_{n+1},\ldots,z_{n+s},\ldots,z_{n+s+t}\\}$

where $s,t\geq 0$ and $\mu(y_{i})=z_{i}$ for $1\leq i\leq n+s$ and
$\eta(x_{i})=z_{i}$ for $1\leq i\leq n$. Then

$\displaystyle d_{S}(X_{1},X_{3})=$
$\displaystyle\sum_{i=1}^{n}d(x_{i},y_{i})+\sum_{i=n+1}^{n+s}M(y_{i})\hbox{
and }$ $\displaystyle d_{S}(X_{2},X_{3})=$
$\displaystyle\sum_{i=1}^{n+s}d(y_{i},z_{i})+\sum_{i=n+s+1}^{n+s+t}M(z_{i}).$

Let $\chi=\mu\circ\eta\in\mathscr{X}(X_{1},X_{2})$. Then

$\displaystyle d_{S}(X_{1},X_{2})$ $\displaystyle\leq$ $\displaystyle
d_{\chi}(X_{1},X_{2})$ $\displaystyle=$
$\displaystyle\sum_{i=1}^{n}d(x_{i},z_{i})+\sum_{i=n+1}^{n+s+t}M(z_{i})$
$\displaystyle\leq$
$\displaystyle\sum_{i=1}^{n}\left[d(x_{i},y_{i})+d(y_{i},z_{i})\right]+\sum_{i=n+1}^{n+s+t}M(z_{i})$
$\displaystyle=$
$\displaystyle\sum_{i=1}^{n}d(x_{i},y_{i})+\sum_{i=1}^{n}d(y_{i},z_{i})+\sum_{i=n+1}^{n+s+t}M(z_{i})$
$\displaystyle=$
$\displaystyle\left(d_{S}(X_{1},X_{3})-\sum_{i=n+1}^{n+s}M(y_{i})\right)+$
$\displaystyle\left(d_{S}(X_{3},X_{2})-\sum_{i=n+1}^{n+s}d(y_{i},z_{i})-\sum_{i=n+s+1}^{n+s+t}M(z_{i})\right)+\sum_{i=n+1}^{n+s+t}M(z_{i})$
$\displaystyle=$ $\displaystyle
d_{S}(X_{1},X_{3})+d_{S}(X_{2},X_{3})-\sum_{i=n+1}^{n+s}M(y_{i})-\sum_{i=n+1}^{n+s}d(y_{i},z_{i})+\sum_{i=n+1}^{n+s}M(z_{i})$
$\displaystyle=$ $\displaystyle
d_{S}(X_{1},X_{3})+d_{S}(X_{2},X_{3})+\sum_{i=n+1}^{n+s}\left(M(z_{i})-M(y_{i})-d(y_{i},z_{i})\right)$
$\displaystyle\leq$ $\displaystyle d_{S}(X_{1},X_{3})+d_{S}(X_{3},X_{2}).$

by condition (2)

Case 2: Suppose $|X_{3}|\leq|X_{1}|\leq|X_{2}|$. Let
$\mu\in\mathscr{X}(X_{3},X_{2})$ and $\eta\in\mathscr{X}(X_{3},X_{1})$ be such
that $d_{S}(X_{3},X_{2})=d_{\mu}(X_{3},X_{2})$ and
$d_{S}(X_{1},X_{3})=d_{\eta}(X_{1},X_{3})$. We may assume that

$\displaystyle X_{3}$ $\displaystyle=$ $\displaystyle\\{x_{1},\ldots,x_{n}\\}$
$\displaystyle X_{1}$ $\displaystyle=$
$\displaystyle\\{y_{1},\ldots,y_{n},y_{n+1},\ldots,y_{n+s}\\}$ $\displaystyle
X_{2}$ $\displaystyle=$
$\displaystyle\\{z_{1},\ldots,z_{n},z_{n+1},\ldots,z_{n+s},\ldots,z_{n+s+t}\\}$

where $s,t\geq 0$ and $\mu(x_{i})=z_{i}$ for $1\leq i\leq n$ and
$\eta(x_{i})=y_{i}$ for $1\leq i\leq n$. Then

$\displaystyle d_{S}(X_{3},X_{1})=$
$\displaystyle\sum_{i=1}^{n}d(x_{i},y_{i})+\sum_{i=n+1}^{n+s}M(y_{i})$
$\displaystyle d_{S}(X_{3},X_{2})=$
$\displaystyle\sum_{i=1}^{n}d(x_{i},z_{i})+\sum_{i=n+1}^{n+s+t}M(z_{i}).$

Define $\chi:X_{1}\to X_{2}$ by $\chi(y_{i})=z_{i}$ for $i=1,2,\ldots,n+s$.
Then

$\displaystyle d_{S}(X_{1},X_{2})$ $\displaystyle\leq$ $\displaystyle
d_{\chi}(X_{1},X_{2})$ $\displaystyle=$
$\displaystyle\sum_{i=1}^{n+s}d(y_{i},z_{i})+\sum_{i=n+s+1}^{n+s+t}M(z_{i})$
$\displaystyle=$
$\displaystyle\sum_{i=1}^{n}d(y_{i},z_{i})+\sum_{i=n+1}^{n+s}d(y_{i},z_{i})+\sum_{i=n+s+1}^{n+s+t}M(z_{i})$
$\displaystyle\leq$
$\displaystyle\sum_{i=1}^{n}\left[d(y_{i},x_{i})+d(x_{i},z_{i})\right]+\sum_{i=n+1}^{n+s}d(y_{i},z_{i})+\sum_{i=n+s+1}^{n+s+t}M(z_{i})$
$\displaystyle=$
$\displaystyle\sum_{i=1}^{n}d(y_{i},x_{i})+\left(\sum_{i=1}^{n}d(x_{i},z_{i})+\sum_{i=n+1}^{n+s+t}M(z_{i})\right)-\sum_{i=n+1}^{n+s}M(z_{i})+\sum_{i=n+1}^{n+s}d(y_{i},z_{i})$
$\displaystyle=$
$\displaystyle\left(d_{S}(X_{3},X_{1})-\sum_{i=n+1}^{n+s}M(y_{i})\right)+d_{S}(X_{3},X_{2})+\sum_{i=n+1}^{n+s}\left(d(y_{i},z_{i})-M(z_{i})\right)$
$\displaystyle=$ $\displaystyle
d_{S}(X_{3},X_{1})+d_{S}(X_{3},X_{2})-\sum_{i=n+1}^{n+s}M(y_{i})+\sum_{i=n+1}^{n+s}\left(d(y_{i},z_{i})-M(z_{i})\right)$
$\displaystyle\leq$ $\displaystyle d_{S}(X_{1},X_{3})+d_{S}(X_{3},X_{2}).$

where the last inequality follows from by condition (2).

Case 3: Suppose $|X_{1}|\leq|X_{2}|\leq|X_{3}|$.

Fix a subset $X_{3}^{\prime}$ of $X_{3}$ of cardinality equal to $X_{2}$. Then
from Case 1, it follows that $d_{S}(X_{1},X_{2})\leq
d_{S}(X_{1},X_{3}^{\prime})+d_{S}(X_{3}^{\prime},X_{2})$. From Corollary 2 we
know that $d_{S}(X_{1},X_{3}^{\prime})\leq d_{S}(X_{1},X_{3})$ and
$d_{S}(X_{3}^{\prime},X_{2})\leq d_{S}(X_{3},X_{2})$. Thus
$d_{S}(X_{1},X_{2})\leq d_{S}(X_{1},X_{3})+d_{S}(X_{3},X_{2})$.

∎

######  Remark 1.

If $X$ contains at least two elements, then the function $M$ never takes on
the value 0. In fact, there exists a constant $C>0$ such that $M(y)\geq C$ for
all $y\in X$: from (2), $d(x,y)\leq M(x)\leq d(x,y)+M(y)\leq 2M(y)$. Thus
$M(y)\geq M(x)/2$ for all $y\in X$. Put $C=M(x)/2$. If $C=0$, then the
inequlity $M(y)\geq d(y,x)$ implies that $y=x$ for all $x\in X$, contradicting
that $X$ contains at least two elements. Thus $C=M(x)/2>0$ is the required
constant.

######  Remark 2.

If $\\{A_{n}\\}$ is a Cauchy sequence in $\mathcal{F}(X)$, it can be shown
that $|A_{n}|=|A_{m}|$ for all $m,n$ sufficiently large: let $C$ be as in
Remark 1. Then there exists $N$ such that $d_{S}(A_{m},A_{n})<C$ for all
$m,n\geq N$. Since $C=\frac{1}{2}M(x)<M(y)$ for all $y\in X$, it follows that
$|A_{m}|=|A_{n}|$ for all $m,n\geq N$.

######  Remark 3.

If the topology induced the metric $d$ on $X$ is the discrete topology, then
$\mathcal{F}(X)$ is complete with respect to the subset metric. However, this
is not the case in general. Consider the case where $X=[0,1]$, $d$ is the
usual Euclidean metric and $M(y)=\max\\{y,1-y\\}$. Put
$A_{n}=\\{0,\frac{1}{n}\\}$ for all $n\geq 1$. Then $\\{A_{n}\\}$ is Cauchy
sequence that does not converge: if $\\{A_{n}\\}$ did converge, using Lemma 1
and Remark 2, it would converge to a set of the form $A=\\{0,a\\}$ for some
$a\in X$. But $d_{S}(A_{n},A)=|a-1/n|\to 0$ as $n\to\infty$, so $a$ must equal
to $0$. But if $a=0$, then $d_{(}A_{n},A)=M(1/n)=1-1/n\to 1$ as $n\to\infty$,
a contradiction.

## References

  * [1] Aura Conci and Carlos Kubrusly.  Distances between sets—a survey.  Adv. Math. Sci. Appl., 26(1):1–18, 2017.
  * [2] Michel Marie Deza and Elena Deza.  Encyclopedia of distances.  Springer-Verlag, Berlin, 2009.  With 1 CD-ROM (Windows, Macintosh and UNIX).
  * [3] Thomas Eiter and Heikki Mannila.  Distance measures for point sets and their computation.  Acta Inform., 34(2):109–133, 1997.
  * [4] James Munkres.  Algorithms for the assignment and transportation problems.  J. Soc. Indust. Appl. Math., 5:32–38, 1957.
  * [5] Ilkka Niiniluoto.  Truthlikeness, volume 185 of Synthese Library. Springer Dordrecht, 1987.
  * [6] Ilkka Niiniluoto and Raimo Tuomela, editors.  The logic and epistemology of scientific change. Societas Philosophica Fennica, Helsinki, 1979.  Acta Philos. Fenn. 30 (1978), no. 2-4 (1979).
  * [7] Wentu Song, Kui Cai, and Kees A. Schouhamer Immink.  Sequence-subset distance and coding for error control in DNA-based data storage.  IEEE Trans. Inform. Theory, 66(10):6048–6065, 2020.


# The ${\mathbb{F}}_{p}$-Selberg integral

Richárd Rimányi ⋄ and Alexander Varchenko ⋆

###### Abstract.

We prove an ${\mathbb{F}}_{p}$-Selberg integral formula, in which the
${\mathbb{F}}_{p}$-Selberg integral is an element of the finite field
${\mathbb{F}}_{p}$ with odd prime number $p$ of elements. The formula is
motivated by analogy between multidimensional hypergeometric solutions of the
KZ equations and polynomial solutions of the same equations reduced modulo
$p$.

⋄,⋆ Department of Mathematics, University of North Carolina at Chapel Hill
Chapel Hill, NC 27599-3250, USA

⋆ Faculty of Mathematics and Mechanics, Lomonosov Moscow State University
Leninskiye Gory 1, 119991 Moscow GSP-1, Russia

⋆ Moscow Center of Fundamental and Applied Mathematics
Leninskiye Gory 1, 119991 Moscow GSP-1, Russia

Key words: Selberg integral, ${\mathbb{F}}_{p}$-integral, Morris’ identity,
Aomoto recursion, KZ equations, reduction modulo $p$

2010 Mathematics Subject Classification: 13A35 (33C60, 32G20)

††footnotetext: ${}^{\diamond}\mskip-0.99998mu$E-mail<EMAIL_ADDRESS>supported in part by Simons Foundation grant 523882
${}^{\star}\mskip-0.99998mu$E-mail<EMAIL_ADDRESS>supported in part by
NSF grant DMS-1954266

###### Contents

  1. 1 Introduction
  2. 2 Preliminary remarks
    1. 2.1 Lucas’ Theorem
    2. 2.2 Binomial lemma
    3. 2.3 Cancellation of factorials
  3. 3 ${\mathbb{F}}_{p}$-Integrals
    1. 3.1 Definition
    2. 3.2 ${\mathbb{F}}_{p}$-Beta integral
  4. 4 $n$-Dimensional ${\mathbb{F}}_{p}$-Selberg integral
    1. 4.1 $n$-Dimensional integral formulas
    2. 4.2 Auxiliary lemmas
    3. 4.3 Case $a+b+(n-1)c=p-1$
    4. 4.4 Aomoto recursion
    5. 4.5 Proof of Theorem 4.1
    6. 4.6 Relation to Jacobi polynomials
  5. 5 ${\mathbb{F}}_{p}$-Selberg integral from Morris’ identity
    1. 5.1 Morris’ identity
    2. 5.2 More on values of $S_{n}(a,b,c)$
    3. 5.3 Factorization properties
  6. 6 A remarkable combinatorial identity
  7. 7 KZ equations
    1. 7.1 Special case of ${\mathfrak{sl}_{2}}$ KZ equations over ${\mathbb{C}}$
    2. 7.2 Special case of ${\mathfrak{sl}_{2}}$ KZ equations over ${\mathbb{F}}_{p}$

##  1\. Introduction

In 1944 Atle Selberg proved the following integral formula:

(1.1) $\displaystyle\int_{0}^{1}\dots\int_{0}^{1}\prod_{1\leqslant
i<j\leqslant
n}(x_{i}-x_{j})^{2\gamma}\prod_{i=1}^{n}x_{i}^{\alpha-1}(1-x_{i})^{\beta-1}\
dx_{1}\dots dx_{n}$ $\displaystyle\phantom{aaaaaa}=\
\prod_{j=1}^{n}\frac{\Gamma(1+j\gamma)}{\Gamma(1+\gamma)}\,\frac{\Gamma(\alpha+(j-1)\gamma)\,\Gamma(\beta+(j-1)\gamma)}{\Gamma(\alpha+\beta+(n+j-2)\gamma)}\,,$

see [Se1, AAR] 111aIn [Se2] Selberg remarks: “This paper was published with
some hesitation, and in Norwegian, since I was rather doubtful that the
results were new. The journal is one which is read by mathematics-teachers in
the gymnasium, and the proof was written out in some detail so it should be
understandable to someone who knew a little about analytic functions and
analytic continuation.” See more in [FW].. Hundreds of papers are devoted to
the generalizations of the Selberg integral formula and its applications, see
for example [AAR, FW] and references therein. There are $q$-analysis versions
of the formula, the generalizations associated with Lie algebras, elliptic
versions, finite field versions, see some references in [AAR, FW, As, Ha, Ka,
Op, Ch, TV1, TV2, TV3, Wa1, Wa2, Sp, R, FSV, An, Ev]. In the finite field
versions, one considers additive and multiplicative characters of a finite
field, which map the field to the field of complex numbers, and forms an
analog of equation (1.1), in which both sides are complex numbers. The
simplest of such formulas is the classical relation between Jacobi and Gauss
sums, see [AAR, An, Ev].

In this paper we suggest another version of the Selberg integral formula, in
which the ${\mathbb{F}}_{p}$-Selberg integral is an element of the finite
field ${\mathbb{F}}_{p}$ with an odd prime number $p$ of elements, see Theorem
4.1.

Our motivation comes from the theory of the Knizhnik-Zamolodchikov (KZ)
equations, see [KZ, EFK]. These are the systems of linear differential
equations, satisfied by conformal blocks on the sphere in the WZW model of
conformal field theory. The KZ equations were solved in multidimensional
hypergeometric integrals in [SV1], see also [V1, V2]. The following general
principle was formulated in [MV]: if an example of the KZ type equations has a
one-dimensional space of solutions, then the corresponding multidimensional
hypergeometric integral can be evaluated explicitly. As an illustration of
that principle in [MV], an example of KZ equations with a one-dimensional
space of solutions was considered, the corresponding multidimensional
hypergeometric integral was reduced to the Selberg integral and then evaluated
by formula (1.1). Other illustrations see in [FV, FSV, TV1, TV2, TV3, V3,
RTVZ].

Recently in [SV2] the KZ equations were considered modulo a prime number $p$
and polynomial solutions of the reduced equations were constructed, see also
[SlV, V4, V5, V6, V7]. The construction is analogous to the construction of
the multidimensional hypergeometric solutions, and the constructed polynomial
solutions were called the ${\mathbb{F}}_{p}$-hypergeometric solutions.

In this paper we consider the reduction modulo $p$ of the same example of the
KZ equations, that led in [MV] to the Selberg integral. The space of solutions
of the reduced KZ equations is still one-dimensional and, according to the
principle, we may expect that the corresponding
${\mathbb{F}}_{p}$-hypergeometric solution is related to a Selberg type
formula. Indeed we have evaluated that ${\mathbb{F}}_{p}$-hypergeometric
solution by analogy with the evaluation of the Selberg integral and obtained
our ${\mathbb{F}}_{p}$-Selberg integral formula in Theorem 4.1.

The paper contains three proofs of our ${\mathbb{F}}_{p}$-Selberg integral
formula. There might be more proofs. It would be interesting to see if our
formula can be deduced from the known relations between the multidimensional
Gauss and Jacobi sums, see for example [AAR, Section 8.11].

The paper is organized as follows. In Section 2 we collect useful facts. In
Section 3 we introduce the notion of ${\mathbb{F}}_{p}$-integral and discuss
the integral formula for the ${\mathbb{F}}_{p}$-beta integral. In Section 4 we
formulate our main result, Theorem 4.1, and prove it by developing an
${\mathbb{F}}_{p}$-analog of Aomoto’s recursion, defined in [Ao] for the
Selberg integral. In Section 5 we give another proof of Theorem 4.1, based on
Morris’ identity, which is deduced from the classical Selberg integral formula
(1.1) in [Mo]. In Section 6 we sketch a third proof of Theorem 4.1 based on a
combinatorial identity, also deduced from the Selberg integral formula (1.1).
In Section 7 we discuss in more detail how our ${\mathbb{F}}_{p}$-Selberg
integral formula is related to the ${\mathbb{F}}_{p}$-hypergeometric solutions
of KZ equations reduced modulo $p$.

The authors thank C. Biró, I. Cherednik, P. Etingof, E. Rains, A. Slinkin for
useful discussions.

##  2\. Preliminary remarks

###  2.1. Lucas’ Theorem

######  Theorem 2.1 ([L]).

For nonnegative integers $m$ and $n$ and a prime $p$, the following congruence
relation holds:

(2.1)
$\displaystyle\binom{n}{m}\equiv\prod_{i=0}^{a}\binom{n_{i}}{m_{i}}\quad(\operatorname{mod}\
p),$

where $m=m_{b}p^{b}+m_{b-1}p^{b-1}+\cdots+m_{1}p+m_{0}$ and
$n=n_{b}p^{b}+n_{b-1}p^{b-1}+\cdots+n_{1}p+n_{0}$ are the base $p$ expansions
of $m$ and $n$ respectively. This uses the convention that $\binom{n}{m}=0$ if
$n<m$. ∎

###  2.2. Binomial lemma

######  Lemma 2.2 ([V7]).

Let $a,b$ be positive integers such that $a<p$, $b<p$, $p\leqslant a+b$. Then
we have an identity in ${\mathbb{F}}_{p}$,

(2.2) $\displaystyle b\,\binom{b-1}{a+b-p}$ $\displaystyle=$ $\displaystyle
b\,\binom{b-1}{p-a-1}=(-1)^{a+1}\,\frac{a!\,b!}{(a+b-p)!}\,.$

∎

###### Proof.

We have

$\displaystyle
b\binom{b-1}{p-a-1}=\frac{b(b-1)\cdots(a+b-p+1)}{1\cdots(p-a-1)}$
$\displaystyle\phantom{aaa}=\frac{b\cdots(a+b-p+1)(a+b-p)!a!}{(-1)^{p-a-1}(p-1)(p-2)\cdots(a+1)\,a!\,(a+b-p)!}=(-1)^{a+1}\,\frac{a!\,b!}{(a+b-p)!}\,.$

∎

###  2.3. Cancellation of factorials

######  Lemma 2.3.

If $a,b$ are nonnegative integers and $a+b=p-1$, then in ${\mathbb{F}}_{p}$ we
have

(2.3) $\displaystyle a!\,b!\,=\,(-1)^{a+1}\,.$

###### Proof.

We have $a!=(-1)^{a}(p-1)\dots(p-a)$ and $p-a=b+1$. Hence
$a!\,b!=(-1)^{a}(p-1)!=(-1)^{a+1}$ by Wilson’s Theorem. ∎

##  3\. ${\mathbb{F}}_{p}$-Integrals

###  3.1. Definition

Let $p$ be an odd prime number and $M$ an ${\mathbb{F}}_{p}$-module. Let
$P(x_{1},\dots,x_{k})$ be a polynomial with coefficients in $M$,

(3.1) $\displaystyle P(x_{1},\dots,x_{k})=\sum_{d}\,c_{d}\,x_{1}^{d_{1}}\dots
x_{k}^{d_{k}}.$

Let $l=(l_{1},\dots,l_{k})\in{\mathbb{Z}}_{>0}^{k}$. The coefficient
$c_{l_{1}p-1,\dots,l_{k}p-1}$ is called the ${\mathbb{F}}_{p}$-integral over
the cycle $[l_{1},\dots,l_{k}]_{p}$ and is denoted by
$\int_{[l_{1},\dots,l_{k}]_{p}}P(x_{1},\dots,x_{k})\,dx_{1}\dots dx_{k}$.

######  Lemma 3.1.

For $i=1,\dots,k-1$ we have

(3.2)
$\displaystyle\int_{[l_{1},\dots,l_{i+1},l_{i},\dots,l_{k}]_{p}}P(x_{1},\dots,x_{i+1},x_{i},\dots,x_{k})dx_{1}\dots
dx_{k}$ $\displaystyle\phantom{aaaaa}=\
\int_{[l_{1},\dots,l_{k}]_{p}}P(x_{1},\dots,x_{k})\,dx_{1}\dots dx_{k}\,.$

∎

######  Lemma 3.2.

For any $i=1,\dots,k$, we have

$\displaystyle\int_{[l_{1},\dots,l_{k}]_{p}}\frac{\partial P}{\partial
x_{i}}(x_{1},\dots,x_{k})=0\,.$

∎

###  3.2. ${\mathbb{F}}_{p}$-Beta integral

For nonnegative integers the classical beta integral formula says

(3.3) $\displaystyle\int_{0}^{1}x^{a}(1-x)^{b}dx=\frac{a!\,b!}{(a+b+1)!}\,.$

######  Theorem 3.3 ([V7]).

Let $a<p$, $b<p$, $p-1\leqslant a+b$. Then in ${\mathbb{F}}_{p}$ we have

(3.4)
$\displaystyle\int_{[1]_{p}}x^{a}(1-x)^{b}dx\,=\,-\,\frac{a!\,b!}{(a+b-p+1)!}\,.$

If $a+b<p-1$, then

(3.5) $\displaystyle\int_{[1]_{p}}x^{a}(1-x)^{b}dx\,=0\,.$

###### Proof.

We have $x^{a}(1-x)^{b}=\sum_{k=0}^{b}(-1)^{k}\binom{b}{k}x^{k}\,,$ and need
$a+k=p-1$. Hence $k=p-1-a$ and

$\displaystyle\int_{[1]_{p}}x^{a}(1-x)^{b}dx\,=(-1)^{p-1-a}\binom{b}{p-1-a}.$

Now Lemma 2.2 implies (3.4). Formula (3.5) is clear. ∎

##  4\. $n$-Dimensional ${\mathbb{F}}_{p}$-Selberg integral

###  4.1. $n$-Dimensional integral formulas

The $n$-dimensional Selberg integral formulas for nonnegative integers $a,b,c$
are

(4.1) $\displaystyle\int_{0}^{1}\dots\int_{0}^{1}\prod_{1\leqslant
i<j\leqslant n}(x_{i}-x_{j})^{2c}\prod_{i=1}^{n}x_{i}^{a}(1-x_{i})^{b}\
dx_{1}\dots dx_{n}$
$\displaystyle\phantom{aaaaaa}=\prod_{j=1}^{n}\frac{(jc)!}{c!}\,\frac{(a+(j-1)c)!\,(b+(j-1)c)!}{(a+b+(n+j-2)c+1)!}\,,$

and for $k=1,\dots,n-1$,

(4.2)
$\displaystyle\int_{0}^{1}\dots\int_{0}^{1}\prod_{i=1}^{k}x_{i}\prod_{1\leqslant
i<j\leqslant n}(x_{i}-x_{j})^{2c}\prod_{i=1}^{n}x_{i}^{a}(1-x_{i})^{b}\
dx_{1}\dots dx_{n}$
$\displaystyle\phantom{aa}=\,\prod_{j=1}^{k}\frac{a+(n-j)c+1}{a+b+(2n-j-1)c+1}\,\prod_{j=1}^{n}\frac{(jc)!}{c!}\,\frac{(a+(j-1)c)!\,(b+(j-1)c)!}{(a+b+(n+j-2)c+2)!}\,,$

[Se1, Ao, AAR].

######  Theorem 4.1.

Assume that $a,b,c$ are nonnegative integers such that

(4.3) $\displaystyle p-1\leqslant a+b+(n-1)c,\qquad a+b+(2n-2)c<2p-1\ .$

Then we have an integral formula in ${\mathbb{F}}_{p}$:

(4.4) $\displaystyle\int_{[1,\dots,1]_{p}}\prod_{1\leqslant i<j\leqslant
n}(x_{i}-x_{j})^{2c}\prod_{i=1}^{n}x_{i}^{a}(1-x_{i})^{b}\ dx_{1}\dots dx_{n}$
$\displaystyle\phantom{aaaaaa}=(-1)^{n}\,\prod_{j=1}^{n}\frac{(jc)!}{c!}\,\frac{(a+(j-1)c)!\,(b+(j-1)c)!}{(a+b+(n+j-2)c+1-p)!}\,.$

Also, if $k=1,\dots,n-1$, and

(4.5) $\displaystyle p-1\leqslant a+b+(n-1)c,\qquad a+b+(2n-2)c<2p-2\ ,$

then

(4.6)
$\displaystyle\int_{[1,\dots,1]_{p}}\prod_{i=1}^{k}x_{i}\prod_{1\leqslant
i<j\leqslant n}(x_{i}-x_{j})^{2c}\prod_{i=1}^{n}x_{i}^{a}(1-x_{i})^{b}\
dx_{1}\dots dx_{n}$
$\displaystyle\phantom{a}=\,(-1)^{n}\,\prod_{j=1}^{k}\frac{a+(n-j)c+1}{a+b+(2n-j-1)c+2}\,\prod_{j=1}^{n}\frac{(jc)!}{c!}\,\frac{(a+(j-1)c)!\,(b+(j-1)c)!}{(a+b+(n+j-2)c+1-p)!}\,.$

The first proof of Theorem 4.1 is given in Sections 4.2 \- 4.4, the second in
Section 5, and the third one is sketched in Section 6.

######  Remark.

Formula (4.4) can be rewritten as

(4.7) $\displaystyle\sum_{x_{1},\dots,x_{n}\in{\mathbb{F}}_{p}}\
\prod_{1\leqslant i<j\leqslant
n}(x_{i}-x_{j})^{2c}\prod_{i=1}^{n}x_{i}^{a}(1-x_{i})^{b}\ dx_{1}\dots dx_{n}$
$\displaystyle\phantom{aaaaaa}=\,\prod_{j=1}^{n}\frac{(jc)!}{c!}\,\frac{(a+(j-1)c)!\,(b+(j-1)c)!}{(a+b+(n+j-2)c+1-p)!}\,.$

######  Remark.

The fact that the ${\mathbb{F}}_{p}$-Selberg integral in the left-hand side of
(4.4) equals an explicit alternating product in the right-hand side of (4.4)
is surprising. But even more surprising is the fact that the alternating
product in the right-hand side is exactly the alternating product staying in
the classical formula (4.1) with just several of factorials shifted by $p$.

######  Remark.

The Selberg integral (4.1) is related to the ${\mathfrak{sl}_{2}}$ KZ
differential equations, see Section 7, and is called the Selberg integrals of
type $A_{1}$. The Selberg integrals of types $A_{n}$, related to the
$\mathfrak{sl}_{n+1}$ KZ differential equations, are introduced in [TV3, Wa1,
Wa2].

We call the ${\mathbb{F}}_{p}$-integral (4.4) the ${\mathbb{F}}_{p}$-Selberg
integral of type $A_{1}$. The ${\mathbb{F}}_{p}$-Selberg integral of type
$A_{n}$, $n>1$, are introduced in [RV]. The ${\mathbb{F}}_{p}$-Selberg
integral formula of type $A_{n}$ is deduced in [RV] for the
${\mathbb{F}}_{p}$-Selberg integral formula (4.4) by induction on $n$.

######  Remark.

The integral analogous to (4.4) but with $x_{i}-x_{j}$ factors raised to an
odd power vanishes:

(4.8) $\int_{[1,\dots,1]_{p}}\prod_{1\leqslant i<j\leqslant
n}(x_{i}-x_{j})^{2c+1}\prod_{i=1}^{n}x_{i}^{a}(1-x_{i})^{b}\ dx_{1}\dots
dx_{n}=0.$

Indeed, after expanding the $(x_{1}-x_{2})^{2c+1}$ factor, the integral (4.8)
equals

$\sum_{m=0}^{2c+1}(-1)^{m+1}\binom{2c+1}{m}\int_{[1,\dots,1]_{p}}x_{1}^{a+m}x_{2}^{a+(2c+1-m)}f(x_{1},\ldots,x_{n})\
dx_{1}\dots dx_{n}=0,$

with $f$ symmetric in $x_{1}$ and $x_{2}$. The terms corresponding to $m$ and
$2c+1-m$ cancel each other, making the sum 0.

###  4.2. Auxiliary lemmas

Denote

(4.9) $\displaystyle
P_{n}(a,b,c)\,=\,(-1)^{n}\,\prod_{j=1}^{n}\frac{(jc)!}{c!}\,\frac{(a+(j-1)c)!\,(b+(j-1)c)!}{(a+b+(n+j-2)c+1-p)!}\,.$

The polynomial

$\displaystyle\Phi(x_{1},\dots,x_{n},a,b,c)=\prod_{1\leqslant i<j\leqslant
n}(x_{i}-x_{j})^{2c}\prod_{i=1}^{n}x_{i}^{a}(1-x_{i})^{b}$

is called the master polynomial. Denote

$\displaystyle S_{n}(a,b,c)$ $\displaystyle=$
$\displaystyle\int_{[1,\dots,1]_{p}}\prod_{1\leqslant i<j\leqslant
n}(x_{i}-x_{j})^{2c}\prod_{i=1}^{n}x_{i}^{a}(1-x_{i})^{b}dx_{1}\dots
dx_{n}\,,$ $\displaystyle S_{k,n}(a,b,c)$ $\displaystyle=$
$\displaystyle\int_{[1,\dots,1]_{p}}\prod_{i=1}^{k}x_{i}\prod_{1\leqslant
i<j\leqslant
n}(x_{i}-x_{j})^{2c}\prod_{i=1}^{n}x_{i}^{a}(1-x_{i})^{b}\,dx_{1}\dots
dx_{n}\,,$

for $k=0,\dots,n$. Then $S_{0,n}(a,b,c)=S_{n}(a,b,c)$,
$S_{n,n}(a,b,c)=S_{n}(a+1,b,c)$. By (3.2), we also have

$\displaystyle
S_{k,n}(a,b,c)=\int_{[1,\dots,1]_{p}}\prod_{i=1}^{k}x_{\sigma_{i}}\prod_{1\leqslant
i<j\leqslant
n}(x_{i}-x_{j})^{2c}\prod_{i=1}^{n}x_{i}^{a}(1-x_{i})^{b}\,dx_{1}\dots
dx_{n}\,$

for any $1\leqslant\sigma_{1}<\dots<\sigma_{k}\leqslant n$.

######  Lemma 4.2.

We have $S_{n}(a,b+p,c)=S_{n}(a,b,c)$.

###### Proof.

We have
$(1-x_{i})^{b+p}=(1-x_{i})^{b}(1-x_{i})^{p}=(1-x_{i})^{b}(1-x_{i}^{p})$. Hence
the factors $(1-x_{i})^{b}$ and $(1-x_{i})^{b+p}$ contribute to the
coefficient of $x_{i}^{p-1}$ in the same way. ∎

######  Lemma 4.3.

If $a+b+(2n-2)c<2p-2$ and $c>0$, then $n<p$. ∎

######  Lemma 4.4.

If $a+b+(n-1)c<p-1$, then $S_{n}(a,b,c)=0$.

###### Proof.

The coefficient of $x_{1}^{p-1}\dots x_{n}^{p-1}$ in the expansion of
$\Phi(a,b,c)$ equals zero. ∎

######  Lemma 4.5.

If $p\leqslant a+(n-1)c$, then $S_{n}(a,b,c)=0$.

###### Proof.

Expand $\Phi(x,a,b,c)$ in monomials $x_{1}^{d_{1}}\dots x_{n}^{d_{n}}$. If
$p\leqslant a+(n-1)c$, then each monomial $x_{1}^{d_{1}}\dots x_{n}^{d_{n}}$
in the expansion has at least one of $d_{1},\dots,d_{n}$ greater than $p-1$,
Hence the coefficient of $x_{1}^{p-1}\dots x_{n}^{p-1}$ in the expansion
equals zero. ∎

######  Lemma 4.6.

If $a+b+(2n-2)c<2p-1$, then $S_{n}(a,b,c)=S_{n}(b,a,c)$.

###### Proof.

Expand $\Phi(x,a,b,c)$ in monomials $x_{1}^{d_{1}}\dots x_{n}^{d_{n}}$. If
$a+b+(2n-2)c<2p-1$, then

(a) for each monomial $x_{1}^{d_{1}}\dots x_{n}^{d_{n}}$ in the expansion all
of $d_{1},\dots,d_{n}$ are less than $2p-1$.

We also have

$\displaystyle\Phi(1-y_{1},\dots,1-y_{n},a,b,c)=\prod_{1\leqslant i<j\leqslant
n}(y_{i}-y_{j})^{2c}\prod_{i=1}^{n}y_{i}^{a}(1-y_{i})^{b}\,.$

This transformation does not change the ${\mathbb{F}}_{p}$-integral due to
Lucas’ Theorem and property (a), see a similar reasoning in the proof of [V5,
Lemma 5.2]. ∎

###  4.3. Case $a+b+(n-1)c=p-1$

######  Lemma 4.7.

If $a+b+(n-1)c=p-1$, then

(4.10) $\displaystyle
S_{n}(a,b,c)=(-1)^{bn+cn(n-1)/2}\,\frac{(cn)!}{(c!)^{n}}\,.$

###### Proof.

If $a+b+(n-1)c=p-1$, then $S_{n}(a,b,c)$ equals $(-1)^{bn}$ multiplied by the
coefficient of $(x_{1}\dots x_{n})^{c}$ in $\prod_{1\leqslant i<j\leqslant
n}(x_{i}-x_{j})^{2c}$, which equals $(-1)^{cn(n-1)/2}\frac{(cn)!}{(c!)^{n}}$
by Dyson’s formula

(4.11) $\displaystyle\operatorname{C.T.}\prod_{1\leqslant i<j\leqslant
n}(1-x_{i}/x_{j})^{c}(1-x_{j}/x_{i})^{c}=\frac{(cn)!}{(c!)^{n}}\,.$

Here C.T. denotes the constant term. See the formula in [AAR, Section 8.8]. ∎

######  Lemma 4.8.

If $a+b+(n-1)c=p-1$, then

(4.12)
$\displaystyle\phantom{aaaa}P_{n}(a,b,c)\,=\,(-1)^{bn+cn(n-1)/2}\,\frac{(cn)!}{(c!)^{n}}\,.$

###### Proof.

We have

$\displaystyle P_{n}(a,b,c)$ $\displaystyle=$
$\displaystyle(-1)^{n}\,\prod_{j=1}^{n}\frac{(jc)!}{c!}\,\frac{(a+(j-1)c)!\,(b+(j-1)c)!}{(a+b+(n+j-2)c+1-p)!}$
$\displaystyle=$
$\displaystyle(-1)^{n}\,\prod_{j=1}^{n}\frac{(jc)!}{c!}\,\frac{(a+(j-1)c)!\,(b+(j-1)c)!}{c!\,(2c)!\dots((n-1)c)!}\,.$

By Lemma 2.2 we have $a!\,(b+(n-1)c)!=(-1)^{b+(n-1)c+1}$,
$(a+c)!\,(b+(n-2)c)!=(-1)^{b+(n-2)c+1}$, and so on. This proves the lemma. ∎

Lemmas 4.7 and 4.8 prove formula (4.4) for $a+b+(n-1)c=p-1$.

###  4.4. Aomoto recursion

We follow the paper [Ao], where recurrence relations were developed for the
classical Selberg integral. See also [AAR, Section 8.2].

Using Lemma 3.2, for $k=1,\dots,n$ we have

$\displaystyle 0$ $\displaystyle=$
$\displaystyle\int_{[1,\dots,1]_{p}}\frac{\partial}{\partial
x_{1}}\Big{[}(1-x_{1})\prod_{i=1}^{k}x_{i}\,\Phi(x,a,b,c)\Big{]}dx_{1}\dots
dx_{n}$ $\displaystyle=$
$\displaystyle(a+1)\int_{[1,\dots,1]_{p}}(1-x_{1})\prod_{i=2}^{k}x_{i}\,\Phi(x,a,b,c)\,dx_{1}\dots
dx_{n}$
$\displaystyle-(b+1)\int_{[1,\dots,1]_{p}}\prod_{i=1}^{k}x_{i}\,\Phi(x,a,b,c)\,dx_{1}\dots
dx_{n}$
$\displaystyle+2c\int_{[1,\dots,1]_{p}}\sum_{j=2}^{n}\frac{1-x_{1}}{x_{1}-x_{j}}\prod_{i=1}^{k}x_{i}\,\Phi(x,a,b,c)\,dx_{1}\dots
dx_{n}\,.$

######  Lemma 4.9.

The ${\mathbb{F}}_{p}$-integral

(4.14)
$\displaystyle\int_{[1,\dots,1]_{p}}\frac{1}{x_{1}-x_{j}}\,\prod_{i=1}^{k}x_{i}\,\Phi(x,a,b,c)\,dx_{1}\dots
dx_{n}$

equals $0$ if $2\leqslant j\leqslant k$ and equals $S_{k-1,n}/2$ if
$k<j\leqslant n$. The ${\mathbb{F}}_{p}$-integral

(4.15)
$\displaystyle\int_{[1,\dots,1]_{p}}\frac{x_{1}}{x_{1}-x_{j}}\,\prod_{i=1}^{k}x_{i}\,\Phi(x,a,b,c)\,dx_{1}\dots
dx_{n}$

equals $S_{k,n}/2$ if $2\leqslant j\leqslant k$ and equals $S_{k,n}$ if
$k<j\leqslant n$.

###### Proof.

By Lemma 4.6 each of these integrals does not change if $x_{1},x_{j}$ are
permuted. The four statements of the lemma hold since
$\frac{x_{1}x_{j}}{x_{1}-x_{j}}+\frac{x_{1}x_{j}}{x_{j}-x_{1}}=0$,
$\frac{x_{1}}{x_{1}-x_{j}}+\frac{x_{j}}{x_{j}-x_{1}}=1$,
$\frac{x_{1}^{2}x_{j}}{x_{1}-x_{j}}+\frac{x_{1}x_{j}^{2}}{x_{j}-x_{1}}=x_{1}x_{j}$,
$\frac{x_{1}^{2}}{x_{1}-x_{j}}+\frac{x_{j}^{2}}{x_{j}-x_{1}}=x_{1}+x_{j}$,
respectively. ∎

######  Lemma 4.10.

For $k=1,\dots,n$ we have

(4.16) $\displaystyle
S_{k,n}\,=\,\frac{a+(n-k)c+1}{a+b+(2n-k-1)c+2}\,S_{k-1,n}\,.$

###### Proof.

Using Lemma 4.9 we rewrite (4.4) as

$\displaystyle
0=(a+1)S_{k-1,n}-(a+b+2)S_{k,n}+c(n-k)S_{k-1,n}-c(2n-k-1)S_{k,n}\,.$

∎

###  4.5. Proof of Theorem 4.1

Theorem 4.1 is proved by induction on $a$ and $b$. The base induction step
$a+b+(n-1)c=p-1$ is proved in Section 4.3.

Lemma 4.10 gives

$\displaystyle
S_{n}(a+1,b,c)\,=\,\,S_{n}(a,b,c)\,\prod_{j=1}^{n}\frac{a+(n-j)c+1}{a+b+(2n-j-1)c+1}\,\,.$

Together with the symmetry $S_{n}(a,b,c)=S_{n}(b,a,c)$ this gives formula
(4.4). Then formula (4.16) gives formula (4.6). Theorem 4.1 is proved.

###  4.6. Relation to Jacobi polynomials

The statements (4.6) for different values of $k$ can be organized to just one
equality which involves a Jacobi polynomial – like it was done by K. Aomoto in
[Ao] for the classical Selberg integral. Recall that the degree $n$ Jacobi
polynomial is

$P^{(n)}_{\alpha,\beta}(x)=\frac{1}{n!}\sum_{\nu=0}^{n}\binom{n}{\nu}\prod_{i=1}^{\nu}(n+\alpha+\beta+i)\prod_{i=\nu+1}^{n}(\alpha+i)\left(\frac{x-1}{2}\right)^{\nu}.$

######  Proposition 4.11.

Assuming inequalities (4.5) let $\alpha=(a+1)/c-1$, $\beta=(b+1)/c-1$. Then

(4.17)
$\int_{[1,\ldots,1]_{p}}\prod_{i=1}^{n}(x_{i}-t)\cdot\Phi(x,a,b,c)dx_{1}\ldots
dx_{n}=\frac{n!c^{n}\cdot S_{n}(a,b,c)}{\prod_{i=n-1}^{2n-2}(a+b+ic+2)}\cdot
P^{(\alpha,\beta)}_{n}(1-2t).$

The proof is the same is in [Ao]: After expanding $\prod_{i=1}^{n}(x_{i}-t)$
we have the sum of integrals of the type

$\int_{[1,\ldots,1]_{p}}x_{\sigma_{1}}x_{\sigma_{2}}\ldots
x_{\sigma_{k}}\Phi(x,a,b,c)dx_{1}\ldots dx_{n},$

which — by symmetry (3.2) — are equal to $S_{k,n}(a,b,c)$. Substituting

$S_{k,n}(a,b,c)=S_{n}(a,b,c)\cdot\prod_{j=1}^{k}\frac{a+(n-j)c+1}{a+b+(2n-j-1)c+2}$

from (4.4) and (4.6) yields (4.17).

##  5\. ${\mathbb{F}}_{p}$-Selberg integral from Morris’ identity

###  5.1. Morris’ identity

In this section we work out the integral formula (4.4) for the
${\mathbb{F}}_{p}$-Selberg integral from Morris’ identity. Suppose that
$\alpha,\beta,\gamma$ are nonnegative integers. Then

(5.1)
$\displaystyle\operatorname{C.T.}\,\prod_{i=1}^{n}(1-x_{i})^{\alpha}(1-1/x_{i})^{\beta}\prod_{1\leqslant
j\neq k\leqslant n}(1-x_{j}/x_{k})^{\gamma}$ $\displaystyle\phantom{a}=\,\
\prod_{j=1}^{n}\frac{(j\gamma)!}{\gamma!}\,\frac{(\alpha+\beta+(j-1)\gamma)!}{(\alpha+(j-1)\gamma)!\,(\beta+(j-1)\gamma)!}\,.$

Morris identity was deduced in [Mo] from the integral formula (4.1) for the
classical Selberg integral, see [AAR, Section 8.8].

The left-hand side of (5.1) can be written as

(5.2)
$\displaystyle\operatorname{C.T.}\,(-1)^{\binom{n}{2}\gamma+n\beta}\prod_{1\leqslant
i<j\leqslant
n}(x_{i}-x_{j})^{2\gamma}\prod_{i=1}^{n}x_{i}^{-\beta-(n-1)\gamma}(1-x_{i})^{\alpha+\beta}\,,$

while

(5.3) $\displaystyle S_{n}(a,b,c)\,=\,\operatorname{C.T.}\,\prod_{1\leqslant
i<j\leqslant n}(x_{i}-x_{j})^{2c}\prod_{i=1}^{n}x_{i}^{a+1-p}(1-x_{i})^{b}\,,$

where the constant term is projected to ${\mathbb{F}}_{p}$.

Putting $a+1-p=-\beta-(n-1)\gamma,\,b=\alpha+\beta\,,c=\gamma$, or

(5.4)
$\displaystyle\alpha=a+b+(n-1)c+1-p,\qquad\beta=p-a-(n-1)c-1,\qquad\gamma=c.$

we obtain the following theorem.

######  Theorem 5.1.

If the nonnegative integers $a,b,c$ satisfy the inequalities

(5.5) $\displaystyle p-1\leqslant a+b+(n-1)c,\qquad a+(n-1)c\leqslant p-1,$

then the ${\mathbb{F}}_{p}$-Selberg integral is given by the formula:

$\displaystyle S_{n}(a,b,c)\,=\,(-1)^{\binom{n}{2}c+na}$
$\displaystyle\phantom{aaa}\times\,\prod_{j=1}^{n}\frac{(jc)!}{c!}\,\frac{(b+(j-1)c)!}{(p-a-(n-j)c-1)!\,(a+b+(n+j-2)c+1-p)!}\,,$

where the integer on the right-hand side is projected to ${\mathbb{F}}_{p}$.

######  Lemma 5.2.

If both inequalities (4.3) and (5.5) hold, that is, if

(5.7) $\displaystyle p-1\leqslant a+b+(n-1)c,\qquad a+b+(2n-2)c<2p-1\ ,$ (5.8)
$\displaystyle a+(n-1)c\leqslant p-1,$

then in ${\mathbb{F}}_{p}$ we have

(5.9)
$\displaystyle(-1)^{\binom{n}{2}c+na}\prod_{j=1}^{n}\frac{(jc)!}{c!}\,\frac{(b+(j-1)c)!}{(p-a-(n-j)c-1)!\,(a+b+(n+j-2)c)!}\,,$
$\displaystyle\phantom{aa}=\,(-1)^{n}\,\prod_{j=1}^{n}\frac{(jc)!}{c!}\,\frac{(a+(j-1)c)!\,(b+(j-1)c)!}{(a+b+(n+j-2)c+1-p)!}\,,$

and hence (5.1)

(5.10) $\displaystyle
S_{n}(a,b,c)=(-1)^{n}\,\prod_{j=1}^{n}\frac{(jc)!}{c!}\,\frac{(a+(j-1)c)!\,(b+(j-1)c)!}{(a+b+(n+j-2)c+1-p)!}\,.$

Notice that by Lemma 4.5 we have $S_{n}(a,b,c)=0$ if inequality (5.8) does not
hold.

###### Proof.

We have

$\displaystyle\prod_{j=1}^{n}\frac{1}{(p-a-(n-j)c-1)!}$ $\displaystyle=$
$\displaystyle\prod_{j=1}^{n}\frac{(a+(n-j)c)!}{(p-a-(n-j)c-1)!\,(a+(n-j)c)!}$
$\displaystyle=$ $\displaystyle\prod_{j=1}^{n}(-1)^{a+(n-j)c+1}(a+(n-j)c)!\,,$

by Lemma 2.3. This implies the Lemma 5.2. ∎

###  5.2. More on values of $S_{n}(a,b,c)$

######  Theorem 5.3.

If inequalities (5.5) hold and $a=p-1-(n-1)c-k$, then

(5.11) $\displaystyle
S_{n}(p-1-(n-1)c-k,b,c)\,=\,(-1)^{\binom{n}{2}c+na}\,\frac{(nc)!}{(c!)^{n}}\,\prod_{j=1}^{n}\frac{\binom{b+(j-1)c}{k}}{\binom{(j-1)c+k}{k}}\,,$

where the integer in the right-hand side is projected to ${\mathbb{F}}_{p}$. ∎

Notice that the projections to ${\mathbb{F}}_{p}$ of the binomial coefficients
$\binom{b+(j-1)c}{k}$ can be calculated by Lucas’s Theorem and both integers
in the binomial coefficients $\binom{(j-1)c+k}{k}$ are nonnegative and less
than $p$.

###### Proof.

We have

$\displaystyle\frac{(\alpha+\beta+(j-1)\gamma)!}{(\alpha+(j-1)\gamma)!\,(\beta+(j-1)\gamma)!}=\binom{\alpha+\beta+(j-1)\gamma}{\beta}\prod_{i=1}^{(j-1)\gamma}\frac{1}{\beta+i}\,$
$\displaystyle\phantom{aaa}=\,\binom{b+(j-1)c}{p-a-(n-1)c-1}\prod_{i=1}^{(j-1)c}\frac{1}{p-a-(n-1)c-1+i}\,.$

If $a=p-1-(n-1)c-k$, then this equals

$\displaystyle\binom{b+(j-1)c}{k}\prod_{i=1}^{(j-1)c}\frac{1}{k+i}$
$\displaystyle=$
$\displaystyle\binom{b+(j-1)c}{k}\frac{k!}{((j-1)c)!\,\prod_{i=1}^{k}((j-1)c+i)}\,$
$\displaystyle=$
$\displaystyle\frac{1}{((j-1)c)!}\frac{\binom{b+(j-1)c}{k}}{\binom{(j-1)c+k}{k}}\,.$

Substituting this to (5.1) we obtain (5.11). ∎

######  Example.

Formula (5.11) gives

$\displaystyle S_{2}(p-c-1,b,c)=(-1)^{c}\binom{2c}{c}\,,\qquad
S_{2}(p-c-2,b,c)=(-1)^{c}\binom{2c}{c}\,\frac{b(b+c)}{c+1}\,,$

and so on. Notice that these values are not given by Theorem 4.1. See more
examples in Figure 1.

a=1200000000000000000000000000a=1100000000000000000000000000a=1011111111111111111111111111a=901098765432101098765432101098a=8001361041063100136104106310013a=70001071291041000107129104100010a=600001542451000015424510000a=5000001051106100000105110610000a=400000017671000000176710000a=30000000103810000000103810000a=200000000191000000001910000a=10000000001010000000001010000a=000000000001000000000010000b=012345678910111213141516171819202122232425a=900000000000000000000000000a=800000000000000000000000000a=722222222222222222222222222a=6025939520101002593952010100259a=500291192009002911920090029a=400023132000000231320000002a=300002992000000029920000000a=200000252000000002520000000a=100000022000000000220000000a=000000002000000000020000000a=800000000000000000000000000a=700000000000000000000000000a=600000000000000000000000000a=500000000000000000000000000a=433333333333333333333333333a=308473067045084730670450847a=200343006006003430060060034a=100083000000000830000000008a=000003000000000030000000000
Figure 1. Tables of $S_{1}(a,b,-)$, $S_{2}(a,b,3)$, $S_{3}(a,b,3)$ values for
$p=11$ and small integers $a,b$. Yellow shading indicates the range covered by
Theorem 4.1, and the dotted lines enclose the region covered by Theorem 5.1.
The structure of the gray shading is discussed in Section 5.3.

###  5.3. Factorization properties

By Lemmas 4.2 and 4.5 we have $S_{n}(a,b+p,c)=S_{n}(a,b,c)$ and
$S_{n}(a,b,c)=0$ if $a\geqslant p-(n-1)c$. Thus, for given $c$, it is enough
to analyze $S_{n}(a,b,c)$ in the rectangle $\Omega=\\{(a,b)\ |\
a\in[0,p-1-(n-1)c],b\in[0,p-1]\\}$. This rectangle is partitioned into $n$
smaller rectangles :

$\displaystyle\Omega_{0}(n,c)$ $\displaystyle=$ $\displaystyle\\{(a,b)\ |\
a\in[0,\ p-1-(n-1)c],\ \ b\in[0,\ p-1-(n-1)c]\\}\,,$
$\displaystyle\Omega_{i}(n,c)$ $\displaystyle=$ $\displaystyle\\{(a,b)\ |\
a\in[0,\ p-1-(n-1)c],$ $\displaystyle\phantom{aaaaaaa}b\in[p-1-(n-i)c+1,\
p-1-(n-i-1)c]\\}\,,\quad i=1,\dots,n-1,$

see the tables in Figure 1. The values of $S_{n}(a,b,c)$ in $\Omega_{0}(n,c)$
are given by Theorem 4.1 and Lemma 4.4. The values of $S_{n}(a,b,c)$ in a
rectangle $\Omega_{i}(n,c)$ are given by Theorem 4.1 and Lemma 4.4 also, but
applied to ${\mathbb{F}}_{p}$-Selberg integrals of smaller dimensions with the
same value of $c$ and suitable choices of values for $a$ and $b$. Namely, we
have the following factorization property.

######  Theorem 5.4.

For $(a,b)\in\Omega_{i}(n,c)$ with $i>0$, we have

$\displaystyle S_{n}(a,b,c)\,$ $\displaystyle=$
$\displaystyle\,(-1)^{(n-i)ic}\,\binom{nc}{ic}\,$ $\displaystyle\times$
$\displaystyle\frac{\prod_{j=1}^{n-i}\binom{p-1-(n-j)c-a}{(j-1)c}\,\prod_{j=1}^{i}\binom{p-1-(n-j)c-a}{(j-1)c}}{\prod_{j=1}^{n}\binom{p-1-(n-j)c-a}{(j-1)c}}\,$
$\displaystyle\times$ $\displaystyle
S_{n-i}(a+ic,b,c)\,S_{i}(a+(n-i)c,b+(n-i)c-p,c)\,.$

Notice that all binomials $\binom{\alpha}{\beta}$ in the second line of (5.4)
have $p>\alpha\geqslant\beta\geqslant 0$. Notice also that
$(a+ic,b)\in\Omega_{0}(n-i,c)$ and $(a+(n-i)c,b+(n-i)c-p)\in\Omega_{0}(i,c)$,
and hence Theorem 4.1 and Lemma 4.4 can be applied to $S_{n-i}(a+ic,b,c)$ and
$S_{i}(a+(n-i)c,b+(n-i)c-p,c)$ .

###### Proof.

The theorem follows from formula (5.11) and Lucas’ Theorem. ∎

##  6\. A remarkable combinatorial identity

In this section we sketch another proof of Theorem 4.1. We do this because at
the heart of this proof there is a remarkable identity (Theorem 6.1) for
polynomials in two variables.

Notation. Let $c,n$ be positive integers. For $1\leqslant i<j\leqslant n$ we
will consider non-negative integers $0\leqslant m_{ij}\leqslant 2c$ and we set
$\overline{m}_{ij}=2c-m_{ij}$. For $1\leqslant k\leqslant n$ define

$r_{k}=\sum_{1\leqslant i<k}\overline{m}_{ik}+\sum_{k<i\leqslant
n}m_{ki},\qquad s_{k}=\sum_{1\leqslant i<k}m_{ik}+\sum_{k<i\leqslant
n}\overline{m}_{ki}.$

We will use the (rising) Pochhammer symbol $(x)_{m}=x(x+1)(x+2)\cdots(x+m-1)$.

######  Theorem 6.1.

Let $n\geqslant 2,\ c\geqslant 1$ be positive integers. In $\mathbb{Z}[x,y]$
we have the identity

$\sum_{\text{\bf
m}}\left((-1)^{\sum_{i<j}m_{ij}}\prod_{i<j}\binom{2c}{m_{ij}}\cdot\prod_{k=1}^{n}(x)_{r_{k}}(y)_{s_{k}}\right)\\\
=\ \prod_{k=1}^{n-1}\frac{((k+1)c)!}{c!}(x)_{kc}(y)_{kc}(x+y+(2n-k-2)c)_{kc}\
,$

where by $\sum_{\text{\bf m}}$ we mean the $\binom{n}{2}$-fold summation
$\sum_{m_{12}=0}^{2c}\sum_{m_{13}=0}^{2c}\sum_{m_{14}=0}^{2c}\ldots\sum_{m_{n-1,n}=0}^{2c}$.

The summands of the left-hand side are of degree $4c\binom{n}{2}$ polynomials,
and according to the theorem, their sum is the right-hand side, which is the
product of degree $3c\binom{n}{2}$, with linear factors. The reader is invited
to verify that for $n=2$ the theorem reduces to a hypergeometric identity,
namely Dixon’s Theorem ([AAR, Theorem 3.4.1]) on the factorization of
${}_{3}F_{2}$ with certain parameters. For instance the $n=2,c=2$ case of
Theorem 6.1 states that the sum of the terms

$(x+2)(x+3)(y+2)(y+3),\qquad-4x(x+2)y(y+2),\qquad 6x(x+1)y(y+1),\\\
-4x(x+2)y(y+2),\qquad(x+2)(x+3)(y+2)(y+3)$

is $12(x+y+2)(x+y+3)$ (here we canceled the factor $xy(x+1)(y+1)$, which
appears in each term and on the right-hand side as well). The explicit form of
the identity for $n=3$ is

$\sum_{m_{12},m_{23},m_{13}=0}^{2c}(-1)^{m_{12}+m_{13}+m_{23}}\binom{2c}{m_{12}}\binom{2c}{m_{23}}\binom{2c}{m_{13}}\\\
\times\prod_{k=0}^{m_{12}+m_{13}-1}(x+k)\prod_{k=0}^{2c-m_{12}+m_{23}-1}(x+k)\prod_{k=0}^{4c-m_{13}-m_{23}-1}(x+k)\\\
\times\prod_{k=0}^{4c-m_{12}-m_{13}-1}(y+k)\prod_{k=0}^{2c-m_{23}+m_{12}-1}(y+k)\prod_{k=0}^{m_{13}+m_{23}-1}(y+j)\\\
\ \hskip 147.95424pt=\ \frac{(2c)!}{c!}\,\ \frac{(3c)!}{c!}\
\prod_{k=1}^{c}(x+k-1)(y+k-1)(x+y+4c-k)\\\ \times\
\prod_{k=1}^{2c}(x+k-1)(y+k-1)(x+y+4c-k).$

Sketch of the proof of Theorem 6.1. Consider equation (4.1) for a positive
integer $c$, that is, the classical Selberg integral formula in $n$
dimensions. On the left-hand side we decouple the variables, i.e. we
substitute
$(x_{i}-x_{j})^{2c}=\sum_{m_{ij}=0}^{2c}\binom{2c}{m_{ij}}x_{i}^{m_{ij}}(-x_{j})^{\overline{m}_{ij}}.$
We obtain

$\sum_{\text{\bf
m}}\left((-1)^{\sum_{i<j}m_{ij}}\prod_{i<j}\binom{2c}{m_{ij}}\cdot\prod_{k=1}^{n}\left(\int_{0}^{1}x_{k}^{a+r_{k}}(1-x_{k})^{b}dx_{k}\right)\right)\\\
=\
\prod_{j=1}^{n}\frac{(jc)!}{c!}\frac{(a+(j-1)c)!(b+(j-1)c)!}{(a+b+(n+j-2)c+1)!}.$

Now writing $\Gamma(a+r_{k}+1)\Gamma(b+1)/\Gamma(a+r_{k}+b+2)$ for the one-
dimensional Selberg integrals on the left-hand side, and substituting

$x=a+1,\qquad y=-(a+2(n-1)c+b+1)\,,$

the obtained identity rearranges to the statement in the theorem. ∎

We believe that the identity in Theorem 6.1 is interesting on it own right,
but here is a sketch how to use it to prove Theorem 4.1.

Consider the left-hand side of (4.4), and carry out the same decoupling of
variables as we did in the proof of Theorem 6.1. We obtain a sum,
parameterized by choices of $m_{ij}$, and in each summand we get a product of
one-dimensional ${\mathbb{F}}_{p}$-Selberg integrals of the form
$\int_{[1]_{p}}x_{k}^{A_{k}}(1-x_{k})^{b}dx_{k}$ for some $A_{k}$.
Substituting the value $-A_{k}!b!/(A_{k}+b+1-p)!$ for such a one-dimensional
integral (formula (3.4)), we obtain an explicit formula (no integrals
anymore!) for the left-hand side of (4.4). The summation Theorem 6.1 brings
that sum to a product form, and one obtains exactly the right-hand side of
(4.4).

In this proof one has to pay additional attention to the case $a+b<p-1$, when
some integrals $\int_{[1]_{p}}x_{k}^{A_{k}}(1-x_{k})^{b}dx_{k}$ have
$A_{k}+b<p-1$ and are equal to zero by formula (3.5). Still in this case the
sum of nonzero terms is transformed to the desired product by the identity of
Theorem 6.1 with parameter $c$ replaced by $d:=a+b+(n-1)c+1-p$. ∎

##  7\. KZ equations

###  7.1. Special case of ${\mathfrak{sl}_{2}}$ KZ equations over
${\mathbb{C}}$

Let $e,f,h$ be the standard basis of the complex Lie algeba
${\mathfrak{sl}_{2}}$ with $[e,f]=h$, $[h,e]=2e$, $[h,f]=-2f$. The element

(7.1) $\displaystyle\Omega=e\otimes f+f\otimes e+\frac{1}{2}h\otimes h\ \in\
{\mathfrak{sl}_{2}}\otimes{\mathfrak{sl}_{2}}$

is called the Casimir element. For $i\in{\mathbb{Z}}_{\geqslant 0}$ let
$V_{i}$ be the irreducible $i+1$-dimensional ${\mathfrak{sl}_{2}}$-module with
basis $v_{i},fv_{i},\dots,f^{i}v_{i}$ such that $ev_{i}=0$, $hv_{i}=iv_{i}$.

Let $u(z_{1},z_{2})$ be a function taking values in $V_{m_{1}}\otimes
V_{m_{2}}$ and solving the KZ equations

(7.2) $\displaystyle\kappa\,\frac{\partial u}{\partial
z_{1}}=\frac{\Omega}{z_{1}-z_{2}}\,u\,,\qquad\kappa\,\frac{\partial
u}{\partial z_{2}}=\frac{\Omega}{z_{2}-z_{1}}\,u\,,$

where $\kappa\in{\mathbb{C}}^{\times}$ is a parameter of the equations. Let
${\operatorname{Sing}}[m_{1}+m_{2}-2n]$ denote the space of singular vectors
of weight $m_{1}+m_{2}-2n$ in $V_{m_{1}}\otimes V_{m_{2}}$,

$\displaystyle{\operatorname{Sing}}[m_{1}+m_{2}-2n]=\\{v\in V_{m_{1}}\otimes
V_{m_{2}}\ |\ hv=(m_{1}+m_{2}-2n)v,\ ev=0\\}.$

This space is one-dimensional if the integer $n$ satisfies $0\leqslant
n\leqslant\operatorname{min}(m_{1},m_{2})$ and is zero-dimensional otherwise.
According to [SV1], solutions $u$ with values in
${\operatorname{Sing}}[m_{1}+m_{2}-2n]$ are expressible in terms of
$n$-dimensional hypergeometric integrals

$\displaystyle
u(z_{1},z_{2})=\sum_{r}u_{r}(z_{1},z_{2})\,f^{r}v_{m_{1}}\otimes
f^{n-r}v_{m_{2}}$

with

$\displaystyle
u_{r}(z_{1},z_{2})=(z_{1}-z_{2})^{m_{1}m_{2}/2\kappa}\int_{C}W_{r}(z_{1},z_{2},t)\Psi(z_{1},z_{2},t)\,dt_{1}\dots
dt_{n}\,.$

Here the domain of integration is the simplex $C=\\{t\in{\mathbb{R}}^{n}\ |\
z_{1}\leqslant t_{n}\leqslant\dots\leqslant t_{1}\leqslant z_{2}\\}$. The
function $\Psi(z_{1},z_{2},t)$ is called the master function,

$\displaystyle\Psi(z_{1},z_{2},t)=\prod_{1\leqslant i<j\leqslant
n}(t_{i}-t_{j})^{2/\kappa}\prod_{i=1}^{n}(t_{i}-z_{1})^{-m_{1}/\kappa}(t_{i}-z_{2})^{-m_{2}/\kappa}\,,$

the rational functions $W_{r}(z_{1},z_{2},t)$ are called the weight functions,

$\displaystyle W_{r}(z_{1},z_{2},t)=\sum_{J\subset\\{1,\dots,n\\}\atop|J|=r}\
\prod_{j\in J}\ \frac{1}{t_{j}-z_{1}}\ \prod_{j\notin
J}\frac{1}{t_{i}-z_{2}}\,.$

The fact that $u$ is a solution in ${\operatorname{Sing}}[m_{1}+m_{2}-2n]$
implies that

(7.3)
$\displaystyle\phantom{aaa}(n-r)(m_{2}-n+r+1)u_{r}\,+\,(r+1)(m_{1}-r)u_{r+1}\,=\,0,\qquad
r=1,\dots,n-1.$

The coordinate functions $u_{r}$ are generalizations of the Selberg integral.
In fact, $u_{0}$ and $u_{n}$ are exactly the Selberg integrals. For example,

$\displaystyle
u_{0}(z_{1},z_{2})=(z_{1}-z_{2})^{m_{1}m_{2}/2\kappa}\\!\\!\int_{C}\prod_{1\leqslant
i<j\leqslant
n}\\!\\!\\!(t_{i}-t_{j})^{2/\kappa}\prod_{i=1}^{n}(t_{i}-z_{1})^{-m_{1}/\kappa}(t_{i}-z_{2})^{-m_{2}/\kappa-1}dt_{1}\dots
dt_{n}\,.$

The change of variables $t_{i}=(z_{2}-z_{1})s_{i}+z_{1}$ for $i=1,\dots,n$
gives

$\displaystyle
u_{0}(z_{1},z_{2})=\frac{(-1)^{A}(z_{1}-z_{2})^{B}}{n!}\,\tilde{S}_{n}\Big{(}1-\frac{m_{1}}{\kappa},-\frac{m_{2}}{\kappa},\frac{1}{\kappa}\Big{)},$

where $\tilde{S}_{n}(\alpha,\beta,\gamma)$ denotes the Selberg integral (1.1),
$A=\frac{n(n-1-m_{1})}{\kappa}+n$,
$B=\frac{m_{1}m_{2}-2n(m_{1}+m_{2})+2n(n-1)}{2\kappa}$. By formula (7.3), we
obtain

$\displaystyle u(z_{1},z_{2})$ $\displaystyle=$
$\displaystyle\kappa^{n}\,\frac{(-1)^{A}(z_{1}-z_{2})^{B}}{n!}\,\prod_{j=1}^{n}\frac{\Gamma(1+\frac{j}{\kappa})}{\Gamma(1+\frac{1}{\kappa})}\,\frac{\Gamma(1-\frac{m_{1}-j+1}{\kappa})\,\Gamma(1-\frac{m_{2}-j+1}{\kappa})}{\Gamma(1-\frac{m_{1}+m_{2}-n-j+2}{\kappa})}\,,$
$\displaystyle\times$
$\displaystyle\sum_{r=0}^{n}(-1)^{r}\binom{n}{r}\frac{f^{r}v_{1}\otimes
f^{n-r}v_{2}}{\prod_{j=1}^{r}(m_{1}-j+1)\prod_{j=1}^{n-r}(m_{2}-j+1)}\,.$

###  7.2. Special case of ${\mathfrak{sl}_{2}}$ KZ equations over
${\mathbb{F}}_{p}$

Let $p$ be an odd prime number. Let $\kappa$ be a ratio of two integers not
divisible by $p$. Let $m_{1},m_{2}$ be positive integers such that
$m_{1},m_{2}<p$. Consider the Lie algebra ${\mathfrak{sl}_{2}}$ over the field
${\mathbb{F}}_{p}$. Let $V^{p}_{m_{1}}$, $V^{p}_{m_{2}}$ be the
${\mathfrak{sl}_{2}}$-modules over ${\mathbb{F}}_{p}$, corresponding to the
complex representations $V_{m_{1}}$, $V_{m_{2}}$. Then the KZ differential
equations (7.2) with values in $V^{p}_{m_{1}}\otimes V^{p}_{m_{2}}$ are well-
defined, and we may discuss their polynomial solutions in variables
$z_{1},z_{2}$. Let

$\displaystyle{\operatorname{Sing}}[m_{1}+m_{2}-2n]_{p}=\\{v\in
V_{m_{1}}^{p}\otimes V_{m_{2}}^{p}\ |\ hv=(m_{1}+m_{2}-2n)v,\ ev=0\\}.$

This space is one-dimensional, if the integer $n$ satisfies $0\leqslant
n\leqslant\operatorname{min}(m_{1},m_{2})$ and is zero-dimensional otherwise.

Choose the least positive integers $M_{1},M_{2},M_{12},c$ such that

(7.5) $\displaystyle M_{i}\equiv-\frac{m_{i}}{\kappa}\,,\quad
M_{12}\equiv\frac{m_{1}m_{2}}{2\kappa},\quad
c\equiv\frac{1}{\kappa}\,\qquad(\operatorname{mod}\,p).$

According to [SV2], solutions $u$ with values in
${\operatorname{Sing}}[m_{1}+m_{2}-2n]_{p}$ are expressible in terms of
$n$-dimensional ${\mathbb{F}}_{p}$-hypergeometric integrals

(7.6) $\displaystyle
u(z_{1},z_{2})=\sum_{r}u_{r}(z_{1},z_{2})\,f^{r}v_{m_{1}}\otimes
f^{n-r}v_{m_{2}}$

with

$\displaystyle
u_{r}(z_{1},z_{2})=(z_{1}-z_{2})^{M_{12}}\int_{[1,\dots,1]_{p}}W_{r}(z_{1},z_{2},t)\Psi_{p}(z_{1},z_{2},t)\,dt_{1}\dots
dt_{n}\,,$

where $\Psi_{p}(z_{1},z_{2},t)$ is the master polynomial,

$\displaystyle\Psi_{p}(z_{1},z_{2},t)=\prod_{1\leqslant i<j\leqslant
n}(t_{i}-t_{j})^{2c}\prod_{i=1}^{n}(t_{i}-z_{1})^{M_{1}}(t_{i}-z_{2})^{M_{2}}\,.$

######  Theorem 7.1.

Assume that $M_{1},M_{2},M_{12},c,n$ are positive integers such that

(7.7) $\displaystyle M_{1}+(n-1)c<p,\qquad\phantom{aaaaa}M_{2}+(n-1)c<p,$
$\displaystyle p\leqslant M_{1}+M_{2}+(n-1)c,\qquad M_{1}+M_{2}+(2n-2)c<2p-1\
.$

Then the function $u(z_{1},z_{2})$, defined by (7.6), is given by the formula

$\displaystyle u(z_{1},z_{2})$ $\displaystyle=$
$\displaystyle(-1)^{A}(z_{1}-z_{2})^{B}\,\prod_{j=1}^{n}\frac{(jc)!}{c!}\,\frac{(M_{1}+(j-1)c)!\,(M_{2}+(j-1)c)!}{(M_{1}+M_{2}+(n+j-2)c-p)!}\,,$
$\displaystyle\times$
$\displaystyle\sum_{r=0}^{n}(-1)^{r}\binom{n}{r}\frac{f^{r}v_{1}\otimes
f^{n-r}v_{2}}{\prod_{j=1}^{r}(M_{1}+(j-1)c)\prod_{j=1}^{n-r}(M_{2}+(j-1)c)}\,,$

where

$\displaystyle A=n(M_{1}+(n-1)c+1)\,,\qquad
B=M_{12}+n(M_{1}+M_{2}+(n-1)c-p)\,.$

For $n=1$ this is [V7, Theorem 4.3].

###### Proof.

The proof follows from the ${\mathbb{F}}_{p}$-Selberg integral formula of
Theorem 4.1 and formula (7.3), cf. Section 7.1. ∎

## References

  * [1]
  * [An] Greg W. Anderson, The evaluation of Selberg sums, C. R. Acad. Sci. Paris Sér. I Math. 311 (1990), no. 8, 469–472
  * [2]
  * [AAR] G.E. Andrews, R. Askey, R. Roy, Special functions, Cambridge University Press, 1999
  * [3]
  * [Ao] K. Aomoto, Jacobi polynomials associated with Selberg integral, Siam J. Math, 18 (1987), No. 2, 545–549
  * [4]
  * [As] R. Askey, Some basic hypergeometric extensions of integrals of Selberg and Andrews, SIAM J. Math. Anal. 11 (1980), 938–951
  * [5]
  * [Ch] I. Cherednik, From double Hecke algebra to analysis, Doc.Math.J.DMV, Extra Volume ICM 1998,II, 527–531
  * [6]
  * [EFK] P. Etingof, I. Frenkel, A.Kirillov, Lectures on representation theory and Knizhnik-Zamolodchikov equations, Mathematical Surveys and Monographs, 58, AMS, Providence, RI, 1998. xiv+198 pp. ISBN: 0-8218-0496-0
  * [7]
  * [Ev] R.J. Evans, The evaluation of Selberg character sums, L’Enseign. Math. 37 (1991), 235–248
  * [8]
  * [FSV] G. Felder, L. Stevens, and A. Varchenko, Elliptic Selberg integrals and conformal blocks, Math. Res. Lett. 10 (2003), no. 5–6, 671–684
  * [9]
  * [FV] G. Felder and A.Varchenko, Integral representation of solutions of the elliptic Knizhnik-Zamolodchikov-Bernard equations, Int. Math. Res. Notices, 1995, N. 5, 221–233
  * [10]
  * [FW] P. J. Forrester, S. O. Warnaar, The importance of the Selberg integral, Bull. Amer. Math. Soc. (N.S.) 45 (2008), 489–534
  * [11]
  * [Ha] L. Habsieger, Une $q$-intégrale de Selberg et Askey, SIAM J. Math. Anal. 19 (1988), 1475–1489
  * [12]
  * [Ka] J. Kaneko, $q$-Selberg integrals and Macdonald polynomials, Ann. Sci. Ecole Norm. Sup. 29 (1996), 583–637
  * [13]
  * [KZ] V. Knizhnik and A. Zamolodchikov, Current algebra and the Wess-Zumino model in two dimensions, Nucl. Phys. B247 (1984), 83–103
  * [14]
  * [L] E. Lucas, Theorie des Fonctions Numeriques Simplement Periodiques, American Journal of Mathematics. 1 (2) (1878) 184–196, doi:10.2307/2369308, JSTOR 2369308, MR 1505161
  * [15]
  * [Mo] W. G. Morris, Constant Term Identities for Finite and Affine Root System, Ph.D. Thesis, University of Wisconsin, Madison, 1982
  * [16]
  * [MV] E. Mukhin and A. Varchenko, Remarks on critical points of phase functions and norms of Bethe vectors, Adv. Stud. Pure Math. 27 (2000), 239–246
  * [17]
  * [Op] E.M. Opdam, Some applications of hypergeometric shift operators, Invent. Math. 98 (1989), 1–18
  * [18]
  * [R] E. Rains, Multivariate Quadratic Transformations and the Interpolation Kernel, Contribution to the Special Issue on Elliptic Hypergeometric Functions and Their Applications, SIGMA 14 (2018), 019, 69 pages, https://doi.org/10.3842/SIGMA.2018.019
  * [19]
  * [RTVZ] R. Rimányi, V. Tarasov, A.Varchenko, P. Zinn-Justin, Extended Joseph polynomials, quantized conformal blocks, and a q-Selberg type integral, Journal of Geometry and Physics, 62 (2012), pp. 2188–2207
  * [20]
  * [RV] R. Rimányi, A. Varchenko, The $\mathbb{F}_{p}$-Selberg integral of type $A_{n}$, arXiv:2012.01391, 1–21
  * [21]
  * [Se1] A. Selberg, Bemerkninger om et multipelt integral, Norsk Mat. Tidsskr., 26 (1944), 71–78
  * [22]
  * [Se2] A. Selberg, Collected papers I, Springer–Verlag, Heidelberg, 1989; p. 212
  * [23]
  * [Sp] V. Spiridonov, On the elliptic beta function, (Russian) Uspekhi Mat. Nauk 5 6 (2001), no. 1, 181–182; translation in Russian Math. Surveys 56 (2001), no. 1, 185–186
  * [24]
  * [SV1] V. Schechtman, A.Varchenko, Arrangements of Hyperplanes and Lie Algebra Homology, Invent. Math. 106 (1991), 139–194
  * [25]
  * [SV2] V. Schechtman, A.Varchenko, Solutions of KZ differential equations modulo $p$, The Ramanujan Journal, 48 (3), 2019, 655–683
  * [26]
  * [SlV] A. Slinkin, A. Varchenko Hypergeometric Integrals Modulo $p$ and Hasse–Witt Matrices, arXiv:2001.06869, 1–36
  * [27]
  * [TV1] V. Tarasov and A.Varchenko, Geometry of q-hypergeometric functions as a bridge between Yangians and quantum affine algebras, Invent. Math. 128 (1997), 501–588
  * [28]
  * [TV2] V. Tarasov and A.Varchenko, Geometry of q-hypergeometric functions, quantum affine algebras and elliptic quantum groups, Asterisque, 246 (1997), 1–135
  * [29]
  * [TV3] V. Tarasov and A.Varchenko, Selberg-type integrals associated with $\mathfrak{sl}_{3}$, Lett. Math. Phys. 65 (2003), 173–185
  * [30]
  * [V1] A. Varchenko, Multidimensional Hypergeometric Functions and Representation Theory of Lie Algebras and Quantum Groups, Advanced Series in Mathematical Physics, Vol. 21, World Scientific, 1995
  * [31]
  * [V2] A.Varchenko, Special functions, KZ type equations, and Representation theory, CBMS, Regional Conference Series in Math., n. 98, AMS (2003)
  * [32]
  * [V3] A.Varchenko, A Selberg Integral Type Formula for an $\mathfrak{sl}_{2}$ One-Dimensional Space of Conformal Blocks, Mosc. Math. J. 10 (2010), no. 2, 469–475
  * [33]
  * [V4] A.Varchenko, Solutions modulo $p$ of Gauss-Manin differential equations for multidimensional hypergeometric integrals and associated Bethe ansatz, Mathematics 2017, 5(4), 52; doi:10.3390/math5040052, 1–18
  * [34]
  * [V5] A.Varchenko, Hyperelliptic integrals modulo $p$ and Cartier-Manin matrices,
  * [35] arXiv:1806.03289, 1–16
  * [36]
  * [V6] A. Varchenko, An invariant subbundle of the KZ connection mod $p$ and reducibility of $\widehat{{\mathfrak{sl}_{2}}}$ Verma modules mod $p$, arXiv:2002.05834 , 1–14
  * [37]
  * [V7] A.Varchenko, Determinant of ${\mathbb{F}}_{p}$-hypergeometric solutions under ample reduction, arXiv:2010.11275, 1–22
  * [38]
  * [Wa1] S. Ole Warnaar, A Selberg integral for the Lie algebra $A_{n}$, Acta Math. 203 (2009), no. 2, 269–304
  * [39]
  * [Wa2] S. Ole Warnaar, The $\mathfrak{sl}_{3}$ Selberg integral, Adv. Math. 224 (2010), no. 2, 499–524
  * [40]