Canonical Hilbert-Burch matrices for power series

Abstract: Sets of zero-dimensional ideals in the polynomial ring $k[x,y]$ that share the same leading term ideal with respect to a given term ordering are known to be affine spaces called Gröbner cells. Conca-Valla and Constantinescu parametrize such Gröbner cells in terms of certain canonical Hilbert-Burch matrices for the lexicographical and degree-lexicographical term orderings, respectively.In this paper, we give a parametrization of $(x,y)$-primary ideals in Gröbner cells which is compatible with the local structure of such ideals. More precisely, we extend previous results to the local setting by defining a notion of canonical Hilbert-Burch matrices of zero-dimensional ideals in the power series ring $k[[x,y]]$ with a given leading term ideal with respect to a local term ordering.

\section{Parametrization of ideals in $\res[x,y]$}\label{S:polys}

Let $\res$ be an arbitrary field. Consider a monomial zero-dimensional ideal $E$ in the polynomial ring $P=\res[x,y]$. By taking the smallest integer $t$ such that $x^t\in E$ and the smallest integers $m_i$ such that $x^{t-i}y^{m_i}\in E$ for any $1\leq i\leq t$, we can always express such a monomial ideal as

$$E=(x^t,x^{t-1}y^{m_1},\dots,x^{t-i}y^{m_i},\dots,y^{m_t}),$$

\noindent where $0=m_0< m_1\leq\dots\leq m_t$ is an increasing sequence.
If all the inequalities are strict, we call \(E\) a lex-segment ideal.

After fixing a term order, we can ask for all ideals $I$ in $P$ with leading term ideal $E$. Reduced Gr\"obner bases provide a parametrization of this set of ideals. However, explicitly describing such a parametrization is not always straightforward. In \cite{CV08}, Conca and Valla consider a different approach. Instead of focusing on the generators of $I$, they study the relations or syzygies among the generators. A Hilbert-Burch matrix of the ideal $I$ encodes these relations. Therefore, giving such a parametrization is equivalent to choosing a simple or canonical Hilbert-Burch matrix for each ideal $I$.

\begin{definition}\label{canonical}
The \textbf{canonical Hilbert-Burch matrix}\index{canonical Hilbert-Burch matrix} of the monomial ideal $E=(x^t,\dots,x^{t-i}y^{m_i},\dots,y^{m_t})$ is the Hilbert-Burch matrix of $E$ of the form

$$H=\left(\begin{array}{cccc}
y^{d_1} & 0 & \cdots & 0\\
-x & y^{d_2} & \cdots & 0\\
0 & -x & \cdots & 0\\
\vdots & \vdots & & \vdots\\
 0 & 0 & \cdots & y^{d_t}\\
0 & 0 & \cdots & -x
\end{array}\right),$$
\noindent
where $d_i=m_i-m_{i-1}$ for any $1\leq i\leq t$.
The \textbf{degree matrix}\index{degree matrix} $U$ of $E$ is the $(t+1)\times t$ matrix with integer entries $u_{i,j}=m_j-m_{i-1}+i-j$, for $1\leq i\leq t+1$ and $1\leq j\leq t$.
\end{definition}

It follows from the definition that $u_{i,i}=d_i$ and $u_{i+1,i}=1$, for $1\leq i\leq t$.

\medskip

Conca-Valla parametrize the set \(V_0(E)\) of all zero-dimensional ideals $I$ in $P$ that share the same leading term ideal $E$ with respect to the lexicographical term ordering.
They give a set of matrices that deform the canonical Hilbert-Burch matrix of the monomial ideal $E$ into Hilbert-Burch matrices of each $I$. We use the same notation as in \cite{CV08}.

\begin{definition}\label{def:setT2}
We denote by $T_0(E)$ the set of matrices $N=(n_{i,j})$ of size $(t+1)\times t$ with entries in $\res[y]$ such that
\begin{itemize}
\item $n_{i,j}=0$ for any $i<j$,
\item $\deg(n_{i,j})<d_j$ for any $i\geq j$.
\end{itemize}
\end{definition}

\begin{theorem}\label{ThCV08}\cite[Theorem 3.3, Corollary 3.1]{CV08} Given a zero-dimensional monomial ideal $E$ in $P=\res[x,y]$ with canonical Hilbert-Burch matrix $H$, the map
$$\begin{array}{rrcl}
\Phi: & T_0(E) & \longrightarrow & V_0(E)\\
& N & \longmapsto & I_t(H+N)
\end{array}$$

\noindent
is a bijection.
\end{theorem}

This theorem allows us to define the canonical Hilbert-Burch matrix of any zero-dimensional ideal $I$ of $P$ as $H+\Phi^{-1}(I)$, where $H$ is the canonical Hilbert-Burch matrix of the monomial ideal $\operatorname{Lt_{lex}}(I)$.

\medskip

In \cite{Con11}, Constantinescu parametrizes the variety
$$V_{\operatorname{deglex}}(E)=\lbrace I\subset P:\operatorname{Lt_{deglex}}(I)=E\rbrace,$$
where the leading term ideals are considered with respect to the degree-lexicographical order, for $E$ lex-segment.

\begin{definition}
Denote by $\mathcal{A}(E)$ the set of $(t+1)\times t$ matrices $A=(a_{i,j})$
with entries in $\res[y]$ such that all its entries satisfy
\[\deg(a_{i,j})\leq \begin{cases}
\min(u_{i,j}+1, d_i-1), & i\leq j;\\
\min(u_{i,j},d_j-1), & i > j;
\end{cases}\]
\noindent
and $u_{i,j}$ are the entries of the degree matrix $U$ of $E$.
\end{definition}

\begin{theorem}\label{ThCon11}\cite[Theorem 3.1]{Con11} Given a zero-dimensional lex-segment ideal $L$ in $P=\res[x,y]$ with canonical Hilbert-Burch matrix $H$, the map
$$\begin{array}{rrcl}
\Phi: & \mathcal{A}(L) & \longrightarrow & V_{\operatorname{deglex}}(L)\\
& A & \longmapsto & I_t(A+H)
\end{array}$$

\noindent
is a bijection.
\end{theorem}

The proofs of well-definedness and surjectivity of $\Phi$ hold for any monomial ideal. Although the lex-segment hypothesis is needed in his proof of injectivity, the author conjectures that $\Phi$ is a proper parametrization in the general case.

\section{From polynomials to power series}

We are now interested in the local setting. We want to parametrize zero-dimensional ideals of the ring of formal power series $R=\res[\![x,y]\!]$ analogously to the results of Conca-Valla and Constantinescu for the polynomial ring.

One can still describe zero-dimensional monomial ideals of $R$ as $E=(x^t,x^{t-1}y^{m_1},\dots,x^{t-i}y^{m_i},\dots,y^{m_t})$ and consider their canonical Hilbert-Burch matrix $H$ as introduced in \Cref{canonical}. However, in order to define the leading term ideal we need to deal with term orders that are well-defined in a power series ring.

