TITLE: When is for a continuous function $f:E_1\times E_2\to E_3$, the map $x_1\mapsto f(x_1,\;\cdot\;)$ into $C(E_2,E_3)$ continuous?
QUESTION [0 upvotes]: Let ($E_i,d_i)$ be a metric space, $\overline d_3:=\min(1,d_3)$ and $$\overline\rho(f,g):=\sup_{x_2\in E_2}\overline d_3(f(x_2),g(x_2))\;\;\;\text{for }f,g\in E_3^{E_2}.$$
Now let $f:E_1\times E_2\to E_3$ and $$g:E_1\to E_3^{E_2}\;,\;\;\;x_1\mapsto f(x_1,\;\cdot\;).$$
I'm interested in the relations between the following claims:

$f$ is continuous.$^1$
$g(x_1)$ is continuous for all $x_1\in E_1$.
$g$ is continuous.$^2$

(1.) clearly implies (2.), (3.) trivially implies (2.) and we should be able to show that (3.) implies (1.).
Now I wonder when does (1.) imply (3.). Can we show that (1.) implies (3.) when $E_1$ or $E_2$ is compact?
Let $x_1\in E_1$ and $\varepsilon>0$. Assuming $E_2$ is compact, $g(x_1)$ is uniformly continuous and hence there is a $\delta_1>0$ with $$\forall x_2,y_2\in E_2:d_2(x_2,y_2)<\delta_1\Rightarrow d_3(f(x_1,x_2),f(x_1,y_2))<\varepsilon\tag1.$$ Now we somehow need to utilize that $f$ is (jointly) continuous ...

$^1$ $E_1\times E_2$ is equipped with the product topology generated by $((x_1,y_1),(x_2,y_2))\mapsto\max(d_1(x_1,y_1),d_2(x_2,y_2))$.
$^2$ $C(E_2,E_2)$ is equipped with $\overline\rho$.

REPLY [1 votes]: (1) implies (3) if $f$ is uniformly continuous (and this is the case if both $E_1$ and $E_2$ are compact): Suppose $f$ is uniformly continuous and let $x\in E_1$. We want to show that $g$ is continuous. Now, as $f$ is assumed to bei uniformly continuous, given $\varepsilon >0$ there exists $\delta>0$ such that $d_3(f(x_1,y_1), f(x_2,y_2))<\varepsilon$ whenever $d_1(x_1,y_1)<\delta$ and $d_2(x_2,y_2)<\delta$. In particular,
$\rho(g(x), g(x_1))=\sup_{y\in E_2}d_3 (f(x,y), f(x_1,y))\leq \varepsilon$ whenever $d_1(x,x_1)<\delta$.
This shows that $g$ is continuous.
As mentioned above, $f$ is uniformly continuous if $E_1$ and $E_2$ are compact.
In general, the compactness of these spaces are necessary for the conclusion $(1)\Rightarrow (3)$ to hold (it is not hard to find counterexamples).


text:
\section{Convergence of subdivided discrete surfaces}
\label{sec:4}
\subsection{Cauchy sequence}
Firstly we prove the sequence of subdivided discrete surface forms a Cauchy sequence in the Hausdorff topology.
\begin{thm}\label{cauchy}
  The sequence of discrete surfaces
  $\{M_{i}\}^{\infty}_{i=0}$
  that are constructed by the GC-subdivisions  as in Section \ref{sec:3} forms a Cauchy sequence
  in the Hausdorff topology.
  \label{thm-e}