\subsection{Enhanced standard basis and Grauert's division}

\begin{definition}
A term ordering $\tau$ in the polynomial ring $P=\res[x_1,\dots,x_n]$ induces a reverse-degree ordering ${\overline{\tau}}$ in $R=\res[\![x_1,\dots,x_n]\!]$ such that for any monomials $m,m'$ in $R$, $m>_{{\overline{\tau}}} m'$ if and only if
$$\deg(m) < \deg(m')$$
or
$$\deg(m) = \deg(m') \mbox{ and } m >_{\tau} m_0.$$
\noindent
We call ${\overline{\tau}}$ the \textbf{local degree ordering} induced by the global ordering $\tau$.
\end{definition}

Note that the local orders induced by the lexicographic and the degree lexicographic orders are the same. Moreover, in two variables, the latter also coincides with the reverse degree lexicographic order.

\begin{definition} Given an ideal $J$ of $R$, we define the \textbf{leading term ideal} of $J$ as the monomial ideal in $P$ generated by the leading terms with respect to the local degree ordering ${\overline{\tau}}$, i.e.
$$\operatorname{Lt_{\overline{\tau}}}(J)=\left( \operatorname{Lt_{\overline{\tau}}}(f): f\in J\right)\subset\res[x,y].$$

 We call a subset $\lbrace f_1,\dots,f_m\rbrace$ of $J$ a \textbf{${\overline{\tau}}$-enhanced standard basis of $J$} if $\operatorname{Lt_{\overline{\tau}}}(J)=(\operatorname{Lt_{\overline{\tau}}}(f_1),\dots,\operatorname{Lt_{\overline{\tau}}}(f_m))$.
\end{definition}

\begin{remark} The term standard basis was first used by Hironaka in \cite[Definition 3]{Hir64} to refer to systems of generators of an ideal $J$ in $R$ whose initial forms generate the homogeneous ideal $J^\ast$. However, this terminology is not consistent in literature and in other sources standard basis refer to what we here define as ${\overline{\tau}}$-enhanced standard basis, e.g. \cite{GP08}. The notation used in this paper is the same as in \cite{Ber09}.
\end{remark}

\begin{example}\label{ex:1}\emph{Comparison between leading terms w.r.t. global and local orders.} Consider the lex-segment ideal $L=(x^3,x^2y,xy^3,y^5)$ and set $\tau=\operatorname{lex}$. Let $H$ be its canonical Hilbert-Burch matrix and $U$ its degree matrix:

$$H=\left(\begin{array}{ccc}
y & 0 & 0 \\
-x & y^2 & 0\\
0 & -x & y^2 \\
0 & 0 & -x\\
\end{array}\right),\quad U=\left(\begin{array}{ccc}
1 & 2 & 3\\
1 & 2 & 3\\
0 & 1 & 2\\
-1 & 0 & 1\\
\end{array}\right).$$

Consider the matrix $M=H+N$, where $N$ is a $4\times 3$ matrix with all zero entries except for $1$ in the $(4,3)$-entry. From Conca-Valla parametrization in \Cref{ThCV08}, we know that $I=I_3(M)\subset P$ is an ideal in $V_0(L)$. Indeed, the maximal minors of $M$ give a $\tau$-Gr\"obner basis $\lbrace x^3-x^2,x^2y-xy,xy^3-y^3,y^5\rbrace$ of $I$ and $\operatorname{Lt_{lex}}(I)=L$.

However, the $3\times 3$-minors of $M$ are not a ${\overline{\tau}}$-enhanced standard basis of the ideal $J=IR$, namely the extension of $I$ in the power series ring. In fact, $J=(x^2,xy,y^3)$ is itself a lex-segment ideal. The reason why the leading term ideal changes when computed with respect to ${\overline{\tau}}$ is that $n_{4,3}=1$ has a term of degree lower than $u_{4,3}=1$.
\end{example}

\begin{remark} Because $\operatorname{Lt_{\overline{\tau}}}(J)$ is a monomial ideal, $R/\operatorname{Lt_{\overline{\tau}}}(J)$ has a natural graded structure. Moreover, we have $R/J\simeq P/(J\cap P)$ for any zero-dimensional ideal $J\subset R$. Therefore we can consider $\operatorname{Lt_{\overline{\tau}}}(J)$ indistinctively in $R$ or $P$. The Hilbert function of the local ring $R/J$ is defined as
$$\operatorname{HF}_{R/J}(i)=\dim_\res\left(\frac{(m/J)^i}{(m/J)^{i+1}}\right).$$ Recall that $\operatorname{HF}_{R/J}=\operatorname{HF}_{P/\operatorname{Lt_{\overline{\tau}}}(J)}$, where the latter is the usual Hilbert function of a graded ring.
On the contrary, when taking $I\subset P$ and $J\subset R$ from \Cref{ex:1}, note that $\operatorname{HF}_{R/J}=\lbrace 1,2,1\rbrace$ whereas the Hilbert function of $P/I$ is not even defined.
\end{remark}

Buchberger division can be replaced in the power series ring by Grauert's division, see \cite{Gra72}. Later on, Mora gave an analogous method to Buchberger's algorithm in the local case: the tangent cone algorithm, see \cite{Mor82}. We reproduce next a modern formulation of Grauert's division theorem in $\res[\![x_1,\dots,x_n]\!]$ from \cite[Theorem~6.4.1]{GP08}:

\begin{theorem}\label{Grauert}[Grauert's Division Theorem]
Let $f,f_0,\dots,f_t$ be in $R$. Then there exist $q_0,\dots,q_t,r\in R$ such that $$f=\sum_{i=0}^t q_if_i+r$$ satisfying the following properties:
\begin{enumerate}
\item No monomial of $r$ is divisible by any $\operatorname{Lt_{\overline{\tau}}}(f_i)$, for $0\leq i\leq t$.
\item If $q_i\neq 0$, $\operatorname{Lt_{\overline{\tau}}}(q_if_i)\leq_{{\overline{\tau}}}\operatorname{Lt_{\overline{\tau}}}(f)$.
\end{enumerate}
\end{theorem}

These techniques can be used to extend results that are well-understood for graded algebras to the local case. In \cite{ERV14}, they have been successfully applied to characterize the Hilbert function of one dimensional quadratic complete intersections.

\subsection{Lifting of syzygies in local rings}
The connection between the lifting of syzygies and Gr\"obner bases has been widely studied in polynomial rings, see \cite[Theorem 2.4.1]{KR00}. Analogous results hold for rings of formal power series.

Let $\mathcal{F}$ be a subset $\lbrace f_0,\dots,f_t\rbrace$ of $R$ and set $\operatorname{Lt_{\overline{\tau}}}(\mathcal{F})=\left\{\operatorname{Lt_{\overline{\tau}}}(f_0),\dots,\operatorname{Lt_{\overline{\tau}}}(f_t)\right\}$. By a slight abuse of notation, $\mathcal{F}$ and \(\operatorname{Lt_{\overline{\tau}}}(\mathcal{F})\) will be regarded as $(t+1)$-tuples of $R^{t+1}$ when convenient.
Mora, Pfister and Traverso prove in \cite[Theorem 3]{MPT89} that $\mathcal{F}$ is a  ${\overline{\tau}}$-enhanced standard basis of an ideal of $R$ if and only if any homogeneous syzygy of $\operatorname{Lt_{\overline{\tau}}}(\mathcal{F})$ can be lifted to a syzygy of $\mathcal{F}$.

For the sake of completeness, we will now give a precise definition of lifting in this setting following the notation of \cite[Definition 1.7]{Ber09}. We define the \textbf{degree} of $m=(m_1,\dots,m_{t+1})\in R^{t+1}$ with respect to the $(t+1)$-tuple $\mathcal{F}\in R^{t+1}$ and the local ordering ${\overline{\tau}}$ as

$$\deg_{({\overline{\tau}},\mathcal{F})}(m)=\max_{{\overline{\tau}}}\lbrace \operatorname{Lt_{\overline{\tau}}}(m_i f_{i-1}): 1\leq i\leq t+1\mbox{ and }m_i\neq 0\rbrace.$$

An element $\sigma = \{\sigma_1, \dots, \sigma_{t+1}\} \in R^{t+1}$ is homogeneous with respect to $({\overline{\tau}},\mathcal{F})$-degree if all its non-zero components reach the maximum leading term, namely $\operatorname{Lt_{\overline{\tau}}}(\sigma_i f_{i-1})=\deg_{({\overline{\tau}},\mathcal{F})}(\sigma)$ for any $i\in\lbrace 1,\dots,t+1\rbrace$ such that $\sigma_i\neq 0$.

\begin{definition} We call $m\in R^{t+1}$ a \textbf{$({\overline{\tau}},\mathcal{F})$-lifting} of a $({\overline{\tau}},\mathcal{F})$-homogeneous element $\sigma\in R^{t+1}$ if $m=\sigma + n$, where $n=(n_1,\dots,n_{t+1})\in R^{t+1}$ satisfies
\begin{equation}\label{eq:lifting}
\operatorname{Lt_{\overline{\tau}}}(n_if_{i-1})<_{{\overline{\tau}}} \deg_{({\overline{\tau}},\mathcal{F})}(\sigma)
\end{equation}
for any $1\leq i\leq t+1$ such that $n_i\neq 0$.
Conversely, we call $\sigma$ the \textbf{$({\overline{\tau}},\mathcal{F})$-leading form} of $m$ and denote it by
$\operatorname{LF_{(\overline{\tau},\mathcal{F})}}(m)=\sigma\in R^{t+1}$.
\end{definition}

If both ${\overline{\tau}}$ and $\mathcal{F}$ are clear from the context, we will just say that $m$ is a lifting of $\sigma$, which in its turn is the leading form of $m$. The shift on the indexes of $n$ and $\mathcal{F}$ in (\ref{eq:lifting}) is convenient for our specific setting, as we will see in the following example.

\begin{example}{\emph{Liftings of homogeneous elements.}} \label{Ex:lift}
Consider a monomial ideal $E=(x^t,x^{t-1}y^{m_1},\dots,y^{m_t})$ and take $\mathcal{F}=(f_0,\dots,f_t)\in R^{t+1}$ such that $\operatorname{Lt_{\overline{\tau}}}(f_i)=x^{t-i}y^{m_i}$ for any $0\leq i\leq t$. The columns $\sigma^1,\dots,\sigma^t$ of the canonical Hilbert-Burch matrix $H$ of $E$ are $({\overline{\tau}},\mathcal{F})$-homogeneous elements with $\deg_{({\overline{\tau}},\mathcal{F})}(\sigma^j)=x^{t-j+1}y^{m_j}$ for any $1\leq j\leq t$. We can build liftings $m^j$ of $\sigma^j$ by taking $m^j=\sigma^j+n^j$, where $n^j=(n_{1,j},\dots,n_{t+1,j})$ is a $(t+1)$-tuple of $R^{t+1}$ such that either $n_{i,j}=0$ or $\operatorname{Lt_{\overline{\tau}}}(n_{i,j})x^{t-i+1}y^{m_{i-1}}<_{{\overline{\tau}}} x^{t-j+1}y^{m_j}$.
\end{example}

As in the polynomial case, Bertella proves in \cite[Theorem~1.10]{Ber09} that the module of syzygies of $\mathcal{F}$ is generated by liftings of homogeneous generators of the module of syzygies of $\operatorname{Lt_{\overline{\tau}}}(\mathcal{F})$. Recall that the fact that syzygies lift is equivalent to the existence of a flat family $I_t$ where $I_0=\operatorname{Lt_{\overline{\tau}}}(\mathcal{F})$ and $I_1=(\mathcal{F})$, see \cite[Chapter 1]{Ste03} and \cite[Lemma 18.8]{MS05}.

In the same paper, Bertella provides a very explicit characterization of ${\overline{\tau}}$-enhanced standard bases in codimension two in terms of matrices that encode leading forms of the generators of the module of syzygies of the ideal:

\begin{theorem}\cite[Theorem~1.11]{Ber09}\label{1.11}
Let $M$ be a $(t+1)\times t$ matrix with entries in $R$. For $0\leq i\leq t$, let $f_i$ be the determinant of $M$ after removing row $i+1$ and set $\mathcal{F}=(f_0,\dots,f_t)$. Let $H$ be the matrix whose columns are the $({\overline{\tau}},\mathcal{F})$-leading forms of the columns of $M$.
Assume that:
\begin{itemize}
\item $\operatorname{ht}(f_0,\dots,f_t)=2$,
    \item $I_t(H)=(\operatorname{Lt_{\overline{\tau}}}(f_0),\dots,\operatorname{Lt_{\overline{\tau}}}(f_t))$.
\end{itemize}
Then the following are equivalent:
\begin{enumerate}
    \item[(i)] $\lbrace f_0,\dots,f_t\rbrace$ is a ${\overline{\tau}}$-enhanced standard basis of the ideal $I_t(M)$.
    \item[(ii)] $\operatorname{ht}(\operatorname{Lt_{\overline{\tau}}}(f_0),\dots,\operatorname{Lt_{\overline{\tau}}}(f_t))=2$.
\end{enumerate}
\end{theorem}

In other words, for zero-dimensional ideals $J$ in $R=\res[\![x,y]\!]$, a ${\overline{\tau}}$-enhanced standard basis $\mathcal{F}$ arises from maximal minors of a Hilbert-Burch matrix \(M\) that encodes liftings of syzygies of $\operatorname{Lt_{\overline{\tau}}}(\mathcal{F})$.

\section{Towards a parametrization of ideals in $\res[\![x,y]\!]$}
From now on we will consider \(\tau = \operatorname{lex}\).

\begin{definition} \label{def:setV}
Given a zero-dimensional monomial $E$ ideal in $R$, we denote by $V(E)$ the set of ideals $J\subset R$ such that $\operatorname{Lt_{\overline{\tau}}}(J)=E$.
\end{definition}

Let us start by defining a set of matrices whose maximal minors generate all the ideals with the same leading term ideal with respect to the local order ${\overline{\tau}}$.

\begin{definition}\label{def:setN}
Let $E$ be a monomial ideal with canonical Hilbert-Burch matrix $H$ and associated degree matrix $U=(u_{i,j})$. We define the set $\mathcal{N}(E)$ of $(t+1)\times t$ matrices $N=(n_{i,j})$ with entries in $\res[\![y]\!]$ such that all its non-zero entries satisfy
\[{\mathrm{ ord}}(n_{i,j})\geq \begin{cases}
u_{i,j}+1, & i\leq j;\\
u_{i,j}, & i > j.
\end{cases}.\]
\end{definition}

\begin{proposition}\label{Param} Given a monomial ideal $E=(x^t,\dots,x^{t-i}y^{m_i},\dots,y^{m_t})$ in $R$ with canonical Hilbert-Burch matrix $H$ and degree matrix $U$, let $V(E)$ be the set of ideals in \Cref{def:setV} and let $\mathcal{N}(E)$ be the set of matrices in \Cref{def:setN}. The map
$$\begin{array}{rrcl}
\varphi: & \mathcal{N}(E) & \longrightarrow & V(E)\\
& N & \longmapsto & I_t(H+N)
\end{array}$$
\noindent
is surjective.
\end{proposition}

We prove this proposition in two steps: well-definedness in \Cref{well} and surjectivity in \Cref{surj}.

\begin{lemma}\label{well} The map $\varphi$ is well-defined.
\end{lemma}

\begin{proof}
We need to prove that the leading term ideal $\operatorname{Lt_{\overline{\tau}}}\left(I_t(H+N)\right)$ is the mononomial ideal $E$ for any matrix $N=(n_{i,j})$ in the set $\mathcal{N}(E)$.

Consider the matrix $M=H+N$. The order bounds on the entries of $N$ yield
$${\mathrm{ ord}}(m_{i,j})\geq \left\lbrace\begin{array}{cc}
u_{i,j}+1, & i<j;\\
u_{i,j}, & i\geq j.
\end{array}\right.$$

Set $f_i=\det[M]_{i+1}$, for any $0\leq i\leq t$, where $[M]_{i+1}$ is the square matrix that we get after removing row $i+1$ of $M$. Since
$$f_i=\sum_{\sigma\in S_t}\operatorname{sgn}(\sigma)\prod_{1\leq k\leq t+1,\,k\neq i+1}m_{k,\sigma(k)},$$
we study the leading terms of polynomials of the form $h=\prod_{1\leq k\leq t+1,\,k\neq i+1}m_{k,\sigma(k)}$.

If $h$ is the product of all elements in the main diagonal of $[M]_{i+1}$, then $\operatorname{Lt_{\overline{\tau}}}(h)=x^{t-i}y^{m_i}$. We claim that any other $h\neq 0$ satisfies $\operatorname{Lt_{\overline{\tau}}}(h)<_{{\overline{\tau}}} x^{t-i}y^{m_i}$. Indeed, since
$$\operatorname{Lt_{\overline{\tau}}}(h)=\prod_{1\leq k\leq t+1,\,k\neq i+1}\operatorname{Lt_{\overline{\tau}}}(m_{k,\sigma(k)}),$$
\noindent
then
$${\mathrm{ ord}}(h)=\sum_{1\leq k\leq t+1,\,k\neq i+1}{\mathrm{ ord}}(m_{k,\sigma(k)})\geq \sum_{1\leq k\leq t+1,\,k\neq i+1} u_{k,\sigma(k)}.$$

Equality can only be reached if subindices $(i,j)$ satisfy $i\geq j$, namely
$$h=\prod_{k=1}^i(y^{d_k}+n_{k,k})\prod_{k=i+1}^{t+1}m_{k,\sigma(k)},$$
\noindent
hence the maximal power of $x$ is only reached at the main diagonal. Thus, any $h\neq 0$ away from the main diagonal satisfies $\operatorname{Lt_{\overline{\tau}}}(h)<_{{\overline{\tau}}}x^{t-i}y^{m_i}$ and, therefore, $\operatorname{Lt_{\overline{\tau}}}(f_i)=x^{t-i}y^{m_i}$.

Now we need to show that $\{f_0,\dots,f_t\}$ forms a $\overline{\tau}$-enhanced standard basis of $I_t(M)$. From the order bounds on the entries $n_{i,j}$ of $N$, it follows that the columns of $M$ are liftings of the columns of $H$. See \Cref{Ex:lift} for more details.
By \Cref{1.11}, it is enough to show that $\operatorname{ht}\left((\operatorname{Lt_{\overline{\tau}}}(f_0),\dots,\operatorname{Lt_{\overline{\tau}}}(f_t))\right)=2$,
which is clear because this ideal contains pure powers $x^t$ and $y^{m_t}$. Therefore, $\operatorname{Lt_{\overline{\tau}}}\left(I_t(M)\right)=E$.
\end{proof}

\begin{lemma}\label{surj}
The map $\varphi$ is surjective.
\end{lemma}

\begin{proof}

Consider a ${\overline{\tau}}$-enhanced standard basis $\lbrace f_0,\dots,f_t\rbrace$ of $J\in V(E)$ such that $\operatorname{Lt_{\overline{\tau}}}(f_i)=x^{t-i}y^{m_i}$. We can assume that the monomials in the support of the $f_i$'s are not divisible by $x^t$, except for $\operatorname{Lt_{\overline{\tau}}}(f_0)$.

For any $1\leq j\leq t$, consider the $S$-polynomials $S_j:=S(f_{j-1},f_j)=y^{d_j}f_{j-1}-xf_j$. Note that no monomial in ${\mathrm{Supp}}(S_j)$ is divisible by $x^{t+1}$ for any $1\leq j\leq t$. By \Cref{Grauert} we have
$$S_j=\sum_{i=0}^{t}q_{i,j}f_i,$$
for some $q_{i,j}\in\res[\![x,y]\!]$ such that $\operatorname{Lt_{\overline{\tau}}}(q_{i,j}f_i)\leq\operatorname{Lt_{\overline{\tau}}}(S_j)$.
We claim that $q_{i,j}\in\res[\![y]\!]$.

In fact, we will prove that this holds for any $f\in J$ such that $x^{t+1}$ does not divide any monomial in ${\mathrm{Supp}}(f)$. Assume $\operatorname{LC_{\overline{\tau}}}(f)=1$. Consider such an $f$, then $\operatorname{Lt_{\overline{\tau}}}(f)=x^sy^r$ for some $0\leq s\leq t$. On the other hand, from the fact that $\operatorname{Lt_{\overline{\tau}}}(f)$ belongs to $\operatorname{Lt_{\overline{\tau}}}(J)$, it follows that $x^{t-i}y^{m_i}$ must divide $\operatorname{Lt_{\overline{\tau}}}(f)$ for some $0\leq i\leq t$. Then $t-i\leq s$ and $m_i\leq r$, hence $m_{t-s}\leq m_i\leq r$. Define

$$g=f-y^{r-m_{t-s}}f_{t-s}.$$

The new element $g$ still belongs to $J$ and satisfies again that none of its monomials is divisible by $x^{t+1}$. In this way we can define a sequence $({g_i})_{i\in\mathbb{N}}$, starting by $g_0=f$, whose elements have decreasing leading terms with respect to ${\overline{\tau}}$.
As in the proof of Grauert's division theorem in \cite[Theorem~6.4.1]{GP08}, $\sum_{i\in\mathbb{N}} g_k$ converges with respect to the $\mathfrak m$-adic topology and
$$f=\sum_{k\in\mathbb{N}}(g_k-g_{k+1})=\sum_{i=0}^t \left(\sum_{k\in\mathbb{N}, s_k=t-i}y^{r_k-m_{t-s_k}}\right)f_i.$$

Therefore, for any $1\leq j\leq t$, the $S$-polynomial $S_j$ provides a relation between generators of $J$
$$y^{d_j}f_{j-1}-xf_j+\sum_{i=1}^{t+1}n_{i,j}f_{i-1}=0,$$
where $n_{i,j}=-q_{i-1,j}\in\res[\![y]\!]$. This expression can be encoded in the matrix $M=H+N$, where $N=(n_{i,j})$.
From $\operatorname{Lt_{\overline{\tau}}}(n_{i,j}f_{i-1})\leq_{\overline{\tau}}\operatorname{Lt_{\overline{\tau}}}(S_j)$ it follows that any column $m^i$ of $M$ is a lifting of a column $\sigma^i$ of $H$.
The columns $\sigma^1,\dots,\sigma^t$ of $H$ constitute a homogeneous system of generators of $\operatorname{Syz}(\operatorname{Lt_{\overline{\tau}}}(J))$.
Then, by \cite[Theorem~1.10]{Ber09}, $m^1,\dots,m^t$ generate $\operatorname{Syz}(J)$. The Hilbert-Burch theorem ensures that $J$ is generated by the maximal minors of $M$.

Finally, the order bounds on the entries of $N$ are obtained again from $\operatorname{Lt_{\overline{\tau}}}(n_{i,j}f_{i-1})\leq_{\overline{\tau}}\operatorname{Lt_{\overline{\tau}}}(S_j)$.
Indeed, $x^{t-i+1}y^{m_{i-1}+\beta_{i,j}}<_{{\overline{\tau}}}x^{t-j+1}y^{m_j}$,
where $\operatorname{Lt_{\overline{\tau}}}(n_{i,j})=y^{\beta_{i,j}}$. Since
\begin{equation}\label{eq:surj}
\beta_{i,j}+t-i+1+m_{i-1}\geq t-j+1+m_j,
\end{equation}
we have $\beta_{i,j}\geq i-j+m_j-m_{i-1}=u_{i,j}$. If $\beta_{i,j}=u_{i,j}$, then equality holds in (\ref{eq:surj}) and hence $t-i+1<t-j+1$. In other words, $\beta_{i,j}\geq u_{i,j}$ and equality is only reachable when $i>j$.
\end{proof}

The proof of \Cref{surj} provides a constructive method to obtain a matrix $N\in\mathcal{N}(E)$ from any ${\overline{\tau}}$-enhanced standard basis $\lbrace f_0,f_1,\dots,f_t\rbrace$ of $J\in V(E)$ such that $\operatorname{Lt_{\overline{\tau}}}(f_i)=x^{t-i}y^{m_i}$ and $x^t$ does not divide any term of any $f_i$ except for $\operatorname{Lt_{\overline{\tau}}}(f_0)$.

\begin{example} \label{ex:polysurj}
{\emph{Matrices in $\mathcal{N}(E)$ with proper power series entries.}} Set $J=(x^4+x^3y,y^2+x^3+x^2y)$ and consider the ${\overline{\tau}}$-enhanced standard basis

$$\begin{array}{l}
f_0=x^4+x^3y,\\
f_1=x^3y^2+y^5,\\
f_2=x^2y^2,\\
f_3=xy^2,\\
f_4=y^2+x^3+x^2y.
\end{array}$$
\noindent

It can be checked that it satisfies the conditions of \Cref{surj}. The first $S$-polynomial is $y^2f_0-xf_1=\left(\sum_{i\geq 1}y^i\right)f_1+\left(\sum_{i\geq 3}y^i\right)f_2-y^3f_3-\left(\sum_{i\geq 4}y^i\right)f_4$, hence some entries in $N$ are proper power series, not polynomials.
\end{example}

Next we will see that, for any ideal $J\in V(E)$, we can always find a matrix $N\in\mathcal{N}(E)$ with polynomial entries such that $\varphi(N)=J$.

\begin{example} \label{ex:polysurj2} {\emph{Obtaining matrices in $\mathcal{N}(E)$ with polynomial entries.}}
The matrix in $\mathcal{N}(E)$ obtained from the ${\overline{\tau}}$-enhanced standard basis of $J=(x^4+x^3y,y^2+x^3+x^2y)$ given in \Cref{ex:polysurj} is
\[
N=\left(\begin{array}{cccc}
0 & 0 & 0 & 1\\
- \sum_{i\geq 1} y^i & \sum_{i\geq 1} y^i & 0 & 0\\
- \sum_{i\geq 3} y^i & \sum_{i\geq 2} y^i & 0 & 0\\
y^3 & 0 & 0 & 0\\
\sum_{i\geq 4} y^i & - \sum_{i\geq 3} y^i & 0 & 0
\end{array}\right).
\]
By removing all the terms of degree larger than 3 we get the matrix
\[
\overline{N}=\left(\begin{array}{cccc}
0 & 0 & 0 & 1\\
- y-y^2-y^3 & y+y^2+y^3 & 0 & 0\\
- y^3 & y^2+y^3 & 0 & 0\\
y^3 & 0 & 0 & 0\\
0 & - y^3 & 0 & 0
\end{array}\right)
\]
with polynomial entries. Check that \(J =\varphi(N)=\varphi(\overline{N})\). Observe that, although the behaviour with respect to the syzygies is much better, the ${\overline{\tau}}$-enhanced standard basis of $J$ given by the minors of \(H+\overline{N}\) is less simple, for example
\(\bar{f}_0 = x^4+x^3y+y^4-xy^4+y^5-x^2y^4-xy^5+y^6-x^2y^5-xy^6\).
\end{example}

For a general $J\in V(E)$, we can only ensure that we will obtain the same ideal if we remove the terms in the entries of $N$ with degree strictly higher than the socle degree of $R/J$, namely the largest integer $s$ such that $\mathfrak m^{s+1}\subset J$.

\begin{definition}\label{def:setNs} Let $E$ be a monomial ideal and let $s$ be the socle degree of $R/E$. We define the set of matrices \(\mathcal{N}(E)_{\le s} :=
\mathcal{N}(E) \cap (\res[\![y]\!]_{\le s})^{(t+1) \times t}\).
\end{definition}

\begin{proposition}\label{polysurj}
The restriction of \(\varphi\) to \(\mathcal{N}(E)_{\le s}\)
is surjective.
\end{proposition}
\begin{proof}
Consider \(J \in V(E)\), by \Cref{surj} we know that \(J=I_t(H+N)\) for some $N\in \mathcal{N}(E)$.
Recall that $J$ has the same Hilbert function as $E$, hence the socle degree of $J$ is also $s$. We express $N$ as \(N = \overline{N} +  \widetilde{N}\), where \(\overline{N} \in \mathcal{N}(E)_{\le s}\) and \(\widetilde{N} \in (\res[\![y]\!]_{\ge s+1})^{(t+1) \times t}\).
We decompose \(\widetilde{N}\) into matrices \(\widetilde{N}_{i,j}\) with at most one non-zero entry at position \((i,j)\) such that
\( \widetilde{N} = \sum_{i = 1,\dots t+1,j= 1,\dots,t} \widetilde{N}_{i,j}\).

By definition, $J=(f_0,\dots,f_t)$, where \(f_k =  \det([H +N]_{k+1})\). Our goal is to prove that $J=(\bar{f}_0,\dots,\bar{f}_t)$, where \(\bar{f}_k =  \det([H+ \overline{N}]_{k+1})\).

Let us use the Laplacian rule to rewrite the determinant.
We denote by \(\left[M\right]_{(l,m),n}\) the (square) submatrix of \(M\) that is obtained by deleting the \(l\)-th and \(m\)-th rows and the \(n\)-th column. Then
\[
\begin{array}{ll}
f_k &= \det\left(\left[H+\overline{N}+ \sum_{i,j} \widetilde{N}_{i,j}\right]_{k+1}\right)\\
&= \det\left(\left[H+\overline{N}\right]_{k+1}\right) +
\sum_{i,j} \pm \tilde{n}_{i,j} \cdot \det\left(\left[H+\overline{N}\right]_{(k+1,i),j}\right)\\
&= \bar{f}_k + \sum_{i,j} \pm \tilde{n}_{i,j} \cdot \det\left(\left[H+\overline{N}\right]_{(k+1,i),j}\right).
\end{array}
\]
Since \(\tilde{n}_{i,j} \in \res[\![y]\!]_{\ge s+1}\), it is clear that $f_i-\bar{f}_i\in (x,y)^{s+1} \subset J$. Then \(J'=\left(\bar{f}_0, \dots, \bar{f}_t\right)\subset J\) and, because $\operatorname{Lt_{\overline{\tau}}}(J')=\operatorname{Lt_{\overline{\tau}}}(J)$, we deduce that \(J=\left(\bar{f}_0, \dots, \bar{f}_t\right)\).
\end{proof}

It is important to note that \Cref{polysurj} does not provide a parametrization of $V(E)$. In general, the map $\varphi$ is not injective even when we restrict it to $\mathcal{N}(E)_{\le s}$.

\begin{example}\label{ex:noninj} {\emph{The restriction of $\varphi$ is not injective.}} Continuing \Cref{ex:polysurj} and \Cref{ex:polysurj2}, note that $\overline{N}\in\mathcal{N}_{\le 4}(E)$ but also
\[
N'=\left(
\begin{array}{llll}
0& 0&     0&1\\
-y&0&     0&0\\
0&0&    0&0\\
0&0&     0&0\\
0&0&0&0
\end{array}
\right)\in\mathcal{N}_{\le 4}(E),
\]
with \(\varphi(N')=\varphi(\overline{N})=J\).

The corresponding associated ${\overline{\tau}}$-enhanced standard basis of $J$ is \(\{{x^4+x^3y},\  x^3y^2,\ x^2y^2,\ xy^2,\ y^2+x^3+x^2y\}\).
\end{example}

\begin{remark}\label{miniinj}
We have seen that \(\varphi: \mathcal{N}(E) \to V(E)\) as well as its restriction
\(\varphi: \mathcal{N}_{\le s}(E) \to V(E)\) are not injective. Although an ideal $J$ can be obtained from different matrices of the form $H+N$, the systems of polynomial generators $\lbrace f_0,\dots,f_t\rbrace$ of $J$ that arise as maximal minors of any such matrices are all different. In other words, the map $\mathcal{N}(E) \to R^{t+1}$, that sends $N$ to the maximal minors of $H+N$, is injective.

Indeed, if two matrices \(N, N' \in \mathcal{N}(E)\) satisfy that
the maximal minors of \(H+N\) and \(H+N'\) coincide, it follows that
\(N=N'\).
The argument is the same as in the first paragraph of \cite[3.2]{Con11} and we reproduce it here.
Let \(\{f_0,\dots,f_t\}\) be the maximal minors of \(H+N\) and \(H+N'\).
The columns of both matrices are syzygies of \(\lbrace f_0,\dots,f_t\rbrace\), thence
the columns of their difference \(H+N-(H+N')=N-N' \in \res[\![y]\!]^{(t+1)\times t)}\) are also syzygies,
but since the leading terms of the \(f_i\) involve different powers of \(x\), it follows that \(N=N'\).
\end{remark}

\section{Parametrization for lex-segment leading term ideals}

A special situation occurs when a ${\overline{\tau}}$-enhanced standard basis of $J$ and a \(\operatorname{lex}\)-Gr\"obner basis of $I=J\cap P$ coincide. In this setting, we can overcome the lack of injectivity of $\varphi:\mathcal{N}(E)\rightarrow V(E)$ by using Conca-Valla's parametrization of $V_0(E)$.

\begin{proposition}\label{CVmatrix} Let $J\in V(E)$ be an ideal that admits a ${\overline{\tau}}$-enhanced standard basis \(\{f_0,\dots,f_t\}\)
that is also a \(\operatorname{lex}\)-Gr\"obner basis of $I=J\cap P$
with \(\operatorname{Lt_{\overline{\tau}}}(f_i)=\operatorname{Lt_{lex}}(f_i)\). Then there exists a unique matrix $N\in\mathcal{N}(E)\cap T_0(E)$ such that $J=I_t(H+N)$.
\end{proposition}
\begin{proof}
Let \(\{f_0, \dots, f_t\}\) be a \({\overline{\tau}}\)-enhanced standard basis of \(J\) that is also a \(\operatorname{lex}\)-Gr\"obner basis
  with \(\operatorname{Lt_{\overline{\tau}}}(f_i)=\operatorname{Lt_{lex}}(f_i)=x^{t-i}y^{m_i}\).
Then the \(f_i\) are the signed maximal minors of \(H+N\) for some \(N \in \mathcal{N}(E)\) that is a strictly lower triangular matrix with
polynomial entries.
Here by strictly lower triangular, we mean that
\(n_{i,j}=0\) for all \(i \le j\).

Assume that \(N\) is not yet in \(T_0(E)\),
namely there exist \((i,j)\) with \(\deg(n_{i,j})\ge d_j\).
In that case we decompose $n_{i,j}=r_{i,j} + y^{d_j} q_{i,j}$ with
\begin{itemize}\label{OrderBounds}
\item \(u_{i,j}\le {\mathrm{ ord}}(r_{i,j})\le\deg(r_{i,j}) \le d_j-1\),
\item \(\max(u_{i,j}-d_j,0)\le {\mathrm{ ord}}(q_{i,j})\le\deg(q_{i,j}) \le \deg n_{i,j}-d_j\).
\end{itemize}

Next we will perform the
\((i,j)\)-reduction move defined in \cite[Proof~of~3]{Con11} on \(N\). Note that since \(N\) is strictly lower triangular, it corresponds to the second type of reduction moves:

\begin{itemize}
    \item[Step 1.] Add the \(j\)-th row multiplied by \(-q_{i,j}\) to the
\(i\)-th row of \(H+N\).
    \item[Step 2.] Add the \((i-1)\)-th column multiplied by \(q_{i,j}\) to the
\((j-1)\)-th column of the matrix resulting from Step 1.
\end{itemize}

This operation does not change the ideal \(J\) and produces a new matrix \(\widetilde{N}\) whose $(i,j)$-entry has degree strictly less than $d_j$.
Checking that it preserves the order bounds on the entries is a technicality that follows from the order bounds on $r_{i,j}$ and $q_{i,j}$.
Thus the matrix \(\widetilde{N}\) we obtain will still be in \(\mathcal{N}(E)\) and the maximal minors of \(H+\widetilde{N}\)
will also form a \({\overline{\tau}}\)-enhanced standard basis of \(J\).

After performing finitely many reduction steps from the last to the first column, we will obtain a matrix
\(N_0 \in T_0(E) \cap \mathcal{N}(E)\)
with \(J = I_t(H+N_0)\). By \Cref{ThCV08}, \(N
_0\) is unique.
\end{proof}

This result allows us to extend the definition of canonical Hilbert-Burch matrix to any ideal that has a \({\overline{\tau}}\)-enhanced standard basis \(\{f_0,\dots,f_t\}\) that satisfies $\operatorname{Lt_{\overline{\tau}}}(f_i)=\operatorname{Lt_{lex}}(f_i)=x^{t-i}y^{m_i}$. Moreover, the proof of \Cref{CVmatrix} gives an algorithm to construct the canonical matrix from the matrix that encodes the S-polynomials of \(\{f_0,\dots,f_t\}\) via reduction moves.

\begin{definition}\label{def:setM}
Set $\mathcal{M}(E):=\mathcal{N}(E)\cap T_0(E)$. Let $J\in V(E)$ be an ideal that admits a ${\overline{\tau}}$-enhanced standard basis which is also a \(\operatorname{lex}\)-Gr\"obner basis of $I=J\cap P$. We define the \textbf{canonical Hilbert-Burch matrix}\index{canonical Hilbert-Burch matrix} of $J$ as \(H+N\), where $N$ is the unique matrix in $\mathcal{M}(E)$ such that $J=I_t(H+N)$.
\end{definition}

\begin{remark}\label{V2}
In \cite{CV08}, Conca and Valla provide parametrizations of certain subsets of $V_0(E)$. $V_2(E)$ is the set of all $(x,y)-$primary ideals $I$ such that $\operatorname{Lt_{lex}}(I)=E$ and it is parametrized by the set of matrices $T_2(E)$ (see \cite[Definition 3.2]{CV08} for an explicit description). It is not difficult to check that $\mathcal{M}(E)=\mathcal{N}(E)\cap T_0(E)=\mathcal{N}(E)\cap T_2(E)$.
\end{remark}

\medskip

\begin{example}\label{Ex:step1}{\emph{Canonical Hilbert-Burch matrix.}}
Consider $J=(x^6,xy^2-y^5,y^8)$ and $E=\operatorname{Lt_{\overline{\tau}}}(J)=(x^6$, $x^5y^2$, $x^4y^2$, $x^3y^2$, $x^2y^2$, $xy^2$, $y^8)$.
Set \(f_0 = x^6\), \(f_i = x^{t-i}y^2\) for
\(i=1,\dots,4\), \(f_5 = xy^2-y^5\) and \(f_6=y^8\). Note that $\{f_0,\dots,f_6\}$ is a ${\overline{\tau}}$-enhanced standard basis of $J$ with $\operatorname{Lt_{lex}}(f_i)=\operatorname{Lt_{\overline{\tau}}}(f_i)=x^{t-i}y^{m_i}$.
The matrix \(H+N\) associated to
\(\{f_0,\dots,f_6\}\) is the following:
\[
\left(\begin{array}{cccccc}
y^2 & 0 & 0 & 0 & 0 & 0\\
-x & 1 & 0 & 0 & 0 & 0\\
0 & -x & 1 & 0 & 0 & 0\\
0 & 0 & -x & 1 & 0 & 0\\
0 & 0 & 0 & -x & 1 & 0\\
0 & 0 & 0 & 0 & -x-y^3 & y^6\\
0 & 0 & 0 & 0 & -1 & -x+y^3\\
\end{array}\right).
\]
The matrix \(N \in \mathcal{N}(E)\) is strictly lower triangular,
but since \(\deg(n_{6,5})=3 \ge d_5=0\) and \(\deg(n_{7,5})=0\ge d_5=0\),
we see that \(N \notin T_0(E)\). By performing the reduction moves \((6,5)\) and \((7,5)\), we obtain the canonical Hilbert-Burch matrix $H+N_0$ of $J$, with $N_0\in\mathcal{M}(E)$:
\[M_0=H+N_0=\left(\begin{array}{cccccc}
y^2 & 0 & 0 & 0 & 0 & 0\\
-x & 1 & 0 & 0 & 0 & 0\\
0 & -x & 1 & 0 & 0 & 0\\
0 & 0 & -x & 1 & 0 & 0\\
0 & 0 & 0 & -x & 1 & 0\\
0 & 0 & 0 & 0 & -x & y^6\\
0 & 0 & 0 & 0 & 0 & -x+y^3\\
\end{array}\right).\]

\end{example}

There is a class of monomial ideals \(E\) such that any ideal with leading term ideal \(E\) is under the hypothesis of \Cref{CVmatrix}:

\begin{lemma}\label{lexGrobner}
Let \(E = (x^t,x^{t-1}y^{m_1},\dots, y^{m_t})\) be a monomial ideal such that
\begin{equation}\label{lexGBcond}
m_j-j-1 \le m_i-i    \mbox{ for all } j<i.
\end{equation}
Then the reduced ${\overline{\tau}}$-enhanced standard basis of $J \in V(E)$ is a Gr\"obner basis of $I=J\cap P$ with respect to the lexicographic term order and $\operatorname{Lt_{lex}}(I)=E$.
\end{lemma}

\begin{proof}
Let $\{f_i\}_{i \in \mathcal{I}}$ with \(\mathcal{I} \subset \{0,\dots,t\}\) be the unique reduced ${\overline{\tau}}$-enhanced standard basis of $J$ with \(\operatorname{Lt_{\overline{\tau}}}(f_i)=x^{t-i}y^{m_i}\). There are two steps in this proof:

\medskip

\noindent
$(i)$ $\operatorname{Lt_{lex}}(f_i)=x^{t-i}y^{m_i}$ for any $i \in \mathcal{I}$.

Let us suppose that $\operatorname{Lt_{lex}}(f_i)=x^ky^l\neq x^{t-i}y^{m_i}$. Since $x^{t-i}y^{m_i}\in{\mathrm{Supp}}(f_i)$, then
\[x^ky^l>_{\operatorname{lex}}x^{t-i}y^{m_i}\]
and hence there are two possible situations:

\noindent
\emph{Case I:} $k=t-i$ and $l>m_i$. $\operatorname{Lt_{lex}}(f_i)=x^{t-i}y^l$ is in the support of $\operatorname{tail}_{{\overline{\tau}}}(f_i)$ but $x^{t-i}y^l\in E$, which contradicts the reducedness hypothesis on $\{f_j\}_{j \in \mathcal{I}}$.

\noindent
\emph{Case II:} $k>t-i$. Then we can set $k=t-j$ for some $0<j<i$. Since $\operatorname{Lt_{lex}}(f_i)=x^{t-j}y^l$ and $\operatorname{Lt_{\overline{\tau}}}(f_i)=x^{t-i}y^{m_i}$, then
$$t-i+m_i=\deg(x^{t-i}y^{m_i})\leq\deg(x^{t-j}y^l)=t-j+l.$$
If there is an equality on the degree, the local order is equal to the lex order, hence $\operatorname{Lt_{\overline{\tau}}}(f_i)=x^{t-j}y^l$ and we reach a contradiction. Therefore, we have $t-i+m_i<t-j+l$.
If $l\geq m_j$, the argument of Case I holds.
Thus, we obtain the following sequence of strict inequalities
\[
t-i+m_i < t-j+l < t-j+m_j.
\]
It is equivalent to \[m_i-i+1 \le l-j \le m_j-j-1\]
But by assumption
\( m_j-j-1 \le m_i-i\), which leads to a contradiction.

\medskip

$(ii)$ $\{f_i\}_{i \in \mathcal{I}}$ is a Gr\"obner basis of $I$ with respect to \(\operatorname{lex}\).

Since $\{f_i\}_{i \in \mathcal{I}}$ is a subset of $I$, $E=(\operatorname{Lt_{lex}}(f_i))_{i \in \mathcal{I}} \subset \operatorname{Lt_{lex}}(I)$.
We can check that $\operatorname{Lt_{lex}}(I)=E$ by looking at the dimensions.
From $R/J\cong P/I$, it follows that
\[\dim_\res(P/\operatorname{Lt_{lex}}(I))=\dim_\res(P/I)=\dim_\res(R/J)=\dim_\res(P/\operatorname{Lt_{\overline{\tau}}}(J))=\dim_\res(P/E)\]
and hence the inclusion $E\subset \operatorname{Lt_{lex}}(I)$ becomes an equality.
\end{proof}

\begin{remark}
Since for lex-segment ideals the sequence \((m_i-i)_i\)
is strictly increasing, lex-segment ideals satisfy \ref{lexGrobner}.
But the class of ideals is bigger. For example ideals with equality \(m_i = m_{i+1}\) for exactly one \(i\) satisfy this condition too.
\end{remark}

\begin{theorem}\label{ParamLex}
Let $E=(x^t,\dots,x^{t-i}y^{m_i},\dots,y^{m_t})$ be a lex-segment ideal (or an ideal satisfying condition (\ref{lexGBcond})). Let $H$ be the canonical Hilbert-Burch matrix of $E$. Then the restriction of the map \(\varphi\) from \Cref{Param} to \(\mathcal{M}(E)\)

$$\begin{array}{rrcl}
\varphi: & \mathcal{M}(E) & \longrightarrow & V(E)\\
& N & \longmapsto & I_t(H+N)
\end{array}$$

\noindent
is a bijection.
\end{theorem}

\begin{proof}
The map \(\varphi\) is well-defined by \Cref{well}. \Cref{lexGrobner} and \Cref{CVmatrix} ensure the existence of a unique matrix $N\in\mathcal{M}(E)$ such that $J=I_t(H+N)$.
\end{proof}

Note that when $E$ is an ideal satisfying (\ref{lexGBcond}), then the set $\mathcal{M}(E)$ has a simple description. It is formed by matrices of size $(t+1)\times t$ with entries in $\res[y]$ such that

$$n_{i,j}=
\left\lbrace\begin{array}{ll}
0, & i\leq j;\\
c_{i,j}^{v_{i,j}}y^{v_{i,j}}+c_{i,j}^{v_{i,j}+1}y^{v_{i,j}+1}+\dots+c_{i,j}^{d_j-1}y^{d_j-1}, & i > j;
\end{array}\right.
$$

where \(v_{i,j}:=\max(u_{i,j},0)\).

\begin{corollary}\label{cor:ParamLex}
Let $E$ be the lex-segment ideal $(x^t,x^{t-1}y^{m_1},\dots,y^{m_t})$
(or an ideal satisfying condition (\ref{lexGBcond}))
with degree matrix $U=(u_{i,j})$,
\(v_{i,j}=\max(u_{i,j},0)\) and $d_j=m_j-m_{j-1}$ for any $1\leq i\leq t+1$ and $1\leq j\leq t$.
Then $V(E)$ is an affine space of dimension $\mathbf{N}$, where
$$\mathbf{N}=\sum_{2\leq j+1\leq i\leq t+1}\left(d_j-v_{i,j}\right).$$
\end{corollary}

Let us show the details of the parametrization of the Gr\"obner cell $V(E)$ as an affine space $\mathbb{A}_\res^\mathbf{N}$ with an example:

\begin{example}\label{ex:Paramlex}{\emph{Gr\"obner cell of a lex-segment ideal.}} Consider the lex-segment ideal $L=(x^3,x^2y,xy^3,y^5)$.
By \Cref{ParamLex}, any canonical Hilbert-Burch matrix $M=H+N$, with $N \in \mathcal{M}(L)$, associated to an ideal $J \in V(L)$ is of the form
$$M=\left(\begin{array}{ccc}
y & 0 & 0\\
-x & y^2 & 0\\
c_{3,1}^0 & -x+c_{3,2}^1y & y^2\\
c_{4,1}^0  & c_{4,2}^0+c_{4,2}^1y  & -x+c_{4,3}^1y
\end{array}\right).$$

We identify any ideal $J=I_3(M)$ with the point
$$p_J=(c_{3,1}^0,c_{4,1}^0,c_{3,2}^1,c_{4,2}^0,c_{4,2}^1,c_{4,3}^1)\in\mathbb{A}_\res^6.$$

In other words, $V(L)$ can be identified with the affine space $\mathbb{A}_\res^6$. Note that the point at the origin in $\mathbb{A}^6_\res$ corresponds to the monomial ideal $L$.
\end{example}

\medskip
\begin{corollary} \label{Cor:hilbertfunction}
Assume ${\mathrm{ char}}(\res)=0$ and let $h$ be an admissible Hilbert function.
Let $L=\operatorname{Lex}(h)$ be the unique lexicographical ideal such that $\operatorname{HF}_{R/L}=h$.
Then any ideal $J\subset R$ such that $\operatorname{HF}_{R/J}=h$ is of the form $I_t(H+N)$, for some $N\in \mathcal{M}(L)$, after a generic change of coordinates.
\end{corollary}

\begin{proof}
It follows from \Cref{ParamLex} and the fact that for any $J\subset R$ such that $\operatorname{HF}_{R/J}=h$ it holds $\operatorname{Lex}(h)=\operatorname{Gin}_{\overline{\tau}}(J)$. Here $\operatorname{Gin}_{\overline{\tau}}(J)$ is the extension to the local case defined in \cite[Theorem–Definition~1.14]{Ber09} of the usual notion of generic initial ideal.
\end{proof}

\begin{example}\label{ex:CV-vs-local}\emph{Two stratifications of $\operatorname{Hilb}^3(\res[\![x,y]\!])$.}
There are three monomial ideals of colength 3 in two variables: $E_1=(x,y^3)$, $E_2=(x^2,xy,y^2)$ and $E_3=(x^3,y)$. The punctual Hilbert scheme $\operatorname{Hilb}^3(\res[\![x,y]\!])$ can be stratified into three corresponding Gr\"obner cells that depend on the term ordering that we choose. The following table describes the ideals that we find in each Gr\"obner cell with respect to $\operatorname{lex}$, namely $V_2(E_i)$, and the induced local order, namely $V(E_i)$, with $i=1,2,3$. Recall that $V_2(E_i)$ is the affine space in Conca-Valla parametrization introduced in \Cref{V2} that only considers $\mathfrak m$-primary ideals in the polynomial ring, hence it provides a proper stratification of $\operatorname{Hilb}^3(\res[\![x,y]\!])$.

\medskip

\begin{center}
\begin{tabular}{c||c|c|c}
 $E_i$ & $E_1=(x,y^3)$  & $E_2=(x^2,xy,y^2)$ & $E_3=(x^3,y)$\\
\hline
\hline
$\operatorname{HF}_{R/E_i}$ & $\lbrace 1,1,1\rbrace$ & $\lbrace 1,2\rbrace$ & $\lbrace 1,1,1\rbrace$\\
\hline
\hline
${\overline{\tau}}$ & $J=(x,y^3+c_2y^2+c_1y)$ & $J=(x^2,xy,y^2)$ & $J=(x^3,y+cx^2)$\\
\hline
 $\tau=\operatorname{lex}$  & $I=(x,y^3+c_2y^2+c_1y)$   &  $I=(x^2+cy,xy,y^2)$ & $I=(x^3,y)$
\end{tabular}
\end{center}

\medskip

The extension $J=IR$ of ideals $I\in V_2(E_2)$ with $c\neq 0$ are of the form $J=(y-\frac{1}{c}x^2,x^3)\in V(E_3)$. Note that $\operatorname{HF}_{R/J}\neq\operatorname{HF}_{R/E_2}$, hence ideals in the same Gr\"obner cell with respect to the lexicographical order can have different Hilbert functions when considered in the power series ring. By construction this will never happen in Gr\"obner cells with respect to the local order. In this sense we say that the parametrization given in \Cref{ParamLex} is compatible with the local structure.
\end{example}

In the general case, we have a surjective map $ \varphi: \mathcal{N}(E)_{\le s} \to V(E)$.
Restricting to \(\mathcal{M}(E)\) we get an injection to \(V(E)\), but if \(E\) does not satisfy condition (\ref{lexGBcond}) the map \(\varphi\) is not surjective anymore.

\begin{lemma} \label{nonsurj}
If \(E\) does not satisfy condition (\ref{lexGBcond}), then there exists
\(J \in V(E)\) such that \(\operatorname{Lt_{lex}}(J \cap P) \not= E\).
\end{lemma}

\begin{proof}
Since condition (\ref{lexGBcond}) is not satisfied, there exist \(j<i\)
such that
\begin{equation}\label{eq:not}
m_j-j-1 > m_i-i.
\end{equation}
Take \(i'= \max\{l \ | \ m_i=m_l\}\)
and \(j' = \min\{l \ | \ m_j = m_l\}\), then
\[m_{j'}-j' -1 > m_j-j-1 > m_i-i > m_{i'}-i'.\]
Replace \(i\) with \(i'\) and \(j\) with \(j'\).
Note that (\ref{eq:not}) still holds and now additionally \(d_j\ge 1\) and \(d_{i+1} \ge 1\).

Set \(f_k = x^{t-k}y^{m_k}\) for \(k \in \{0,\dots,t\}\setminus \{i\}\) and
\(f_i = x^{t-i}y^{m_i} + x^{t-j}y^{m_j-1}\). Consider the ideal
\(J = (f_0,\dots, f_t)\) of $R$.
Clearly, \(\operatorname{Lt_{lex}}(f_i) = x^{t-j}y^{m_j-1} \notin E\), thus
\(\operatorname{Lt_{lex}}(J \cap P) \not= E\).

Now we need to prove that $\operatorname{Lt_{\overline{\tau}}}(J)=E$.
From (\ref{eq:not}) we have \(t-i+m_i<t-j+m_j-1\), so
\(\operatorname{Lt_{\overline{\tau}}}(f_i) = x^{t-i}y^{m_i}\).
The polynomial \(f_i\) cannot be reduced by the other (monomial) generators.

The \(S\)-polynomials are
\[
S_l = \begin{cases}
-x^{t-j+1}y^{m_j-1}, & l = i; \\
x^{t-j} y^{m_j-1+d_{i+1}},  & l = i+1; \\
0, & \mbox{otherwise.}
\end{cases}
\]

If $i<t$, check that \(S_{i} = y^{d_j-1} f_{j-1}\) and \(S_{i+1} = y^{d_{i+1}-1} f_j \).
Then the matrix \(N\) has only two non-zero entries \(n_{j,i}=y^{d_j-1}\) and
\(n_{j+1,i+1}=-y^{d_{i+1}-1}\).
If \(i=t\) there is only one non-zero \(S\)-polynomial. In any case, one can check that \(N \in \mathcal{N}(E)\).
Thence, \(\{f_0,\dots,f_t\}\) forms a \({\overline{\tau}}\)-enhanced standard basis and
\(J \in V(E)\).
\end{proof}

\begin{example} {\emph{$\mathcal{M}(E)\rightarrow V(E)$ not surjective.}}
Consider $E=(x^6,xy^2,y^8)$ as in \Cref{Ex:step1}.
\(E\) does not satisfy condition (\ref{lexGBcond}) because for \((i,j)=(5,1)\) we have \(m_1-1-1 = 0 > m_5-5 = 2-5 = -3\). The ideal \(J\) from \Cref{nonsurj} in this case is generated by the monomials \(x^{6-k}y^{m_k}\) for \(k=0,\dots,4,6\)
and \(xy^2+x^5y\).
\(J \cap P\notin V_0(E)\) because $\operatorname{Lt_{lex}}(J \cap P)=(x^6,x^5y,x^2y^2,xy^3,y^8)$.
Therefore, \(J \notin \varphi(\mathcal{M}(E))\).
\end{example}

Several computations, comparison to \cite{Con11}, considerations about the reduction moves and a detailed study of complete intersections give us strong evidence of what the subset of $\mathcal{N}(E)_{\le s}$ that provides a bijection should be.

We define the subset \((\res[y]_{<\underline{d}})^{(t+1) \times t} \subset \res[y]^{(t+1) \times t}\)
as matrices where the entries satisfy the following degree conditions: \[
\deg(n_{i,j}) < \begin{cases}
d_i, & i\le j;\\
d_j, & i > j.
\end{cases}
\]

\begin{conjecture}\label{Conj}
Let $E$ be a monomial ideal. Then the set $\mathcal{N}(E)_{< \underline{d}}:= \mathcal{N}(E) \cap (\res[y]_{<\underline{d}})^{(t+1) \times t}$
parametrizes $V(E)$.
\end{conjecture}

For any ideal $E$ satisfying condition (\ref{lexGBcond}) the sets $\mathcal{N}(E)_{< \underline{d}}$ and $\mathcal{M}(E)$ coincide. By \Cref{ParamLex}, the conjecture is true for such $E$, which includes lex-segment ideals.
For general \(E\), we have an inclusion
\(\mathcal{M}(E) \subset \mathcal{N}(E)_{< \underline{d}}\).
Moreover, the matrix \(N\) constructed in the proof of
\Cref{nonsurj}, which is not in \(\mathcal{M}(E)\), can also be transformed to a matrix in
\(\mathcal{N}(E)_{< \underline{d}}\) via reduction moves.

\begin{remark}
An approach analogous to \Cref{CVmatrix} and \cite[Proof~of~3]{Con11} with reduction moves does not work in general. It can be verified that if we start with any \(N \in \mathcal{N}(E)\) the matrix obtained by a reduction move is in \(\mathcal{N}(E)\).
If the matrix is additionally strictly upper or strictly lower triangular, there is an obvious order in which one can perform the reduction moves to obtain a matrix in \(\mathcal{N}(E)_{< \underline{d}}\).

For a general matrix \(N \in \mathcal{N}(E)\) this order is not so clear. This problem already arises in  \cite[Proof~of~3]{Con11} and is solved by considering reduction moves that are maximal for an element, namely those producing a maximal increase of the degree of the element.
In our setting the situation is worse, since even when starting with a matrix with polynomial entries, an \((i,j)\)-reduction move can create entries that are proper power series. This happens if the entry on the diagonal is not zero. And even when starting with a matrix with only zeros on the diagonal, general reduction moves will create non-zero diagonal entries.

Additionally, reduction moves do not give a way of reducing entries on the diagonal.
In \Cref{ex:polysurj2} and its continuation \Cref{ex:noninj}
we have two matrices \(\overline{N}, N' \in \mathcal{N}_{\le s}(E)\) with
\(J = I_t(H+\overline{N}) = I_t(H+N')\). The matrix
\(N' \in \mathcal{N}(E)_{< \underline{d}}\)
is our desired matrix, but it cannot be obtained from \(\overline{N}\) by
this type of reduction moves.
\end{remark}

\begin{example}{\emph{$E$ not satisfying (\ref{lexGBcond}) where \Cref{Conj} holds.}} Consider the monomial ideal $E=(x^4,y^2)$. It can be proved that any $J\in V(E)$ is of the form $J=(x^4+ax^3y,y^2+bx^3+cx^3y+dx^2y)$. The $S$-polynomials of the standard basis
$$\begin{array}{l}
f_0=x^4+ax^3y\\
f_1=x^3y^2\\
f_2=x^2y^2\\
f_3=xy^2+(d-ab)x^3y+(ad-a^2b)x^2y^2\\
f_4=y^2+bx^3+cx^3y+dx^2y+(ad-a^2b)xy^2+(a^3b^2-2a^2bd+ad^2+c)x^3y
\end{array}$$

\noindent
of $J$ give the matrix $M=H+N$, with $N\in\mathcal{N}(E)_{< \underline{d}}$ and $I_4(M)=J$, satisfying the conjecture:
$$M=\left(\begin{array}{cccc}
y^2  &  0 & (d-ab)y & b+(a^3b^2-2a^2bd+ad^2+c)y\\
-x-ay & 1 & 0 & 0\\
0 & -x & 1 & 0\\
0 & 0 & -x & 1\\
0 & 0 & 0 & -x
\end{array}\right).$$
\end{example}

\section{Applications to the construction of Gorenstein rings}

Let us assume that $\res$ is a field of characteristic 0. The explicit description of the affine variety $V(L)$ given by \Cref{ParamLex} allows us to parametrize Gorenstein rings $R/J$ with a given Hilbert function $h$ up to a generic change of coordinates. It is enough to consider those Gorenstein ideals $J$ that arise as a deformation of the unique lex-segment ideal $L=\operatorname{Lex}(h)$ associated to $h$. We will now see that the subset $V_G(L)$ of all Gorenstein ideals in $V(L)$ has the structure of a quasi-affine variety.

\begin{proposition}\label{rkCriteria} Let $L$ be a lex-segment ideal and let $J$ be an ideal with $\operatorname{Lt_{\overline{\tau}}}(J)=L$. Let $H$ and $M=H+N$ be the canonical Hilbert-Burch matrices of $L$ and $J$, respectively. Then $J$ is Gorenstein if and only if the third main diagonal of $N$ consists of polynomials in $y$ with non-zero constant terms.
\end{proposition}

\begin{proof} In codimension 2, $J$ is Gorenstein (equivalently, complete intersection) if and only if it is minimally generated by 2 elements. Let $\overline{M}$ be the matrix whose entries are the classes of the entries of $M$ in $R/\mathfrak m$. By \cite[Lemma 2.1]{Ber09}, $J$ is Gorenstein if and only if  $\operatorname{rk}(\overline{M})=t-1$. It can be checked easily that this is equivalent to $c_{3,1}^0 c_{4,2}^0\cdots c_{t+1,t-1}^0\neq 0$, where $c_{i,i-2}^0$ is the constant term of the entry $n_{i,i-2}$ of $N$.
\end{proof}

\begin{remark} \Cref{rkCriteria} provides a method of determining whether a lex-segment ideal $L$ admits Gorenstein deformations by looking at the degree matrix $U$ of the canonical Hilbert-Burch matrix $H$ of $L$. Gorenstein ideals are admissible if and only if $u_{i,i-2}\leq 0$ for any $3\leq i\leq t+1$. See \cite{Ber09} for details on what the admissible Hilbert functions for Gorenstein rings of codimension 2 are.
\end{remark}

\begin{example}\label{ex:VGL}\emph{Parametrization of Gorenstein deformations of a lex-segment ideal.} Consider $L=(x^3,x^2y,xy^3,y^5)$. From \Cref{ex:Paramlex} we have
$$\overline{M}=\left(\begin{array}{ccc}
0 & 0 & 0\\
0 & 0 & 0\\
c_{3,1}^0 & 0 & 0\\
c_{4,1}^0 & c_{4,2}^0 & 0
\end{array}\right).$$

\noindent
By \Cref{rkCriteria}, $J=I_3(M)$ is Gorenstein if and only if $c_{3,1}^0c_{4,2}^0\neq 0$. Then the set of Gorenstein ideals $J$ with $\operatorname{Lt_{\overline{\tau}}}(J)=L$ can be identified with $\mathbb{A}^6_\res\backslash\mathbb{V}(c_{3,1}^0c_{4,2}^0)$.
\end{example}

\begin{corollary}\label{cor:VGL} Let $L$ be a lex-segment ideal. The set $V_G(L)$ of Gorenstein ideals $J$ such that $\operatorname{Lt_{\overline{\tau}}}(J)=L$ is a quasi-affine variety.
\end{corollary}

\begin{remark}
\Cref{cor:VGL} is a generalization of the procedure given in \cite[Remark 4.7]{RS10} by Rossi and Sharifan to explicitly construct a Gorenstein ring $J$ whose resolution is obtained by consecutive and zero cancellation of the resolution of $L=\operatorname{Lex}(h)$.
\end{remark}

\bigskip

The parametrization of Gorenstein ideals can also be used to find Gorenstein Artin rings $G=R/J$ that are as close as possible to a given Artin ring $A=R/I$. See \cite{Ana08},\cite{EH18},\cite{EHM20} for more details on this problem.

\begin{definition} We call the Artin Gorenstein ring $G=R/J$ a \textbf{minimal Gorenstein cover} of the Artin ring $A=R/I$ if $J\subset I$ and $\dim_\res G-\dim_\res A$ is minimal among all Artin Gorenstein rings mapping onto $A$. The difference $\dim_\res G-\dim_\res A$ is called the \textbf{Gorenstein colength} of $A$, denoted by $\operatorname{gcl}(A)$.
\end{definition}

Let us show through an example how we can find such Gorenstein covers using the canonical Hilbert-Burch matrices provided by \Cref{ParamLex}:

\begin{example}\emph{Parametrization of minimal Gorenstein covers of $A=R/I$ arising from a lex-segment ideal.} Consider the ideal $I=(x^3-2xy^2,x^2y-2y^3,y^3)$ with Hilbert function $\lbrace 1,2,3,1\rbrace$. The sequence $h=\lbrace 1,2,3,2,1\rbrace$ corresponds to the Hilbert function of smallest length that admits Gorenstein ideals $J$ where the inclusion $J\subset I$ is possible a priori. The lex-segment ideal associated to $h$ is our running example $L=(x^3,x^2y,xy^3,y^5)$, see \Cref{ex:Paramlex} and \Cref{ex:VGL}.

On one hand, the inclusion condition $J\subset I$ can be described by a normal form computation of the generators of $J\in V(L)\simeq\mathbb{A}_\res^6$ with respect to a standard basis of $I$. The point $p_J=(c_{3,1}^0,c_{4,1}^0,c_{3,2}^1,c_{4,2}^0,c_{4,2}^1,c_{4,3}^1)\in\mathbb{A}_\res^6$ satisfies the inclusion property if and only if it belongs to the affine variety $\mathbb{V}(-c_{3,1}^0+c_{3,2}^1c_{4,3}^1-c_{4,2}^0+2,c_{3,1}^1+c_{4,3}^1)\subseteq\mathbb{A}_\res^6$.

On the other hand, $V_G(L)\simeq\mathbb{A}_\res^6\backslash\mathbb{V}(c_{3,1}^0c_{4,2}^0)$. Therefore, $J$ is a Gorenstein cover of $A$ if and only if $p_J\in \mathbb{V}(-c_{3,1}^0+c_{3,2}^1c_{4,3}^1-c_{4,2}^0+2,c_{3,1}^1+c_{4,3}^1)\backslash\mathbb{V}(c_{3,1}^0c_{4,2}^0)$.

For instance, the point $(1,0,0,1,0,0)\in\mathbb{A}_\res^6$ corresponds to the Gorenstein cover $G=R/(x^2y-y^3,x^3-2xy^2)$ of $A$. In particular, we proved that $\operatorname{gcl}(A)=2$.
\end{example}

\begin{corollary}\label{cor:wow} The set of Gorenstein covers of $G=R/J$ of $A=R/I$ that arise from a deformation of a lex-segment ideal $L$, namely $\operatorname{Lt_{\overline{\tau}}}(J)=L$, is a quasi-affine variety.
\end{corollary}

\begin{remark}
Not all minimal Gorenstein covers come from deformations of a lex-segment ideal. The reason behind this is that the inclusion condition $J\subset I$ is not preserved after a generic change of coordinates on $J$.
To make sure we do not miss any Gorenstein cover we need to look also at deformations of all monomial ideals with a convenient Hilbert function.
The surjectivity of \Cref{polysurj} is enough to detect the existence of minimal Gorenstein covers and hence enough to compute the Gorenstein colength. Examples can be found in \cite{Hom19}.
However, to compute the quasi-projective variety of minimal Gorenstein covers defined in \cite[Theorem 4.2]{EHM20}, a proper parametrization for the general case would be desirable.
\end{remark}

\section*{Acknowledgements}
We want to thank Alexandru Constantinescu for suggesting the problem
and for helpful discussions, as well as for recommending to the second author a stay at the Universit\`a Degli Studi di Genova. The first author wants to thank Joan Elias for encouraging her to do a research stay with Maria Evelina Rossi. We also want to thank Bernd Sturmfels for his advice.

We want to give special thanks to Maria Evelina Rossi for hosting us in Genova, answering many questions, giving useful hints and commenting on several versions of this manuscript, and especially for suggesting us to work on this problem together.

The first author was partially supported by MTM2016-78881-P, BES-2014-069364 and EEBB-I-18-12915.
Travel of the second author to Genova was supported by a Vigoni project.

\bibliographystyle{amsalpha}

Commutative Algebra (math.AC); Algebraic Geometry (math.AG)


Inclusion-exclusion principles for convex hulls and the Euler relation

Abstract: Consider $n$ points $X_1,\ldots,X_n$ in $\mathbb R^d$ and denote their convex hull by $\Pi$. We prove a number of inclusion-exclusion identities for the system of convex hulls $\Pi_I:=conv(X_i\colon i\in I)$, where $I$ ranges over all subsets of $\{1,\ldots,n\}$. For instance, denoting by $c_k(X)$ the number of $k$-element subcollections of $(X_1,\ldots,X_n)$ whose convex hull contains a point $X\in\mathbb R^d$, we prove that $$ c_1(X)-c_2(X)+c_3(X)-\ldots + (-1)^{n-1} c_n(X) = (-1)^{\dim \Pi} $$ for all $X$ in the relative interior of $\Pi$. This confirms a conjecture of R. Cowan [Adv. Appl. Probab., 39(3):630--644, 2007] who proved the above formula for almost all $X$. We establish similar results for the number of polytopes $\Pi_J$ containing a given polytope $\Pi_I$ as an $r$-dimensional face, thus proving another conjecture of R. Cowan [Discrete Comput. Geom., 43(2):209--220, 2010]. As a consequence, we derive inclusion-exclusion identities for the intrinsic volumes and the face numbers of the polytopes $\Pi_I$. The main tool in our proofs is a formula for the alternating sum of the face numbers of a convex polytope intersected by an affine subspace. This formula generalizes the classical Euler--Schläfli--Poincaré relation and is of independent interest.

\section{Statement of results}
\subsection{Introduction}
Let $X_1,\ldots,X_n$ be a finite collection\footnote{Since we do not require the points to be distinct, we use the notions ``collection'', ``subcollection'', etc.\ rather than ``set'', ``subset'', etc.} of points in $\R^d$.
Denote its convex hull by $\Pi$:
$$
\Pi:= \conv(X_1,\ldots,X_n) = \left\{\sum_{i=1}^n \lambda_i X_i \colon \lambda_1,\ldots,\lambda_n\geq 0,  \sum_{i=1}^n \lambda_i = 1\right\}.
$$
More generally, for any set $I\subset\{1,\ldots,n\}$ we write
$$
\Pi_I:=\conv(X_i\colon i\in I)
$$
for the convex hull of the points $X_i, i\in I$. In this paper, we are interested in various inclusion-exclusion relations satisfied by the system of polytopes $\Pi_I$, where $I$ ranges over all subsets of  $\{1,\ldots,n\}$.

Recall that a \textit{polytope} is a convex hull of a finite set of points. By definition, it is convex and compact. The \textit{interior} of a polytope $P$ is denoted by $\interior P$.  The \textit{relative interior} of a polytope $P$, denoted by $\relint  P$, is the interior of $P$ with respect to its affine hull. For example, the relative interior of a point is this point itself. For these and other standard definitions from convex geometry we refer to the monographs by Schneider~\cite{schneider_book}, Schneider and Weil~\cite{schneider_weil_book}, and Gr\"unbaum~\cite{gruenbaum_book}.
We denote by $\cF_k(P)$ the set of $k$-dimensional (closed) faces of $P$, and by $f_k(P)$ their number. Let $\dim P$ be the dimension of $P$ and write $\cF_\bullet(P)=\cup_{k=0}^{\dim P} \cF_k(P)$ for the set of all faces of $P$ including $P$ itself. Of central importance for the present paper is the classical Euler--Schl\"afli--Poincar\'e relation (see~\cite[page~626]{schneider_weil_book} or~\cite[page~130]{gruenbaum_book}) which states that for every polytope $P$,
\begin{equation}\label{eq:euler_relation}
\sum_{F\in \cF_{\bullet} (P)} (-1)^{\dim F} = \sum_{k=0}^{\dim P} (-1)^k f_k(P) = 1.
\end{equation}

\subsection{Cowan's formula}
Recall that $X_1,\ldots,X_n$ is a finite collection of points in $\R^d$, and additionally let $X$ be any point in $\R^d$.  For $k=1,\ldots,n$ denote by $c_k(X)$ the number of $k$-element subcollections of $(X_1,\ldots,X_n)$ containing $X$ in their convex hull:
\begin{equation}\label{eq:def_c_k}
c_k(X) = \# \{I\subset\{1,\ldots,n\}\colon \# I = k, X\in \Pi_I\}.
\end{equation}
Here, $\#B$ is the number of elements in a set $B$.
Cowan~\cite{cowan1}  proved that
\begin{equation}\label{eq:cowan_exceptional}
\sum_{k=1}^{n} (-1)^{k-1} c_k(X)
=
\begin{cases}
(-1)^{\dim \Pi}, &\text{if } X \in  (\relint \Pi)\backslash \mathcal E,\\
0, &\text{if } X\notin \relint  \Pi,
\end{cases}
\end{equation}
where  $\mathcal E$ is some ``exceptional set'' of codimension $2$. Cowan also conjectured that, in fact, the first case of the formula holds for \emph{all} $X\in \relint  \Pi$ and proved this for $d=2$. Another proof of Cowan's formula can be found in the book of Schneider and Weil~\cite[p.~309--310]{schneider_weil_book}, but there is again an exceptional set, namely the union of all $(d-2)$-dimensional affine subspaces spanned by $X_1,\ldots,X_n$. Our first result confirms Cowan's conjecture for all $d\in\N$.

\begin{theorem}\label{theo:cowan}
For any finite collection of points $X_1,\ldots,X_n$ in $\R^d$ and for all $X\in \R^d$ we have
\begin{equation}\label{eq:cowan}
\sum_{k=1}^{n} (-1)^{k-1} c_k(X)
=
\begin{cases}
(-1)^{\dim \Pi}, &\text{if } X \in  \relint \Pi,\\
0, &\text{if } X\notin \relint  \Pi.
\end{cases}
\end{equation}
\end{theorem}
This formula should be compared to the well-known inclusion-exclusion principles which state that for arbitrary subsets $A_1,\ldots,A_n$ of a set $\Omega$,
\begin{align}
&\sum_{\varnothing\neq I\subset\{1,\ldots,n\}} (-1)^{\# I-1} \ind_{\cap_{i\in I} A_i} = \ind_{A_1\cup\ldots\cup A_n},\label{eq:inclusion1}\\
&\sum_{\varnothing\neq I\subset\{1,\ldots,n\}} (-1)^{\# I-1} \ind_{\cup_{i\in I} A_i} = \ind_{A_1\cap\ldots\cap A_n},\label{eq:inclusion2}
\end{align}
where $\ind_B$ denotes the indicator function of a set $B$.
In terms of indicator functions, Cowan's formula can be written as
\begin{equation}\label{eq:cowan_indicator}
\sum_{\varnothing\neq I\subset\{1,\ldots,n\}} (-1)^{\# I-1} \ind_{\Pi_I} = (-1)^{\dim \Pi} \ind_{\relint  \Pi}.
\end{equation}
This is clearly analogous to~\eqref{eq:inclusion2} if we consider the convex hull as an analogue of the union, and the interior of the convex hull with a ``phase factor'' $(-1)^{\dim \Pi}$ as an analogue of the intersection.  The next theorem states a ``dual'' Cowan's formula which is analogous  to~\eqref{eq:inclusion1}.
\begin{theorem}\label{theo:cowan_dual}
For any finite collection of points $X_1,\ldots,X_n$ in $\R^d$ we have
\begin{equation}\label{eq:cowan_dual}
\sum_{\varnothing\neq I\subset\{1,\ldots,n\}} (-1)^{\# I -1}  (-1)^{\dim \Pi_I}\ind_{\relint  \Pi_I}  = \ind_{\Pi}.
\end{equation}
\end{theorem}
Given~\eqref{eq:cowan}, we can obtain~\eqref{eq:cowan_dual} by simple algebraic manipulations (M\"obius inversion), see Section~\ref{subsec:proof_dual_cowan}. The proof of~\eqref{eq:cowan} is non-trivial and will be given in Section~\ref{subsec:proof_cowan}.

\subsection{Generalized Euler relation}
The left-hand side of~\eqref{eq:cowan} looks very much like the Euler characteristic, but it seems that the original proof of Cowan~\cite{cowan1} does not establish any direct connection between his formula and the theory of additive functionals.
We will follow a different method. Referring to Section~\ref{subsec:proof_cowan} for more details, we briefly describe the essence of our approach.
Consider a non-degenerate simplex with $n$ vertices located in some $(n-1)$-dimensional linear space $H$. Define an affine map $A:H\to\R^d$ by sending the vertices of the simplex to the points $X_1,\ldots,X_n$. Then, the polytopes $\Pi_I$, $I\subset\{1,\ldots,n\}$, are the images of the faces of the simplex. Passing to the preimages, we can interpret Cowan's formula as a statement about the intersections between the affine subspace $A^{-1}(X)$ and the faces of the simplex.

The following general fact (which may be of independent interest) is the main ingredient of our proofs. Although it may be known, we were unable to find it in the literature.

\begin{theorem}\label{theo:euler_intersection}
Let $T$ be a polytope in $\R^m$ with non-empty interior $\interior T$. Let $L\subset\R^m$ be an affine subspace of dimension $m-d$.
Denote by $a_k$ the number of $k$-dimensional faces of $T$ which are intersected by $L$, where $k=0,\ldots, m$. Then,
\begin{equation}\label{eq:euler_intersection}
\sum_{k=0}^{m} (-1)^k a_k
=
\begin{cases}
(-1)^{d}, &\text{if } L\cap \interior  T\neq \varnothing,\\
0, &\text{if } L\cap \interior  T = \varnothing.
\end{cases}
\end{equation}
\end{theorem}
In the special case $L=\R^m$ we have $a_k=f_k(T)$,  the number of $k$-dimensional faces of $T$, and the theorem reduces to the classical Euler relation~\eqref{eq:euler_relation}.
\begin{example}
Consider a square $ABCD$ and a line $L$ passing through $A$ and the middle of the side $BC$. Then, $a_0=1$ (vertex $A$), $a_1=3$ (sides $AB$, $AD$, $BC$), and $a_2=1$. We have $1-3+1=-1$. Let $L'$ be the line passing through $A$ and $B$. Then, $a_0'=2$ (vertices $A$ and $B$), $a_1'=3$ (sides $AB$, $AD$, $BC$), and $a_3'=1$. We have $2-3+1=0$.
\end{example}

If for every face $F$ of the polytope $L\cap T$ there is a \textit{unique} face $G$ of the polytope $T$ such that $G\cap L=F$, and if $\dim F = \dim G - d$, then~\eqref{eq:euler_intersection} is a consequence of the Euler--Schl\"afli--Poincar\'e relation~\eqref{eq:euler_relation} for the polytope $L\cap T$. However, it is easy to construct examples in which the uniqueness fails (for example, if $L$ is a line containing some vertex of $T$, $m\geq 2$). Thus, the main problem is how to treat these ``non-general position'' cases.

Our proof of Theorem~\ref{theo:euler_intersection} (which will be given in Section~\ref{sec:proof_euler}) is based on Groemer's extension of the Euler characteristic to the class of ro-polytopes. Our method can be applied to obtain further results of the same type, for example the following one. Recall that $\cF_k(P)$ is the set of $k$-dimensional faces of a polytope  $P$.

\begin{theorem}\label{theo:euler_touch}
Let $T_1,T_2\subset\R^m$ be two polytopes which touch each other, that is $(\relint T_1)\cap (\relint T_2) = \varnothing$ but $T_1\cap T_2 \neq\varnothing$. Then,
\begin{equation}\label{eq:euler_touch}
\sum_{k=0}^{m} (-1)^k \#\{F\in \cF_{k}(T_1)\colon F\cap T_2\neq \varnothing\} = 0.
\end{equation}
\end{theorem}

A somewhat related result is the Euler relation for face-to-face tessellations, see~\cite[Eq.~(14.65)]{schneider_weil_book}, but it seems that this relation implies neither Theorem~\ref{theo:euler_intersection} nor Theorem~\ref{theo:euler_touch}.

\subsection{Inclusion-exclusion principles for intrinsic volumes}
It is possible to generalize Cowan's formula to the setting when we count convex hulls intersecting certain affine subspace $F\subset\R^d$ rather than convex hulls containing a given point $X$. Let $X_1,\ldots,X_n$ be a finite collection of points in  $\R^d$. It will be convenient to assume that the convex hull $\Pi$ of these points has full dimension $d$. This is not a restriction of generality because otherwise we could replace $\R^d$ by the affine hull of $X_1,\ldots,X_n$.   Given an affine subspace $F\subset\R^d$ and $k=1,\ldots,n$, denote by $c_k(F)$ the number of $k$-element subcollections of $(X_1,\ldots,X_n)$ whose convex hull intersects $F$, that is
$$
c_k(F) = \# \{I\subset\{1,\ldots,n\}\colon \# I = k, F\cap \Pi_I \neq \varnothing\}.
$$
\begin{theorem}\label{theo:cowan_affine}
Under the above assumptions,
\begin{equation}\label{eq:cowan_affine}
\sum_{k=1}^{n} (-1)^{k-1} c_k(F)
=
\begin{cases}
(-1)^{d-\dim F}, &\text{if } F\cap \interior  \Pi \neq \varnothing,\\
0, &\text{if } F\cap \interior  \Pi = \varnothing.
\end{cases}
\end{equation}
\end{theorem}
The above result reduces to Cowan's formula if $F$ is a point. In terms of indicator variables, Theorem~\ref{theo:cowan_affine} can be written as follows:
\begin{equation}\label{eq:cowan_affine_indicator}
\sum_{\varnothing\neq I\subset\{1,\ldots,n\}} (-1)^{\# I-1} \ind_{\{F \cap \Pi_I\neq \varnothing\}} = (-1)^{d-\dim F} \ind_{\{F\cap \interior  \Pi\neq \varnothing\}}.
\end{equation}

The set of all $r$-dimensional affine subspaces of $\R^d$ is denoted by $\text{AffGr}(d,r)$ and called the affine Grassmannian. It is known that $\text{AffGr}(d,r)$ carries a measure $\mu_r$ (defined up to a multiplicative constant) invariant with respect to the natural action of the isometry group of $\R^d$; see~\cite[Chapter~5.1]{schneider_weil_book}.   The intrinsic volumes $V_0(K),\ldots,V_d(K)$ of a compact convex set $K\subset \R^d$ satisfy the Crofton formula~\cite[Theorem~5.1.1]{schneider_weil_book}
\begin{equation}\label{eq:crofton}
V_{r}(K) =
\frac{\Gamma\left(\frac{d-r+1}{2}\right)\Gamma\left(\frac{r+1}{2}\right)}{\Gamma\left(\frac 12\right) \Gamma\left(\frac{d+1}{2}\right)}
\int_{\text{AffGr}(d,d-r)} \ind_{\{F\cap K\neq \varnothing\}} \mu_{d-r}(\dd F), \; r=0,\ldots,d,
\end{equation}
where we used the same normalization for $\mu_r$ as in~\cite[Chapter~5.1]{schneider_weil_book}.
Integrating~\eqref{eq:cowan_affine_indicator} over $\text{AffGr}(d,d-r)$ with respect to  $\mu_{d-r}(\dd F)$, we obtain an inclusion-exclusion principle for intrinsic volumes which generalizes the result of Cowan~\cite{cowan1} who considered the case $r=d$.
\begin{theorem}\label{theo:cowan_intrinsic}
For any finite collection $X_1,\ldots,X_n$ of points in $\R^d$ with $\dim \Pi=d$ and for every $r=0,\ldots,d$, we have
\begin{equation}\label{eq:cowan_intrinsic}
\sum_{\varnothing\neq I\subset\{1,\ldots,n\}} (-1)^{\# I-1} V_{r}(\Pi_I) = (-1)^{r} V_{r}(\Pi).
\end{equation}
\end{theorem}
\begin{remark}
Using the local Crofton formula~\cite[Theorem~5.3.3]{schneider_weil_book} one can prove a similar identity for the curvature measures of the $\Pi_I$'s.
\end{remark}

As in the work of Cowan~\cite{cowan1}, it is possible to obtain probabilistic corollaries of the above deterministic results.
Let  $X_1,\ldots,X_n$ be random vectors with values in $\R^d$. We call $(X_1,\ldots,X_n)$ an \textit{exchangeable tuple} if for every permutation $\sigma$ of $\{1,\ldots,n\}$, the distributional equality
\begin{equation}\label{eq:exchange}
(X_1,\ldots,X_n) \eqdistr (X_{\sigma(1)},\ldots, X_{\sigma(n)})
\end{equation}
holds. For example, this condition is satisfied if $X_1,\ldots,X_n$ are independent identically distributed random vectors; see~\cite{cowan1} for more examples.  Given any subset  $I\subset\{1,\ldots,n\}$ with $\#I = k$  write
$$
v_{r}(k)
:=
\E V_r(\Pi_I)
=
\E V_r(\conv(X_1,\ldots,X_k)),
$$
where we stress that  by exchangeability,  there is no dependence on the choice of $I$.

\begin{theorem}\label{theo:cowan_intrinsic_random}
Let $(X_1,\ldots,X_n)$ be an exchangeable tuple of random vectors in $\R^d$ such that $\dim \Pi=d$ a.s. Let $r\in \{0,\ldots,d\}$ and assume that $\E V_r( \Pi)<\infty$. Then,
$$
\sum_{k=1}^{n} (-1)^{k-1} \binom{n}{k} v_{r}(k) = (-1)^{r} v_{r}(n).
$$
\end{theorem}
\begin{remark}
Condition $\E V_r(\Pi)<\infty$ holds provided that  $\E |X_1|^r<\infty$.  This follows
from the fact that
$\Pi$ is contained in the ball of radius $|X_1|+\ldots+|X_n|$ centred at the origin together with
the monotonicity (see~\eqref{eq:crofton}) and the homogeneity of the intrinsic volumes.
\end{remark}
\begin{proof}[Proof of Theorem~\ref{theo:cowan_intrinsic_random}]
By the monotonicity of the intrinsic volumes, our assumption
 $\E V_r(\Pi)<\infty$ implies that $v_{r}(k) <\infty$ for all $k\in \{1,\ldots,n\}$. Taking the expectation in~\eqref{eq:cowan_intrinsic} and noting that there are $\binom nk$ subsets $I$ with $k$ elements, we obtain the result.
\end{proof}
In the case $r=d$, Theorem~\ref{theo:cowan_intrinsic_random} reduces to the well-known identity of Buchta~\cite{buchta}; see also~\cite[Theorem~8.2.6]{schneider_weil_book} and~\cite{affentranger1,affentranger2,badertscher,cowan1,beermann_reitzner,buchta_miles}.

\subsection{Inclusion-exclusion principles for faces}
Next we are going to state inclusion-exclusion principles for the faces of the polytopes $\Pi_I$, $I\subset \{1,\ldots,n\}$. These deterministic formulas will be used to prove probabilistic identities (conjectured by Cowan in~\cite{cowan2}) on the expected face numbers of random convex hulls.

Fix some finite collection of points $X_1,\ldots,X_n$ in $\R^d$.
For a set $I\subset\{1,\ldots,n\}$
denote by $b_j(I)$ the number of $j$-element sets $J\supset  I$ such that $\Pi_I$ is a face of $\Pi_J$, that is
$$
b_j(I) = \#\{J\subset\{1,\ldots,n\}\colon J\supset  I, \#J=j, \Pi_I \text{ is a face of } \Pi_J\}.
$$
\begin{theorem}\label{theo:inclusion_exclusion_faces}
Consider a non-empty subset $I\subset\{1,\ldots,n\}$ such that\footnote{We write $(X_k \colon k\notin I)$ rather than $\{X_k \colon k\notin I\}$ because the points need not be distinct.} $\Pi_I\cap (X_k \colon k\notin I)=\varnothing$. Then,
\begin{equation}\label{eq:cowan_faces}
\sum_{j=\#I}^n (-1)^{j-1} b_j(I)=
\begin{cases}
(-1)^{\dim \Pi + \#I - 1 - \dim \Pi_I}, &\text{if } \Pi_I \text{ is not a face of } \Pi,\\
0, &\text{if } \Pi_I \text{ is a face of } \Pi.
\end{cases}
\end{equation}
\end{theorem}

The above assumption on $I$ is always satisfied if $\#I=1$ (that is, if $\Pi_I$ is a single point) and the points $X_1,\ldots,X_n$ are distinct. The following example shows that~\eqref{eq:cowan_faces} may fail in general.

\begin{example}\label{ex:example}
Consider the points $X_i=i$, $i=1,\ldots,5$, on the real line and take $I=\{2,4\}$. Clearly, $\Pi_I= [2,4]$ is a face of $\Pi_J$ if and only if $J=\{2,4\}$ or  $J=\{2,3,4\}$. Thus, $b_1(I)=b_4(I)=b_5(I)=0$ and $b_2(I)=b_3(I)=1$. The alternating sum in~\eqref{eq:cowan_faces} equals $0$, so that~\eqref{eq:cowan_faces} fails.
\end{example}

In order to state a version of Theorem~\ref{theo:inclusion_exclusion_faces} not requiring additional assumptions on $I$, we have to introduce the following modified version of $b_j(I)$:
$$
b_j^*(I) = \#\{J\subset\{1,\ldots,n\}\colon J\supset  I, \#J=j, \Pi_I \text{ is a clean face of } \Pi_J\},
$$
where the word ``clean'' means that $\Pi_I\cap (X_k\colon k\in J\backslash I)=\varnothing$.

\begin{theorem}\label{theo:inclusion_exclusion_faces_clean}
For every non-empty subset $I\subset\{1,\ldots,n\}$ we have
\begin{equation}\label{eq:cowan_faces_clean}
\sum_{j=\#I}^n (-1)^{j-1} b_j^*(I)=
\begin{cases}
(-1)^{\dim \Pi + \#I - 1 - \dim \Pi_I}, &\text{if } \Pi_I \text{ is not a face of } \Pi,\\
0, &\text{if } \Pi_I \text{ is a face of } \Pi.
\end{cases}
\end{equation}
\end{theorem}
Under the assumption $\Pi_I\cap (X_k\colon k\notin I)=\varnothing$ the conditions ``$\Pi_I$ is a face of $\Pi_J$'' and ``$\Pi_I$ is a clean face of $\Pi_J$'' become equivalent which means that  Theorem~\ref{theo:inclusion_exclusion_faces_clean} contains Theorem~\ref{theo:inclusion_exclusion_faces} as a special case.
\begin{example}
Continuing Example~\ref{ex:example}, we see that $\Pi_I$ is a clean face of $\Pi_J$ if and only if $J=I=\{2,4\}$. Hence, all $b_j^*(I)$ equal zero except for $b_2^*(I)=1$, and~\eqref{eq:cowan_faces_clean} holds.
\end{example}

We say that a finite collection $X_1,\ldots,X_n$ of points in $\R^d$ is in \textit{$r$-general position} for some $r\in \{1,\ldots,d\}$ if every $r$-dimensional affine subspace contains at most $r+1$ points from this set.
Recall that $f_r(P)=\#\cF_r(P)$ denotes the number of $r$-dimensional faces of a polytope $P$. The next result is a deterministic counterpart of a probabilistic formula conjectured by Cowan~\cite{cowan2}. We obtain it by summing up~\eqref{eq:cowan_faces} over all subsets $I$ with $\# I = r+1$; see Section~\ref{subsec:proof_theo_relation_for_f_r} for details.
\begin{theorem}\label{theo:relation_for_f_r}
Fix some $d\in\N$ and  $r\in \{1,\ldots,d\}$. Let $X_1,\ldots,X_n$ be a finite collection of points in $r$-general position in $\R^d$  and suppose that $\dim \Pi=d$. Then,
\begin{equation}\label{eq:relation_for_f_r}
\sum_{\varnothing\neq J\subset\{1,\ldots,n\}} (-1)^{\#J-1} f_r(\Pi_J) = (-1)^d \left(\binom {n}{r+1} - f_r(\Pi)\right).
\end{equation}
\end{theorem}
In particular, if $n-d$ is odd, then the term $f_r(\Pi)$ appears on both sides with different signs, and we obtain the relation
$$
2 f_r(\Pi) = \binom{n}{r+1} + (-1)^n \sum_{\varnothing \neq J\subsetneq \{1,\ldots,n\}} (-1)^{\#J-1} f_r(\Pi_J),
$$
where we stress that the term with $J=\{1,\ldots,n\}$ is excluded from the summation. If $n-d$ is even, then the term $f_r(\Pi)$ cancels and we obtain
$$
\sum_{\varnothing \neq J\subsetneq \{1,\ldots,n\}} (-1)^{\#J-1} f_r(\Pi_J) = (-1)^d \binom{n}{r+1}.
$$
Passing to the random setting, we prove a formula which was conjectured by Cowan~\cite{cowan2} and proved by him in some special cases using the Dehn--Sommerville relations. Let $(X_1,\ldots,X_n)$ be an exchangeable tuple of random vectors in $\R^d$; see~\eqref{eq:exchange}. For an arbitrary subset $I\subset\{1,\ldots,n\}$  with $\# I=k$ we write
$$
F_r(k) := \E f_r(\Pi_I)
=
\E f_r(\conv(X_1,\ldots,X_k))
$$
for the expected number of $r$-dimensional faces of $\Pi_I$.
\begin{theorem}\label{theo:relation_for_f_r_random}
Fix some $d\in\N$ and $r\in \{1,\ldots,d\}$. Let $(X_1,\ldots,X_n)$ be an exchangeable tuple of random vectors in $\R^d$ such that with probability one, $\dim \Pi=d$ and the points $X_1,\ldots,X_n$ are in $r$-general position. Then,
$$
\sum_{k=1}^n (-1)^{k-1}  \binom nk F_r(k) = (-1)^d \left(\binom {n}{r+1} - F_r(n)\right).
$$
\end{theorem}
\begin{proof}
Take the expectation in~\eqref{eq:relation_for_f_r} and note that there are $\binom nk$ subsets $J$ with $k$ elements.
\end{proof}

\subsection{A proof of Buchta's identity}
Several remarkable identities for random convex hulls were discovered by Buchta in~\cite{buchta_identity}. One of these identities has a form very similar to the inclusion-exclusion principles studied in the present paper. Given that Theorems~\ref{theo:cowan_intrinsic_random} and~\ref{theo:relation_for_f_r_random} have deterministic counterparts, it is natural to ask whether something similar is true for Buchta's identity.

To state Buchta's identity, let $X_1,\ldots,X_n$ be independent identically distributed random vectors in $\R^d$. The  probability distribution of $X_i$ is denoted by $\mu$ and assumed to be non-atomic (which implies that $X_1,\ldots,X_n$ are distinct a.s.).
Denote by $N_n=f_0(\Pi)$ the number of vertices of $\Pi$ and write
$$
M_j := \mu (\conv(X_1,\ldots,X_j))
$$
for the so-called probability content of $\conv(X_1,\ldots,X_j)$.  Buchta's identity~\cite{buchta_identity} (see also~\cite[Theorem 8.2.5]{schneider_weil_book}) states that for every $l=1,\ldots,n$,
\begin{equation}\label{eq:buchta}
\P[N_n = l] = (-1)^l \binom n l \sum_{j=1}^l (-1)^j \binom lj \E M_j^{n-j}.
\end{equation}
If $\mu$ is the uniform distribution on some convex body $K\subset \R^d$, then $M_j$ is just the volume of $\conv(X_1,\ldots,X_j)$ divided by the volume of $K$. Below we provide a ``pointwise'' version of~\eqref{eq:buchta} which turns out to be a very simple  inclusion-exclusion formula. Our proof is different from the original proof of Buchta~\cite{buchta} (see also~\cite[Theorem 8.2.5]{schneider_weil_book}).

\vspace*{2mm}
\noindent
\textit{Proof of~\eqref{eq:buchta}.}
Denote the probability space on which $X_1,\ldots,X_n$ are defined by $(\Omega,\mathbb F, \P)$. Let $A_1,\ldots,A_n\in \mathbb F$ be  random events to be specified later and denote by $A_i^c=\Omega\backslash A_i$ the complement of $A_i$.   Start with the inclusion-exclusion principle
\begin{equation} \label{eq:buchta_incl_excl}
\ind_{A_1\cap\ldots\cap A_l\cap A_{l+1}^c \cap \ldots \cap A_n^c}
=
\prod_{i=1}^l (1-\ind_{A_i^c})
\prod_{k=l+1}^n \ind_{A_k^c}
=
\sum_{J\subset\{1,\ldots,l\}} (-1)^{l-\#J} \ind_{\cap_{i\notin J} A_i^c},
\end{equation}
where $J=\varnothing$ is allowed in the summation and the intersection over an empty index set is $\Omega$.
Let now $A_i$ be the random event $\{X_i \text{ is a vertex of } \Pi\}$, for $i=1,\ldots,n$. Recall that $\cF_0(\Pi)$ denotes the set of vertices of $\Pi$. Then, \eqref{eq:buchta_incl_excl} becomes what can be considered as a pointwise version of Buchta's identity
\begin{equation} \label{eq:buchta_pointwise}
\ind_{\{\cF_0(\Pi) = \{X_1,\ldots,X_l\}\}}
=  \sum_{J\subset\{1,\ldots,l\}} (-1)^{l-\#J} \ind_{\{X_i, i\notin J, \text{ are not vertices of } \Pi\}}.
\end{equation}
Taking the expectation on both sides of~\eqref{eq:buchta_pointwise} yields~\eqref{eq:buchta} because by exchangeability,
$$
\P[N_n = l] = \binom nl \E \ind_{\{\cF_0(\Pi) = \{X_1,\ldots,X_l\}\}}
$$
and for every $J\subset\{1,\ldots,l\}$ with $\#J=j$,
\begin{align*}
\P [X_i, i\notin J, \text{ are not vertices of } \Pi]
&=
\P[\{X_i\colon i\notin J\} \subset\conv(X_k\colon k\in J)]\\
&
=\E [M_{j}^{n-j}].
\end{align*}
To prove the latter identity note that the conditional probability that $\{X_i\colon i\notin J\} \subset\conv(X_k\colon k\in J)$  given $\{X_k\colon k\in J\}$ equals $M_j^{n-j}$. Unlike most proofs of the present paper, the above argument is almost purely combinatorial and does not rely on topological notions like the Euler characteristic.

\section{Proof of the generalized Euler relation}\label{sec:proof_euler}

In this section we prove Theorems~\ref{theo:euler_intersection} and~\ref{theo:euler_touch}. First we need to recall some facts about the extension of the Euler characteristic to the class of ro-polyhedra which is due to Groemer~\cite{groemer}; see also~\cite[Chapter~14.4]{schneider_weil_book}.

\subsection{Euler characteristic for ro-polyhedra}
A \textit{ro-polytope} is defined as a relative interior of some polytope.
Finite unions of ro-polytopes are called \textit{ro-polyhedra}. It is known (see~\cite{groemer} or~\cite{schneider_weil_book}, page 625, Theorem 14.4.5) that there is a unique function $\chi$ (the \textit{Euler characteristic})  defined on the family of ro-polyhedra in $\R^m$ and having the following properties:
\begin{enumerate}
\item[(a)] $\chi(\varnothing) =0$.
\item [(b)] $\chi$ is additive, that is $\chi(M\cup N) = \chi(M) + \chi(N) - \chi(M\cap N)$ for all ro-polyhedra $M$ and $N$.
\item[(c)] For a non-empty polytope $P$ we have
$\chi(P) = 1$ and  $\chi(\relint  P) = (-1)^{\dim P}$.
\end{enumerate}
For the proof of the following lemma we refer to Theorem~14.4.1 in~\cite{schneider_weil_book}.
\begin{lemma}\label{lem:chi_property}
If $A_1,\ldots,A_s\subset \R^m$ are ro-polyhedra such that  $\sum_{i=1}^s a_i \ind_{A_i}=0$ for some $a_1,\ldots,a_s\in\Z$, then
$$
\sum_{i=1}^s a_i \chi(A_i)=0.
$$
\end{lemma}

\subsection{Proof of Theorem~\ref{theo:euler_intersection}}
Recall that $\cF_k(T)$ denotes the set of $k$-dimensional faces of the polytope $T$ and $\cF_{\bullet}(T)=\cup_{k=0}^{m} \cF_k(T)$ is the set of all faces of $T$. Note that $\cF_{m} (T)$ has exactly one element, namely $T$ itself.

We can represent the polytope $T$ as a disjoint union of its relatively open faces:
\begin{equation}\label{eq:polytope_union_faces}
T= \cup_{G\in \cF_\bullet(T)} \relint  G.
\end{equation}
It was observed by Nef~\cite{nef} that together with the properties of $\chi$ this immediately implies the Euler relation:
$$
1= \chi(T) = \sum_{G\in \cF_\bullet(T)} \chi(\relint  G) = \sum_{G\in \cF_\bullet(T)} (-1)^{\dim G}.
$$
The proof of Theorem~\ref{theo:euler_intersection} is more involved. A well-known corollary of the Euler relation, see~\cite[p.~627, Eq.~(14.64)]{schneider_weil_book} or~\cite[page~137]{gruenbaum_book},  states that for every face $G\in \cF_\bullet(T)$ other than $T$ itself,
\begin{equation}\label{eq:euler_generalized}
\sum_{F\in \cF_\bullet(T) \colon F\supset \relint  G} (-1)^{\dim F} = \sum_{F\in \cF_\bullet(T) \colon F\supset G} (-1)^{\dim F} =  0.
\end{equation}
From~\eqref{eq:polytope_union_faces} and~\eqref{eq:euler_generalized} we easily obtain an inclusion-exclusion relation  for the indicator function of the interior of $T$
$$
\ind_{\interior  T} = \sum_{k=0}^m \sum_{F\in \cF_{m-k}(T)} (-1)^k \ind_{F}
$$
which holds pointwise. Multiplying both sides by $\ind_L$ and replacing $k$ by $m-k$ we obtain
$$
\ind_{L\cap \interior T} = \sum_{k=0}^m \sum_{F\in \cF_{k}(T)} (-1)^{m-k} \ind_{F\cap L}.
$$
By Lemma~\ref{lem:chi_property}, this implies that
\begin{equation}\label{eq:tech1}
\chi(L\cap \interior T) = \sum_{k=0}^m \sum_{F\in \cF_{k}(T)} (-1)^{m-k} \chi(F\cap L).
\end{equation}
The left-hand side of~\eqref{eq:tech1} equals
$$
\chi(L\cap \interior  T) =
\begin{cases}
(-1)^{m-d}, &\text{if } L\cap \interior T \neq \varnothing,\\
0, &\text{if } L\cap \interior T =\varnothing
\end{cases}
$$
because $L\cap \interior T$ is either an $(m-d)$-dimensional ro-polytope (in which case its Euler characteristic equals $(-1)^{m-d}$) or empty (in which case the Euler characteristic vanishes).  As for the right-hand side of~\eqref{eq:tech1}, any term $\chi(F\cap L)$ is either zero (if $F\cap L = \varnothing$) or $1$ (if $F\cap L$ is a non-empty polytope), hence
$$
\sum_{k=0}^m \sum_{F\in \cF_{k}(T)} (-1)^{m-k} \chi(F\cap L)
=
\sum_{k=0}^m (-1)^{m-k} a_{k}.
$$
Taking everything together, we obtain the required relation.

\subsection{Proof of Theorem~\ref{theo:euler_touch}}
As in the previous proof, start with the relation
$$
\ind_{\relint  T_1} = \sum_{k=0}^m \sum_{F\in \cF_{m-k}(T_1)} (-1)^k \ind_{F}.
$$
Multiplying both sides by $\ind_{T_2}$, using $(\relint T_1) \cap T_2 =\varnothing$, and substituting $m-k$ for $k$, we infer
$$
0 = \sum_{k=0}^m \sum_{F\in \cF_{k}(T_1)} (-1)^k \ind_{F \cap T_2}.
$$
By Lemma~\ref{lem:chi_property} this implies
$$
\sum_{k=0}^m \sum_{F\in \cF_{k}(T_1)} (-1)^k \chi(F \cap T_2) = 0.
$$
Now observe that $F\cap T_2$ is a polytope which may be empty or not, hence
$$
\chi(F\cap T_2)
=
\begin{cases}
1,&\text{if } F\cap T_2 \neq \varnothing,\\
0, &\text{if } F\cap T_2 = \varnothing.
\end{cases}
$$
It follows that
$$
\sum_{k=0}^m (-1)^k  \#\{F\in \cF_{k}(T_1)\colon F\cap T_2 \neq \varnothing \} = 0,
$$
which completes the proof.

\section{Proofs of the inclusion-exclusion formulas}
\subsection{Proof of Theorem~\ref{theo:cowan}}\label{subsec:proof_cowan}
Without loss of generality we assume that $\dim \Pi=d$, otherwise we could replace $\R^d$ by the affine hull of $X_1,\ldots,X_n$.
Define a linear operator $A:\R^n \to \R^d$ by
$$
Ae_1 = X_1,\ldots, Ae_n=X_n,
$$
where $e_1,\ldots,e_n$ is the standard basis of $\R^n$.
Consider the standard $(n-1)$-dimensional simplex
$$
S:= \{(\alpha_1,\ldots,\alpha_n)\in [0,\infty)^n \colon \alpha_1+\ldots+\alpha_n =1\}\subset \R^n.
$$
The $(k-1)$-dimensional faces of $S$ have the form
$$
S_{i_1,\ldots,i_k} = \{(\alpha_1,\ldots,\alpha_n)\in S \colon \alpha_i=0 \text{ for all } i\notin \{i_1,\ldots, i_k\}\},
$$
where $1\leq i_1<\ldots<i_k \leq n$ and $k\in \{1,\ldots,n\}$.
The next lemma provides an interpretation of Cowan's formula as a statement about the number of faces of the simplex $S$ intersected by the affine subspace $A^{-1}(X)$. A somewhat related idea was used in~\cite{kabl_vys_zaporozhets_weyl_chambers}.
\begin{lemma}\label{lem:lem}
For a point $X\in\R^d$ and any $1\leq i_1<\ldots<i_k \leq n$ the following statements are equivalent:
\begin{enumerate}
\item[(i)] $X\in \conv (X_{i_1}, \ldots, X_{i_k})$
\item[(ii)] $A^{-1}(X) \cap S_{i_1,\ldots, i_k}\neq \varnothing$.
\end{enumerate}
\end{lemma}
\begin{proof}
The set $A^{-1}(X) \cap S_{i_1,\ldots, i_k}$ is non-empty if and only if there exist $(\alpha_1,\ldots,\alpha_n)\in S$ such that $\alpha_i=0$ for all $i\notin \{i_1,\ldots, i_k\}$  and
$$
A(\alpha_1e_1+\ldots +\alpha_ne_n) = X.
$$
But in view of the definition of $A$ this means that
$$
\alpha_{i_1} X_{i_1} + \ldots + \alpha_{i_k} X_{i_k} = X,
$$
which is equivalent to $X\in \conv (X_{i_1}, \ldots, X_{i_k})$.
\end{proof}

We proceed to the proof of Theorem~\ref{theo:cowan}. Fix some $X\in\R^d$.
We are going to apply Theorem~\ref{theo:euler_intersection} to the polytope $T := S$ located in the hyperplane $H\colon \alpha_1+\ldots+\alpha_n=1$ (which we identify with $\R^{n-1}$, so that $m=n-1$) and the affine subspace $L := A^{-1}(X)\cap H$.

We argue that the codimension of $L$ in the hyperplane $H$ equals $d$.  Recall that we assume that $\Pi=\conv(X_1,\ldots,X_n)$ has full dimension $d$. Hence, the vectors $X_2-X_1,\ldots, X_n-X_1$ span the whole $\R^d$. This means that for every $x\in\R^d$ there is a real solution $(v_2,\ldots,v_n)$ to $v_2(X_2-X_1)+\ldots+v_n(X_n-X_1)=x$. Defining $v_1=-(v_2+\ldots+v_n)$ and $v=(v_1,\ldots,v_n)$ we obtain a solution $v$ to $A v = x$ in the hyperplane $H_0\colon  v_1+\ldots+v_n=0$. We have $AH_0 = \R^d$, hence $AH=\R^d$ and therefore $L=A^{-1}(X)\cap H$ has codimension $d$ in $H$.

By Lemma~\ref{lem:lem}, $c_k(X)$ defined in~\eqref{eq:def_c_k} equals  $a_{k-1}$, the number of $(k-1)$-dimensional faces of $S$ which are intersected by $L$.  Hence, by Theorem~\ref{theo:euler_intersection} we obtain that
$$
\sum_{k=1}^n (-1)^{k-1} c_k(X) = \sum_{j=0}^{n-1} (-1)^{j} a_j =
\begin{cases}
(-1)^{d}, &\text{if } L\cap \relint S\neq \varnothing,\\
0, &\text{if } L\cap \relint S = \varnothing.
\end{cases}
$$

It remains to prove that $L\cap \relint S\neq \varnothing$ if and only if $X\in \relint \Pi$. Indeed, $X$ is in the relative interior of $\conv (X_1,\ldots,X_n)$ if and only if there is a strictly positive tuple $(\alpha_1,\ldots,\alpha_n)\in S$ such that $\alpha_1X_1+\ldots+\alpha_n X_n =X$; see~\cite[Theorem 1.1.14]{schneider_book}. But this is equivalent to  $(\alpha_1,\ldots,\alpha_n) \in L\cap \relint S$.

\subsection{Proof of Theorem~\ref{theo:cowan_dual}}\label{subsec:proof_dual_cowan}
Applying Theorem~\ref{theo:cowan} in its indicator functions version~\eqref{eq:cowan_indicator} to every $\Pi_I$ and interchanging the order of summation, we obtain
\begin{align*}
\sum_{\varnothing\neq I\subset\{1,\ldots,n\}} (-1)^{\# I -1}  (-1)^{\dim \Pi_I}\ind_{\relint  \Pi_I}
&=
\sum_{\varnothing\neq I\subset\{1,\ldots,n\}} (-1)^{\# I -1}  \sum_{\varnothing \neq J\subset I} (-1)^{\#J-1} \ind_{\Pi_J}\\
&=
\sum_{\varnothing\neq J\subset\{1,\ldots,n\}} (-1)^{\# J -1} \ind_{\Pi_J} \sum_{I\supset  J} (-1)^{\#I-1}\\
&=
\ind_{\Pi},
\end{align*}
where in the last step we used that
$$
\sum_{I\supset  J} (-1)^{\#I-1} =
\begin{cases}
(-1)^{n-1}, &\text{if } J=\{1,\ldots,n\},\\
0, &\text{otherwise}.
\end{cases}
$$

\subsection{Proof of Theorem~\ref{theo:cowan_affine}}
We can assume that $F$ is a proper affine subspace because the case when $F$ is a point was treated in Theorem~\ref{theo:cowan}, while the case $F=\R^n$ reduces to the identity
$$
\sum_{k=1}^n (-1)^{k-1} \binom nk = 1.
$$

Since the problem is invariant under simultaneous translations of $X_1,\ldots,X_n$ and $F$, we can assume that $F$ contains the origin.
Denote by $S:\R^d\to F^{\bot}$ the projection on $F^{\bot}$,  the orthogonal complement of $F$.
The idea is to apply Cowan's formula~\eqref{eq:cowan} to the projected points $S(X_1),\ldots,S(X_n)$.
Note that for any set $I\subset\{1,\ldots,n\}$  the convex hull of $(X_{i}\colon i\in I)$  intersects $F$ if and only if the convex hull of $(S(X_i)\colon i\in I)$ contains the origin. This is true since convex hulls are preserved under linear maps.  We obtain
\begin{align*}
\sum_{k=1}^n (-1)^{k-1} c_k(F)
&=
\sum_{k=1}^n (-1)^{k-1} \sum_{\substack{I\subset\{1,\ldots,n\}\\\#I=k}} \ind_{\{F\cap \Pi_I \neq \varnothing\}}\\
&=
\sum_{k=1}^n (-1)^{k-1} \sum_{\substack{I\subset\{1,\ldots,n\}\\\#I=k}} \ind_{\{0\in \conv(SX_i\colon i\in I)\}}\\
&=
\begin{cases}
(-1)^{d-\dim F}, &\text{if } 0\in \relint  S(\Pi),\\
0, &\text{if } 0\notin \relint  S(\Pi),
\end{cases}
\end{align*}
where the last step is by Theorem~\ref{theo:cowan} applied to the points $SX_1,\ldots,SX_n\in F^{\bot}$.  To complete the proof, note that the origin is in the relative interior of $S(\Pi) = \conv(S(X_1),\ldots, S(X_n))$ if and only if $F$ intersects the interior of $\Pi$. This is true because the projection of the interior of $\Pi$ is the relative interior of $S(\Pi)$.

\subsection{Proof of Theorem~\ref{theo:inclusion_exclusion_faces_clean}}
The idea is as follows: we will show that, essentially, $\Pi_I$ is a face of $\Pi_J$  if and only if the affine subspace spanned by $\Pi_I$ is not intersected by $\Pi_{J\backslash I}$. After that, we can apply Theorem~\ref{theo:cowan_affine}.

Denote by $\aff B$ the affine hull of a collection of points $B$.
\begin{lemma}\label{lem:clean_face}
For non-empty sets $I\subset J\subset\{1,\ldots,n\}$ the following two conditions are equivalent:
\begin{enumerate}
\item[(i)] $\Pi_I$ is a clean face of $\Pi_J$
\item[(ii)] $\aff (X_i\colon  i\in I) \cap \conv(X_k\colon k\in J\backslash I) = \varnothing$.
\end{enumerate}
\end{lemma}
\begin{proof}[Proof of (i) $\Rightarrow$ (ii)]
Let $\Pi_I$ be a clean face of $\Pi_J$. By the definition of a face, there is an affine hyperplane $H$ separating $\R^d$ into two closed half-spaces $H_+$ and $H_-$ such that $H\cap \Pi_J = \Pi_I$ and $\Pi_J\subset H_+$. Since $\Pi_I$ is clean, we have $\Pi_I\cap (X_k\colon k\in J\backslash I)=\varnothing$ and, consequently, $H\cap (X_k\colon k\in J\backslash I) = \varnothing$. It follows that $(X_k\colon k\in J\backslash I)$ is contained in the interior of $H_+$. Hence, $\conv(X_k\colon k\in J\backslash I)$ does not intersect $H$. Since $\aff (X_i\colon  i\in I)$ is a subset of $H$, we obtain (ii).
\end{proof}
\begin{proof}[Proof of $(ii)\Rightarrow (i)$]
We argue by contradiction. First we assume that $\Pi_I$ is not a face of $\Pi_J$. Then we can represent some point of $\Pi_I$ as a non-trivial convex combination of two points from $\Pi_J$ such that at least one of the points is not contained in $\Pi_I$. That is, we have
$$
\sum_{i\in I} \alpha_i X_i = \lambda \sum_{k\in J} \beta_k X_k + (1-\lambda) \sum_{k\in J} \gamma_k X_k,
$$
where $\lambda\in (0,1)$,  and $(\alpha_i)_{i\in I}$, $(\beta_k)_{k\in J}$, $(\gamma_k)_{k\in J}$ are collections of non-negative numbers summing up to $1$.
Moreover, we can assume that, say,  $\sum_{k\in J} \beta_k X_k\notin \Pi_I$. This implies that for at least one $k_0\in J\backslash I$ we have $\beta_{k_0} > 0$. Then, we can write
$$
\frac{1}{C} \sum_{i\in I} (\alpha_i - \lambda \beta_i - (1-\lambda)\gamma_i) X_i =
\sum_{k\in J\backslash I} \frac{\lambda \beta_k + (1-\lambda) \gamma_k}{C}X_k,
$$
where $C:= \sum_{l\in J\backslash I} (\lambda \beta_l + (1-\lambda) \gamma_l) > \lambda \beta_{k_0} > 0$. The left-hand side belongs to $\aff(X_i \colon i\in I)$, whereas the right-hand side belongs to $\conv(X_k\colon k\in J\backslash I)$, a contradiction. Hence, $\Pi_I$ is a face of $\Pi_J$. In fact, condition (ii) implies that $\Pi_I \cap (X_k\colon k\in J\backslash I)=\varnothing$, hence $\Pi_I$ is a clean face of $\Pi_J$.
\end{proof}

\begin{proof}[Proof of Theorem~\ref{theo:inclusion_exclusion_faces_clean}]
Without loss of generality, we assume that the affine hull of $(X_1,\ldots,X_n)$ is $\R^d$ (equivalently, $\dim \Pi=d$). Otherwise, consider this affine hull instead of $\R^d$.
For a non-empty set $I\subset\{1,\ldots,n\}$ write
$$
S^*(I) = \{ J\subset\{1,\ldots,n\} \colon J\supset  I, \Pi_I \text{ is a clean face of } \Pi_J\}.
$$
Let $L=L_I$ be the affine hull of $\{X_i\colon i\in I\}$. Consider
\begin{align*}
N
&:= \sum_{K\subset\{1,\ldots,n\}} (-1)^{\#K} \ind_{\{\Pi_K \cap L = \varnothing\}}\\
&= \sum_{\substack{K\subset\{1,\ldots,n\}\\K\cap I = \varnothing}} (-1)^{\#K} \ind_{\{\Pi_K \cap L = \varnothing\}}\\
&= \sum_{\substack{J\subset\{1,\ldots,n\}\\J\supset  I}} (-1)^{\#J-\#I} \ind_{\{\Pi_{J\backslash I} \cap L = \varnothing\}},
\end{align*}
where in the last equality we denoted by $J$ the disjoint union of $I$ and $K$.
Applying Lemma~\ref{lem:clean_face}, we obtain
\begin{align*}
N
&= \sum_{\substack{J\subset\{1,\ldots,n\}\\J\supset  I}} (-1)^{\#I - \#J} \ind_{\{J\in S^*(I)\}}\\
&= (-1)^{\#I} \sum_{J\in S^*(I)} (-1)^{\#J}\\
&=(-1)^{\#I-1} \sum_{j=\#I}^n (-1)^{j-1} b_j^*(I).
\end{align*}
On the other hand, by Theorem~\ref{theo:cowan_affine},
\begin{align*}
N
&= \sum_{K\subset\{1,\ldots,n\}} (-1)^{\#K} - \sum_{K\subset\{1,\ldots,n\}} (-1)^{\#K} \ind_{\{\Pi_K \cap L \neq  \varnothing\}}\\
&= \sum_{K\subset\{1,\ldots,n\}} (-1)^{\#K-1} \ind_{\{\Pi_K \cap L \neq  \varnothing\}}\\
&=
\begin{cases}
(-1)^{d-\dim \Pi_I}, &\text{if } L\cap \interior  \Pi \neq \varnothing,\\
0,               &\text{if } L\cap \interior  \Pi = \varnothing.
\end{cases}
\end{align*}
Comparing these two formulas for $N$, we obtain
$$
\sum_{j=\#I}^n (-1)^{j-1} b_j^*(I) =
\begin{cases}
(-1)^{d+ \#I -1-\dim \Pi_I}, &\text{if } L\cap \interior  \Pi \neq \varnothing,\\
0,               &\text{if } L\cap \interior  \Pi = \varnothing,
\end{cases}
$$
which completes the proof because $L\cap \interior \Pi = \varnothing$ if and only if $\Pi_I$ is a face of $\Pi$.
\end{proof}

\subsection{Proof of Theorem~\ref{theo:relation_for_f_r}}\label{subsec:proof_theo_relation_for_f_r}
For a set $I\subset\{1,\ldots,n\}$ write
$$
S(I) = \{ J\subset\{1,\ldots,n\} \colon J\supset  I, \Pi_I \text{ is a face of } \Pi_J\}.
$$
The conditions we imposed on $X_1,\ldots,X_n$ imply that every $r$-dimensional face of $\Pi_J$ must have a form $\Pi_I$ for a unique $I\subset J$ with $\#I=r+1$. Using Theorem~\ref{theo:inclusion_exclusion_faces}, we get
\begin{align*}
\sum_{\varnothing\neq J\subset\{1,\ldots,n\}} (-1)^{\#J-1} f_r(\Pi_J)
&=
\sum_{\substack{I\subset\{1,\ldots,n\}\\ \#I=r+1}} \sum_{J\in S(I)} (-1)^{\#J-1}\\
&=
(-1)^d \sum_{\substack{I\subset\{1,\ldots,n\}\\ \#I=r+1}} \ind_{\{\Pi_I \text{ is a not a face of } \Pi\}} \\
&=
(-1)^d \left(\binom {n}{r+1} - f_r(\Pi)\right),
\end{align*}
where the last step holds because there are $\binom {n}{r+1}$ subsets $I$ with $\#I=r+1$.

\bibliographystyle{alpha}

Probability (math.PR); Metric Geometry (math.MG)