\end{thm}
\begin{proof}
  Let $f^{(i)}$ be a fixed $n$-gonal face in $X_{i}$,
  $f^{(i+1)}$ be the face defined by the inner vertices of
  $X_{i+1}|_{f^{(i)}}$.
  Consider the Hausdorff distance
  \begin{equation}
    \begin{aligned}
      d_H(\Phi_{i}(\partial f^{(i)}), \widetilde{\Phi}_{i+1}(\partial f^{(i+1)}))
      &\le\sum_{e\in X_{i+1}|_{f^{(i)}}} | \widetilde{\Phi}_{i+1}(e)|\\
      &\le\sqrt{2n(E_{D}(\widetilde{\Phi}_{i+1}(X_{i+1}|_{f_{(i)}}))}
      \le E_{0}(n)\sqrt{\lambda_{1}^{i+1}(n)},
    \end{aligned}
  \end{equation}
  where
  $E_{0}(n) \coloneqq \sqrt{2nE_{D}(\Phi_{0}(\partial f^{(0)}))}$
  is constant which determined by
  $\Phi_{0}\colon X_{0} \to M_{0}$
  and
  $\lambda_{1}(n)=1/(1+4\sin^2(\pi/n))$.
  Since each face of a fixed 3-valent graph has finite many of edges,
  that is,
  $n$ is bounded from above.
  Let
  $\lambda_{1} = \max\{ \lambda_{1}(n) \}$,
  $E = \max\{ E_{0}(n) \}$,
  we have
  \begin{equation}
    \begin{aligned}
      d_{H}(M_{i}, \widetilde{M}_{i+1}) =
      \sup_{\v{f}^{(i)} \in \MF_{i}} \{d_H(\Phi_{i}(\partial f^{(i)}), \widetilde{\Phi}_{i+1}(\partial f^{(i+1)}))\}
      \le E\sqrt{\lambda_{1}^{i+1}}.
    \end{aligned}
  \end{equation}
  On the other hand, take $\v{v} \in \v{f}^{(i)}$, also we have $\v{v} \in \MV_{i}$.
  Since $\pi_{i+1}(\v{v})$ is the barycenter of its nearest neighbors, It is easy to see
  \begin{equation}
    \begin{aligned}
      d_{H}(\v{v}, \pi_{i+1}(\v{v})) < \sup_{\v{f}^{(i)} \in \MF_{i}} \{d_H(\Phi_{i}(\partial f^{(i)}), \widetilde{\Phi}_{i+1}(\partial f^{(i+1)}))\}
      \le E\sqrt{\lambda_{1}^{i+1}}.
    \end{aligned}
  \end{equation}
  That is,
  \begin{equation}
    \begin{aligned}
      d_{H}(M_{i}, \pi_{i+1}(\widetilde{M}_{i+1})) = d_{H}(M_{i}, M_{i+1})
      = \sup \{d_{H}(\v{v}, \pi_{i+1}(\v{v})) \}
      \le E\sqrt{\lambda_{1}^{i+1}}.
    \end{aligned}
  \end{equation}
  Thus
  for any $\epsilon>0$,
  let $N=[2\log_{1/\lambda_{1}}(\Lambda/\epsilon)] $.
  Then for any $i$, $j>N$ $(j>i)$,
  we have
  \begin{equation*}
    \begin{aligned}
      d_{H}(M_{i}, M_{j})
      &\le d_{H}(M_{i}, M_{i+1})
      + d_{H}(M_{i+1}, M_{i+2})
      + \cdots + d_{H}(M_{j-1}, M_{j})\\
      &\le E\Big(\sqrt{\lambda^{i+1}_{1}} + \sqrt{\lambda^{i+2}_{1}}
      + \cdots + \sqrt{\lambda^{j}_{1}}\Big)\\
      &<\Lambda E \sqrt{\lambda^{i+1}_{1}}\\
      &<\epsilon,
    \end{aligned}
  \end{equation*}
  where
  $\Lambda = (1+\sqrt{\lambda_{1}})/(1-\lambda_{1})$
  is a constant determined by
  $\Phi_{0}\colon X_{0}\to M_{0}$ as well.
\end{proof}

\subsection{Monotonicity of the Dirichlet energy}
Let $\{ M_{i} \}_{i}^{\infty}$ be the sequence of discrete surfaces,
$\Phi_{i} \colon X_{i} \to M_{i} = (\MV_{i}, \ME_{i}, \MF_{i})$ be a discrete surface of $i$-th step constructed from a un-branched bounded domain in a discrete surface.
In this subsection, we show the monotonicity of the Dirichlet energy.
It is sufficient to prove it on the  energy of the subdivision sequence constructed from a leaf in $M=M_0$.
A core idea is simple.
When we take a subdivision,
the size of each face gets smaller and smaller, but the number of faces increases.
Fortunately, however, the number of $n$-gonal faces with $n \neq 6$ does not change in the subdivision process,
but the number of hexagonal faces only increases.
We study the sum of the energy of hexagonal faces to find it well balanced.
\par
For any fixed $i$, $\MF_{i}$ is consist of two parts as following
\begin{equation}
  \begin{aligned}
    \MF_{i} = \MF_{i}^{n<6} \bigcup \MF_{i}^{=6} \bigcup \MF_{i}^{n>6},
  \end{aligned}
\end{equation}
where $\MF_{i}^{n=6}$ is the set of hexagonal faces in  $M_i$  and
$\MF_{i}^{n<6}$ and $\MF_{i}^{n>6}$ are the set of  $n$-gonal faces in  $M_i$ with $ n < 6$ and $n >6$, respectively.
Note firstly there is the largest $n$, which we denote $N$, because we are working with a bounded domain, and secondly  we have
\begin{equation}
  \begin{aligned}
    \sharp \MF_{i}^{n<6} = \sharp \MF_{0}^{n<6}, \quad  \sharp \MF_{i}^{n>6} = \sharp \MF_{0}^{n>6}
  \end{aligned}
\end{equation}
since the GC-subdivision increases the number of hexagonal faces only.

\par
Let
\begin{displaymath}
  E_{D}(\v{f}) = \sum_{\v{v} \sim \v{w} \in \v{f}} | \v{v}- \v{w} |^2.
\end{displaymath}
\begin{lem}
  \label{lem-e}
  Let $\v{f}$ be an $n$-gonal face in $M_i$,
  $\v{f}'$ be a face in $M_{i+1}$ as a solution of the Dirichlet problem with the boundary $\v{f}$,
  and $\tilde{\v{f}}$
  be the solution of the Dirichlet problem with the boundary $\v{f}$ and the all the edges connecting the corresponding vertices (see Figure~\ref{fig:face}).
  Then we obtain
  \begin{align}
    \label{energy-of-solution0}
    &E_{D}(\v{f}') \le \lambda_1^{2}(n) E_{D}(\v{f}), \\
    \label{energy-of-solution1}
    &E_{D}(\tilde{\v{f}}) \le \lambda_1(n) E_{D}(\v{f}),
  \end{align}
  where $\lambda_1^{2}(n)$ is the spectrum radius of $A(n)$ computed in the previous section.
\end{lem}
\begin{proof}
  The inequalities (\ref{energy-of-solution0})
  and (\ref{energy-of-solution1}) are equivalent to (\ref{eq:localenergy0}) and (\ref{eq:localenergy1}), respectively.
\end{proof}
\begin{figure}[ht]
  \centering
  \includegraphics[bb=0 0 61 54,scale=1.00]{figures/faces-crop.pdf}
  \caption{
    Assume $\v{f} \in \MF_i$ consists of thin edges,
    then $\v{f}' \in \MF_{i+1}$ consists of thick edges,
    and $\tilde{\v{f}}$ consists of thick and dashed edges.
    Here black vertices are vertices in $\MV_i$ and white vertices are in $\MV_{i+1}$.
  }
  \label{fig:face}
\end{figure}

\begin{thm}[monotonicity of  the Dirichlet energy]\label{monotonicity}
  Let $\{ M_{i} \}_{i}^{\infty}$ be the sequence of discrete surfaces constructed from a leaf or a bounded domain.
  The Dirichlet energy of $M_{i}$ is bounded from above by the constant independent of $n$.
  Moreover it monotonically decreases if $M_0$ contains no $n$-gonal faces with $n > 6$
  and contains an $n$-gonal face with $n < 6$.
\end{thm}
\begin{proof}
  Since each edge is shared by two faces, we obtain
  \begin{equation*}
    E_{D}(M_{i}) = \sum_{\v{e}\in \ME_{i}} |\v{e}|^2 = \frac{1}{2} \sum_{\v{f}^{(i)} \in \MF_{i}} E_{D}(\v{f^{(i)}}).
  \end{equation*}
  For any $\v{f}^{(i)} \in \MF_{i}$,
  let $\widetilde{\v{f}}^{(i)}$ be the set of vertices of $\v{f}^i$ and $\v{f}^{(i+1)} \in M_{i+1}$, the solution of the Dirichlet problem with the boundary $\v{f}^{(i)}$,  and the all the edges connecting the corresponding vertices as in Lemma \ref{lem-e}.
  Then,
  \begin{equation*}
    E_{D}(M_{i+1}) \le E_D(\widetilde{M}_{i+1}) = \sum_{\v{f}^{(i)}\in \MF_{i}} E_{D}(\widetilde{\v{f}}^{(i)}).
  \end{equation*}
  By using Lemma \ref{lem-e},
  now we compute the Dirichlet energy of $M_{i+1}$ as
  \begin{equation}
    \label{eq:4.8}
    \begin{aligned}
      E_D(M_{i+1})
      &\le
      E_D(\widetilde{M}_{i+1})
      =
      \sum_{\v{f}\in \MF_i} E_D(\tilde{\v{f}})
      \le

      \sum_{\v{f}\in \MF_i} \lambda_1(n) E_D(\v{f})
      \\
      &=
      \sum_{\v{f}\in \MF_i^{n<6}} \lambda_1(n) E_D(\v{f})
      +
      \frac{1}{2} \sum_{\v{f}\in \MF_i^{n=6}} E_D(\v{f})
      +
      \sum_{\v{f}\in \MF_i^{n>6}} \lambda_1(n) E_D(\v{f})
      \\
      &=
      \frac{1}{2}
      \left(
        \sum_{\v{f}\in \MF_i^{n<6}} E_D(\v{f})
        +
        \sum_{\v{f}\in \MF_i^{n=6}} E_D(\v{f})
        +
        \sum_{\v{f}\in \MF_i^{n>6}} E_D(\v{f})
      \right)
      \\
      &+
      \sum_{\v{f} \in \MF_i^{n<6}} \left(\lambda_1(n) - \frac{1}{2}\right) E_D(\v{f})
      +
      \sum_{\v{f} \in \MF_i^{n>6}} \left(\lambda_1(n) - \frac{1}{2}\right) E_D(\v{f})
      \\
      &=
      E_D(M_i)
      +
      \sum_{\v{f} \in \MF_i^{n<6}} \left(\lambda_1(n) - \frac{1}{2}\right) E_D(\v{f})
      +
      \sum_{\v{f} \in \MF_i^{n>6}} \left(\lambda_1(n) - \frac{1}{2}\right) E_D(\v{f}).
    \end{aligned}
  \end{equation}
  We also have
  \begin{equation}
    \label{eq:4.9}
    \begin{alignedat}{3}
      \lambda_1(n) &< 1/2 &\quad &\text{ for } n<6, \\
      \lambda_1(6) &= 1/2, \\
      \lambda_1(n) &< 1 &\quad &\text{ for } 6<n.
    \end{alignedat}
  \end{equation}
  If there are no $n$-gonal faces ($n > 6$) and at least one $n$-gonal face ($n < 6$),
  then, by (\ref{eq:4.8}), we obtain
  \begin{displaymath}
    E_D(M_{i+1})
    \le
    E_D(M_i)
    +
    \sum_{\MF_i^{n<6}} \left(\lambda_1(n) - \frac{1}{2}\right) E_D(\v{f}).
  \end{displaymath}
  Since $\lambda_1(n) < 1/2$ ($n < 6$), we obtain
  \begin{equation}
    \label{eq:monotone_decreasing}
    E_D(M_{i+1}) <  E_D(M_i).
  \end{equation}
  Inequality (\ref{eq:monotone_decreasing}) implies that
  the Dirichlet energy of $M_i$ is monotonically decreasing.
  \par
  On the other hand, by (\ref{eq:4.8}), we also obtain
  \begin{equation}
    \label{eq:generalcase}
    \begin{aligned}
      E_D(M_{i+1})
      \le
      E_D(M_i)
      &+
      \sum_{\v{f} \in \MF_0^{n<6}}
      \left(\lambda_1(n) - \frac{1}{2}\right) \lambda_1(n)^{2i} E_D(\v{f})
      \\
      &+
      \sum_{\v{f} \in \MF_0^{n<6}}
      \left(\lambda_1(n) - \frac{1}{2}\right) \lambda_1(n)^{2i} E_D(\v{f}).
    \end{aligned}
  \end{equation}
  Hence, we obtain
  \begin{equation}
    \label{eq:7}
    E_D(M_{i+1}) \le E_D(M_i)
    +
    \sum_{n=3}^5
    C_n \lambda_1(n)^{2i}
    +
    \sum_{n=7}^N
    C_n \lambda_1(n)^{2i},
  \end{equation}
  where $C_n = (\lambda_1(n) - 1/2) N_n E_n$, $N_n$ is the number of $n$-gonal faces in $M_0$,
  and $E_n = \max\{E_D(\v{f}) : \v{f} \in M_0, \, \v{f} \text{ is an $n$-gonal face}\}$.
  Note that, for $n \not= 6$, $C_n$ are independent from $i$.
  Finally, we obtain
  \begin{equation}
    \label{eq:8}
    E_D(M_i)
    \le
    E_D(M_0)
    + \sum_{n=3}^5 C_n \frac{1 - \lambda_1(n)^{2i-2}}{1-\lambda_1(n)^2}
    + \sum_{n=7}^N C_n \frac{1 - \lambda_1(n)^{2i-2}}{1-\lambda_1(n)^2},
  \end{equation}
  and (\ref{eq:8}) implies the boundedness of $E_D(M_i)$.
\end{proof}

config: arxiv


TITLE: Functional Cauchy-Riemann equation?
QUESTION [0 upvotes]: I have a question on the complex scalar field theory.
Say you have a $U(1)$ invariant Lagrangian of the form
$$\int d^4 x |\partial\phi|^2 -m^2 |\phi|^2 + \frac{g}{4}(|\phi|^2)^2.$$
Then if you want to find a vacuum solution then I always find it easiest to rewrite the Lagrangian in terms of real components $\phi=\frac{1}{\sqrt{2}}(\varphi+i\chi)$ then take the functional derivative with respect to $\{\varphi,\chi\}$. However, in some textbook authors use functional derivative with respect to $\phi,\phi^\dagger$.
My question is whether one should check the functional-version of the Cauchy-Riemann equation for complex-differentiability if one wants to do functional derivative with respect to complex scalar fields?

REPLY [1 votes]: You shouldn't check the Cauchy-Riemann equations as they will not hold - that functional is not holomorphic as it contains explicit $\phi^\dagger$s.
This is why you need to impose both $\frac{\delta S}{\delta \phi(x)} = 0$ and $\frac{\delta S}{\delta \phi^\dagger(x)} = 0$.
In the holomorphic case the second equation would come for free.
The way I make sense of it is to think of
$\frac{\delta}{\delta\phi(x)},\frac{\delta}{\delta\phi^\dagger(x)}$ as shorthand for
$\frac{1}{\sqrt{2}}\left(\frac{\delta}{\delta\varphi(x)} \mp i \frac{\delta}{\delta\chi(x)}\right)$.
You can reconstruct the real derivatives as:
$$
\frac{\delta}{\delta\varphi(x)}
= \frac{1}{\sqrt{2}}\left(\frac{\delta}{\delta\phi(x)}
    + \frac{\delta}{\delta\phi^\dagger(x)}\right),
\qquad
\frac{\delta}{\delta\chi(x)}
= \frac{i}{\sqrt{2}}\left(\frac{\delta}{\delta\phi(x)}
    - \frac{\delta}{\delta\phi^\dagger(x)}\right).
$$
Therefore, the condition for a stationary point,
$\frac{\delta S}{\delta\varphi(x)} = \frac{\delta S}{\delta\chi(x)} = 0$
is equivalent to demanding
$\frac{\delta S}{\delta\phi(x)} = \frac{\delta S}{\delta\phi^\dagger(x)} = 0$.
The Cauchy-Riemann equations would demand that $\frac{\delta S}{\delta\phi^\dagger} = 0$ everywhere.
This is easier notationally with ordinary calculus for functions of two variables, with $z = \frac{x + i y}{\sqrt{2}}$.
The same principles apply to the functional case.
With a holomorphic function, we can talk about the ordinary derivative $\frac{df}{dz}$.
With a nonholomorphic function we can talk about the partial derivatives $\left(\frac{\partial f}{\partial z}\right)_\bar{z}$ and $\left(\frac{\partial f}{\partial \bar{z}}\right)_z$, which are defined as
$\frac{1}{\sqrt{2}}\left( \left(\frac{\partial f}{\partial x}\right)_y \mp i \left(\frac{\partial f}{\partial y}\right)_x \right)$.
The idea of changing $z$ while holding $\bar{z}$ constant sounds ridiculous, so thinking of them as shorthand like this was the simplest[*] way I could make sense of the concept.
Note that the chain rule still works with these differential operators:
$$
  df = \left(\frac{\partial f}{\partial x}\right)_y dx
  + \left(\frac{\partial f}{\partial y}\right)_x dy
  = \left(\frac{\partial f}{\partial z}\right)_\bar{z} dz
  + \left(\frac{\partial f}{\partial \bar{z}}\right)_z d\bar{z}.
$$
Furthermore, $\left(\frac{\partial z}{\partial z}\right)_\bar{z} = \left(\frac{\partial \bar{z}}{\partial \bar{z}}\right)_z = 1$ and $\left(\frac{\partial \bar{z}}{\partial z}\right)_\bar{z} = \left(\frac{\partial z}{\partial \bar{z}}\right)_z = 0$.
This means that use these funny differential operators the same way as partial derivatives with respect to independent variables.
[*]: There is another way of thinking about this that is more complicated, but probably more correct.
If one of these makes sense to you, feel free to ignore the other.
You say that $x$ and $y$ could be complex numbers, it just so happens that they are both real at this point.
If we integrate over $x$ and $y$, we say that we chose a contour that lies along the real axes, but we could have picked a contour anywhere on the complex planes.
This means that $\bar{z} = \frac{x - i y}{\sqrt{2}}$ is not necessarily the complex conjugate of $z$, so varying $z$ while holding $\bar{z}$ constant is a legitimate concept.
In that case you would worry about the Cauchy-Riemann equations with respect to the real and imaginary components of $x$, and with respect to the real and imaginary components of $y$, not $z$.
But if you define the function away from the real axis by analytic continuation this would be automatic.
Trandlating back to the functional language, you would imagine $\varphi$ and $\chi$ being complex, etc.


text:
\begin{document}

\begin{titlepage}

\title{\bf{An action principle for the Einstein-Weyl equations}}
\author{Silke Klemm$^{1,2}$\thanks{silke.klemm@mi.infn.it} and Lucrezia Ravera$^{3,4}$\thanks{lucrezia.ravera@polito.it} \\ \\
{\small $^{1}$\textit{Dipartimento di Fisica, Universit\`{a} di Milano, Via Celoria 16, 20133 Milano, Italy}}\\
{\small $^{2}$\textit{INFN, Sezione di Milano, Via Celoria 16, I-20133 Milano, Italy}}\\
{\small $^{3}$\textit{DISAT, Politecnico di Torino, Corso Duca degli Abruzzi 24, 10129 Torino, Italy}}\\
{\small $^{4}$\textit{INFN, Sezione di Torino, Via P. Giuria 1, 10125 Torino, Italy}}}
\clearpage\maketitle
\thispagestyle{empty}

\begin{abstract}
A longstanding open problem in mathematical physics has been that of finding an action principle for
the Einstein-Weyl (EW) equations.
In this paper, we present for the first time such an action principle in three dimensions in which the Weyl vector is not exact. More precisely, our model contains, in addition to
the Weyl nonmetricity, a traceless part. If the latter is (consistently) set to zero, the equations of motion
boil down to the EW equations.
In particular, we consider a metric affine $f(R)$ gravity
action plus additional terms involving Lagrange multipliers and gravitational Chern-Simons contributions.
In our framework, the metric and the connection are considered as independent objects, and no a priori assumptions on the nonmetricity and the torsion of the connection are made. The dynamics of the
Weyl vector turns out to be governed by a special case of the generalized monopole equation, which
represents a conformal self-duality condition in three dimensions.
\end{abstract}

\vspace{2cm}

\end{titlepage}

\section{Introduction}

A remarkable generalization of Riemannian geometry was first proposed in 1918 by
Weyl (see e.g. \cite{Adler:1965,CP1,Folland,Romero:2012hs}), who introduced an additional
symmetry in an attempt of geometrically
unifying electromagnetism with gravity \cite{Weyl:1918ib, Weyl:1919fi}. In this theory, both the direction and the length of vectors are allowed to vary under parallel transport\footnote{Note, however, that Weyl's
attempt to identify the trace part of the connection, associated with stretching and contraction, with the
vector potential of electromagnetism failed, due to observational inconsistencies \cite{Wheeler:2018rjb}.}.
The trace part of the connection introduced by Weyl is known as the Weyl vector. When it is exact,
it can be gauged away by a local scale transformation. In this case, Weyl geometry is said to be integrable
(parallel transported vectors along closed paths return with unaltered lengths), and there exists a subclass
of global gauges in which the geometry is Riemannian.

Mathematically, a Weyl structure on an $n$-dimensional manifold $\cal M$ consists of a conformal
structure $[g]=\{fg,f:{\cal M}\to\mathbb{R}^+\}$, together with a torsion-free connection $\nabla$
which is compatible with $[g]$ in the sense that
\begin{equation}
\nabla_\mu g_{\nu\rho} = 2 h_{\mu} g_{\nu\rho}\,, \label{eq:Weyl-nonmetr}
\end{equation}
for some one-form $h$ on $\cal M$. This compatibility condition is invariant under the transformation
\begin{equation}
g\mapsto e^{2\Omega} g\,, \qquad h\mapsto h + d\Omega\,,
\end{equation}
where $\Omega$ is a function on $\cal M$.

A Weyl structure is said to be Einstein-Weyl (EW) \cite{Hitchin:1982vry} if the symmetrized
Ricci tensor $R_{\mu\nu}$ of $\nabla$ is proportional to some metric $g\in [g]$. This conformally
invariant condition is equivalent to
\begin{equation}
R_{(\mu\nu)} - \frac Rn g_{\mu\nu} = 0\,, \label{EW-eqns}
\end{equation}
with $R$ the Ricci scalar of $\nabla$.

A longstanding and still unresolved open problem has been that of finding an action principle
for \eqref{EW-eqns}. Here we shall present for the first time an action principle for the EW equations in
$2+1$ dimensions\footnote{Our results hold also in three Euclidean dimensions.}
in which the Weyl vector is not exact. Notice that three-dimensional EW geometry \cite{pt}
is particularly interesting, since it is related to dispersionless integrable
systems \cite{Ward:1990qt,Dunajski:2000rf,Dunajski:2008xx}.
Moreover, Jones and Tod \cite{Jones:1985pla} showed that selfdual conformal four-manifolds with
a conformal vector field are in correspondence with abelian monopoles on Einstein-Weyl three-manifolds.
In ref.~\cite{Gauduchon:1998xx}, Gauduchon and Tod studied the structure of four-dimensional
hyper-Hermitian Riemannian spaces admitting a tri-holomorphic Killing vector, i.e., a Killing vector
that is compatible with the three complex structures on the hyper-Hermitian space. It turned out that
the latter is fibered over a specific type of three-dimensional EW spaces, called hyper-CR or
Gauduchon-Tod.

Note also that 3d EW manifolds and their generalizations play an important role also in high energy
physics, for instance in the context of supersymmetric solutions to fake
supergavity \cite{Meessen:2009ma,Gutowski:2009vb,Grover:2009ms}, in the classification
of four-dimensional Euclidean gravitational instantons \cite{Dunajski:2010zp,Dunajski:2010uv},
or supersymmetric near-horizon geometries \cite{Dunajski:2016rtx, Klemm:2019izb}. Moreover, Weyl connections were considered recently in holography \cite{Ciambelli:2019bzz}. For a general review of
Einstein manifolds with nonmetric and torsionful connections cf.~\cite{Klemm:2018bil}.

Our construction of an action that leads to \eqref{EW-eqns} involves a metric affine $f(R)$ gravity
action \cite{Hehl:1994ue, Iosifidis:2018zjj, Iosifidis:2019jgi, Sotiriou:2006qn, Sotiriou:2006mu, Vitagliano:2010sr} plus additional terms containing Lagrange multipliers and gravitational Chern-Simons
contributions. We work in a first order formalism, where the metric and the connection are treated as
independent variables, and make no a priori assumptions on the metricity and the torsion
of the connection.

The remainder of this paper is organized as follows: In section \ref{review} we briefly review
metric affine $f(R)$ gravity in $n$ dimensions, following \cite{Iosifidis:2018zjj,Iosifidis:2019jgi}. Subsequently, in section \ref{magin3dplusCS} we construct an action that yields the EW equations
with nonexact Weyl vector in three dimensions. We conclude our work with some final remarks.

\section{Metric affine $f(R)$ gravity in $n$ dimensions}\label{review}

Consider the gravitational action
\begin{equation}
S_{\text{G}} = \frac1{2\kappa^2}\int d^n x\sqrt{-g} f(R)\,, \label{action-f(R)}
\end{equation}
where $\kappa$ denotes the gravitational coupling constant and $f(R)$ is an arbitrary function
of the scalar curvature $R = g^{\mu \nu} R_{\mu \nu}(\Gamma)$, with $\Gamma$ a general affine
connection\footnote{We adopt the same conventions of \cite{Iosifidis:2018zjj,Iosifidis:2019jgi}. In
particular, our metric convention is $\eta= \text{diag} (-, +, +)$.}.
We work in a first order (Palatini) formalism, where the metric $g_{\mu\nu}$ and the connection
${\Gamma^\lambda}_{\mu\nu}$ are treated as independent variables. Variation of \eqref{action-f(R)}
w.r.t.~$g^{\mu\nu}$ gives
\begin{equation}
f'(R) R_{(\mu\nu)} - \frac12 f(R) g_{\mu\nu} = 0\,, \label{eq:Einstein}
\end{equation}
while the variation w.r.t.~${\Gamma^\lambda}_{\mu\nu}$ leads to
\begin{equation}\label{eq:Conn}
\begin{split}
& \frac1{\sqrt{-g}}\left[-\nabla_\lambda\left(\sqrt{-g} f'(R) g^{\mu\nu}\right) + \nabla_\sigma\left(\sqrt{-g} f'(R) g^{\mu\sigma}\right){\delta^\nu}_\lambda\right] \\
& + 2f'(R)\left(g^{\mu\nu}{\Gamma^\sigma}_{[\lambda\sigma]} - g^{\mu\rho}
{\Gamma^\sigma}_{[\rho\sigma]}{\delta^\nu}_\lambda + g^{\mu\sigma}{\Gamma^\nu}_{[\sigma\lambda]}
\right) = 0\,.
\end{split}
\end{equation}
The trace of \eqref{eq:Einstein} yields
\begin{equation}\label{trace}
\frac{f}{2f'} = \frac Rn\,,
\end{equation}
which is identically satisfied if we choose
\begin{equation}
f = CR^{n/2}\,, \label{eq:f}
\end{equation}
where $C$ is an arbitrary integration constant. Let us observe that \eqref{trace} could also be viewed
as an algebraic equation on $R$ admitting generically solutions with constant scalar curvature
(cf.~e.g.~\cite{Iosifidis:2019jgi}). Here, we consider the specific choice \eqref{eq:f}. Then (with $C=1$),
the action \eqref{action-f(R)} becomes
\begin{equation}
S_{\text{G}} = \frac1{2\kappa^2}\int d^n x \sqrt{-g} R^{n/2} \,, \label{action-f(R)-fixed}
\end{equation}
which is invariant under the conformal transformation (we use the same definition as \cite{Iosifidis:2019jgi})
\begin{equation}\label{weylresc}
g_{\mu\nu}\mapsto g'_{\mu\nu} = e^{2\Omega} g_{\mu\nu}\,, \qquad
{\Gamma^\lambda}_{\mu\nu}\mapsto {\Gamma'^\lambda}_{\mu\nu} = {\Gamma^\lambda}_{\mu\nu}\,,
\end{equation}
where $\Omega$ is a scalar function. Indeed, under \eqref{weylresc} we have
\begin{equation}\label{conftr}
d^n x\sqrt{-g}\mapsto d^n x e^{n\Omega}\sqrt{-g}\,, \qquad
{R^\lambda}_{\mu\nu\rho}\mapsto {R^\lambda}_{\mu\nu\rho}\,, \qquad
R_{\mu\rho}\mapsto R_{\mu\rho}\,, \qquad R\mapsto e^{-2\Omega} R\,,
\end{equation}
and one can clearly see that \eqref{action-f(R)-fixed} is invariant.

Now, plugging \eqref{trace} into \eqref{eq:Einstein}, the latter boils down to
\begin{equation}
R_{(\mu\nu)} - \frac Rn g_{\mu\nu} = 0\,. \label{eq:EW}
\end{equation}
In the case in which one has Weyl nonmetricity \eqref{eq:Weyl-nonmetr} and vanishing torsion,
\eqref{eq:EW} precisely corresponds to the Einstein-Weyl equations. Observe that \eqref{eq:EW} is traceless.

Let us take a closer look at \eqref{eq:Conn}. Using the definition of the Cartan torsion tensor,
\begin{equation}
{T_{\mu\nu}}^\rho := {\Gamma^\rho}_{[\mu\nu]}\,, \label{eq:torsdef}
\end{equation}
\eqref{eq:Conn} can be rewritten as
\begin{equation}\label{eq:ConnTor}
\begin{split}
& \frac1{\sqrt{-g}}\left[-\nabla_\lambda\left(\sqrt{-g} f'(R) g^{\mu\nu}\right) + \nabla_\sigma\left(\sqrt{-g}f'(R) g^{\mu\sigma}\right){\delta^\nu}_\lambda\right] \\
& + 2f'(R)\left(g^{\mu\nu}T_\lambda - T^\mu{\delta^\nu}_\lambda + g^{\mu\sigma}{T_{\sigma \lambda}}^{\nu}
\right) = 0\,,
\end{split}
\end{equation}
where $T_\lambda :={T_{\lambda \sigma}}^{\sigma}$ is the trace part of the torsion.
Taking the $\lambda,\mu$ trace of \eqref{eq:ConnTor} leads to the identity
\begin{equation}\label{palatinitraceless}
{P_{\mu}}^{\mu \nu} = 0\,,
\end{equation}
where we introduced the so-called Palatini tensor,
\begin{equation}\label{palatini}
{P_{\lambda}}^{\mu\nu} = -\frac{\nabla_\lambda\left(\sqrt{-g} g^{\mu\nu}\right)}{\sqrt{-g}} + \frac{\nabla_\sigma\left(\sqrt{-g}g^{\mu\sigma}\right){\delta^\nu}_\lambda}{\sqrt{-g}} + 2 \left(g^{\mu\nu}T_\lambda - T^\mu{\delta^\nu}_\lambda + g^{\mu\sigma}{T_{\sigma\lambda}}^\nu
\right)\,,
\end{equation}
which is indeed traceless.
Contracting $\lambda$ and $\nu$ in \eqref{eq:ConnTor}, one obtains\footnote{Here we also fix a
miscalculation appearing in \cite{Sotiriou:2006qn}.}
\begin{equation}
(n-1)\nabla_\sigma\left(\sqrt{-g} f'(R) g^{\sigma\mu}\right) = 2(n-2)\sqrt{-g} f'(R) T^\mu\,.
\label{eq:contractionln}
\end{equation}
Plugging \eqref{eq:contractionln} into \eqref{eq:ConnTor} and taking the symmetric and antisymmetric
part in $\mu,\nu$, we get respectively
\begin{equation}
- \frac1{\sqrt{-g}}\nabla_\lambda \left(\sqrt{-g} f'(R) g^{\mu\nu}\right)+ 2f'(R)\left(g^{\mu\nu}T_\lambda - \frac{1}{n-1} g^{\rho(\mu}{\delta^{\nu)}}_\lambda T_\rho + g^{\sigma(\mu}{T_{\sigma\lambda}}^{\nu)}
\right) = 0\,,
\label{eq:Conn-symm}
\end{equation}
and
\begin{equation}
-\frac1{n-1} g^{\rho[\mu}{\delta^{\nu]}}_\lambda T_\rho + g^{\sigma[\mu}
{T_{\sigma\lambda}}^{\nu]} = 0\,.
\label{eq:Conn-antisymm}
\end{equation}
After some algebraic manipulation, \eqref{eq:Conn-antisymm} gives
\begin{equation}\label{torsionobtained}
{T_{\lambda \mu}}^{\nu} = \frac{2}{n-1} T_{[\lambda} {\delta_{\mu]}}^{\nu}\,,
\end{equation}
i.e., the torsion is completely determined by its trace part $T_\lambda$.
On the other hand, if we take the $\mu,\nu$ trace in \eqref{eq:Conn-symm} and use the general
formula \cite{Iosifidis:2018zjj,Iosifidis:2019jgi}
\begin{equation}
\nabla_\lambda\sqrt{-g} = -\frac12\sqrt{-g} g_{\mu\nu}\nabla_\lambda g^{\mu\nu} =
-\frac12 \sqrt{-g} g_{\mu\nu} {Q_\lambda}^{\mu\nu}= - \frac12\sqrt{-g} Q_\lambda\,,
\end{equation}
where $Q_\lambda \equiv {Q_{\lambda \mu}}^\mu$ is a trace of the nonmetricity
tensor\footnote{The latter is defined by $Q_{\lambda\mu\nu}:= -\nabla_\lambda g_{\mu\nu} =
-\partial_\lambda g_{\mu\nu} + {\Gamma^\rho}_{\mu\lambda} g_{\rho\nu} +
{\Gamma^\rho}_{\nu\lambda}g_{\mu\rho}$.}, we find
\begin{equation}\label{QT=df'/f'}
\frac{n-2}{2n} Q_\lambda + \frac{2(n-2)}{n-1} T_\lambda = \frac{\partial_\lambda f'}{f'}\,,
\end{equation}
or equivalently
\begin{equation}\label{affinevector=df'/f'}
\frac{n-2}2\mathit{w}_\lambda = \partial_\lambda \text{ln} f'\,,
\end{equation}
where we introduced the so-called affine vector $\mathit{w}_\lambda$ \cite{Iosifidis:2018zjj}, defined in
$n$ dimensions by
\begin{equation}\label{affinevector}
\mathit{w}_\lambda :=\frac1n Q_\lambda + \frac4{n-1} T_\lambda\,.
\end{equation}
Observe that, using \eqref{eq:f}, eq.~\eqref{affinevector=df'/f'} can be rewritten as
\begin{equation}\label{dlnRandaffvector}
\partial_\lambda\text{ln} R = \mathit{w}_\lambda\,,
\end{equation}
i.e., the affine vector is exact.
Now, plugging the expression for $\partial_\lambda\ln f'$ from \eqref{QT=df'/f'} and the torsion
\eqref{torsionobtained} into \eqref{eq:Conn-symm}, we obtain
\begin{equation}\label{nonmetrobtained}
Q_{\lambda\mu\nu} = \frac1n Q_\lambda g_{\mu\nu}\,.
\end{equation}
The nonmetricity is thus fully determined by the vector $Q_\lambda$. Notice that in the irreducible
decomposition of the nonmetricity tensor under the Lorentz group there is a second nonmetricity vector
$\tilde{Q}_\nu := {Q^\mu}_{\mu\nu}$. Using \eqref{nonmetrobtained}, one gets
$\tilde{Q}_\nu = \frac1n Q_\nu$, and therefore \eqref{nonmetrobtained} can alternatively be written as
$Q_{\lambda\mu\nu} = \tilde{Q}_\lambda g_{\mu\nu}$.

Finally, exploiting the generic decomposition of an affine connection,
\begin{equation}\label{gendecompaffconn}
{\Gamma^\lambda}_{\mu\nu} = \tilde{\Gamma}^\lambda_{\phantom{\lambda}\mu\nu} + {N^\lambda}_{\mu\nu}\,,
\end{equation}
where the distortion tensor ${N^\lambda}_{\mu\nu}$ and the Levi-Civita connection
$\tilde{\Gamma}^\lambda_{\phantom{\lambda}\mu\nu}$ are respectively given by
\begin{equation}\label{distortion}
{N^\lambda}_{\mu\nu} = \underbrace{\frac12 g^{\rho\lambda}\left(Q_{\mu\nu\rho} + Q_{\nu\rho\mu}
- Q_{\rho\mu\nu}\right)}_{\text{deflection}} - \underbrace{g^{\rho\lambda}\left(T_{\rho\mu\nu} +
T_{\rho\nu\mu} - T_{\mu\nu\rho}\right)}_{\text{contorsion}}\,,
\end{equation}
\begin{equation}
\tilde{\Gamma}^\lambda_{\phantom{\lambda}\mu\nu} = \frac12 g^{\rho\lambda}\left(\partial_\mu
g_{\nu\rho} + \partial_\nu g_{\rho\mu} - \partial_\rho g_{\mu\nu}\right)\,,
\end{equation}
one can show that, in the present case, the complete expression for the affine connection reads
\begin{equation}\label{affineconnobtained}
{\Gamma^\lambda}_{\mu\nu} = \tilde{\Gamma}^\lambda_{\phantom{\lambda}\mu\nu} + \frac1{2n} Q_\nu
{\delta^\lambda}_\mu + \frac12\left(\mathit{w}_\mu {\delta_\nu}^\lambda - g_{\mu\nu}
\mathit{w}^{\lambda}\right)\,.
\end{equation}
Notice that, in $f(R)$ theories, the connection is only determined up to a vectorial degree of
freedom \cite{Iosifidis:2018zjj,Iosifidis:2019jgi}. Indeed, using the definition of the Ricci tensor,
\begin{equation}
R_{\mu\nu} := {R^\lambda}_{\mu\lambda\nu} = 2\partial_{[\lambda} {\Gamma^\lambda}_{|\mu|\nu]}
+2 {\Gamma^{\lambda}}_{\rho[\lambda} {\Gamma^\rho}_{|\mu|\nu]} \,,
\end{equation}
one can show that under projective transformations\footnote{The latter are defined as those
transformations of the affine connection that leave the autoparallels of vectors invariant up to
reparametrizations of the affine parameter \cite{Iosifidis:2018zjj}.}
\begin{equation}\label{projectivetransf}
{\Gamma^\lambda}_{\mu\nu}\mapsto {\Gamma'^\lambda}_{\mu\nu} = {\Gamma^\lambda}_{\mu\nu} +
{\delta^\lambda}_\mu\xi_\nu\,,
\end{equation}
where $\xi_\nu$ is an arbitrary vector field, the symmetric part of the Ricci tensor and thus the Ricci
scalar and the action \eqref{action-f(R)} remain invariant.

Observe that in the case in which \eqref{trace} is considered as a purely algebraic equation for the scalar
curvature $R$ yielding constant curvature metrics, one has, from \eqref{dlnRandaffvector}, that the affine
vector $w_\mu$ vanishes, which implies
\begin{equation}
Q_\mu = - \frac{4n}{n-1} T_\mu\,,
\end{equation}
and
\begin{equation}
{\Gamma^\lambda}_{\mu\nu} = \tilde{\Gamma}^\lambda_{\phantom{\lambda}\mu\nu} +
\frac1{2n} Q_\nu {\delta^\lambda}_{\mu}\,.
\end{equation}
One can therefore always arrive at the Levi-Civita connection by choosing $\xi_\nu$ appropriately in
\eqref{projectivetransf}.

On the other hand, in the case of $f(R)$ theories with $f(R) = R^{n/2}$, taking into account that under the
projective transformation \eqref{projectivetransf} one has\footnote{Here we use
$N_{(\lambda\mu)\nu} = \frac12 Q_{\nu\lambda\mu}$.}
\begin{equation}
\begin{split}
& {T_{\mu\nu}}^\lambda\mapsto {T_{\mu\nu}}^\lambda + {\delta_{[\mu}}^\lambda\xi_{\nu]}\,, \qquad
T_\mu\mapsto T_\mu - \frac{n-1}2\xi_\mu\,, \\
& {N^\lambda}_{\mu\nu}\mapsto {N^\lambda}_{\mu\nu} + {\delta^\lambda}_{\mu}\xi_\nu\,, \qquad
Q_{\lambda\mu\nu}\mapsto Q_{\lambda\mu\nu} + 2\xi_\lambda g_{\mu\nu}\,, \qquad
Q_\mu\mapsto Q_\mu + 2 n\xi_\mu\,,
\end{split}
\end{equation}
one easily shews that the affine vector $w_\mu$ is invariant under \eqref{projectivetransf}. This is
consistent with the fact that $w_\mu$ is related by \eqref{dlnRandaffvector} to the scalar curvature $R$,
which was shown above to be projectively invariant. One can use the projective gauge freedom
to further restrict the torsion and nonmetricity, and thus the affine connection. For instance, we can
choose $\xi_\mu$ in such a way to eliminate either the torsion or the
nonmetricity \cite{Iosifidis:2018zjj,Iosifidis:2019jgi},
\begin{equation}
\begin{split}
&\xi_\mu = \frac2{n-1} T_\mu\, \Rightarrow\,
\left\{
\begin{aligned}
& \, T'_\mu = 0 \, \Rightarrow\, {T'_{\mu\nu}}^\lambda = 0\,, \\
& \, Q'_\mu = Q_\mu + \frac{4n}{n-1} T_\mu\, \Rightarrow\, Q'_{\lambda\mu\nu} = Q_{\lambda\mu\nu}
+ \frac4{n-1} T_\lambda g_{\mu \nu}\,;
\end{aligned}
\right. \\
& \xi_\mu = -\frac1{2n} Q_\mu\, \Rightarrow\,
\left\{
\begin{aligned}
& \, T'_\mu = T_\mu + \frac{n-1}{4n} Q_\mu\, \Rightarrow\, {T'_{\mu\nu}}^\lambda  =
{T_{\mu\nu}}^\lambda + \frac1{2n} Q_{[\mu} {\delta_{\nu]}}^\lambda\ , \\
& \, Q'_\mu = 0\, \Rightarrow\, Q'_{\lambda\mu\nu} = 0\,.
\end{aligned}
\right.
\end{split}
\end{equation}
Intriguingly, one may also choose $\xi_\mu$ in such a way that the torsion and nonmetricity vectors
result to be interchanged \cite{Iosifidis:2018zjj}\footnote{Notice that, in this case, the scalar product
$T_\mu Q^\mu$ is left invariant under the transformation.},
\begin{equation}
\xi_\mu = \frac2{n-1} T_\mu - \frac1{2n} Q_\mu\, \Rightarrow\,
\left\{
\begin{aligned}
& \, T'_\mu = \frac{n-1}{4n} Q_\mu\, \Rightarrow\, {T'_{\mu\nu}}^\lambda = \frac1{2n}
Q_{[\mu} {\delta_{\nu]}}^\lambda\,, \\
& \, Q'_\mu = \frac{4n}{n-1} T_\mu\, \Rightarrow\, Q'_{\lambda\mu\nu} = \frac4{n-1} T_\lambda
g_{\mu\nu}\,.
\end{aligned}
\right.
\end{equation}
In this sense, systems with spacetime dislocations (induced by torsion) are physically equivalent to
systems with Weyl nonmetricity \cite{Iosifidis:2018zjj}.

As we already mentioned, the action \eqref{action-f(R)-fixed} is also invariant under the conformal
transformations \eqref{weylresc}, under which the torsion and nonmetricity transform respectively as
\begin{equation}
{T_{\mu\nu}}^\lambda\mapsto {T'_{\mu\nu}}^\lambda = {T_{\mu\nu}}^\lambda\,, \qquad
Q_{\lambda\mu\nu}\mapsto Q'_{\lambda\mu\nu} = e^{2\Omega}\left[Q_{\lambda\mu\nu}
- 2 g_{\mu\nu}\partial_\lambda\Omega\right]\,,
\end{equation}
which implies
\begin{equation}
T_\mu\mapsto T'_\mu = T_\mu\,, \qquad
Q_\mu\mapsto Q'_\mu = Q_\mu - 2 n\partial_\mu\Omega\,, \qquad
\tilde{Q}_\mu\mapsto\tilde{Q}'_\mu = \tilde{Q}_\mu - 2\partial_\mu\Omega\,.
\end{equation}
For further details on transformations in metric affine manifolds we refer to \cite{Iosifidis:2019jgi}.

To conclude this preliminary review, let us now briefly discuss, following \cite{Iosifidis:2019jgi}, what
happens when one adds a matter action $S_{\text M} [g_{\mu\nu}, {\Gamma^\lambda}_{\mu\nu}]$ to
\eqref{action-f(R)}. The full action is then
\begin{equation}\label{full}
S = S_{\text G} + S_{\text M}\,.
\end{equation}
Variation of \eqref{full} w.r.t.~$g^{\mu\nu}$ gives
\begin{equation}
f'(R) R_{(\mu\nu)} - \frac12 f(R) g_{\mu\nu} = \kappa^2 T_{\mu\nu}\,, \label{eq:Einstein+matter}
\end{equation}
where
\begin{equation}\label{enmomtens}
T_{\mu\nu} := -\frac2{\sqrt{-g}}\frac{\delta S_{\text M}}{\delta g^{\mu\nu}}
\end{equation}
is the energy-momentum tensor\footnote{If $f(R)$ is given by \eqref{eq:f}, the trace
of \eqref{eq:Einstein+matter} yields $g^{\mu\nu} T_{\mu\nu}=0$, so this specific model can be coupled
only to conformally invariant matter.},
while the variation w.r.t.~${\Gamma^\lambda}_{\mu\nu}$ leads to
\begin{equation}\label{eq:Conn+matter}
\begin{split}
& \frac1{\sqrt{-g}}\left[-\nabla_\lambda\left(\sqrt{-g} f'(R) g^{\mu\nu}\right) + \nabla_\sigma
\left(\sqrt{-g} f'(R) g^{\mu\sigma}\right){\delta^\nu}_\lambda\right] \\
& + 2f'(R)\left(g^{\mu\nu}{\Gamma^\sigma}_{[\lambda\sigma]} - g^{\mu\rho}
{\Gamma^\sigma}_{[\rho\sigma]}{\delta^\nu}_\lambda + g^{\mu\sigma}{\Gamma^\nu}_{[\sigma\lambda]}
\right) = \kappa^2 {\Delta_\lambda}^{\mu\nu}\,,
\end{split}
\end{equation}
with the hypermomentum tensor
\begin{equation}
{\Delta_\lambda}^{\mu \nu}\equiv - \frac2{\sqrt{-g}}\frac{\delta S_{\text M}}
{\delta {\Gamma^\lambda}_{\mu\nu}}\,,
\end{equation}
that contains information on the spin, shear and dilation of matter. Using the Cartan torsion tensor,
\eqref{eq:Conn+matter} can be cast into
\begin{equation}\label{eq:ConnTor+matter}
\begin{split}
& \frac1{\sqrt{-g}}\left[-\nabla_\lambda\left(\sqrt{-g} f'(R) g^{\mu\nu}\right) +
\nabla_\sigma\left(\sqrt{-g} f'(R) g^{\mu\sigma}\right){\delta^\nu}_\lambda\right] \\
& + 2f'(R)\left(g^{\mu\nu} T_\lambda - T^\mu{\delta^\nu}_\lambda +
g^{\mu\sigma} {T_{\sigma \lambda}}^\nu\right) = \kappa^2 {\Delta_\lambda}^{\mu\nu}\,.
\end{split}
\end{equation}
The $\lambda,\mu$ trace of \eqref{eq:ConnTor+matter} gives
\begin{equation}\label{condonmatter}
{\Delta_\mu}^{\mu\nu} = 0\,,
\end{equation}
which cannot hold for any form of matter. \eqref{condonmatter} arises due to the projective invariance
of the Ricci scalar. Metric affine $f(R)$ theories of gravity can thus
be consistently coupled only to projectively invariant matter. Note in this context that the terms
added to \eqref{action-f(R)-fixed} in the next section break projective invariance, so that the
resulting theory can be coupled to any type of matter.

\section{An action principle for the Einstein-Weyl equations in three dimensions}\label{magin3dplusCS}

In this section, we present an action principle for the Einstein-Weyl equations in $2+1$ dimensions.
To this end, we consider the $f(R)$ contribution \eqref{action-f(R)-fixed} plus additional terms involving
Lagrange multipliers and gravitational Chern-Simons contributions.

Let us first recall the decomposition of the nonmetricity $Q_{\lambda\mu\nu}$ and torsion
${T_{\lambda\mu}}^{\nu}$ in a trace and traceless part. In three dimensions, one has \cite{Iosifidis:2019jgi}
\begin{align}
& Q_{\lambda\mu\nu} = \frac25 Q_\lambda g_{\mu\nu} - \frac15\tilde{Q}_\lambda g_{\mu\nu} +
\frac35 g_{\lambda(\nu}\tilde{Q}_{\mu)} - \frac15 g_{\lambda(\nu} Q_{\mu)} + \Omega_{\lambda\mu\nu}\,,
\label{gennm} \\
& {T_{\lambda\mu}}^\nu = {\delta_{[\mu}}^{\nu} T_{\lambda]} + {S_{\lambda\mu}}^\nu\,, \label{gentor}
\end{align}
where the traces $Q_\lambda$ (the Weyl vector), $\tilde{Q}_\lambda$ and $T_\lambda$ were defined
in the previous section, while $\Omega_{\lambda\mu\nu}$ and ${S_{\lambda\mu}}^\nu$ denote
the traceless parts of the nonmetricity and torsion respectively.
In the following, we shall need the variation of the latter w.r.t.~the metric and the connection, which is
given by \cite{Iosifidis:2019jgi}
\begin{equation}
\delta_g Q_{\rho\alpha\beta} = \partial_\rho\left(g_{\mu\alpha} g_{\nu\beta} \delta g^{\mu\nu}\right) -
2 g_{\lambda\mu} g_{\nu(\alpha} {\Gamma^\lambda}_{\beta)\rho}\delta g^{\mu\nu}\,, \qquad
\delta_g {T_{\mu\nu}}^\alpha = 0\,, \label{deltag-QT}
\end{equation}
and
\begin{equation}
\delta_\Gamma Q_{\rho\alpha\beta} = 2\delta^\nu_\rho\delta^\mu_{(\alpha} g_{\beta)\lambda}
\delta {\Gamma^\lambda}_{\mu\nu}\,, \qquad
\delta_\Gamma {T_{\alpha\beta}}^\lambda = \delta^{[\mu}_{\alpha}\delta^{\nu]}_{\beta}
\delta {\Gamma^\lambda}_{\mu\nu}\,. \label{deltaconn-QT}
\end{equation}
These imply
\begin{align}
& \delta_g Q_\rho = \partial_\rho\left(g_{\mu\nu}\delta g^{\mu\nu}\right)\,, \qquad
\delta_g T_\mu =0\,, \\
& \delta_g \tilde{Q}_\beta = \delta g^{\mu\nu} [g_{\nu\beta} g^{\rho\alpha}\partial_\rho g_{\mu\alpha}
+ {\Gamma^\lambda}_{\mu\nu} g_{\lambda\beta} - g^{\rho\sigma} {\Gamma^\alpha}_{\rho\sigma}
g_{\mu\alpha} g_{\nu\beta}] + g_{\nu\beta}\partial_\mu\delta g^{\mu\nu}\,, \label{deltag-traces}
\end{align}
and
\begin{equation}
\delta_\Gamma Q_\rho = 2\delta^\nu_\rho\delta^\mu_\lambda\delta {\Gamma^\lambda}_{\mu\nu}\,,
\qquad
\delta_\Gamma\tilde{Q}_\beta = (g^{\mu\nu} g_{\beta\lambda} + \delta^\mu_\beta\delta^\nu_\lambda)
\delta {\Gamma^\lambda}_{\mu\nu}\,, \qquad
\delta_\Gamma T_\alpha = \delta^{[\mu}_{\alpha}\delta^{\nu]}_{\lambda}\delta
{\Gamma^\lambda}_{\mu\nu}\,. \label{deltaconn-traces}
\end{equation}
We propose the action
\begin{equation}\label{actiontotfin}
\begin{aligned}
S & = \frac1{2\kappa^2}\int d^3 x\left[\sqrt{-g} f(R) + \frac1{2\mu}\epsilon^{\mu\nu\rho} Q_\rho
\hat{R}_{\nu\mu}\right] + \int d^3 x\epsilon^{\mu\nu\rho}\left[\chi_{\rho\mu}\left(-\frac13 Q_\nu +
\tilde{Q}_\nu\right) + \zeta_{\nu\sigma} {T_{\rho\mu}}^\sigma\right] \\
& + \frac3{\kappa^2\mu}\int d^3 x\epsilon^{\mu\nu\rho}\left( {\Gamma^\sigma}_{\tau\rho}
\partial_\mu {\Gamma^\tau}_{\sigma\nu} + \frac23 {\Gamma^\tau}_{\sigma\mu}
{\Gamma^\sigma}_{\alpha\nu} {\Gamma^\alpha}_{\tau\rho}\right)\,,
\end{aligned}
\end{equation}
where $f(R)=R^{3/2}$, $\hat{R}_{\mu\nu} := {R^\lambda}_{\lambda\mu\nu} =
\partial_{[\mu}Q_{\nu]}$ denotes the homothetic curvature tensor, and $\mu$ is a Chern-Simons
coupling constant. Note that \eqref{actiontotfin} contains a Chern-Simons term both for the Weyl vector
and the connection $\Gamma$. In \eqref{actiontotfin} we also introduced the Levi-Civita symbol
$\epsilon^{\mu\nu\rho}=\sqrt{-g}\varepsilon^{\mu\nu\rho}$, where $\varepsilon^{\mu\nu\rho}$ is the
Levi-Civita tensor. $\chi_{\mu\nu}=-\chi_{\nu\mu}$ and $\zeta_{\mu\nu}$ are Lagrange
multipliers\footnote{The action \eqref{actiontotfin} is diffeomorphism-invariant by construction,
since it can be written as $S=\int d^3 x\sqrt{-g}\Psi$, where $\Psi$ transforms as a scalar under
general coordinate transformations.}. The idea that gravitational Chern-Simons terms may be
useful to find an action principle for the three-dimensional EW equations appeared for the first time
in \cite{pt,Cacciatori:2005wz}. In particular, the suggestion to use a CS term for the Weyl vector
occurs as a final comment in \cite{pt}.
\eqref{actiontotfin} can also be written in the form
\begin{equation}\label{actiontotfin1}
\begin{aligned}
S & = \frac1{2\kappa^2}\int d^3 x\left[\sqrt{-g} f(R) + \frac1{2\mu}\epsilon^{\mu\nu\rho} Q_\rho
\hat{R}_{\nu\mu}\right] + \int d^3 x\epsilon^{\mu\nu\rho}\left[\chi_{\rho\mu}\left(- \frac13 Q_\nu +
\tilde{Q}_\nu\right) + \zeta_{\nu\sigma} {T_{\rho\mu}}^\sigma\right] \\
& + \frac3{2\kappa^2\mu}\int d^3 x\epsilon^{\mu\nu\rho}\left( {R^\sigma}_{\tau\mu\nu}
{\Gamma^\tau}_{\sigma\rho} - \frac23 {\Gamma^\tau}_{\sigma\mu} {\Gamma^\sigma}_{\alpha\nu}
{\Gamma^\alpha}_{\tau\rho}\right)\,.
\end{aligned}
\end{equation}
From the variation of \eqref{actiontotfin} w.r.t.~$\chi_{\mu\nu}$ and $\zeta_{\mu\nu}$ we
get respectively
\begin{equation}\label{qt}
\tilde{Q}_\mu = \frac13 Q_\mu\,,
\end{equation}
\begin{equation}
\varepsilon^{\mu\rho\sigma} {T_{\rho\sigma}}^\nu = 0\,. \label{eq:dual-T=0}
\end{equation}
The latter implies vanishing torsion,
\begin{equation}\label{zerotor}
{T_{\rho\sigma}}^\nu = 0\,.
\end{equation}
Varying w.r.t~${\Gamma^\lambda}_{\mu\nu}$ and using \eqref{deltaconn-QT}, \eqref{deltaconn-traces},
one obtains
\begin{equation}\label{eq:ConnTorCS}
\begin{split}
& {P_\lambda}^{\mu\nu} + {\delta_\lambda}^\nu g^{\mu\sigma}\frac{\partial_\sigma f'}{f'} - g^{\mu\nu}
\frac{\partial_\lambda f'}{f'} + \frac2{\mu f'}\varepsilon^{\nu\rho\sigma}(3 {R^\mu}_{\lambda\rho\sigma}
- {\delta_\lambda}^\mu \hat{R}_{\rho\sigma}) \\
& + \frac{2\kappa^2}{f'}\left({\delta_\lambda}^\nu\varepsilon^{\mu\rho\sigma}\chi_{\rho\sigma} -
\frac23 {\delta_\lambda}^\mu\varepsilon^{\nu\rho\sigma}\chi_{\rho\sigma} + g_{\lambda\tau}
\varepsilon^{\tau\rho\sigma}\chi_{\rho\sigma} g^{\mu\nu} + \varepsilon^{\mu\nu\rho}
\zeta_{\rho\lambda}\right) = 0\,,
\end{split}
\end{equation}
where ${P_\lambda}^{\mu\nu}$ is the Palatini tensor defined in \eqref{palatini}.
In the following, we shall consistently set the traceless part of the nonmetricity to zero,
\begin{equation}\label{omzero}
\Omega_{\lambda\mu\nu} = 0\,.
\end{equation}
Notice that \eqref{qt} and \eqref{omzero} are precisely the constraints
needed to get the Weyl nonmetricity \eqref{eq:Weyl-nonmetr}: Plugging \eqref{qt} and \eqref{omzero}
into the decomposition \eqref{gennm} gives $Q_{\lambda\mu\nu}=g_{\mu\nu}Q_\lambda/3$,
and thus
\begin{equation}
\nabla_\lambda g_{\mu\nu} = -Q_{\lambda\mu\nu} = -\frac13 Q_\lambda g_{\mu\nu}\,,
\end{equation}
which coincides with \eqref{eq:Weyl-nonmetr} for $h_\lambda=-Q_\lambda/6$.

Using \eqref{qt}, \eqref{zerotor}, \eqref{omzero}, and writing the Palatini tensor explicitly in terms of the
Weyl vector $Q_\mu$, \eqref{eq:ConnTorCS} becomes
\begin{equation}\label{eqconnstart0}
\begin{split}
& \frac16(g^{\mu\nu} Q_\lambda - {\delta_\lambda}^\nu Q^\mu) + {\delta_\lambda}^\nu
\frac{\partial^\mu f'}{f'} - g^{\mu\nu}\frac{\partial_\lambda f'}{f'} + \frac6{\mu f'}\left[2
\varepsilon^{\alpha\nu\beta} g_{\lambda\alpha} {{\tilde R}^\mu}_{\,\,\,\beta} + \varepsilon^{\alpha\mu\nu}
(g_{\alpha\lambda}\tilde{R} - 2{\tilde R}_{\alpha\lambda})\right] \\
& + \frac1{\mu f'}\left[\frac13\varepsilon^{\alpha\mu\nu}(g_{\alpha\lambda} Q_\rho Q^\rho -
Q_\alpha Q_\lambda + 6\tilde{\nabla}_\alpha Q_\lambda) + \varepsilon^{\alpha\nu\beta}
g_{\alpha\lambda}\left(\frac13 Q_\beta Q^\mu - 2\tilde{\nabla}_\beta Q^\mu\right)
\right] \\
& + \frac{2\kappa^2}{f'}\left({\delta_\lambda}^\nu\varepsilon^{\mu\rho\sigma}\chi_{\rho\sigma} -
\frac23 {\delta_\lambda}^\mu\varepsilon^{\nu\rho\sigma}\chi_{\rho\sigma} + g_{\lambda\tau}
\varepsilon^{\tau\rho\sigma}\chi_{\rho\sigma} g^{\mu\nu} + \varepsilon^{\mu\nu\rho}
\zeta_{\rho\lambda} \right) = 0\,.
\end{split}
\end{equation}
Here, $\tilde\nabla$ denotes the Levi-Civita connection, and ${\tilde R}_{\mu\nu}$, $\tilde R$
are respectively its Ricci tensor and scalar curvature. We also used \eqref{gendecompaffconn},
\eqref{distortion}, \eqref{gennm} and \eqref{gentor} to express the Riemann tensor in terms of its
Levi-Civita part and the Weyl vector.

The $\lambda ,\mu$ trace of \eqref{eqconnstart0} leads to
\begin{equation}\label{zetasymm}
\frac{2\kappa^2}{f'}\varepsilon^{\nu\rho\sigma}\zeta_{\rho\sigma} = 0\quad\Rightarrow\quad
\zeta_{[\rho\sigma]} = 0\,.
\end{equation}
Taking this into account and considering the $\lambda ,\nu$ trace of \eqref{eqconnstart0}, we obtain
\begin{equation}\label{lambdanutrace}
\frac{10\kappa^2}{3f'}\varepsilon^{\mu\rho\sigma}\chi_{\rho\sigma} - \frac16 Q^\mu - \frac1{\mu f'}
\varepsilon^{\mu\rho\sigma}\hat{R}_{\rho\sigma} + \frac{\partial^\mu f'}{f'} = 0\,.
\end{equation}
Plugging \eqref{zetasymm} and \eqref{lambdanutrace} into \eqref{eqconnstart0}, and taking the
$\mu,\nu$ trace of the resulting equation, one finds
\begin{equation}\label{chizero}
\chi_{\rho\sigma} = 0\,,
\end{equation}
and thus \eqref{lambdanutrace} reduces to
\begin{equation}\label{cdfp}
\frac{\partial^\mu f'}{f'} = \frac16 Q^\mu + \frac1{\mu f'}\varepsilon^{\mu\rho\sigma}
\hat{R}_{\rho\sigma}\,.
\end{equation}
With \eqref{chizero} and \eqref{cdfp}, \eqref{eqconnstart0} becomes
\begin{equation}\label{expr1}
\begin{split}
& ({\delta_\lambda}^\nu\varepsilon^{\mu\rho\sigma} - \varepsilon^{\alpha\rho\sigma}
g_{\alpha\lambda} g^{\mu\nu})\hat{R}_{\rho\sigma} + 6\left[ 2\varepsilon^{\alpha\nu\beta}
g_{\lambda\alpha} {\tilde{R}^\mu}_{\,\,\,\beta}
+ \varepsilon^{\alpha\mu\nu}(g_{\alpha\lambda}\tilde{R} - 2 {\tilde R}_{\lambda\alpha})\right] \\
& + \frac13\varepsilon^{\alpha\mu\nu}(g_{\alpha\lambda} Q_\rho Q^\rho - Q_\alpha Q_\lambda
+ 6\tilde{\nabla}_\alpha Q_\lambda) + \varepsilon^{\alpha\nu\beta} g_{\alpha\lambda}\left(\frac13
Q_\beta Q^\mu - 2\tilde{\nabla}_\beta Q^\mu\right)
+ 2\kappa^2\mu\varepsilon^{\mu \nu \rho} \zeta_{\lambda \rho} = 0\,.
\end{split}
\end{equation}
Before proceeding with the analysis of \eqref{expr1}, consider the variation of \eqref{actiontotfin}
w.r.t.~$g^{\mu\nu}$. To this end, observe that the Chern-Simons terms are topological, i.e., independent
of the metric up to boundary terms. If we use moreover \eqref{omzero} and \eqref{chizero}, it is
straightforward to shew that the equations of motion of $g^{\mu\nu}$ are just given by the Einstein-Weyl
equations \eqref{eq:EW} for $n=3$,
\begin{equation}
R_{(\mu\nu)} - \frac R3 g_{\mu\nu} = 0\,. \label{eq:EW3d}
\end{equation}
Notice that, if one kept $\Omega_{\lambda\mu\nu}\neq0$, there would be additional pieces in
\eqref{eq:EW3d}, so that one would not obtain precisely the EW equations, but something more general
that contains a traceless part of the nonmetricity.
Recall that \eqref{eq:EW3d} is supplemented by \eqref{qt}, \eqref{zerotor} and \eqref{omzero},
and that we get a nonexact Weyl vector whose dynamics is governed by \eqref{cdfp}.
In terms of its Levi-Civita part and the Weyl vector, \eqref{eq:EW3d} reads
\begin{equation}\label{eq:EW3dexpl}
\tilde{R}_{\mu\nu} - \frac13 g_{\mu\nu}\tilde{R} - \frac1{108} g_{\mu\nu} Q_\rho Q^\rho + \frac1{36}
Q_\mu Q_\nu + \frac1{18} g_{\mu\nu}\tilde{\nabla}_\rho Q^\rho - \frac16\tilde{\nabla}_{(\mu} Q_{\nu)}
= 0\,.
\end{equation}
Plugging this into \eqref{expr1}, the latter becomes
\begin{equation}\label{expr2}
\begin{split}
& {\delta_\lambda}^\nu\varepsilon^{\mu\rho\sigma}\hat{R}_{\rho\sigma} - \varepsilon^{\alpha\rho\sigma}
g_{\alpha\lambda} g^{\mu\nu}\hat{R}_{\rho\sigma} - 2\varepsilon^{\alpha\mu\nu}\hat{R}_{\lambda\alpha}
+ 2\varepsilon^{\alpha\nu\rho} g_{\alpha\lambda} {\hat{R}^\mu}_{\,\,\,\beta}\\
& +\varepsilon^{\alpha\mu\nu} g_{\alpha\lambda}\left(\frac19 Q_\rho Q^\rho - 2\tilde{R} + \frac43
\tilde{\nabla}_\rho Q^\rho\right) + 2\kappa^2\mu\varepsilon^{\mu\nu\rho}\zeta_{\lambda\rho} = 0\,.
\end{split}
\end{equation}
\eqref{cdfp} is equivalent to
\begin{equation}\label{dual}
\hat{R}^{\rho\sigma} = \varepsilon^{\rho\sigma\tau}\Upsilon_\tau\,,
\end{equation}
where
\begin{equation}\label{upsilon}
\Upsilon_\tau := \frac12\mu\varepsilon^{\rho\sigma\tau}\left(\frac16 f' Q_\tau - \partial_\tau f'\right)\,.
\end{equation}
Using this in \eqref{expr2}, one easily shows that the terms involving the homothetic curvature tensor
identically vanish, and we are left with
\begin{equation}\label{expr3}
\varepsilon^{\alpha\mu\nu} g_{\alpha\lambda}\left(\frac19 Q_\rho Q^\rho - 2\tilde{R} + \frac43 \tilde{\nabla}_\rho Q^\rho\right) + 2\kappa^2\mu\varepsilon^{\mu\nu\rho}\zeta_{\lambda\rho} = 0\,,
\end{equation}
or equivalently
\begin{equation}\label{zetaexpr}
\zeta_{\mu\nu} = \frac1{\kappa^2\mu} g_{\mu\nu}\left(\tilde{R} - \frac1{18} Q_\rho Q^\rho - \frac23
\tilde{\nabla}_\rho Q^\rho\right) = \frac1{\kappa^2\mu} g_{\mu\nu} R\,,
\end{equation}
where we used \eqref{qt}, \eqref{zerotor} and \eqref{omzero} in the last step.
Summarizing, one has
\begin{equation}\label{nmform}
Q_{\lambda\mu\nu} = \frac13 Q_\lambda g_{\mu\nu}\,,
\end{equation}
which corresponds to Weyl nonmetricity, together with \eqref{zerotor}, \eqref{cdfp} and \eqref{eq:EW3d}.
The latter are precisely the Einstein-Weyl equations in three dimensions.
The final form of the connection, obtained by plugging \eqref{zerotor} and \eqref{nmform} into
\eqref{distortion}, results to be
\begin{equation}\label{connwithWeylnm}
{\Gamma^\lambda}_{\mu\nu} = \tilde{\Gamma}^\lambda_{\phantom{\lambda}\mu\nu} -
\frac16 g_{\mu\nu} Q^\lambda + \frac13 {\delta_{(\mu}}^\lambda Q_{\nu)}\,.
\end{equation}
With $f(R)=R^{3/2}$, eq.~\eqref{cdfp} becomes
\begin{equation}\label{finaleq}
\partial_\mu\ln R = \frac13 Q_\mu + \frac4{3\mu\sqrt R} g_{\mu\tau}\varepsilon^{\rho\sigma\tau}
\hat{R}_{\rho\sigma}\,.
\end{equation}
As we can see, the Weyl vector is not exact and possesses a nontrivial dynamics. In particular,
\eqref{finaleq} is a differential equation containing only the Weyl vector and the metric.
Dualizing \eqref{finaleq} gives the generalized monopole equation (cf.~\cite{Jones:1985pla}),
\begin{equation}
dh = \star(d\Sigma + h\Sigma)\,, \label{eq:gen-monop}
\end{equation}
with the one-form $h$ and the function $\Sigma$ respectively defined by
$h_\lambda=-Q_\lambda/6$ and $\Sigma=\mu\sqrt R/4$. Actually, \eqref{eq:gen-monop}
represents a special case of the generalized monopole equation, since the latter has the exterior
derivative of any one-form $\omega$ on the lhs. If $\Sigma$ were constant (this can always be
achieved by a Weyl rescaling \eqref{weylresc}, under which $\Sigma\mapsto e^{-\Omega}\Sigma$),
\eqref{eq:gen-monop} would boil down to $dh=\star h\Sigma$, which is the self-duality condition
(3) of \cite{Townsend:1983xs} in three dimensions. We can thus regard \eqref{eq:gen-monop}
as a conformally invariant generalization of the three-dimensional self-duality condition.

\section{Final remarks}\label{final}

A longstanding open mathematical problem has been the construction of an action principle
for the Einstein-Weyl equations.
In this paper, we presented for the first time such an action in three dimensions, given by a
metric affine $f(R)$ gravity contribution plus additional pieces involving Lagrange multipliers and
gravitational Chern-Simons terms. To be more precise, our model contains, in addition to
the Weyl nonmetricity, also a traceless part. However, the latter can be consistently set to zero,
and in this case our equations of motion boil down to the EW equations.

Let us spend some words on the matter coupling of \eqref{actiontotfin}.
As mentioned in section \ref{review}, when one adds matter to metric affine $f(R)$ theories of gravity,
the projective invariance of the action imposes the constraint ${\Delta_\mu}^{\mu\nu}=0$
on the hypermomentum. However, if we couple matter to the theory developed in the present paper, we
see that the extra contributions we have introduced in the action break projective invariance.
Thus, in particular, ${\Delta_\mu}^{\mu\nu}\neq 0$, and the inconsistency mentioned above does not
appear anymore.

It remains to be seen if our results can be extended to higher dimensions. If so, this would probably
involve topological terms like e.g.~$BF$ actions, in addition to $f(R)$ gravity. Note
that Chern-Simons terms were considered in modifications of four-dimensional general
relativity \cite{Jackiw:2003pm, Alexander:2009tp, Hehl:1990ir}.
We hope to come back to this point in a future publication.

Finally, it would also be interesting to explore possible cosmological applications of \eqref{actiontotfin},
along the lines of refs.~\cite{Capozziello:2019wfi,Capozziello:2019qlt}, which are based on $f(R)$
gravity theories with a Levi-Civita connection. In this context, \cite{Iosifidis:2020gth} presented a model for
cosmological hyperfluids, i.e., fluids with intrinsic hypermomentum that induce spacetime torsion and
nonmetricity.

\section*{Acknowledgements}

This work was supported partly by INFN and by MIUR-PRIN contract 2017CC72MK003.
The authors would like to thank L.~Andrianopoli, R.~D'Auria
and M.~Trigiante for inspiring discussions.


TITLE: Why is this is an equivalence relation?
QUESTION [1 upvotes]: Fulton makes the following definitions:

After he defines an equivalence relation:

The definitions he made seems very obscure to me and if anyone could show why this relation is an equivalence relation this would help me a lot to understand the applications of these definitions.
I really need help.
Thanks in advance.

REPLY [1 votes]: To see that $\equiv$ is an equivalence relation, you only need the very last sentence of the big block above, namely that $div(zz') = div(z) + div(z')$ and that $div(z^{-1}) = -div(z)$. The first gives you transitivity of $\equiv$, the second symmetry. (To precise, you also need reflexivity, but I presume this is either easy to come by, or implicitely assumed to be the case anyway.)


TITLE: Show that it is/is not a normal extension
QUESTION [3 upvotes]: Let $a \in \mathbb{R}$ with $a^4=5$. Show that:

$\mathbb{Q}(ia^2)$ is a normal extension of $\mathbb{Q}$.
$\mathbb{Q}(a+ia)$ is a normal extension of $\mathbb{Q}(ia^2)$
$\mathbb{Q}(a+ia)$ is not a normal extension of $\mathbb{Q}$

I have done the following:

$Irr(ia^2, \mathbb{Q})=x^2+5$

The splitting field is $\mathbb{Q}(ia^2)$.
Therefore, $\mathbb{Q}(ia^2)$ is a normal extension of $\mathbb{Q}$.

$Irr(a+ia, \mathbb{Q}(ia))=x^2-2ia^2$

The splitting field is $\mathbb{Q}(a+ia)$.
Therefore, $\mathbb{Q}(a+ia)$ is a normal extension of $\mathbb{Q}(ia^2)$.

$Irr(a+ia, \mathbb{Q})=x^4+20$

Are the solutions $\pm \sqrt{2i}a, \pm \sqrt{-2i}a$ ??
These solutions are not in $\mathbb{Q}(a+ia)$, are they?? How can we prove it??
Is this correct??

REPLY [0 votes]: To expand on user204305's answer, let $N$ be a normal extension
of ${\mathbb Q}$ containing ${\mathbb Q}(a+ia)$. We have to show that
$N\neq {\mathbb Q}(a+ia)$.
As indicated in the OP, the minimal polynomial of $a+ia$
is $M=X^4+20$. The roots of $M$ are $m_1=a+ia$,
$m_2=im_1=-a+ia,m_3=-m_1=-a-ia$ and $m_4=-im_1=a-ia$.
By definition, $N$ contains all the $m_i$, so $N$
contains both $\frac{m_1+m_4}{2}=a$ and $\frac{m_1-m_4}{m_1+m_4}=i$. So
$N$ contains ${\mathbb Q}(a)$, and the inclusion is strict
(because ${\mathbb Q}(a) \subseteq {\mathbb R}$ and $i\in N$). We deduce
that $d=[N:{\mathbb Q}(a)]$ is $\geq 2$, so
$[N:{\mathbb Q}]=[N:{\mathbb Q}(a)][{\mathbb Q}(a):{\mathbb Q}] \geq 8$ and hence
$N\neq {\mathbb Q}(a+ia)$ as wished.


TITLE: Calculating the probability of winning roulette after x bets
QUESTION [3 upvotes]: I'm going through all of my homeworks to study for my final and I'm getting hung up on this one problem I never figured out...
A roulette wheel has 38 slots, numbered 0, 00, and 1 through 36. If you bet
1 on a specified number, you either win 35 if the roulette ball lands on that
number or lose 1 if it does not. If you continually make such bets, approximate the
probability that
(a) you are winning after 34 bets;
(b) you are winning after 1,000 bets;
(c) you are winning after 100,000 bets.
So i get the idea is to figure out the mean and variance so that I can let X be estimated by a normal distribution, I got the correct values and checked them with the solutions, but theres one thing I'm confused about.
Even though the solution calculates the expected value of the winnings E(W) = (35)(1/38) + (-1)(37/38) = -0.0526, it uses a different value for the mean in the calculation of the Z score.
It used 1 - (37/38)^34 = 0.596 ..
This is different than any other problem I've seen before, I was just hoping someone could explain why you use this value as opposed to the expected value E(W), and what exactly this value means.
Thanks.

REPLY [1 votes]: $\left(\dfrac{37}{38}\right)^{34}$ is the probability of losing $34$ bets in a row.
If this does not happen then you have gained $35$ at least once and so are ahead after $34$ bets.
So this is not a $Z$ score but, after subtraction from $1$, an exact probability answer to (a).   You do not need to consider expectations or approximations.


TITLE: Coherent states of the form $|{-\alpha}\rangle$
QUESTION [2 upvotes]: I've a brief question about coherent states in quantum mechanics.
As everyone knows, a coherent state is just the proper state of the anhilitation operator $a$, thus they're defined with the eigenvalue equation $a|\alpha\rangle=\alpha|\alpha\rangle$ (or inverting, $\langle\alpha|a^\dagger=\langle\alpha|a^{*}$).
However, sometimes I've seen coherent states of the form $|{-\alpha}\rangle$, and I was wondering about their physical meaning and if they satisfy the same eigenvalue equation as before, i.e., $a|{-\alpha}\rangle=-\alpha|{-\alpha}\rangle$ (and thus, $\langle{-\alpha}|a^\dagger=\langle{-\alpha}|{-\alpha}^{*}$).
Precisely, we can find these states, for example, in the case of the Schrödinger cat state.

REPLY [2 votes]: Yes, coherent states can be found for any value of $\alpha$. To see this, it's nice to use the displacement operator and construct the states:
$$D(\alpha)=e^{\alpha a^\dagger-\alpha^\star a}.$$
It is the exponential of an anti-Hermitian operator and so is unitary by construction. What is interesting is it's effect on the vacuum state, namely we can write
$$|\alpha\rangle=D(\alpha)|0\rangle.$$
To show this, let's compute the operator
$$D^\dagger(\alpha)aD(\alpha).$$
We can use BCH expansion and it reduces to
$$a+\alpha.$$
As such, when we act with this operator on the vacuum state,
$$D^\dagger(\alpha)aD(\alpha)|0\rangle=(a+\alpha)|0\rangle=\alpha|0\rangle.$$
Since $D(\alpha)$ is unitary, acting with it on the left on both sides, we get
$$aD(\alpha)|0\rangle=\alpha D(\alpha)|0\rangle,$$
i.e. $D(\alpha)|0\rangle=|\alpha\rangle$ for any complex number $\alpha$.


TITLE: Largest number on multiplying with itself gives the same number as last digits of the product
QUESTION [3 upvotes]: What is the largest number on multiplying with itself gives the same number as last digits of the product?
i.e., $(376 \times 376) = 141376$
i.e., $(25\times 25) = 625$
If the largest number cant be found out can you prove that there is always a number greater than any given number? (only in base $10$)

REPLY [2 votes]: Looking for $k$ so that $k^2\equiv k\pmod{10^n}$, we get
$$
k(k-1)\equiv0\pmod{10^n}
$$
Since $\gcd(k,k-1)=1$, we must have one of
$$
\begin{align}
k&\equiv0\pmod{10^n}\tag{1}\\
k&\equiv1\pmod{10^n}\tag{2}\\
k&\equiv0\pmod{2^n}\quad\text{and}\quad k\equiv1\pmod{5^n}\tag{3}\\
k&\equiv1\pmod{2^n}\quad\text{and}\quad k\equiv0\pmod{5^n}\tag{4}
\end{align}
$$
The Chinese Remainder Theorem guarantees a solution for each of these.
$(1)$ and $(2)$ lead to $0$ and $1$, so they are bounded.
$(3)$ and $(4)$ lead to more interesting, unbounded solutions. Note that a solution of $(3)$ or $(4)$ for $n$ is also a solution for $n{-}1$ but with another digit added to the left. Furthermore, it cannot be that there is a bounded solution of $(3)$ or $(4)$; that is, one for all $n$. If $k(k-1)\equiv0\pmod{10^n}$ for all $n$, then $k(k-1)=0$; that is, $k=0$ or $k=1$. Therefore, for any $n$, there is a larger $n'$, so that the digit added to the left for the solution mod $10^{n'}$ is non-zero. Thus, there is no largest such number.


TITLE: Is product of Banach spaces a Banach space?
QUESTION [12 upvotes]: If $X$ is a Banach space, then I want to know if $X\times X$ is also Banach. What is the norm of that space?
So for example, we know $C^k(\Omega)$ is Banach and I have a vector $v = (u_1, u_2)$ where $u_i \in C^k(\Omega)$ and I want to use properties on this vector.
Thanks

REPLY [15 votes]: Yes, though the product is more commonly called a direct sum. Many equivalent norms are possible; common choices are $\lVert(u_1,u_2)\rVert=\lVert u_1\rVert+\lVert u_2\rVert$ and $\lVert(u_1,u_2)\rVert=\max(\lVert u_1\rVert,\lVert u_2\rVert)$, or more generally $\lVert(u_1,u_2)\rVert=(\lVert u_1\rVert^p+\lVert u_2\rVert^p)^{1/p}$ for $1\le p<\infty$.

REPLY [6 votes]: Yes.
Let $(X, \lVert - \rVert)$ be a Banach space. Then $X \times X$ is a Banach space under the norm $\lVert (x,y) \rVert = \lVert x \rVert + \lVert y \rVert$.
Proof: It's easy to check that this defines a norm, so we just need completeness. Let $(x_n, y_n)$ be a Cauchy sequence in this norm. Let $\varepsilon > 0$ and let $N \in \mathbb{N}$ be such that for all $m,n \ge N$ we have
$$\lVert (x_n, y_n) - (x_m, y_m) \rVert < \varepsilon$$
Then by the definition of our norm we must also have $\lVert x_n - x_m \rVert + \lVert y_n - y_m \rVert < \varepsilon$, and hence $(x_n)$ and $(y_n)$ are Cauchy in $X$, hence convergent, and it's easy to check that if $x_n \to x$ and $y_n \to y$ then $(x_n,y_n) \to (x,y)$. $\square$
(In fact we may choose other norms for $X \times X$.)

REPLY [3 votes]: The product of a finite number of Banach spaces can easily made into a Banach space by, e.g., adding the norms or by taking their maximum. There are more choices, but none of them is natural, to my knowledge, or preferred.
A better way to put it is, in my opinion, to say that such a product is, in a natural way, a topological vector space, which admits a complete norm.


TITLE: Carbon dioxide molecule model
QUESTION [1 upvotes]: A simple model of the carbon dioxide molecule can be modeled by a system of three masses and two springs. The oxygen atoms have mass M and carbon has mass m. The springs (bonds) have spring constant $k$.
The corresponding mathematical model is
$$
Mx'' = k(y-x)$$
$$my'' = -k(y-x) - k(y-z)$$
$$Mz'' = -k(z-y)
$$
I want to model this such that there is a system of equations where $\vec{x} = Ax$. I set $x_1 = x - y$, $x_2 = y - z$, $x_3 = x_1'$, and $x_4 = x_2'$. But I don't know what to do next.

REPLY [0 votes]: $$
\left[ \begin{array}{rrr}
 m_{o} x'' \\
 m_{c} y'' \\
 m_{o} z''
\end{array} \right]
%
=
%
k
\left[ \begin{array}{rrr}
 -1 & 1 & 0 \\
 1 & -2 & 1 \\
  0 & 1 & -1
\end{array} \right]
%
\left[ \begin{array}{rrr}
 x \\
 y \\
 z
\end{array} \right]
$$
The key is to diagonalize
$$
\mathbf{A} =
\left[ \begin{array}{rrr}
 -1 & 1 & 0 \\
 1 & -2 & 1 \\
  0 & 1 & -1
\end{array} \right]
$$
Eigenvalues:
$$
\lambda \left( \mathbf{A} \right) = \left( -3, -1, 0 \right)
$$
Matrix of eigenvectors:
$$
\mathbf{P} =
\left[ \begin{array}{rrr}
 1 & -2 & 1 \\
 -1 & 0 & 1 \\
 1 & 1 & 1 \\
\end{array} \right]
$$
Diagonalization:
$$
\mathbf{P} \, \mathbf{A} \, \mathbf{P}^{-1} =
\left[ \begin{array}{rrr}
 -3 & 0 & 0 \\
 0 & -1 & 0 \\
 0 & 0 & 0 \\
\end{array} \right]
$$


TITLE: Solving $k\left(e^{a(2k+1)}-1\right)=1$ for k?
QUESTION [2 upvotes]: I've been studying the structure of partial sums of the Dirichlet eta function and noticed that certain critical points occur when the summing from $n=1$ to $n\approx N(k)$ for $k\in\mathbb{N}$ where
$$N(k)=\frac{1}{e^{ak}-1},$$
and $a$ is some constant determined by the input of the eta function.
There is one special critical point which happens when $k=N(2k+1)$, which I'd like to isolate (i.e; solve for $k$). Thus,

How do we solve (or at least approximate) for $k$ when $k\left(e^{a(2k+1)}-1\right)=1$?

Note: Trivially, this is generally unsolvable for $k\in\mathbb{N}$, however solving it for $k\in\mathbb{R}$ will still yield useful results for my purpose.
I have been fumbling with this equation for quite some time to convert it into a form suitable to apply the Lambert W function to no avail. At this point I'm not sure if this is solvable with such a method. Even WolframAlpha cannot solve it.
I presume this has no nice elementary solution, and probably involves some transcendental function / infinite series; which I am content with. Any advice?

REPLY [1 votes]: I prefer to add a second answer since based on a different approach.
Let $x=2a k$ and $A=e^a$ which makes the equation
$$A e^x x=2a+x    \implies e^{-x}= A \, \frac{ x}{x+2 a}$$ which has an explicit solution in terms of the generalized Lambert function (have a look at equation $(4)$ in the linked paper). This is interesting but, unfortunately, not very practical.
Considering the function (I assume $a>0$)
$$f(x)=A e^x x-x-2a$$  its solution is the inverse of
$$a=-\frac{x}{2}
-W\left(-\frac{x}{2} e^{\frac x2} \right)\implies x < 2 W\left(\frac{1}{e}\right)$$
If $x$ is "small", we have
$$a=\frac {x^2}2 \Bigg[1+\sum_{n=1}^\infty \alpha_n\,x^n\Bigg]$$ the first coefficients being
$$\left\{1,\frac{7}{6},\frac{3}{2},\frac{41}{20},\frac{263}{90},\frac{5413}{1260},\frac{3259}{504},\frac{89953}{9072},\frac{129653}{8400}
,\frac{8092127}{332640},\frac
   {20712491}{534600},\frac{216331303}{3474900}\right\}$$ and series reversion would give
$$x=b \Bigg[1-\frac 12 b+\frac 1{24}b^2\sum_{n=0}^\infty \beta_n\,b^{2n}\Bigg]\qquad \text{with} \qquad b=\sqrt{2a}$$ the first coefficients being
$$\left\{1,\frac{11}{240},\frac{17}{13440},-\frac{281}{6451200},-\frac{44029}{5109350
   400},-\frac{12147139}{22317642547200}\right\}$$ More tedious is the expansion around $x= 2 W\left(\frac{1}{e}\right)$.
$$a=-\left(\frac{t}{2}+T\right)-\frac{2 (t+1) T+t}{2 t (T+1)}(x-t)-\frac{T (t-2 T) (t+2 T+4)}{8 t^2 (T+1)^3}(x-t)^2+O\left(\left(x-t\right)^{3}\right)$$ where
$$t=2 W\left(\frac{1}{e}\right)\qquad \text{and} \qquad T=W\left(-\frac{t}{2} e^{\frac t2} \right)$$ which can easily be inversed since
$$a=\gamma_0+\gamma_1(x-t)+\gamma_2(x-t)^2++O\left((x-t)^3\right)$$ leads to
$$x=t+\frac{1}{\gamma_1}(a-\gamma_0)-\frac{\gamma_2 }{\gamma_1
   ^3}(a-\gamma_0)^2+O\left((a-\gamma_0)^3\right)$$


TITLE: Evaluate $\sec \frac{2\pi}{7}+\sec \frac{4\pi}{7}+\sec \frac{6\pi}{7}$
QUESTION [8 upvotes]: The problem is as follows:
Find the value of $\textrm{H}$ which belongs to a certain vibration coming from a magnet.
$$H=\sec \frac{2\pi}{7}+\sec \frac{4\pi}{7}+\sec \frac{6\pi}{7}$$
It was easy to spot that each term was related to multiples of two and three of the first angle. So I rewrote that equation like this:
$$H=\sec \frac{2\pi}{7}+\sec \frac{2\times 2\pi}{7}+\sec \frac{3\times 2\pi}{7}$$
One method which I tried was to transform the multiples of each angle into their equivalents as a single one as shown below:
$$\cos^{2}\omega=\frac{1+\cos 2\omega}{2}$$
$$\cos 2\omega= 2 \cos^{2}\omega - 1$$
$$\cos^{3}\omega=\frac{1}{4}\left(3cos\omega+\cos 3\omega \right)$$
$$\cos 3\omega = 4 \cos^{3}\omega - 3 cos\omega$$
Therefore by plugin these expressions into the above equation would become into (provided that secant function is expressed in terms of secant):
$$H=\frac{1}{\cos \frac{2\pi}{7}}+\frac{1}{2\cos^{2}\frac{2\pi}{7}-1}+\frac{1}{4\cos^{3}\frac{2\pi}{7}-3\cos\omega}$$
But from here on it looks convoluted or too algebraic to continue. My second guess was it could be related to sum to product identity but I couldn't find one for the secant.
Does it exist a shortcut or could it be that am I missing something? Can somebody help me to find the answer?
Can this problem be solved without requiring to use Euler's formulas?

REPLY [0 votes]: Using multiple angle formulas, we get
$$
\begin{align}
\cos(\theta)&=x\\
\cos(2\theta)&=2x^2-1\\
\cos(3\theta)&=4x^3-3x\\
\cos(4\theta)&=8x^4-8x^2+1
\end{align}\tag1
$$
Consider $\cos(3\theta)=\cos(4\theta)$, which happens when $3\theta+4\theta=2k\pi$ for some $k\in\mathbb{Z}$ (it also happens when $3\theta-4\theta=2k\pi$, but those cases are a subset). Thus,
$$
x=\cos\left(\frac{2k\pi}7\right)\implies8x^4-4x^3-8x^2+3x+1=0\tag2
$$
Since $k$ and $7-k$ give the same values for $\cos\left(\frac{2k\pi}7\right)$ and $k=0$ gives $\cos\left(\frac{2k\pi}7\right)=1$, if we divide $(2)$ by $x-1$, we get the polynomial satisfied by $x=\cos\left(\frac{2k\pi}7\right)$ for $k\in\{1,2,3\}$; that is,
$$
8x^3+4x^2-4x-1=0\tag3
$$
The polynomial satisfied by $x=\sec\left(\frac{2k\pi}7\right)$ for $k\in\{1,2,3\}$ is then
$$
x^3+4x^2-4x-8=0\tag4
$$
Vieta's formulas then give that
$$
\bbox[5px,border:2px solid #C0A000]{\sec\left(\frac{2\pi}7\right)+\sec\left(\frac{4\pi}7\right)+\sec\left(\frac{6\pi}7\right)=-4}\tag5
$$
Furthermore, they also give that
$$
\sec\left(\frac{2\pi}7\right)\sec\left(\frac{4\pi}7\right)\sec\left(\frac{6\pi}7\right)=8\tag6
$$


TITLE: Discrete Math - Proving Distributive Laws for Sets by induction
QUESTION [3 upvotes]: I'm working on doing a proof by induction on this question:
Use induction to prove that if $X_1, . . . , X_n$ and $X$ are sets, then
$X∩(X_1∪X_2∪· · ·∪X_n) = (X∩X_1)∪(X∩X_2)∪· · ·∪(X∩X_n)$.
I've shown the basis case:
$X∩X_1 = X∩X_1$
But I'm having difficulty proving the $n + 1$ case. This is my work so far:
Assume $X∩(X_1∪X_2∪· · ·∪X_n) = (X∩X_1)∪(X∩X_2)∪· · ·∪(X∩X_n)$
Show $X∩(X_1∪X_2∪· · ·∪X_n∪X_{n+1}) = (X∩X_1)∪(X∩X_2)∪· · ·∪(X∩X_n) = (X∩X_1)∪(X∩X_2)∪· · ·∪(X∩X_n)∪(X∩X_{n+1})$
I'm not sure what I'm allowed to do from here. Where can I use the induction hypothesis?

REPLY [3 votes]: Tip show: $X\cap(Y\cup X_{n+1})=(X\cup Y)\cap(X\cup X_{n+1})$ where $Y=X_1\cup\cdots\cup X_n$


TITLE: How to prove that the Gram matrix $A^TA$ is symmetric with nonnegative diagonal elements?
QUESTION [2 upvotes]: If A is any real $m \times n$ matrix, then $A^TA$ is called the Gram matrix of $A$. Show that the Gram matrix of $A$ is always symmetric with nonnegative diagonal elements.

I have tried several matrices to prove that this is true but im not sure how I go about showing for a general matrix that this always holds true. Please help.

REPLY [0 votes]: Some hints:
for first part, use $(AB)^T=B^TA^T$
for second part, use $a_{ii}=e_i^TA^TAe_i=(Ae_i)^T(Ae_i)=||Ae_i||^2\geq0$. ($e_i$ is $i^{th}$ column of identity matrix)