%~Mouliné par MaN_auto v.0.39.2 (60cbe62a) 2026-03-06 09:41:32
\documentclass[CRMATH,Unicode,biblatex]{cedram}

\TopicFR{Algèbre}
\TopicEN{Algebra}

\addbibresource{CRMATH_Das_20240157.bib}

\usepackage{amssymb}
\usepackage[all,cmtip]{xy}
\usepackage{mathtools}
\usepackage{varwidth}

\newcommand{\equalto}[2]{\underbrace{#1}_{= #2}}

\newcommand{\dif}{\mathop{}\!{\operatorfont{d}}}

\DeclareMathOperator{\Ext}{Ext}
\DeclareMathOperator{\Gr}{Gr}
\DeclareMathOperator{\Hom}{Hom}
\DeclareMathOperator{\id}{id}
\DeclareMathOperator{\image}{im}

\newcommand{\ad}{\mathrm{ad}}
\newcommand{\Ass}{\mathrm{Ass}}
\newcommand{\AssBimod}{\mathrm{AssBimod}}
\newcommand{\Diass}{\mathrm{Diass}}
\newcommand{\Avg}{\mathrm{Avg}}
\newcommand{\rAvg}{\mathrm{rAvg}}
\newcommand{\Hoch}{\mathrm{Hoch}}
\newcommand{\MM}{\mathrm{MM}}
\newcommand{\Gersten}{\mathrm{G}}

\newcommand{\Ring}{R}

\newcommand{\catDiass}{\mathsf{Diass}}
\newcommand{\catrAvg}{\mathsf{rAvg}}

\let\oldprescript\prescript
\renewcommand{\prescript}[1]{\oldprescript{#1}\!\!}

\newcommand{\vide}{\,\cdot\,,\cdot\,}


%%%---------------------------------------------------------------------------

%%% ARROWS

%%% \to
\renewcommand*{\to}{\mathchoice{\longrightarrow}{\rightarrow}{\rightarrow}{\rightarrow}}

%%% \mapsto
\let\oldmapsto\mapsto
\renewcommand*{\mapsto}{\mathchoice{\longmapsto}{\oldmapsto}{\oldmapsto}{\oldmapsto}}

%%% \longhookrightarrow
\newcommand{\longhookrightarrow}{\!\lhook\joinrel\longrightarrow}

%%%% \longsrightsquigarrow
\newcommand{\longrightsquigarrow}{\relbar\joinrel\rightsquigarrow}

%%%---------------------------------------------------------------------------

%%% BAR & OVERLINE

%%% Better widebar macro

\let\oldoverline\overline

\makeatletter
\let\save@mathaccent\mathaccent
\newcommand*\if@single[3]{%
 \setbox0\hbox{${\mathaccent"0362{#1}}^H$}%
 \setbox2\hbox{${\mathaccent"0362{\kern0pt#1}}^H$}%
 \ifdim\ht0=\ht2 #3\else #2\fi
}
%The bar will be moved to the right by a half of \macc@kerna, which is computed by amsmath:
\newcommand*\rel@kern[1]{\kern#1\dimexpr\macc@kerna}
%If there's a superscript following the bar, then no negative kern may follow the bar;
%an additional {} makes sure that the superscript is high enough in this case:
\newcommand*\widebar[1]{\@ifnextchar^{{\wide@bar{#1}{0}}}{\wide@bar{#1}{1}}}
%Use a separate algorithm for single symbols:
\newcommand*\wide@bar[2]{\if@single{#1}{\wide@bar@{#1}{#2}{1}}{\wide@bar@{#1}{#2}{2}}}
\newcommand*\wide@bar@[3]{%
 \begingroup
 \def\mathaccent##1##2{%
%Enable nesting of accents:
 \let\mathaccent\save@mathaccent
%If there's more than a single symbol, use the first character instead (see below):
 \if#32 \let\macc@nucleus\first@char \fi
%Determine the italic correction:
 \setbox\z@\hbox{$\macc@style{\macc@nucleus}_{}$}%
 \setbox\tw@\hbox{$\macc@style{\macc@nucleus}{}_{}$}%
 \dimen@\wd\tw@
 \advance\dimen@-\wd\z@
%Now \dimen@ is the italic correction of the symbol.
 \divide\dimen@ 3
 \@tempdima\wd\tw@
 \advance\@tempdima-\scriptspace
%Now \@tempdima is the width of the symbol.
 \divide\@tempdima 10
 \advance\dimen@-\@tempdima
%Now \dimen@ = (italic correction / 3) - (Breite / 10)
 \ifdim\dimen@>\z@ \dimen@0pt\fi
%The bar will be shortened in the case \dimen@<0 !
 \rel@kern{0.6}\kern-\dimen@
 \if#31
 \oldoverline{\rel@kern{-0.6}\kern\dimen@\macc@nucleus\rel@kern{0.4}\kern\dimen@}%
 \advance\dimen@0.4\dimexpr\macc@kerna
%Place the combined final kern (-\dimen@) if it is >0 or if a superscript follows:
 \let\final@kern#2%
 \ifdim\dimen@<\z@ \let\final@kern1\fi
 \if\final@kern1 \kern-\dimen@\fi
 \else
 \oldoverline{\rel@kern{-0.6}\kern\dimen@#1}%
 \fi
}%
 \macc@depth\@ne
 \let\math@bgroup\@empty \let\math@egroup\macc@set@skewchar
 \mathsurround\z@ \frozen@everymath{\mathgroup\macc@group\relax}%
 \macc@set@skewchar\relax
 \let\mathaccentV\macc@nested@a
%The following initialises \macc@kerna and calls \mathaccent:
 \if#31
 \macc@nested@a\relax111{#1}%
 \else
%If the argument consists of more than one symbol, and if the first token is
%a letter, use that letter for the computations:
 \def\gobble@till@marker##1\endmarker{}%
 \futurelet\first@char\gobble@till@marker#1\endmarker
 \ifcat\noexpand\first@char A\else
 \def\first@char{}%
 \fi
 \macc@nested@a\relax111{\first@char}%
 \fi
 \endgroup
}
\makeatother

\renewcommand*{\overline}[1]{{\mathchoice{\widebar{#1}}{\widebar{#1}}{\widebar{#1}}{\bar{#1}}}}

%%%---------------------------------------------------------------------------

%%% DELIMITERS

\DeclarePairedDelimiter{\parens}{\lparen}{\rparen}
\DeclarePairedDelimiter{\braces}{\{}{\}}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\bracks}{[}{]}
\newcommand{\bbracks}[1]{\mathopen{[\mkern -2.7mu[} #1 \mathclose{]\mkern -2.7mu]}}
\newcommand{\lgrbracket}{\{\mkern -2.4mu[}
\newcommand{\rgrbracket}{]\mkern -2.4mu\}}
\newcommand{\grbracks}[1]{\lgrbracket #1 \rgrbracket}
\newcommand{\biglgrbracket}{\bigl\{\mkern -2.8mu\bigl[}
\newcommand{\bigrgrbracket}{\bigr]\mkern -2.8mu\bigr\}}
\newcommand{\biggrbracks}[1]{\biglgrbracket #1 \bigrgrbracket}

%%%---------------------------------------------------------------------------

%%% ENVIRONEMENTS

%%% Env. {case} for CRMATH
\newcounter{case}
\newenvironment{case}{\refstepcounter{case}\begin{proof}[{Case~\thecase}]}{\let\qed\relax\end{proof}}

%%%---------------------------------------------------------------------------

%%% VERTICAL BAR

%%% ''Evaluated at'' macro for CRAS
\newcommand\disprestr[3][]{{				
 \left.\kern-\nulldelimiterspace 
 #2 								
 \vphantom{\big\vert} 				
 \right\vert_{#3}^{#1}
}}
\newcommand{\restr}[3][]{
	\mathchoice{\disprestr[#1]{#2}{#3}}
			  {\disprestr[#1]{#2}{#3}}
			  {#2\rvert_{#3}^{#1}}
			  {#2\rvert_{#3}^{#1}}
	}

%%% ''Such that'' macro
\newcommand*{\st}[1][]{\;#1\vert\;}

%%%---------------------------------------------------------------------------

%%% TREES

\newcommand{\Yone}[1]{
\begin{tikzpicture}[scale=#1,baseline={([yshift=-.5ex]current bounding box.center)}]
\draw (-4,-2)-- (-2,0); \draw (-4,-2) -- (-4,-4); \draw (-6,0) -- (-4,-2);
\end{tikzpicture}}

\newcommand{\Ytwoa}[1]{
\begin{tikzpicture}[scale=#1,baseline={([yshift=-.5ex]current bounding box.center)}]
\draw (6,0) -- (8,-2); \draw (8,-2) -- (10,0); \draw (8,-2) -- (8,-4); \draw (9,-1) -- (8,0);
\end{tikzpicture}}

\newcommand{\Ytwob}[1]{
\begin{tikzpicture}[scale=#1,baseline={([yshift=-.5ex]current bounding box.center)}]
\draw (0,0) -- (2,-2); \draw (2,-2) -- (4,0); \draw (2,-2) -- (2,-4); \draw (1,-1) -- (2,0);
\end{tikzpicture}}

%%%---------------------------------------------------------------------------

\graphicspath{{./figures/}}

\newcommand*{\mk}{\mkern -1mu}
\newcommand*{\Mk}{\mkern -2mu}
\newcommand*{\mK}{\mkern 1mu}
\newcommand*{\MK}{\mkern 2mu}

\hypersetup{urlcolor=purple, linkcolor=blue, citecolor=red}

\newcommand*{\relabel}{\renewcommand{\labelenumi}{(\theenumi)}}
\newcommand*{\romanenumi}{\renewcommand*{\theenumi}{\roman{enumi}}\relabel}
\newcommand*{\Romanenumi}{\renewcommand*{\theenumi}{\Roman{enumi}}\relabel}
\newcommand*{\alphenumi}{\renewcommand*{\theenumi}{\alph{enumi}}\relabel}
\newcommand*{\Alphenumi}{\renewcommand*{\theenumi}{\Alph{enumi}}\relabel}
\let\oldtilde\tilde
\renewcommand*{\tilde}[1]{\mathchoice{\widetilde{#1}}{\widetilde{#1}}{\oldtilde{#1}}{\oldtilde{#1}}}
\let\oldhat\hat
\renewcommand*{\hat}[1]{\mathchoice{\widehat{#1}}{\widehat{#1}}{\oldhat{#1}}{\oldhat{#1}}}

\title{Controlling structures, deformations and homotopy theory for averaging algebras}
\alttitle{Structures de contôle, déformations et théorie de l'homotopie pour les algèbres de moyenne}

\author{\firstname{Apurba} \lastname{Das}}
\address{Department of Mathematics, Indian Institute of Technology, Kharagpur 721302, West Bengal, India}
\email{apurbadas348@maths.iitkgp.ac.in}

\subjclass{16D20, 16W99, 16E40, 16S80}

\keywords{\kwd{Averaging algebras} \kwd{diassociative algebras} \kwd{$L_\infty$-algebras} \kwd{deformations} \kwd{homotopy structures}}
\altkeywords{\kwd{Algèbres moyennes} \kwd{algèbres diassociatives} \kwd{algèbres $L_\infty$} \kwd{déformations} \kwd{structures d'homotopie}}

\begin{abstract}
An averaging operator on an associative algebra $A$ is an algebraic abstraction of the time average operator on the space of real-valued functions defined in time-space. In this paper, we consider relative averaging operators on a bimodule $M$ over an associative algebra $A$. A relative averaging operator induces a diassociative algebra structure on the space $M$. The full data consisting of an associative algebra, a bimodule and a relative averaging operator is called a relative averaging algebra. We define bimodules over a relative averaging algebra that fits with the representations of diassociative algebras. We construct a graded Lie algebra and an $L_\infty$-algebra that are respectively controlling algebraic structures for a given relative averaging operator and relative averaging algebra. We also define cohomologies of relative averaging operators and relative averaging algebras and find a long exact sequence connecting various cohomology groups. As applications, we study deformations and abelian extensions of relative averaging algebras. Finally, we define homotopy relative averaging algebras and show that they induce homotopy diassociative algebras.
\end{abstract}

\begin{altabstract}
Un opérateur de moyenne sur une algèbre associative $A$ est une abstraction algébrique de l'opérateur de moyenne temporel sur l'espace des fonctions à valeurs réelles définies dans l'espace-temps. Dans cet article, nous considérons les opérateurs de moyenne relatifs sur un bimodule $M$ sur une algèbre associative $A$. Un opérateur de moyenne relatif induit une structure d'algèbre diassociative sur l'espace $M$. La donnée d'une algèbre associative, d'un bimodule et d'un opérateur de moyenne relatif est appelée algèbre de moyenne relative. Nous définissons des bimodules sur une algèbre de moyenne relative qui s'adaptent aux représentations des algèbres diassociatives. Nous construisons une algèbre de Lie graduée et une algèbre $L_\infty$ qui contrôlent les structures algébriques pour, respectivement, un opérateur de moyenne relatif et une algèbre de moyenne relative donnés. Nous définissons également la cohomologie des opérateurs de moyenne relatifs et des algèbres de moyenne relatives et trouvons une suite exacte longue reliant divers groupes de cohomologie. Comme application, nous étudions les déformations et les extensions abéliennes des algèbres de moyenne relatives. Enfin, nous définissons les algèbres de moyenne relatives homotopiques et montrons qu'elles induisent des algèbres diassociatives homotopiques.
\end{altabstract}

\begin{document}
%\input{CR-pagedemetas}
%\end{document}
\maketitle

\section{Introduction}\label{sec-intro}

The notion of averaging operator was first implicitly studied by O.~Reynolds in 1895~\cite{rey} in the turbulence theory of fluid dynamics. In the mathematical study of turbulence theory, such an operator appears as the time average operator of real-valued functions defined in time-space
\[
f(x,t) \mapsto \overline{f}(x,t) = \lim_{T \to \infty} \frac{1}{2T} \int_{-T}^T f(x, t + \tau) \dif \tau.
\]
The explicit description of an averaging operator was first defined by Kamp\'{e} de F\'{e}riet~\cite{kampe,kampe_II}. Let $A$ be an associative algebra. A linear map $P \colon A \to A$ is said to be an averaging operator on $A$ if
\begin{equation}\label{paper-first}
P(a) \cdot P(b) = P \parens[\big]{P(a) \cdot b} = P \parens[\big]{a \cdot P(b)},
\quad \text{for $a, b \in A$}.
\end{equation}
A pair $(A, P)$ consisting of an associative algebra $A$ and an averaging operator $P \colon A \to A$ is called an averaging algebra. In the last century, most studies on averaging operators have been done for various areas of functional analysis and applied mathematics. For the convenience of the reader, here we mention a few. In~\cite{birkhoff} G.~Birkhoff showed that a positive bounded projection operator on the Banach algebra $C(X)$ of real-valued continuous functions on a compact Hausdorff space $X$ is an idempotent averaging operator. Later, J.L.~Kelley~\cite{kelly} characterized idempotent averaging operators on the algebra $C_\infty(X)$ of real-valued continuous functions on a locally compact Hausdorff space $X$ that vanish at the infinity. In~\cite{gam-mill,mill}, J.L.B.~Gamlen and J.B.~Miller discussed spectrum and resolvent sets of averaging operators on Banach algebras. Besides all these, averaging operators are also studied in connection with probability theory. In~\cite{moy} S.-T.C.~Moy found relations between averaging operators, conditional expectations and general integration theory.

In the algebraic study of averaging operators, B.~Brainerd~\cite{brain} considered the conditions for which an averaging operator can be realized as a generalization of the integral operator on the ring of real-valued measurable functions. In 2000, W.~Cao~\cite{cao} studied averaging operators from algebraic and combinatorial points of view. In particular, he studied free commutative averaging algebras and described the induced Lie and Leibniz algebras. During the same period, J.-L.~Loday~\cite{loday-di} introduced a notion of diassociative algebra to study the universal enveloping algebra of a Leibniz algebra. A diassociative algebra is a vector space equipped with two associative multiplications satisfying three other associative-like compatibilities. M.~Aguiar~\cite{aguiar-pre} showed that an averaging operator on an associative algebra induces a diassociative algebra structure. The general algebraic study of averaging operators on any binary operad and their relations with bisuccessors, duplicators and Rota--Baxter operators on operad was systematically developed in~\cite{pei-rep,pei-rep2,bai-imrn}. More recently, J.~Pei and L.~Guo~\cite{pei-guo} constructed free associative averaging algebras using a class of bracketed words, called averaging words, and discovered their relations with Schr\"{o}der numbers. Averaging operators also appeared in the context of Lie algebras. They are often called embedding tensors and find important connections with Leibniz algebras, tensor hierarchies and higher gauge theories~\cite{bon,lavau,strobl}. In~\cite{kotov} Kotov and Strobl constructed an $L_\infty$-algebra from an embedding tensor that explains the tensor hierarchy of the bosonic sector of gauged supergravity theories. In~\cite{sheng-embedding} Y.~Sheng, R.~Tang and C.~Zhu studied the cohomology and deformations of embedding tensors by considering the controlling algebras. See also~\cite{das-rota,sheng-guo} for cohomological study of Rota--Baxter operators.

In this paper, we consider the notion of a relative averaging operator as a generalization of an averaging operator. Let $A$ be an associative algebra and $M$ be an $A$-bimodule. A linear map $P \colon M \to A$ is called a relative averaging operator (on $M$ over the algebra $A$) if it satisfies the identity~\eqref{avg-iden}, which generalizes~\eqref{paper-first}. A triple $(A, M, P)$ consisting of an associative algebra $A$, an $A$-bimodule $M$ and a relative averaging operator $P$ is called a relative averaging algebra. For our convenience, we denote a relative averaging algebra $(A,M,P)$ by the notation $M \overset{P}{\to} A$. We give some characterizations of a relative averaging operator. We also construct the free relative averaging algebra over any $2$-term chain complex $V \overset{f}{\to} W$. Next, we show that a relative averaging algebra naturally induces a diassociative algebra structure. Conversely, any diassociative algebra is induced from a suitable relative averaging algebra constructed from the given diassociative algebra. We also define a notion of bimodule over a relative averaging algebra and construct the corresponding semidirect product. We show that a bimodule over a relative averaging algebra gives rise to some representations of the induced diassociative algebra.

Then we first focus on the cohomology of relative averaging operators. Given an associative algebra $A$ and an $A$-bimodule $M$, we construct a graded Lie algebra that characterizes relative averaging operators as its Maurer--Cartan elements. This graded Lie algebra is obtained by applying the derived bracket construction to the graded Lie algebra constructed by Majumdar and Mukherjee~\cite{maj-muk}. Using this characterization, we can define the cohomology of a relative averaging operator. We further show that this cohomology can be seen as the cohomology of the induced diassociative algebra with coefficients in a suitable representation. We also remark that this cohomology can be used to study formal deformations of the relative averaging operator by keeping the underlying algebra and the bimodule intact. Next, we focus on the cohomology of relative averaging algebras. To do this, we first construct an $L_\infty$-algebra that characterizes relative averaging algebras as its Maurer--Cartan elements. This helps us to define the cohomology of a relative averaging algebra (with coefficients in the {adjoint bimodule}). Subsequently, we consider the cohomology of a relative averaging algebra with coefficients in an arbitrary bimodule.

In the next, we give two applications of our cohomology theory of relative averaging algebras. At first, we consider deformations of a relative averaging algebra $M \overset{P}{\to} A$, where we simultaneously deform the associative multiplication on $A$, the $A$-bimodule structure on $M$ and the relative averaging operator $P$. In particular, we consider formal and infinitesimal deformations of a relative averaging algebra. Our main result in deformation theory classifies the equivalence classes of infinitesimal deformations of a relative averaging algebra $M \overset{P}{\to} A$ by the second cohomology group \smash{${H^2_{\rAvg}(M \overset{P}{\to} A)}$}. Another application of the cohomology theory is to classify abelian extensions. More precisely, we consider abelian extensions of a relative averaging algebra $M \overset{P}{\to} A$ by a bimodule and show that isomorphism classes of such abelian extensions are classified by the second cohomology group of the relative averaging algebra $M \overset{P}{\to} A$ with coefficients in the bimodule.

In the final part of the paper, we define homotopy relative averaging operators. Like relative averaging operators are defined on bimodules over an associative algebra, a homotopy relative averaging operator is defined on a representation space over an $A_\infty$-algebra. Given an $A_\infty$-algebra and a representation of it, we construct a suitable $L_\infty$-algebra $\parens[\big]{\mathfrak{a}, \{l_k\}_{k=1}^\infty}$. This $L_\infty$-algebra is a generalization of the graded Lie algebra that characterizes relative averaging operators as Maurer--Cartan elements. Motivated by this, we define a homotopy relative averaging operator as a Maurer--Cartan element of the $L_\infty$-algebra $\parens[\big]{\mathfrak{a}, \{l_k\}_{k=1}^\infty}$. A triple consisting of an $A_\infty$-algebra, a representation and a homotopy relative averaging operator is called a homotopy relative averaging algebra. We show that a homotopy relative averaging algebra induces a $\Diass_\infty$-algebra (strongly homotopy diassociative algebra) structure. This generalizes our previous result that a relative averaging algebra induces a diassociative algebra. Finally, we show that a $\Diass_\infty$-algebra gives rise to a homotopy relative averaging algebra.

\paragraph{Note}
It is important to mention that Wang and Zhou~\cite{wang-av} recently considered the cohomology and deformation theory of an averaging algebra. In their approach, they only considered the fact that an averaging algebra induces two new associative algebra structures. However, they have not used the fact that the induced two associative structures form a diassociative algebra. In the present paper, we first point out the intimate relationships between averaging algebras and diassociative algebras (see Proposition~\ref{l-adj-fun}). In our knowledge, diassociative algebra is the key object for the study of (relative) averaging algebras. In Proposition~\ref{n-mult}, we show that the cohomology of a relative averaging operator can be seen as the cohomology of the induced diassociative algebra with coefficients in a suitable representation. In Theorem~\ref{n-func}, we find a cohomological relation between relative averaging operators and induced diassociative algebras. Since Wang and Zhou didn't consider the full diassociative algebra (as the induced structure), the above important results no longer exist in their approach. In our paper, we showed many other results which indicate that diassociative algebras are required to study relative averaging operators (cf.\ Proposition~\ref{grph}, and Theorems~\ref{mc-thm-opp}, \ref{ll-iinnff} and~\ref{mc-ravg-thm}). Thus, we believe that our approach and the constructions (including all the graded Lie algebras and $L_\infty$-algebras) are appropriate to deal with relative averaging algebras.

\paragraph{Organization of our paper}
In Section~\ref{sec-2}, we recall some basic preliminaries on the cohomology of diassociative algebras. In Section~\ref{sec-3}, we consider relative averaging operators and relative averaging algebras which are the main objects of our study. We also define and study bimodules over a relative averaging algebra. The Maurer--Cartan characterizations and cohomology of relative averaging operators and relative averaging algebras are respectively considered in Sections~\ref{sec-4} and~\ref{sec-5}. Applications of cohomology include deformations and abelian extensions of relative averaging algebras which are respectively studied in Sections~\ref{sec-6} and~\ref{sec-7}. Finally, in Section~\ref{sec-8}, we define homotopy relative averaging algebras and find relations with $\Diass_\infty$-algebras.

All vector spaces, linear maps and tensor products are over a field $\mathbf{k}$ of characteristic $0$.

\section{Background on diassociative algebras}\label{sec-2}

In this section, we recall some necessary background on diassociative algebras. In particular, we describe the cohomology theory of diassociative algebras. Our main references are~\cite{loday-di,frab,maj-muk}.

The notion of diassociative algebras was introduced by Loday in the study of Leibniz algebras~\cite{loday-di}. The cohomology theory of diassociative algebras was developed by Frabetti~\cite{frab} and further studied by Majumdar and Mukherjee~\cite{maj-muk}.

\begin{defi}
A \emph{diassociative algebra} is a vector space $D$ equipped with two bilinear operations $\dashv, \vdash \colon D \times D \to D$ that satisfy the following five identities:
\begin{equation}\label{di-id}
\begin{cases}
	(a \dashv b) \dashv c = a \dashv (b \dashv c) = a \dashv (b \vdash c),
\\	(a \vdash b) \dashv c = a \vdash (b \dashv c),
\\	(a \dashv b) \vdash c = (a \vdash b) \vdash c = a \vdash (b \vdash c),
\end{cases}
\end{equation}
for $a,b, c \in D$. A diassociative algebra as above may be denoted by the triple $(D, \dashv, \vdash)$ or simply by~$D$.
\end{defi}

It follows from the above definition that both the bilinear operations $\dashv$ and $\vdash$ in a diassociative algebra are associative products. Moreover, these two associative products additionally satisfy three associative-like identities. Thus, any associative algebra $A$ can be regarded as a diassociative algebra in which both the operations $\dashv$ and $\vdash$ are the given associative multiplication on~$A$.

Let $(D, \dashv, \vdash)$ be a diassociative algebra. A \emph{representation} of the diassociative algebra is a vector space $M$ equipped with four bilinear operations (called action maps)
\[
\dashv \colon D \times M \to M,
\qquad \vdash \colon D \times M \to M,
\qquad \dashv \colon M \times D \to M
\qquad \text{and}
\qquad \vdash \colon M \times D \to M
\]
that satisfy fifteen identities, where each set of five identities corresponds to the identities in~\eqref{di-id} with exactly one of $a, b, c$ replaced by an element of $M$. It follows that any diassociative algebra $(D, \dashv, \vdash)$ is a representation of itself, called the adjoint representation.

Before we recall the cohomology of diassociative algebras, we need some notations about planar binary trees. A planar binary tree with $n$-vertices (often called an $n$-tree) is a planar tree with $(n+1)$ leaves, one root and each vertex trivalent. Let $Y_n$ be the set of all $n$-trees (for $n \geq 1$) and $Y_0$ be the set consisting of a root only, i.e.
\begin{gather*}
Y_0 = \braces[\Bigg]{\quad
\begin{tikzpicture}[scale=0.2,baseline={([yshift=-.5ex]current bounding box.center)}]
\draw (0,0) -- (0,-4);
\end{tikzpicture} \quad},
\qquad Y_1 = \braces[\Bigg]{\Yone{0.2}},
\qquad Y_2 = \braces[\Bigg]{\Ytwoa{0.2}, \Ytwob{0.2}},
\\
Y_3 = \braces[\Bigg]{
\begin{tikzpicture}[scale=0.2,baseline={([yshift=-.5ex]current bounding box.center)}]
\draw (36,0) -- (38, -2) ; \draw (38, -2) -- (38, -4) ; \draw (38, -2) -- (40, 0); \draw (37.33, 0) -- (38.67, - 1.33) ; \draw (38.66, 0) -- (39.34, -0.66);
\end{tikzpicture},
\begin{tikzpicture}[scale=0.2,baseline={([yshift=-.5ex]current bounding box.center)}]
\draw (30,0) -- (32,-2); \draw (32, -2) -- (32, -4); \draw (32,-2) -- (34, 0); \draw (31.33, 0) -- (32.67, -1.33) ; \draw (32.66, 0) -- (32, -0.66);
\end{tikzpicture},
\begin{tikzpicture}[scale=0.2,baseline={([yshift=-.5ex]current bounding box.center)}]
\draw (24,0)-- (26,-2); \draw (26,-2)-- (26,-4); \draw (26,-2) -- (28,0); \draw (25.33, 0) -- (24.66, -0.66); \draw (26.66, 0) -- (27.34, -0.66);
\end{tikzpicture},
\begin{tikzpicture}[scale=0.2,baseline={([yshift=-.5ex]current bounding box.center)}]
\draw (18,0) -- (20,-2); \draw (20, -2) -- (20, -4); \draw (20, -2) -- (22,0); \draw (19.33, -1.33) -- (20.66, 0); \draw (19.33, 0) -- (20, -0.66);
\end{tikzpicture},
\begin{tikzpicture}[scale=0.2,baseline={([yshift=-.5ex]current bounding box.center)}]
\draw (12,0)-- (14,-2); \draw (14,-2) -- (14,-4); \draw (14, -2) -- (16,0); \draw (12.7, - 0.7) -- (13.3333, 0) ; \draw (13.33, -1.33) -- (14.66, 0);
\end{tikzpicture}},
\quad \text{etc.}
\end{gather*}
Note that the cardinality of $Y_n$ is given by the $n$-th Catalan number $\frac{(2n)\mathpunct{!}}{(n+1)\mathpunct{!} n\mathpunct{!}}$. The grafting of an $m$-tree $y_1 \in Y_m$ and an $n$-tree $y_2 \in Y_n$ is an $(m+n+1)$-tree $y_1 \vee y_2 \in Y_{m+n+1}$ obtained by joining the roots of $y_1$ and $y_2$ to a new vertex and creating a new root from that vertex. Given an $n$-tree $y \in Y_n$, we label the $n+1$ leaves of $y$ by $\{0, 1, 2, \dots, n\}$ from left to right. For each $n \geq 1$ and $0 \leq i \leq n$, there is a map (called the $i$-th face map) $d_i \colon Y_n \to Y_{n-1}$, $y \mapsto d_i y$, which is obtained by removing the $i$-th leaf of $y$. Also there are maps $\star_i \colon Y_n \to \{\dashv, \vdash\}$, $y \mapsto \star_i^y$ (for $0 \leq i \leq n$), which are defined as follows:
\begin{align*}
	\star_0^y & =
\begin{cases}
	\dashv & \text{if $y= | \vee y_1$ for some $(n-1)$-tree $y_1$},
\\	\vdash & \text{otherwise},
\end{cases}
\\	\text{(for $1 \leq i \leq n-1$)} \quad \star_i^y & =
\begin{cases}
	\dashv & \text{if the $i$-th leaf of $y$ is oriented like ``$\backslash$''},
\\	\vdash & \text{if the $i$-th leaf of $y$ is o riented like ``/''},
\end{cases}
\\	\star_n^y & =
\begin{cases}
	\vdash & \text{if $y= y_1 \vee |$ for some $(n-1)$-tree $y_1$},
\\	\dashv & \text{otherwise}.
\end{cases}
\end{align*}

Let $(D, \dashv, \vdash)$ be a diassociative algebra and $M$ be a representation of it. For each $n \geq 0$, we define the space $CY^n (D,M)$ of all $n$-cochains by $CY^n (D,M) \coloneqq \Hom\parens[\big]{\mathbf{k}[Y_n] \otimes D^{\otimes n}, M}$. Then there is a map $\delta_{\Diass} \colon CY^n(D,M) \to CY^{n+1}(D,M)$ given by
\begin{multline*}
\delta_{\Diass}(f) (y; a_1, \dots, a_{n+1}) = a_1 \star_0^y f (d_0 y; a_2, \dots, a_{n+1})
\\	+ \sum_{i=1}^n (-1)^i f (d_i y; a_1, \dots, a_i \star_i^y a_{i+1}, \dots, a_{n+1}) + (-1)^{n+1} f(d_{n+1} y; a_1, \dots, a_n) \star_{n+1}^y a_{n+1},
\end{multline*}
for $f \in CY^n (D,M)$, $y \in Y_{n+1}$ and $a_1, \dots, a_{n+1} \in D$. Then it has been shown by Frabetti~\cite{frab} that $(\delta_{\Diass})^2 = 0$. In other words, $\braces[\big]{CY^\bullet(D, M), \delta_{\Diass}}$ is a cochain complex. The corresponding cohomology is called the \emph{cohomology} of the diassociative algebra $(D, \dashv, \vdash)$ with coefficients in the representation $M$. We denote the $n$-th cohomology group by $H^n_{\Diass} (D,M)$.

In~\cite{maj-muk} Majumdar and Mukherjee constructed a graded Lie algebra whose Maurer--Cartan elements correspond to diassociative algebra structures on a given vector space (see also~\cite{yau}). To describe their graded Lie bracket in a more simple form, we define maps $R_0^{m; i, n} \colon Y_{m+n-1} \to Y_m$ and $R_i^{m; i, n} \colon Y_{m+n-1} \to Y_n$ (for $m, n \geq 1$ and $1 \leq i \leq m$) by
\begin{align}
	R_0^{m; i, n} (y) = \widehat{d_0} \circ \widehat{d_1} \circ \dots \circ \widehat{d_{i-1}} \circ d_i \circ \dots \circ d_{i+n-2} \circ \widehat{d_{i + n-1}} \circ \dots \circ \widehat{d_{m+n-1}} (y), \label{r0-maps}
\\	R_i^{m; i, n} (y) = d_0 \circ d_1 \circ \dots \circ d_{i-2} \circ \widehat{d_{i-1}} \circ \dots \circ \widehat{d_{i+n-1}} \circ d_{i+n} \circ \dots \circ d_{m+n-1} (y), \label{ri-maps}
\end{align}
where $\widehat{~}$ means that the term is missing from the expression. Let $D$ be a vector space (not necessarily a diassociative algebra). They showed that the graded vector space $CY^\bullet (D, D) = \bigoplus_{n = 1}^\infty CY^n (D,D) = \bigoplus_{n = 1}^\infty \Hom\parens[\big]{\mathbf{k}[Y_n] \otimes D^{\otimes n}, D}$ inherits a degree $-1$ graded Lie bracket (which we call the Majumdar--Mukherjee bracket) given by
\begin{equation}\label{mm-circ}
[f, g]_{\MM} \coloneqq \parens[\Bigg]{\sum_{i=1}^m (-1)^{(i-1)(n-1)} f \circ_i g} - (-1)^{(m-1)(n-1)} \parens[\Bigg]{\sum_{i=1}^n (-1)^{(i-1)(m-1)} g \circ_i f},
\end{equation}
where
\begin{multline}\label{partial-comp}
(f \circ_i g) (y; a_1, \dots, a_{m+n-1})
\\	= f \parens[\big]{R_0^{m;i,n} (y) ; a_1, \dots, a_{i-1}, g \parens[\big]{R_i^{m;i,n} (y); a_i, \dots, a_{i+n-1}}, a_{i+n}, \dots, a_{m+n-1}},
\end{multline}
for $f \in CY^m(D,D)$, $g \in CY^n(D, D)$, $y \in Y_{m+n-1}$ and $a_1, \dots, a_{m+n-1} \in D$ (see also~\cite{yau,das-jpaa} for more details). In other words, $\parens[\big]{CY^{\bullet +1} (D,D) = \bigoplus_{n = 0}^\infty CY^{n+1} (D,D), [\vide]_{\MM}}$ is a graded Lie algebra. An element $\pi \in CY^2 (D,D)$ determines (and determined by) two bilinear maps $\dashv, \vdash \colon D \times D \to D$ given~by
\begin{align}
a \dashv b = \pi \parens[\big]{\Ytwoa{0.08} ; a, b}
\quad \text{and}
\quad a \vdash b = \pi \parens[\big]{\Ytwob{0.08} ; a, b},
\quad \text{for $a, b \in D$}.
\end{align}
Then it has been shown in~\cite{maj-muk} that $\pi$ defines a Maurer--Cartan element in the above graded Lie algebra if and only if $(\dashv, \vdash)$ defines a diassociative algebra structure on $D$.

\begin{rema}
Let $(D, \dashv, \vdash)$ be a diassociative algebra. Consider the corresponding Maurer--Cartan element $\pi$ in the graded Lie algebra $ \parens[\big]{CY^{\bullet +1} (D,D) = \bigoplus_{n = 0}^\infty CY^{n+1} (D,D), [\vide]_{\MM}}$. Then the coboundary map $\delta_{\Diass} \colon CY^n (D,D) \to CY^{n+1}(D,D)$ of the diassociative algebra $D$ with coefficients in the adjoint representation is simply given by
\[
\delta_{\Diass} (f) = (-1)^{n-1} [\pi, f]_{\MM},
\quad \text{for $f \in CY^n (D,D)$}.
\]
\end{rema}

\section{Relative averaging operators and relative averaging algebras}\label{sec-3}

In this section, we first introduce relative averaging operators, relative averaging algebras and provide various examples. Next, we consider the close relationship between relative averaging algebras and diassociative algebras. Finally, we define and study bimodules over relative averaging algebras.

\begin{defi}\label{first-defn}
\
\begin{enumerate}[leftmargin=*]
\item \label{first-defn_i} Let $A$ be an associative algebra and $M$ be an $A$-bimodule. A \emph{relative averaging operator} on $M$ over the algebra $A$ is a linear map $P \colon M \to A$ that satisfies
\begin{align}\label{avg-iden}
P(u) \cdot P(v) = P \parens[\big]{P(u) \cdot_M v} = P \parens[\big]{u \cdot_M P(v)},
\quad \text{for $u, v \in M$}.
\end{align}
Here $\cdot$ denotes the associative multiplication on $A$ and $\cdot_M$ denotes both the left and right $A$-actions on $M$.
\item \label{first-defn_ii} A \emph{relative averaging algebra} is a triple $(A, M, P)$ consisting of an associative algebra $A$, an $A$-bimodule $M$ and a relative averaging operator $P \colon M \to A$.
\end{enumerate}
\end{defi}

For our convenience, we denote a relative averaging algebra $(A, M, P)$ by the notation $M \overset{P}{\to} A$. Hence $(A, M, P)$ and $M \overset{P}{\to} A$ represent the same mathematical structure.

\begin{defi}\label{defn-morp}
Let $M \overset{P}{\to} A$ and $M' \overset{P'}{\to} A'$ be two relative averaging algebras. A \emph{morphism} of relative averaging algebras from $M \overset{P}{\to} A$ to $M' \overset{P'}{\to} A'$ consists of a pair $(\varphi, \psi)$ of an algebra morphism $\varphi \colon A \to A'$ and a linear map $\psi \colon M \to M'$ satisfying
\[
\psi (a \cdot_M u) = \varphi(a) \cdot_{M'}^{A'} \psi (u),
\quad \psi (u \cdot_M a) = \psi (u) \cdot_{M'}^{A'} \varphi(a)
\quad \text{and}
\quad \varphi \circ P = P' \circ \psi,
\quad \text{for all $a \in A, u \in M$}.
\]
Here $\cdot_{M'}^{A'}$ denotes both the left and right $A'$-actions on $M'$. It is said to be an \emph{isomorphism} if both $\varphi$ and $\psi$ are linear isomorphisms.
\end{defi}

\begin{exam}
Any averaging algebra $(A, P)$ can be regarded as a relative averaging algebra $A \overset{P}{\to} A$, where $A$ is equipped with the adjoint $A$-bimodule structure. Thus, a relative averaging algebra is a generalization of an averaging algebra.
\end{exam}

\begin{exam}
Let $A$ be an associative algebra. Then the tensor product $A \otimes A$ can be equipped with an $A$-bimodule structure with the left and right $A$-actions respectively given by
\[
c \cdot_{A \otimes A} (a \otimes b) = c \cdot a \otimes b
\quad \text{and}
\quad (a \otimes b) \cdot_{A \otimes A} c = a \otimes b \cdot c,
\quad \text{for $a \otimes b \in A \otimes A$, $c \in A$}.
\]
Consider the map $P \colon A \otimes A \to A$ given by $P(a \otimes b) = a \cdot b$, for $a \otimes b \in A \otimes A$. For any $a \otimes b, \: a' \otimes b' \in A \otimes A$, we have
\[
P (a \otimes b) \cdot P (a' \otimes b') = a \cdot b \cdot a' \cdot b' =
\begin{cases}
= P \parens[\big]{a \cdot b \cdot a' \otimes b'} = P \parens[\big]{P (a \otimes b) \cdot_{A \otimes A} (a' \otimes b')},\\
= P \parens[\big]{a \otimes b \cdot a' \cdot b'} = P \parens[\big]{(a \otimes b) \cdot_{A \otimes A} P (a' \otimes b')}.
\end{cases}
\]
This shows that $P \colon A \otimes A \to A$ is a relative averaging operator. Thus, $A \otimes A \overset{P}{\to} A$ is a relative averaging algebra.
\end{exam}

\begin{exam}
Let $A$ be an associative algebra. Then the space
\[
\underbrace{A \oplus \dots \oplus A}_{\text{$n$ copies}}
\]
is an $A$-bimodule where the left (resp.\ right) $A$-action is given by componentwise left (resp.\ right) multiplication map. Then it is easy to see that the map
\[
P \colon A \oplus \dots \oplus A \to A,
\quad P\parens[\big]{(a_1, \dots, a_n)} = a_1 + \dots + a_n,
\quad \text{for $(a_1, \dots, a_n) \in A \oplus \dots \oplus A$},
\]
is a relative averaging operator. In other words, $A \oplus \dots \oplus A \overset{P}{\to} A$ is a relative averaging algebra.
\end{exam}

\begin{exam}
Let $A$ be an associative algebra. Then for any $1 \leq i \leq n$, the $i$-th projection map $P_i \colon A \oplus \dots \oplus A \to A$, $(a_1, \dots, a_n) \mapsto a_i$ is a relative averaging operator. That is, $A \oplus \dots \oplus A \xrightarrow{P_i} A$ is a relative averaging algebra.
\end{exam}

\begin{exam}
Let $A$ be an associative algebra and $M$ be an $A$-bimodule. Suppose $G$ is a finite group and there are maps $G \times A \to A$, $(g, a) \mapsto \prescript{g} a$ and $G \times M \to A$, $(g, u) \mapsto \prescript{g} u$ that satisfy
\[
\prescript{g}(a \cdot_M u) = \prescript{g} a \cdot \prescript{g} u,
\qquad \prescript{g} (u \cdot_M a) = \prescript{g} u \cdot \prescript{g} a
\qquad \text{and}
\qquad \prescript{g} (\prescript{h} u) = \prescript{gh} u,
\]
for $a \in A$, $u \in M$ and $g, h \in G$. We define a map $P \colon M \to A$ by $P(u) = \sum_{g \in G} \prescript{g} u$. For any $u,v \in M$, we observe that
\begin{align*}
	P \parens[\big]{P(u) \cdot_M v} & = \sum_{h \in G} \prescript{h} \parens[\Big]{{\parens[\Big]{\sum_{g \in G} \prescript{g} u}} \cdot_{M} v} = \sum_{h \in G} {\parens[\Big]{\sum_{g \in G} \prescript{hg}u}} \cdot \prescript{h} v = {\parens[\Big]{\sum_{g \in G} \prescript{g} u}} \cdot \parens[\Big]{\sum_{h \in G} \prescript{h} v} = P(u) \cdot P(v),
\\	P \parens[\big]{u \cdot_M P(v)} & = \sum_{h \in G} \prescript{h} \parens[\Big]{u \cdot_M \parens[\Big]{\sum_{g \in G} \prescript{g} v}} = \sum_{h \in G} \prescript{h} u \cdot \parens[\Big]{\sum_{h \in G} \prescript{hg} v} = \parens[\Big]{\sum_{h \in G} \prescript{h} u} \cdot \parens[\Big]{\sum_{g \in G} \prescript{g} v} = P(u) \cdot P(v).
\end{align*}
This shows that $P \colon M \to A$ is a relative averaging operator, equivalently, $M \overset{P}{\to} A$ is a relative averaging algebra.
\end{exam}

\begin{exam}\label{mod-map}
Let $A$ be an associative algebra and $M$ be an $A$-bimodule. Let $P \colon M \to A$ be an $A$-bimodule map, i.e.
\[
P (a \cdot_M u) = a \cdot P(u)
\quad \text{and}
\quad P (u \cdot_M a) = P(u) \cdot a,
\quad \text{for $a \in A$, $u \in M$}.
\]
Then it is easy to see that $M \overset{P}{\to} A$ is a relative averaging algebra.
\end{exam}

\begin{exam}
In~\cite{loday-lm} Loday and Pirashvili introduced the category $\mathcal{LM}$ whose objects are linear maps between vector spaces. In other words, an object in $\mathcal{LM}$ is of the form $V \overset{f}{\to} W$, where $V, W$ are vector spaces and $f$ is a linear map. They equip $\mathcal{LM}$ with a tensor product which makes it a tensor category. It has been observed that an associative object in $\mathcal{LM}$ is given by a datum $M \overset{f}{\to} A$, where $A$ is an associative algebra, $M$ is an $A$-bimodule and $f$ is an $A$-bimodule map. Thus, it turns out that an associative object in $\mathcal{LM}$ is a relative averaging algebra.
\end{exam}

\begin{exam}[Crossed modules of associative algebras~\cite{wagemann}]
A crossed module of associative algebras is a quadruple $(A, M, \cdot_M, d)$ in which $A, M$ are both associative algebras and $M$ is also equipped with an $A$-bimodule structure (with both the left and right $A$-actions on $M$ being denoted by $\cdot_M$) and $d \colon M \to A$ is an algebra morphism that satisfies
\[
d (a \cdot_M u) = a \cdot du, \quad d(u \cdot_M a)= du \cdot a, \quad (du) \cdot_M v = u \cdot_M (dv) = u \diamond v,
\quad \text{for $a \in A$, $u, v \in M$}.
\]
Here $\diamond$ denotes the associative multiplication on $M$. Thus, it follows from Example~\ref{mod-map} that $M \overset{d}{\to} A$ is a relative averaging algebra.
\end{exam}

It has been observed in~\cite{wagemann,baez} that crossed modules of associative algebras are equivalent to ``strict'' associative $2$-algebras. Hence by following the previous example, one can construct relative averaging algebras from strict associative $2$-algebras.

In the following, we give some characterizations of relative averaging operators. We start with the following useful result.

\begin{prop}\label{am-diass}
Let $A$ be an associative algebra and $M$ be an $A$-bimodule. Then the direct sum $A \oplus M$ inherits a diassociative algebra structure with the operations
\[
(a, u) \dashv (b, v) = (a \cdot b, u \cdot_M b)
\quad \text{and}
\quad (a, u) \vdash (b, v) = (a \cdot b, a \cdot_M v),
\quad \text{for $(a, u), (b, v) \in A \oplus M$}.
\]
We denote this diassociative algebra simply by $A \oplus_{\Diass} M$.
\end{prop}

\begin{proof}
For any $(a, u), (b, v), (c, w) \in A \oplus M$, we have
\begin{align*}
	\parens[\big]{(a, u) \dashv (b, v)} \dashv (c, w) & = \parens[\big]{a \cdot b, u \cdot_M b} \dashv (c, w) = \parens[\big]{(a \cdot b) \cdot c, (u \cdot_M b) \cdot_M c},
\\	(a, u) \dashv \parens[\big]{(b, v) \dashv (c, w)} & = (a, u) \dashv \parens[\big]{b \cdot c, v \cdot_M c} = \parens[\big]{a \cdot (b \cdot c), u \cdot_M (b \cdot c)},
\\	(a, u) \dashv \parens[\big]{(b, v) \vdash (c, w)} & = (a, u) \dashv \parens[\big]{b \cdot c, b \cdot_M w} = \parens[\big]{a \cdot (b \cdot c), u \cdot_M (b \cdot c)}.
\end{align*}
Thus, it follows that
\[
\parens[\big]{(a, u) \dashv (b, v)} \dashv (c, w) = (a, u) \dashv \parens[\big]{(b, v) \dashv (c, w)} = (a, u) \dashv \parens[\big]{(b, v) \vdash (c, w)}.
\]
Similarly, one can show that
\begin{gather*}
	\parens[\big]{(a, u) \vdash (b, v)} \dashv (c, w) = (a, u) \vdash \parens[\big]{(b, v) \dashv (c, w)},
\\	\parens[\big]{(a, u) \dashv (b, v)} \vdash (c, w) = \parens[\big]{(a, u) \vdash (b, v)} \vdash (c, w) = (a, u) \vdash \parens[\big]{(b, v) \vdash (c, w)}.
\end{gather*}
This completes the proof.
\end{proof}

\begin{prop}\label{grph}
Let $A$ be an associative algebra and $M$ be an $A$-bimodule. A linear map $P \colon M \to A$ is a relative averaging operator (on $M$ over the algebra $A$) if and only if the graph $\Gr(P) = \braces[\big]{\parens[\big]{P(u), u} \st[\big] u \in M}$ is a subalgebra of the diassociative algebra $A \oplus_{\Diass} M$.
\end{prop}

\begin{proof}
For any $u, v \in M$, we have $\parens[\big]{P(u), u} \dashv \parens[\big]{P(v), v} = \parens[\big]{P(u) \cdot P(v), u \cdot_M P(v)}$. This is in $\Gr(P)$ if and only if $P(u) \cdot P(v) = P \parens[\big]{u \cdot_M P(v)}$. Similarly, the product $\parens[\big]{P(u), u} \vdash \parens[\big]{P(v), v} = \parens[\big]{P(u) \cdot P(v), P(u) \cdot_M v}$ is in $\Gr(P)$ if and only if $P(u) \cdot P(v) = P \parens[\big]{P(u) \cdot_M v}$. In other words, $\Gr(P)$ is a subalgebra of the diassociative algebra $A \oplus_{\Diass} M$ if and only if $P$ is a relative averaging operator.
\end{proof}

Let $(D, \dashv, \vdash)$ be a diassociative algebra. A linear map $\mathcal{N} \colon D \to D$ is said to be a \emph{Nijenhuis operator} on the diassociative algebra $D$ if for all $a, b \in D$,
\begin{align*}
	\mathcal{N}(a) \dashv \mathcal{N}(b) & \coloneqq \mathcal{N} \parens[\big]{\mathcal{N}(a) \dashv b + a \dashv \mathcal{N}(b) - \mathcal{N} (a \dashv b)},
\\	\mathcal{N}(a) \vdash \mathcal{N}(b) & \coloneqq \mathcal{N} \parens[\big]{\mathcal{N}(a) \vdash b + a \vdash \mathcal{N}(b) - \mathcal{N} (a \vdash b)}.
\end{align*}

\begin{prop}\label{avg-nij}
Let $A$ be an associative algebra and $M$ be an $A$-bimodule. A linear map $P \colon M \to A$ is a relative averaging operator (on $M$ over the algebra $A$) if and only if the map $\mathcal{N}_P \colon A \oplus M \to A \oplus M$, $\mathcal{N}_P \parens[\big]{(a, u)} = \parens[\big]{P(u), 0}$ for $(a, u) \in A \oplus M$, is a Nijenhuis operator on the diassociative algebra $A \oplus_{\Diass} M$.
\end{prop}

\begin{proof}
For any $(a, u), (b, v) \in A \oplus M$, we have
\[
\mathcal{N}_P (a, u) \dashv \mathcal{N}_P (b, v) = \parens[\big]{P(u), 0} \dashv \parens[\big]{P(v), 0} = \parens[\big]{P(u) \cdot P(v), 0}.
\]
On the other hand, we have
\begin{multline*}
\mathcal{N}_P \parens[\big]{\mathcal{N}_P (a, u) \dashv (b, v) + (a, u) \dashv \mathcal{N}_P (b, v) - \mathcal{N}_P \parens[\big]{(a, u) \dashv (b, v)}}
\\	\begin{aligned}
		& = \mathcal{N}_P \parens[\big]{\parens[\big]{P(u) \cdot b, 0} + \parens[\big]{a \cdot P(v), u \cdot_M P(v)} - \parens[\big]{P(u \cdot_M b), 0}}
	\\	& = \parens[\big]{P\parens[\big]{u \cdot_M P(v)}, 0}.
	\end{aligned}
\end{multline*}
This shows that $\mathcal{N}_P (a, u) \dashv \mathcal{N}_P (b, v) = \mathcal{N}_P \parens[\big]{\mathcal{N}_P (a, u) \dashv (b, v) + (a, u) \dashv \mathcal{N}_P (b, v) - \mathcal{N}_P \parens[\big]{(a, u) \dashv (b, v)}}$ holds if and only if $P(u) \cdot P(v) = P\parens[\big]{u \cdot_M P(v)}$. Similarly, one can show that
\[
\mathcal{N}_P (a, u) \vdash \mathcal{N}_P (b, v) = \mathcal{N}_P \parens[\big]{\mathcal{N}_P (a, u) \vdash (b, v) + (a, u) \vdash \mathcal{N}_P (b, v) - \mathcal{N}_P \parens[\big]{(a, u) \vdash (b, v)}}
\]
holds if and only if $P(u) \cdot P(v) = P\parens[\big]{P(u) \cdot_M v}$, for $u, v \in M$. Combining these, we get that $\mathcal{N}_P$ is a Nijenhuis operator on the diassociative algebra $A \oplus_{\Diass} M$ if and only if $P$ is a relative averaging operator.
\end{proof}

\subsection*{Free relative averaging algebra}

Let $V \overset{f}{\to} W$ be a $2$-term chain complex. Consider the tensor algebra of $W$,
\[
T(W) = \mathbf{k} \oplus W \oplus W^{\otimes 2} \oplus \dots \oplus W^{\otimes n} \oplus \dotsb
\]
with the concatenation product. Then the space $T(W) \otimes V \otimes T(W)$ can be given a $T(W)$-bimodule structure with the left and right actions given by
\begin{align*}
	(w'_1 \dotsm w'_p) \cdot (w_{-m} \dotsm w_{-1} \otimes v_0 \otimes w_1 \dotsm w_n)
	& = w'_1 \dotsm w'_p w_{-m} \dotsm w_{-1} \otimes v_0 \otimes w_1 \dotsm w_n,
\\	(w_{-m} \dotsm w_{-1} \otimes v_0 \otimes w_1 \dotsm w_n) \cdot (w'_1 \dotsm w'_p)
	& = w_{-m} \dotsm w_{-1} \otimes v_0 \otimes w_1 \dotsm w_n w'_1 \dotsm w'_p,
\end{align*}
for $w'_1 \dotsm w'_p \in T(W)$ and $w_{-m} \dotsm w_{-1} \otimes v_0 \otimes w_1 \dotsm w_n \in T(W) \otimes V \otimes T(W)$. Then it is easy to see that $T(W) \otimes V \otimes T(W) \xrightarrow{\mathcal{P}(f)} T(W)$ is a relative averaging algebra, where
\[
\mathcal{P}(f) (w_{-m} \dotsm w_{-1} \otimes v_0 \otimes w_1 \dotsm w_n) = w_{-m} \dotsm w_{-1} f(v_0) w_1 \dotsm w_n.
\]

\begin{rema}
Let $V$ be any vector space. Consider the $2$-term chain complex $V \xrightarrow{\id_V} V$. Then it follows that $T(V) \otimes V \otimes T(V) \xrightarrow{\mathcal{P}(\id_V)} T(V)$ is a relative averaging algebra.
\end{rema}

\begin{defi}
Let $V \overset{f}{\to} W$ be a $2$-term chain complex. The \emph{free relative averaging algebra} over $V \overset{f}{\to} W$ is a relative averaging algebra $\mathcal{M}(V) \xrightarrow{\mathcal{P}(f)} \mathcal{A}(W)$ equipped with a morphism $(i,j)$ of complexes from $V \overset{f}{\to} W$ to $\mathcal{M}(V) \xrightarrow{\mathcal{P}(f)} \mathcal{A}(W)$ that satisfies the following universal condition:
\begin{gather}
\label{ast}
\tag{$\ast$}
\begin{varwidth}{.9\displaywidth}
for any relative averaging algebra $M \overset{P}{\to} A$ and a morphism $(\varphi, \psi)$ of complexes from $V \overset{f}{\to} W$ to $M \overset{P}{\to} A$, there exists a unique morphism $(\widetilde{\varphi}, \widetilde{\psi})$ of relative averaging algebras from $\mathcal{M}(V) \xrightarrow{\mathcal{P}(f)} \mathcal{A}(W)$ to $M \overset{P}{\to} A$ that makes the following diagram commutative:
\end{varwidth}
\\ \nonumber
\xymatrix{M \ar[rrr]^P & & & A \\
& V \ar[lu]^\psi \ar[ld]_j \ar[r]^f & W \ar[ru]_\varphi \ar[rd]^i & \\
\mathcal{M}(V) \ar@{..>}[uu]^{\widetilde{\psi}} \ar[rrr]_{\mathcal{P}(f)} & & & \mathcal{A}(W). \ar@{..>}[uu]_{\widetilde{\varphi}}}
\end{gather}
\end{defi}

\begin{prop}
Let $V \overset{f}{\to} W$ be a $2$-term chain complex. Then the relative averaging algebra $T(W) \otimes V \otimes T(W) \xrightarrow{\mathcal{P}(f)} T(W)$ is free over the chain complex $V \overset{f}{\to} W$.
\end{prop}

\begin{proof}
We define maps $i \colon W \to T(W)$ and $j \colon V \to T(W) \otimes V \otimes T(W)$ by
\[
i(w) = w
\quad \text{and}
\quad j (v) = 1 \otimes v \otimes 1,
\quad \text{for $w \in W$, $v \in V$}.
\]
Let $M \overset{P}{\to} A$ be any relative averaging algebra and $(\varphi, \psi)$ be a morphism of complexes from $V \overset{f}{\to} W$ to $M \overset{P}{\to} A$. We define maps $\widetilde{\varphi} \colon T(W) \to A$ and $\widetilde{\psi} \colon T(W) \otimes V \otimes T(W) \to M$ by
\begin{align*}
	\widetilde{\varphi} (w_1 \dotsm w_n) & = \varphi(w_1) \dotsm \varphi(w_n),
\\	\widetilde{\psi} (w_{-m} \dotsm w_{-1} \otimes v_0 \otimes w_1 \dotsm w_n) & = \parens[\big]{\varphi(w_{-m}) \dotsm \varphi(w_{-1})} \cdot_M \psi (v_0) \cdot_M \parens[\big]{\varphi(w_1) \dotsm \varphi(w_n)},
\end{align*}
for $w_1 \dotsm w_n \in T(W)$ and $w_{-m} \dotsm w_{-1} \otimes v_0 \otimes w_1 \dotsm w_n \in T(W) \otimes V \otimes T(W)$. Then it is easy to see that the pair $(\widetilde{\varphi}, \widetilde{\psi})$ is a morphism of relative averaging algebras from $T(W) \otimes V \otimes T(W) \xrightarrow{\mathcal{P}(f)} T(W)$ to $M \overset{P}{\to} A$ and satisfies the universal condition~\eqref{ast}.
\end{proof}

\subsection*{Functorial relations with diassociative algebras}

\begin{prop}
\
\begin{enumerate}[leftmargin=*]
\item \label{item_i} Let $M \overset{P}{\to} A$ be a relative averaging algebra. Then the vector space $M$ carries a diassociative algebra structure with the bilinear operations
\begin{align}\label{mp}
u \dashv_P v \coloneqq u \cdot_M P(v)
\quad \text{and}
\quad u \vdash_P v \coloneqq P(u) \cdot v,
\quad \text{for $u, v \in M$}.
\end{align}
We denote this diassociative algebra simply by $M_P$.
\item \label{item_ii} Let $M \overset{P}{\to} A$ and $M' \overset{P'}{\to} A'$ be two relative averaging algebras and $(\varphi, \psi)$ be a morphism between them. Then $\psi \colon M \to M'$ is a morphism between induced diassociative algebras (from $M_P$ to $M'_{P'}$).
\end{enumerate}
\end{prop}

\begin{proof}
\begin{proof}[(\ref{item_i})]
Since $P \colon M \to A$ is a relative averaging operator, it follows from Proposition~\ref{grph} that $\Gr(P)$ is a subalgebra of the diassociative algebra $A \oplus_{\Diass} M$. The inherited diassociative structure on $\Gr(P)$ is given by
\[
\parens[\big]{P(u), u} \dashv \parens[\big]{P(v), v} = \parens[\big]{\equalto{P(u) \cdot P(v)}{P \parens*{u \cdot_M P(v)}}, u \cdot_M P(v)}
\]
and
\[
\parens[\big]{P(u), u} \vdash \parens[\big]{P(v), v} = \parens[\big]{\equalto{P(u) \cdot P(v)}{P\parens*{P(u) \cdot_M v}}, P(u) \cdot_M v},
\]
for $u, v \in M$. As the vector space $M$ is isomorphic to $\Gr(P)$ via $u \leftrightsquigarrow \parens[\big]{P(u), u}$, for $u \in M$, we have a diassociative algebra structure on $M$ which is precisely given by~\eqref{mp}.
\let\qed\relax
\end{proof}
\begin{proof}[(\ref{item_ii})]
For any $u, v \in M$, we have
\begin{align*}
	\psi (u \dashv_P v) & = \psi \parens[\big]{u \cdot_M P(v)} = \psi (u) \cdot^{A'}_{M'} \varphi P(v) = \psi (u) \cdot^{A'}_{M'} P' \parens[\big]{\psi(v)} = \psi (u) \dashv_{P'} \psi(v),
\\	\psi (u \vdash_P v) & = \psi \parens[\big]{P(u) \cdot_M v} = \varphi P(u) \cdot_{M'}^{A'} \psi (v) = P' \parens[\big]{\psi (u)}\cdot_{M'}^{A'} \psi (v) = \psi (u) \vdash_{P'} \psi (v).
\end{align*}
This proves that $\psi \colon M_P \to M'_{P'}$ is a morphism of diassociative algebras.
\end{proof}
\let\qed\relax
\end{proof}

The above proposition shows that there is a functor $\mathcal{F} \colon \catrAvg \to \catDiass$ from the category of relative averaging algebras to the category of diassociative algebras. In the following, we will construct a functor in the other direction.

Let $(D, \dashv, \vdash)$ be a diassociative algebra. Let $D_{\Ass}$ be the quotient of $D$ by the ideal generated by the elements $a \dashv b - a \vdash b$, for $a, b \in D$. Then $D_{\Ass}$ is an associative algebra, where the product is given by $[a] \cdot [b] \coloneqq [a \dashv b] = [a \vdash b] $, for $[a], [b] \in D_{\Ass}$. Moreover, the vector space $D$ is a $D_{\Ass}$-bimodule, where the left and right $D_{\Ass}$-actions on $D$ are respectively given by
\[
[a] \cdot_D b = a \vdash b
\quad \text{and}
\quad b \cdot_D [a] = b \dashv a,
\quad \text{for $[a] \in D_{\Ass}$, $b \in D$}.
\]
With these notations, the quotient map $q \colon D \to D_{\Ass}$ is a relative averaging operator as
\[
q(a) \cdot q(b) = [a] \cdot [b] =
\begin{cases}
	= [a \vdash b] = \bracks[\big]{[a] \cdot_D b} = q \parens[\big]{q(a) \cdot_D b},
\\	= [a \dashv b] = \bracks[\big]{a \cdot_D [b]} = q \parens[\big]{a \cdot_D q(b)},
\end{cases}
\]
for $a, b \in D$. Thus, $D \overset{q}{\to} D_{\Ass}$ is a relative averaging algebra. Moreover, the induced diassociative algebra structure on $D$ coincides with the given one, as
\[
a \dashv_q b = a \cdot_D q(b) = a \dashv b
\quad \text{and}
\quad a \vdash_q b = q(a) \cdot_D b = a \vdash b,
\quad \text{for $a,b \in D$}.
\]

Let $(D, \dashv, \vdash)$ and $(D', \dashv', \vdash')$ be two diassociative algebras and $\psi \colon D \to D'$ be a morphism between them. Then it is easy to verify that the pair $(\varphi, \psi)$ is a morphism of relative averaging algebras from $D \overset{q}{\to} D_{\Ass}$ to $D' \overset{q'}{\to} D'_{\Ass}$, where $\varphi \colon D_{\Ass} \to D'_{\Ass}$ is given by $\varphi \parens[\big]{[a]} = \bracks[\big]{\psi (a)}$, for $[a] \in D_{\Ass}$. This construction yields a functor $\mathcal{G} \colon \catDiass \to \catrAvg$ from the category of diassociative algebras to the category of relative averaging algebras.

\begin{prop}\label{l-adj-fun}
The functor\/ $\mathcal{G} \colon \catDiass \to \catrAvg$ is left adjoint to the functor $\mathcal{F} \colon \catrAvg \to \catDiass$. More precisely, for any diassociative algebra $(D, \dashv, \vdash)$ and a relative averaging algebra $M \overset{P}{\to} A$, we have
\[
\Hom_{\catDiass} (D, M_P) \cong \Hom_{\catrAvg} (D \overset{q}{\rightarrow} D_{\Ass}, M \overset{P}{\rightarrow} A).
\]
\end{prop}

\begin{proof}
Let $\psi \in \Hom_{\catDiass} (D, M_P)$. We define a map $\varphi^\psi \colon D_{\Ass} \to A$ by $\varphi^\psi \parens[\big]{[a]} = P \parens[\big]{\psi (a)}$, for $[a] \in D_{\Ass}$. Then it is easy to see that $\varphi^\psi$ is an algebra morphism. Moreover, we have
\begin{align*}
	\psi \parens[\big]{[a] \cdot_D b} & = \psi (a \vdash b) = \psi (a) \vdash_P \psi (b) = P \psi (a) \cdot_M \psi(b) = \varphi^\psi \parens[\big]{[a]} \cdot_M \psi (b),
\\	\psi \parens[\big]{b \cdot_D [a]} & = \psi (b \dashv a) = \psi (b) \dashv_P \psi (a) = \psi (b) \cdot_M P\psi (a) = \psi (b) \cdot_M \varphi^\psi \parens[\big]{[a]},
\end{align*}
for $[a] \in D_{\Ass}$, $b \in D$. Further, $\varphi^\psi \circ q = P \circ \psi$. Thus, $(\varphi^\psi, \psi) \in \Hom_{\catrAvg} (D \overset{q}{\to} D_{\Ass}, M \overset{P}{\to} A)$.

On the other hand, if $(\varphi, \psi) \in \Hom_{\catrAvg} (D \overset{q}{\to} D_{\Ass}, M \overset{P}{\to} A)$, then $\psi \in \Hom_{\catDiass} (D, M_P)$. Finally, the above two correspondences are inverses to each other.
\end{proof}

\subsection*{Bimodules over relative averaging algebras}

Here we introduce bimodules over relative averaging algebras. We show that a bimodule over a relative averaging algebra gives two representations of the induced diassociative algebra.

\begin{defi}
Let $M \overset{P}{\to} A$ be a relative averaging algebra. A \emph{bimodule} over it consists of a tuple $(N \overset{Q}{\to} B, l, r)$ in which $N \overset{Q}{\to} B$ is a $2$-term chain complex with both $B$ and $N$ are $A$-bimodules, and $l \colon M \times B \to N$ and $r \colon B \times M \to N$ are bilinear maps (called the pairing maps) satisfying
\begin{alignat}{3}
	l (a \cdot_M u, b) & = a \cdot_N l(u, b), & \quad l (u \cdot_M a, b) & = l (u, a \cdot_B b), & \quad l(u, b \cdot_B a) & = l(u, b) \cdot_N a, \label{dasm1}
\\	r(a \cdot_B b, u) & = a \cdot_N r(b, u), & \quad r (b \cdot_B a, u) & = r (b, a \cdot_M u), & \quad r (b, u \cdot_M a) & = r(b, u) \cdot_N a, \label{dasm2}
\end{alignat}
and
\begin{gather}
	P(u) \cdot_B Q(n) = Q \parens[\big]{P(u) \cdot_N n} = Q \parens[\big]{l \parens[\big]{u, Q(n)}}, \label{dasm3}
\\	Q(n) \cdot_B P(u) = Q \parens[\big]{r \parens[\big]{Q(n), u}} = Q \parens[\big]{n \cdot_N P(u)}, \label{dasm4}
\end{gather}
for $a \in A$, $b \in B$, $u \in M$ and $n \in N$. Sometimes we denote a bimodule as above by the complex $N \overset{Q}{\to} B$ when the bilinear maps $l$ and $r$ are clear from the context.
\end{defi}

\begin{exam}[Adjoint bimodule]\label{adj-bimod}
Let $M \overset{P}{\to} A$ be a relative averaging algebra. Then it is easy to see that the tuple $(M \overset{P}{\to} A, l_{\ad}, r_{\ad})$ is a bimodule over the relative averaging algebra $M \overset{P}{\to} A$, where the pairing maps $l_{\ad} \colon M \times A \to M$ and $r_{\ad} \colon A \times M \to M$ are respectively the given right and left $A$-actions on $M$. This is called the adjoint bimodule.
\end{exam}

\begin{exam}[Bimodule over an averaging algebra~\cite{wang-av}]\label{avg-alg-bimod}
Let $(A, P)$ be an averaging algebra. A bimodule over it consists of a pair $(M, Q)$ in which $M$ is an $A$-bimodule and $Q \colon M \to M$ is a linear map satisfying for $a \in A$, $u \in M$,
\begin{align*}
	P(a) \cdot_M Q(u) & = Q \parens[\big]{P(a) \cdot_M u} = Q \parens[\big]{a \cdot_M Q(u)},
\\	Q(u) \cdot_M P(a) & = Q \parens[\big]{Q(u) \cdot_M a} = Q \parens[\big]{u \cdot_M P(a)}.
\end{align*}
This is equivalent to the fact that the tuple $(M \overset{Q}{\to} M, \cdot_M, \cdot_M)$ is a bimodule over the relative averaging algebra $A \overset{P}{\to} A$.
\end{exam}

Let $A$ be an associative algebra. Given an element $\mathbf{r} = \sum r_{(1)} \otimes r_{(2)} \in A \otimes A$, we consider the following three elements
\begin{align*}
	& \mathbf{r}_{13} \mathbf{r}_{12} = \sum r_{(1)} \cdot \widetilde{r}_{(1)} \otimes \widetilde{r}_{(2)} \otimes r_{(2)},
\\	& \mathbf{r}_{12} \mathbf{r}_{23} = \sum r_{(1)} \otimes r_{(2)} \cdot \widetilde{r}_{(1)} \otimes \widetilde{r}_{(2)}
\\	\text{and} \qquad & \mathbf{r}_{23} \mathbf{r}_{13} = \sum r_{(1)} \otimes \widetilde{r}_{(1)} \otimes \widetilde{r}_{(2)} \cdot r_{(2)}
\end{align*}
of $A \otimes A \otimes A$. Here $\sum \widetilde{r}_{(1)} \otimes \widetilde{r}_{(2)}$ is another copy of $\mathbf{r}$. An element $\mathbf{r} \in A \otimes A$ is called an \emph{averaging element} if it satisfies
\begin{equation}
\mathbf{r}_{13} \mathbf{r}_{12} = \mathbf{r}_{12} \mathbf{r}_{23} = \mathbf{r}_{23} \mathbf{r}_{13}.
\end{equation}
Let $r = \sum r_{(1)} \otimes r_{(2)} \in A \otimes A$ be an averaging element. Then the map $P \colon A \to A$ defined by $P(a) = \sum r_{(1)} \cdot a \cdot r_{(2)}$, for $a \in A$, is an averaging operator on $A$. To see this, we observe that
\[
\begin{split}
P(a) \cdot P(a')
	& = \sum r_{(1)} \cdot a \cdot r_{(2)} \cdot \widetilde{r}_{(1)} \cdot a' \cdot \widetilde{r}_{(2)}
\\	& =
\begin{dcases}
	= \sum r_{(1)} \cdot \widetilde{r}_{(1)} \cdot a \cdot \widetilde{r}_{(2)} \cdot a' \cdot r_{(2)} = P \parens[\big]{P(a) \cdot a'}	&  \text{(since $\mathbf{r}_{13} \mathbf{r}_{12} = \mathbf{r}_{12} \mathbf{r}_{23}$}),
\\	= \sum r_{(1)} \cdot a \cdot \widetilde{r}_{(1)} \cdot a' \cdot \widetilde{r}_{(2)} \cdot r_{(2)} = P\parens[\big]{a \cdot P(a')}	& \text{(since $\mathbf{r}_{12} \mathbf{r}_{23} = \mathbf{r}_{23} \mathbf{r}_{13}$)},
\end{dcases}
\end{split}
\]
for $a, a' \in A$. In other words, $(A,P)$ is an averaging algebra. If $M$ is any $A$-bimodule, we define a linear map $Q \colon M \to M$ by $Q(u) = \sum r_{(1)} \cdot_M u \cdot_M r_{(2)}$, for $u \in M$. Then it is easy to verify that $(M, Q)$ is a bimodule over the averaging algebra $(A,P)$.

\begin{exam}
Let $M \overset{P}{\to} A$ and $M' \overset{P'}{\to} A'$ be two relative averaging algebras, and let $(\varphi, \psi)$ be a morphism between them (see Definition~\ref{defn-morp}). Then the tuple $(M' \overset{P'}{\to} A', l, r)$ is a bimodule over the relative averaging algebra $M \overset{P}{\to} A$, where the $A$-bimodule structure on $A'$ is induced by the algebra morphism $\varphi \colon A \to A'$, and the $A$-bimodule structure on $M'$ is given by $a \cdot_{M'} m' = \varphi (a) \cdot_{M'}^{A'} m'$ and $m' \cdot_{M'} a = m' \cdot_{M'}^{A'} \varphi (a)$, for $a \in A$, $m' \in M'$. Moreover, the pairing maps $l \colon M \times A' \to M'$ and $r \colon A' \times M \to M'$ are respectively given by
\[
l (u, a') = \psi (u) \cdot_{M'}^{A'} a'
\quad \text{and}
\quad r (a', u) = a' \cdot_{M'}^{A'} \psi (u),
\quad \text{for $u \in M$, $a' \in A'$}.
\]
\end{exam}

Note that any bimodule over an associative algebra can be dualized. More generally, if $A$ is an associative algebra and $M$ is an $A$-bimodule then the dual space $M^*$ can be equipped with an $A$-bimodule structure with left and right $A$-actions given by
\[
(a \cdot_{M^*} f) (u) = f(u \cdot_M a)
\quad \text{and}
\quad (f \cdot_{M^*} a) (u) = f(a \cdot_M u),
\quad \text{for $a \in A$, $f \in M^*$, $u \in M$}.
\]
In the following result, we give the dual construction of a bimodule over a relative averaging algebra.

\begin{prop}
Let $M \overset{P}{\to} A$ be a relative averaging algebra and $(N \overset{Q}{\to} B, l, r)$ be a bimodule over it. Then $(B^* \overset{Q^*}{\to} N^*, l^*, r^*)$ is also a bimodule, where $B^*, N^*$ are equipped with dual $A$-bimodule structures and the pairings $l^* \colon M \times N^* \to B^*$ and $r^* \colon N^* \times M \to B^*$ are respectively given by
\[
l^* (u, f_N)(b) = f_N \parens[\big]{r (b, u)}
\quad \text{and}
\quad r^* (f_N, u) (b) = f_N \parens[\big]{l(u, b)},
\quad \text{for $u \in M$, $f_N \in N^*$, $b \in B$}.
\]
\end{prop}

\begin{proof}
For any $a \in A$, $u \in M$, $f_N \in N^*$ and $b \in B$, we first observe that
\begin{align*}
	l^* (a \cdot_M u, f_N) (b) & = f_N \parens[\big]{r (b, a \cdot_M u)} \stackrel{\eqref{dasm2}}{=} f_N \parens[\big]{r (b \cdot_B a, u)} = l^* (u, f_N) (b \cdot_B a) = \parens[\big]{a \cdot_{B^*} l^*(u, f_N)} (b),
\\	l^* (u \cdot_M a, f_N) (b) & = f_N \parens[\big]{r (b, u \cdot_M a)} \stackrel{\eqref{dasm2}}{=} f_N \parens[\big]{r (b,u) \cdot_N a} = (a \cdot_{N^*} f_N) \parens[\big]{r (b,u)} = l^* (u, a \cdot_{N^*} f_N)(b),
\\	l^* (u, f_N \cdot_{N^*} a)(b) & = f_N \parens[\big]{a \cdot_N r (b,u)} \stackrel{\eqref{dasm2}}{=} f_N \parens[\big]{r (a \cdot_B b, u)} = l^* (u, f_N) (a \cdot_B b) = (l^* (u, f_N) \cdot_{B^*} a)(b).
\end{align*}
This shows that the identities in~\eqref{dasm1} hold for the dual structure. Similarly, one can verify the identities in~\eqref{dasm2} for the dual structure. Finally, for any $u \in M$, $f_B \in B^*$ and $n \in N$, we have
\[
\begin{split}
\parens[\big]{P(u) \cdot_{N^*} Q^*(f_B)} (n)
	& = Q^*(f_B) \parens[\big]{n \cdot_N P(u)}
\\	& = f_B \parens[\big]{Q \parens[\big]{n \cdot_N P(u)}}
\\	& =
\begin{cases}
	= f_B \parens[\big]{Q(n) \cdot_B P(u)} = \parens[\big]{P(u) \cdot_{B^*}f_B} \parens[\big]{Q(n)} = Q^* \parens[\big]{P(u) \cdot_{B^*} f_B}(n),
\\	= f_B \parens[\big]{Q \circ r \parens[\big]{Q(n), u}} = l^* \parens[\big]{u, Q^* (f_B)} \parens[\big]{Q(n)} = Q^* \parens[\big]{l^* \parens[\big]{u, Q^* (f_B)}} (n).
\end{cases}
\end{split}
\]
Similarly, we have
\[
\begin{split}
\parens[\big]{Q^* (f_B) \cdot_{N^*} P(u)} (n) & = Q^* (f_B) \parens[\big]{P(u) \cdot_N n}
\\	& = f_B \parens[\big]{Q\parens[\big]{P(u) \cdot_N n}}
\\	& =
\begin{cases}
	= f_B \parens[\big]{Q \circ l \parens[\big]{u, Q(n)}} = r^* \parens[\big]{Q^* (f_B), u} \parens[\big]{Q(n)} = Q^* \parens[\big]{r^* (Q^* (f_B), u)} (n),
\\	= f_B \parens[\big]{P(u) \cdot_B Q(n)} = \parens[\big]{f_B \cdot_{B^*} P(u)} \parens[\big]{Q(n)} = Q^* \parens[\big]{f_B \cdot_{B^*} P(u)} (n).
\end{cases}
\end{split}
\]
This shows that the identities in~\eqref{dasm3} and~\eqref{dasm4} also hold for the dual structure. Hence $(B^* \overset{Q^*}{\to} N^*, l^*, r^*)$ is a bimodule over the relative averaging algebra $M \overset{P}{\to} A$.
\end{proof}

Let $M \overset{P}{\to} A$ be a relative averaging algebra. Then $(A^* \overset{P^*}{\to} M^*, l^*, r^*)$ is a bimodule, where the pairings $l^* \colon M \times M^* \to A^*$ and $r^* \colon M^* \times M \to A^*$ are respectively given by
\[
l^* (u, f_M)(a) = f_M (a \cdot_M u)
\quad \text{and}
\quad r^* (f_M, u)(a) = f_M (u \cdot_M a)
\quad \text{for $u \in M$, $f_M \in M^*$, $a \in A$}.
\]
Note that this bimodule is dual to the adjoint bimodule given in Example~\ref{adj-bimod}.

Let $M \overset{P}{\to} A$ be a relative averaging algebra and $(N \overset{Q}{\to} B, l, r)$ be a bimodule over it. Since $B$ is an $A$-bimodule, one can consider the semidirect product algebra $A \oplus B$ with the product
\[
(a, b) \cdot_\ltimes (a', b') = \parens{a \cdot a', a \cdot_B b' + b \cdot_B a'},
\quad \text{for $(a, b), (a', b') \in A \oplus B$}.
\]
It has been shown in~\cite{das-art} that the vector space $M \oplus N$ carries a bimodule structure over the semidirect product algebra $A \oplus B$ with left and right $(A \oplus B)$-actions respectively given by
\begin{equation}\label{apb}
(a, b) \triangleright (u, n) = \parens[\big]{a \cdot_M u, a \cdot_N n + r(b,u)}
\qquad \text{and} \qquad
(u,n) \triangleleft (a, b) = \parens[\big]{u \cdot_M a, l(u,b) + n \cdot_N a},
\end{equation}
for $(a, b) \in A \oplus B$ and $(u,n) \in M \oplus N$. With these notations, we have the following result.

\begin{theo}[Semidirect product]\label{thm-semid}
Let $M \overset{P}{\to} A$ be a relative averaging algebra and $(N \overset{Q}{\to} B, l, r)$ be a bimodule over it. Then $M \oplus N \xrightarrow{P \oplus Q} A \oplus B$ is a relative averaging algebra.
\end{theo}

\begin{proof}
We have already seen that $A \oplus B$ is an associative algebra (with the semidirect product structure) and $M \oplus N$ is an $(A \oplus B)$-bimodule with left and right actions given by~\eqref{apb}. Next, for any $(u,n), (u',n') \in M \oplus N$, we observe that
\[
\begin{split}
(P \oplus Q) (u,n) \cdot_\ltimes (P \oplus Q) (u', n')
	& = \parens[\big]{P(u), Q(n)} \cdot_\ltimes \parens[\big]{P(u'), Q(n')}
\\	& = \parens[\big]{P(u) \cdot P(u'), P(u) \cdot_B Q(n') + Q (n) \cdot_B P(u')}
\\	& = \parens[\big]{P \parens[\big]{P(u) \cdot_M u'}, Q \parens[\big]{P(u) \cdot_N n'} + Q \parens[\big]{r \parens[\big]{Q(n), u'}}}
\\	& = (P \oplus Q) \parens[\big]{P(u) \cdot_M u', P(u) \cdot_N n' + r \parens[\big]{Q(n), u'}}
\\	& = (P \oplus Q) \parens[\big]{\parens[\big]{(P \oplus Q) (u,n)} \triangleright (u',n')}.
\end{split}
\]
Also, we have
\[
\begin{split}
(P \oplus Q) (u,n) \cdot_\ltimes (P \oplus Q) (u', n')
	& = \parens[\big]{P(u) \cdot P(u'), P(u) \cdot_B Q(n') + Q (n) \cdot_B P(u')}
\\	& = \parens[\big]{P \parens[\big]{u \cdot_M P(u')}, Q \parens[\big]{l \parens[\big]{u, Q(n')}} + Q \parens[\big]{n \cdot_N P(u')}}
\\	& = (P \oplus Q) \parens[\big]{u \cdot_M P(u'), l\parens[\big]{u, Q(n')} + n \cdot_N P(u')}
\\	& = (P \oplus Q) \parens[\big]{(u,n) \triangleleft \parens[\big]{(P \oplus Q) (u', n')}}.
\end{split}
\]
This proves that $P \oplus Q \colon M \oplus N \to A \oplus B$ is a relative averaging operator. In other words, $M \oplus N \xrightarrow{P \oplus Q} A \oplus B$ is a relative averaging algebra.
\end{proof}

\begin{prop}
Let $M \overset{P}{\to} A$ be a relative averaging algebra and $(N \overset{Q}{\to} B, l, r)$ be a bimodule over it. Then the vector space $N$ carries a representation of the induced diassociative algebra $M_P$ with the action maps given by
\begin{align}\label{bim-str-maps}
\begin{cases}
	\dashv \colon M_P \otimes N \to N, & u \dashv n = l \parens[\big]{u, Q(n)},
\\	\vdash \colon M_P \otimes N \to N, & u \vdash n = P(u) \cdot_N n,
\\	\dashv \colon N \otimes M_P \to N, & n \dashv u = n \cdot_N P(u),
\\	\vdash \colon N \otimes M_P \to N, & n \vdash u = r \parens[\big]{Q(n), u}.
\end{cases}
\end{align}
\end{prop}

\begin{proof}
To prove the result, we consider the semidirect product relative averaging algebra $M \oplus N \xrightarrow{P \oplus Q} A \oplus B$ given in Theorem~\ref{thm-semid}. Then it follows that the vector space $M \oplus N$ carries a diassociative algebra structure (denoted by $(M \oplus N)_{P \oplus Q}$) with the operations
\begin{align*}
	(u,n) \dashv_{P \oplus Q} (u', n') & = (u, n) \triangleleft \parens[\big]{P(u'), Q(n')} = \parens[\big]{u \dashv_P u', l \parens[\big]{u, Q(n')} + n \cdot_N P(u')},
\\	(u,n) \vdash_{P \oplus Q} (u', n') & = \parens[\big]{P(u), Q(n)} \triangleright (u', n') = \parens[\big]{u \vdash_P u', P(u) \cdot_N n' + r \parens[\big]{Q(n), u'}},
\end{align*}
for $(u,n), (u', n') \in M \oplus N$. This shows that the diassociative algebra $M_P$ has a representation on $N$ with the structure maps~\eqref{bim-str-maps}, and the diassociative algebra $(M \oplus N)_{P \oplus Q}$ is nothing but the semidirect product of the diassociative algebra $M_P$ with the representation $N$.
\end{proof}

\begin{prop}\label{aa-b}
Let $M \overset{P}{\to} A$ be a relative averaging algebra and $(N \overset{Q}{\to} B, l, r)$ be a bimodule over~it. Then the vector space $B$ can be given a representation of the induced diassociative algebra $M_P$ with the action maps given by
\begin{align}\label{nij-act-di}
\begin{cases}
	\dashv \colon M_P \otimes B \to B, & u \dashv b = P(u) \cdot_B b - Q \parens[\big]{l (u, b)},
\\	\vdash \colon M_P \otimes B \to B, & u \vdash b = P(u) \cdot_B b,
\\	\dashv \colon B \otimes M_P \to B, & b \dashv u = b \cdot_B P(u),
\\	\vdash \colon B \otimes M_P \to B, & b \vdash u = b \cdot_B P(u) - Q \parens[\big]{r (b, u)}.
\end{cases}
\end{align}
\end{prop}

\begin{proof}
We first consider the semidirect product relative averaging algebra $M \oplus N \xrightarrow{P \oplus Q} A \oplus B$. Then it follows from Proposition~\ref{avg-nij} that the map
\[
\mathcal{N}_{P \oplus Q} \colon (A \oplus B) \oplus (M \oplus N) \to (A \oplus B) \oplus (M \oplus N), \quad (a,b, u, n) \mapsto \parens[\big]{P(u), Q(v), 0,0}
\]
is a Nijenhuis operator on the diassociative algebra $(A \oplus B) \oplus_{\Diass} (M \oplus N)$. Hence there is a new diassociative structure on the vector space $A \oplus B \oplus M \oplus N$ (deformed by the Nijenhuis operator $\mathcal{N}_{P \oplus Q}$). It can be checked that this diassociative structure on $A \oplus B \oplus M \oplus N$ restricts to a diassociative algebra structure on the vector space $B \oplus M$. The structure is precisely given by
\begin{align*}
	(b,u) \dashv (b', v) & = \parens[\big]{\underbrace{b \cdot_B P(v)}_{\coloneqq b \dashv v} + \underbrace{P(u) \cdot_B b' - Q \parens[\big]{l (u, b')}}_{\coloneqq u \dashv b'}, u \dashv_P v},
\\	(b,u) \vdash (b', v) & = \parens[\big]{\underbrace{b \cdot_B P(v) - Q \parens[\big]{r(b, v)}}_{\coloneqq b \vdash v} + \underbrace{P(u) \cdot_B b'}_{\coloneqq u \vdash b'}, u \vdash_P v},
\end{align*}
for $(b, u), (b', v) \in B \oplus M$. This expression shows that the diassociative algebra $M_P$ has a representation on $B$ with the action maps~\eqref{nij-act-di}.
\end{proof}

\section{The controlling algebra and cohomology for relative averaging operators}\label{sec-4}

Given an associative algebra $A$ and an $A$-bimodule $M$, here we construct a graded Lie algebra whose Maurer--Cartan elements are precisely relative averaging operators. This characterization allows us to define the cohomology of a relative averaging operator. Subsequently, we show that this cohomology of a relative averaging operator can be seen as the cohomology of the induced diassociative algebra with coefficients in a suitable representation.

\begingroup
\allowdisplaybreaks
Let $A$ be an associative algebra and $M$ be an $A$-bimodule. Consider the vector space $D= A \oplus M$ and the Majumdar--Mukherjee graded Lie algebra
\[
\mathfrak{g} = \parens[\Big]{\textstyle\bigoplus_{n = 0}^\infty CY^{n+1} (D,D) = \bigoplus_{n = 0}^\infty \Hom\parens[\big]{\mathbf{k}[Y_{n+1}] \otimes D^{\otimes n+1}, D}, [\vide]_{\MM}}
\]
associated with the vector space $D$. Note that the diassociative algebra structure on $D$ (see Proposition~\ref{am-diass}) gives rise to a Maurer--Cartan element $\Delta \in \mathfrak{g}_1$ in the graded Lie algebra $\mathfrak{g}$ (i.e.\ we have $[\Delta, \Delta]_{\MM} = 0$), where $\Delta$ is given by
\begin{align}\label{del-de}
\begin{cases}
\Delta \parens[\big]{\Ytwoa{0.08} ; (a, u), (b, v)} = (a, u) \dashv (b, v) = (a \cdot b, u \cdot_M b), \\
\Delta \parens[\big]{\Ytwob{0.08} ; (a, u), (b, v)} = (a, u) \vdash (b, v) = (a \cdot b, a \cdot_M v),
\end{cases}
\end{align}
for $(a, u), (b, v) \in D$. Moreover, it is easy to see that the graded subspace
\[
\mathfrak{a} = \bigoplus_{n = 0}^\infty CY^{n+1} (M,A) = \bigoplus_{n = 0}^\infty \Hom \parens[\big]{\mathbf{k}[Y_{n+1}] \otimes M^{\otimes n+1}, A}
\]
is an abelian Lie subalgebra. Let $p \colon \mathfrak{g} \to \mathfrak{g}$ be the projection onto the subspace $\mathfrak{a}$. Then $\ker(p) \subset \mathfrak{g}$ is a graded Lie subalgebra and $\image(p) = \mathfrak{a}$. Moreover, $\Delta \in \ker(p)_1$. Hence by Kosmann-Schwarzbach's derived bracket construction~\cite{yks}, the shifted graded vector space $s \mathfrak{a} = \bigoplus_{n = 1}^\infty CY^n (M,A) = \bigoplus_{n = 1}^\infty \Hom \parens[\big]{\mathbf{k} [Y_n] \otimes M^{\otimes n}, A}$ carries a graded Lie algebra structure with the bracket
\[
\llbracket f, g \rrbracket \coloneqq (-1)^m \bracks[\big]{[\Delta, f]_{\MM}, g}_{\MM},
\]
for $f \in CY^m (M, A)$ and $g \in CY^n (M, A)$. In terms of $\circ_i$ operations (see~\eqref{partial-comp}), the above bracket is
\begin{multline*}
\llbracket f, g \rrbracket = \sum_{i=1}^m (-1)^{(i-1)n} f \circ_i (\Delta \circ_1 g) - \sum_{i=1}^m (-1)^{in} f \circ_i (\Delta \circ_2 g)
\\	- (-1)^{mn} \braces[\Bigg]{\sum_{i=1}^n (-1)^{(i-1)m} g \circ_i (\Delta \circ_1 f) - \sum_{i=1}^n (-1)^{im} g \circ_i (\Delta \circ_2 f)}
\\	+ (-1)^{mn} (\Delta \circ_1 f) \circ_{m+1} g - (\Delta \circ_1 g) \circ_{n+1} f.
\end{multline*}
Explicitly, the bracket is given by
\begin{align}\label{tr-tr}
	& \llbracket f, g \rrbracket (y; u_1, \dots, u_{m+n}) \nonumber
\\*	&	\quad
	\begin{multlined}[b][.9\displaywidth] \nonumber
	= \sum_{i=1}^m (-1)^{(i-1)n} f \parens[\bigg]{R_0^{m; i, n+1} (y); u_1, \dots, u_{i-1},
	\\	\Delta \parens[\big]{R_0^{2; 1, n} R_i^{m;i, n+1} (y); g \parens[\big]{R_1^{2; 1, n} R_i^{m;i, n+1} (y); u_i, \dots, u_{i+n-1}}, u_{i+n}}, u_{i+n+1}, \dots, u_{m+n}}
	\end{multlined}
\\	&	\quad
	\begin{multlined}[b][.9\displaywidth] \nonumber
	\quad - \sum_{i=1}^m (-1)^{in} f \parens[\bigg]{R_0^{m; i, n+1} (y); u_1, \dots, u_{i-1},
	\\	\Delta \parens[\big]{R_0^{2; 2,n} R_i^{m;i, n+1} (y); u_i, g \parens[\big]{R_2^{2; 2,n} R_i^{m;i, n+1} (y); u_{i+1}, \dots, u_{i+n}}}, u_{i+n+1}, \dots, u_{m+n}}
	\end{multlined}
\\	&	\quad
	\begin{multlined}[b][.9\displaywidth] \nonumber
	\quad - (-1)^{mn} \sum_{i=1}^n (-1)^{(i-1)m} g \parens[\bigg]{R_0^{n; i, m+1} (y); u_1, \dots, u_{i-1},
	\\	\Delta \parens[\big]{R_0^{2; 1, m} R_i^{n;i, m+1} (y); f \parens[\big]{R_1^{2; 1, m} R_i^{n;i, m+1} (y); u_i, \dots, u_{i+m-1}}, u_{i+m}}, u_{i+m+1}, \dots, u_{m+n}}
	\end{multlined}
\\	&	\quad
	\begin{multlined}[b][.9\displaywidth] \nonumber
	\quad + (-1)^{mn} \sum_{i=1}^n (-1)^{im} g \parens[\bigg]{R_0^{n; i, m+1} (y); u_1, \dots, u_{i-1},
	\\	\Delta \parens[\big]{R_0^{2; 2,m} R_i^{n;i, m+1} (y); u_i, f \parens[\big]{R_1^{2; 2,m} R_i^{n;i, m+1} (y); u_{i+1}, \dots, u_{i+m}}}, u_{i+m+1}, \dots, u_{m+n}}
	\end{multlined}
\\	&	\quad
	\begin{multlined}[b][.9\displaywidth] \nonumber
	\quad + (-1)^{mn} \Delta \parens[\bigg]{R_0^{2;1,m} R_0^{m+1;m+1, n}(y); f \parens[\big]{R_1^{2;1,m} R_0^{m+1; m+1,n} (y); u_1, \dots, u_m},
	\\	g \parens[\big]{R_{m+1}^{m+1; m+1, n} (y); u_{m+1}, \dots, u_{m+n}}}
	\end{multlined}
\\	&	\quad
	\begin{multlined}[b][.9\displaywidth]
	\quad - \Delta \parens[\bigg]{R_0^{2;1,n} R_0^{n+1;n+1, m}(y); g \parens[\big]{R_1^{2;1,n} R_0^{n+1; n+1,m} (y); u_1, \dots, u_n},
	\\	f \parens[\big]{R_{n+1}^{n+1; n+1, m} (y); u_{n+1}, \dots, u_{m+n}}},
	\end{multlined}
\end{align}
for $y \in Y_{m+n}$ and $u_1, \dots, u_{m+n} \in M$. This graded Lie bracket can be extended to the graded space $CY^\bullet (M, A) = \bigoplus_{n = 0}^\infty CY^n (M, A) = \bigoplus_{n = 0}^\infty \Hom \parens[\big]{\mathbf{k} [Y_n] \otimes M^{\otimes n}, A}$ by the following rules:
\begin{align*}
\llbracket f, a \rrbracket (y; u_1, \dots, u_m)
	&	\begin{multlined}[t][.8\displaywidth]
			= \sum_{i=1}^m f \parens[\big]{y; u_1, \dots, u_{i-1}, a \cdot_M u_i - u_i \cdot_M a, u_{i+1}, \dots, u_m}
		\\	+ f (y; u_1, \dots, u_m) \cdot a - a \cdot f (y; u_1, \dots, u_m),
		\end{multlined}
\\	\llbracket a, b \rrbracket & = a \cdot b - b \cdot a,
\quad \text{for $f \in CY^m (M,A)$, $y \in Y_m$ and $a, b \in A = CY^0 (M,A)$}.
\end{align*}
With all the above notations, we have the following interesting result.
\endgroup

\begin{theo}\label{mc-thm-opp}
Let $A$ be an associative algebra and $M$ be an $A$-bimodule. Then the pair $\parens[\big]{CY^\bullet (M, A), \llbracket\vide\rrbracket}$ is a graded Lie algebra. Moreover, a linear map $P \colon M \to A$ is a relative averaging operator if and only if $P \in CY^1(M, A)$ is a Maurer--Cartan element in the graded Lie algebra $\parens[\big]{CY^\bullet (M, A), \llbracket\vide\rrbracket}$.
\end{theo}

\begin{proof}
The first part follows from the previous discussion. To prove the second part, we first observe that any linear map $P \colon M \to A$ can be identified with an element (denoted by the same notation) $P \in CY^1(M,A)$, where $P \parens[\big]{\Yone{0.08}; u} = P(u)$, for $u \in M$ and the unique tree $\Yone{0.08} \in Y_1$. With this identification, it follows from~\eqref{tr-tr} that
\begin{gather*}
\llbracket P, P \rrbracket \parens[\big]{\Ytwoa{0.08} ; u, v} = 2 \parens[\bigg]{
P \parens[\big]{\underbrace{\Delta \parens[\big]{\Ytwoa{0.08} ; P(u), v}}_{= 0}}
+ P \parens[\big]{\underbrace{\Delta \parens[\big]{\Ytwoa{0.08} ; u, P(v)}}_{= u \cdot_M P(v)}} - \underbrace{\Delta \parens[\big]{\Ytwoa{0.08} ; P(u), P(v)}}_{= P(u) \cdot P(v)}},
\\
\llbracket P, P \rrbracket \parens[\big]{\Ytwob{0.08} ; u, v} = 2 \parens[\bigg]{P \parens[\big]{\underbrace{\Delta \parens[\big]{\Ytwob{0.08} ; P(u), v}}_{= P(u) \cdot_M v}}
+ P \parens[\big]{\underbrace{\Delta \parens[\big]{\Ytwob{0.08} ; u, P(v)}}_{= 0}}
- \underbrace{\Delta \parens[\big]{\Ytwob{0.08} ; P(u), P(v)}}_{= P(u) \cdot P(v)}},
\end{gather*}
for $u, v \in M$. Hence $P$ is a Maurer--Cartan element (i.e.\ $\llbracket P, P \rrbracket = 0$) if and only if $P$ is a relative averaging operator.
\end{proof}


Let $A$ be an associative algebra and $M$ be an $A$-bimodule. In the previous theorem, we have seen that any relative averaging operator $P \colon M \to A$ can be considered as a Maurer--Cartan element in the graded Lie algebra $\parens[\big]{CY^\bullet (M, A), \llbracket\vide\rrbracket}$. Hence a relative averaging operator $P$ induces a differential
\[
d_P \coloneqq \llbracket P, - \rrbracket \colon CY^n (M, A) \to CY^{n+1}(M,A), 
\quad \text{for $n \geq 0$},
\]
which makes $\braces[\big]{CY^\bullet (M, A), d_P}$ into a cochain complex. The corresponding cohomology is called the \emph{cohomology} of the relative averaging operator $P$, and the $n$-th cohomology group is denoted by $H^n_P (M,A)$. Moreover, the differential $d_P$ makes the triple $\parens[\big]{CY^\bullet(M,A), d_P, \llbracket\vide\rrbracket}$ into a differential graded Lie algebra. This differential graded Lie algebra controls the deformations of the relative averaging operator $P$ (see the theorem below). For this reason, we call the differential graded Lie algebra $\braces[\big]{CY^\bullet (M, A), d_P}$ as the \emph{controlling algebra} for the operator $P$.

\begin{theo}
Let $P \colon M \to A$ be a relative averaging operator. For any linear map $P' \colon M \to A$, the sum $P + P'$ is also a relative averaging operator if and only if $P'$ is a Maurer--Cartan element in the differential graded Lie algebra $\parens[\big]{CY^\bullet (M, A), d_P, \llbracket\vide\rrbracket}$.
\end{theo}

\begin{proof}
Note that the sum $P+P'$ is a relative averaging operator if and only if $\llbracket P+ P', P+ P' \rrbracket = 0$, equivalently,
\[
\llbracket P,P' \rrbracket + \llbracket P',P \rrbracket + \llbracket P',P' \rrbracket = 0.
\]
This holds if and only if $d_P (P') + \frac{1}{2} \llbracket P', P' \rrbracket = 0$, which is equivalent to the fact that $P'$ is a Maurer--Cartan element in the differential graded Lie algebra $\parens[\big]{CY^\bullet (M, A), d_P, \llbracket\vide\rrbracket}$.
\end{proof}

In the next, we show that the cohomology of a relative averaging operator $P \colon M \to A$ can be seen as the cohomology of the induced diassociative algebra $M_P$ with coefficients in a suitable representation on $A$. We start with the following result which is a particular case of Proposition~\ref{aa-b}.

\begin{prop}
Let $P \colon M \to A$ be a relative averaging operator. Then there is a representation of the induced diassociative algebra $M_P$ on the vector space $A$ with the action maps
\begin{alignat*}{2}
	& \dashv \colon M_P \times A \to A, \quad	&& u \dashv a = P(u) \cdot a - P (u \cdot_M a),
\\	& \vdash \colon M_P \times A \to A, 		&& u \vdash a = P(u) \cdot a,
\\	& \dashv \colon A \times M_P \to A, 		&& a \dashv u = a \cdot P(u),
\\	& \vdash \colon A \times M_P \to A, 		&& a \vdash u = a \cdot P(u) - P (a \cdot_M u).
\end{alignat*}
\end{prop}

It follows from the above proposition that one may define the cohomology of the induced diassociative algebra $M_P$ with coefficients in the above representation on $A$. More precisely, we consider the cochain complex $\braces[\big]{CY^\bullet (M_P, A), \delta_{\Diass}^P}$, where $CY^n (M_P, A) \coloneqq \Hom \parens[\big]{\mathbf{k}[Y_n] \otimes M^{\otimes n}, A}$ for $n \geq 0$, and the coboundary map $\delta_{\Diass}^P \colon CY^n (M_P, A) \to CY^{n+1} (M_P, A)$ given by
\begin{multline*}
\delta_{\Diass}^P (f)(y; u_1, \dots, u_{n+1}) = u_1 \star_0^y f(d_0 y ; u_2, \dots, u_{n+1})
\\	+ \sum_{i=1}^n (-1)^i f \parens[\big]{d_i y ; u_1, \dots, u_i (\star_i^y)_P u_{i+1}, \dots, u_{n+1}} + (-1)^{n+1} f(d_{n+1} y; u_1, \dots u_n) \star_{n+1}^y u_{n+1},
\end{multline*}
for $f \in CY^n (M_P, A)$, $y \in Y_{n+1}$ and $u_1, \dots, u_{n+1} \in M$. Here $(\star_i^y)_P$ represents the product $\dashv_P$ or $\vdash_P$ accordingly when $\star_i^y$ is given by $\dashv$ or $\vdash$. We denote the $n$-th cohomology group of cochain complex $\braces[\big]{CY^\bullet (M_P, A), \delta_{\Diass}^P}$ by $H^n_{\Diass}(M_P, A)$.

\begin{prop}\label{n-mult}
Let $P \colon M \to A$ be a relative averaging operator. Then the coboundary operators $d_P$ and $\delta_{\Diass}^P$ are related by
\[
d_P (f) = (-1)^n \delta_{\Diass}^P (f),
\quad \text{for $f \in CY^n (M, A)$}.
\]
\end{prop}

\begingroup
\allowdisplaybreaks
\begin{proof}
For any $y \in Y_{n+1}$ and $u_1, \dots, u_{n+1} \in M$, we have
\begin{align*}
	& \parens[\big]{d_P (f)} (y; u_1, \dots, u_{n+1})
\\	& \quad  = \llbracket P, f \rrbracket (y; u_1, \dots, u_{n+1})
\\	& \quad  = P \parens[\big]{\Delta \parens[\big]{R_0^{2;1,n}(y); f \parens[\big]{R_1^{2;1,n} (y); u_1, \dots, u_n}, u_{n+1}}}
\\	& \qquad - (-1)^n P \parens[\big]{\Delta \parens[\big]{R_0^{2;2,n} (y) ; u_1, f \parens[\big]{R_2^{2;2,n} (y); u_2, \dots, u_{n+1}}}}
\\	& \qquad - (-1)^n \sum_{i=1}^n (-1)^{i-1} f \parens[\big]{R_0^{n;i, 2} (y) ; u_1, \dots, u_{i-1}, \Delta \parens[\big]{R_{i}^{n;i, 2} (y); P(u_i), u_{i+1}}, u_{i+2}, \dots, u_{n+1}}
\\	& \qquad + (-1)^n \sum_{i=1}^n (-1)^i f \parens[\big]{R_0^{n;i, 2} (y) ; u_1, \dots, u_{i-1}, \Delta \parens[\big]{R_i^{n;i,2} (y); u_i, P(u_{i+1})}, u_{i+2}, \dots, u_{n+1}}
\\	& \qquad + (-1)^n \Delta \parens[\big]{R_0^{2;2,n} (y) ; P(u_1), f \parens[\big]{R_2^{2;2,n} (y), u_2, \dots, u_{n+1}}}
\\	& \qquad - \Delta \parens[\big]{R_0^{2;1,n} (y); f \parens[\big]{R_1^{2;1,n} (y); u_1, \dots, u_n}, P(u_{n+1})}
\\	& \quad	 = (-1)^n \biggl\{\Delta \parens[\big]{R_0^{2;2,n} (y) ; P(u_1), f \parens[\big]{R_2^{2;2,n} (y), u_2, \dots, u_{n+1}}}
\\	& \qquad - P \parens[\big]{\Delta \parens[\big]{R_0^{2;2,n} (y) ; u_1, f \parens[\big]{R_2^{2;2,n} (y); u_2, \dots, u_{n+1}}}} 		\\	& \qquad		\begin{multlined}[b][.927\displaywidth]
				+ {\sum_{i=1}^n} (-1)^i f \parens[\big]{R_0^{n;i, 2} (y) ; u_1, \dots, u_{i-1},
				\\	\underbrace{\Delta \parens[\big]{R_{i}^{n;i, 2} (y); P(u_i), u_{i+1}} + \Delta \parens[\big]{R_i^{n;i,2} (y); u_i, P(u_{i+1})}}_{= u_i (\star_i^y)_P u_{i+1}}, 
		u_{i+2}, \dots, u_{n+1}}
				\end{multlined}
\\	& \qquad +(-1)^{n+1} \Delta \parens[\big]{R_0^{2;1,n} (y); f \parens[\big]{R_1^{2;1,n} (y); u_1, \dots, u_n}, P(u_{n+1})}
\\	& \qquad - (-1)^{n+1} P \parens[\big]{\Delta \parens[\big]{R_0^{2;1,n}(y); f \parens[\big]{R_1^{2;1,n} (y); u_1, \dots, u_n}, u_{n+1}}}\biggr\}
\\	& \quad  = (-1)^n \braces[\Bigg]{u_1 \star_0^y f (d_0(y); u_2, \dots, u_{n+1}) + \sum_{i=1}^n (-1)^i f (R_0^{n;i,2} (y); u_1, \dots, u_{i-1}, u_i (\star_i^y)_P u_{i+1}, \dots, u_{n+1})
\\	& \qquad + (-1)^{n+1} f(d_{n+1}(y); u_1, \dots, u_n) \star_{n+1}^y u_{n+1}} \quad (\text{as $R_2^{2;2,n} (y) = d_0 (y)$ and $R_1^{2;1,n} (y) = d_{n+1}(y)$})
\\	& \quad  = (-1)^{n} \parens[\big]{\delta_{\Diass}^P (f)} (u_1, \dots, u_{n+1}).
\end{align*}
This completes the proof.
\end{proof}
\endgroup

It follows from the above proposition that the cohomology of a relative averaging operator~$P$ is isomorphic to the cohomology of the diassociative algebra $M_P$ with coefficients in the representation $A$. That is,
\[
H^\bullet_P (M,A) \cong H^\bullet_{\Diass} (M_P, A).
\]

\begin{rema}
The cohomology of a relative averaging operator $P$ is useful to study deformations of the operator $P$ by keeping the underlying algebra and bimodule intact. See~\cite{das-rota} for the similar deformation theory of relative Rota--Baxter operators.
\end{rema}

\subsection*{Cohomological relation with diassociative algebras}

Let $P \colon M \to A$ be a relative averaging operator. In the following, we find the relation between the cohomology of the relative averaging operator $P$ and the cohomology of the induced diassociative algebra $M_P$ with coefficients in the adjoint representation. To do this, we define a collection $\{\Theta_n\}_{n=0}^\infty$ of maps
\[
\Theta_n \colon CY^n (M, A) \to CY^{n+1}(M_P, M_p)
\]
by
\begin{equation}\label{theta-n}
\Theta_n (f) (y; u_1, \dots, u_{n+1}) =
\begin{cases}
	(-1)^{n+1} u_1 \cdot_M f (y_1; u_2, \dots, u_{n+1}) & \text{if $y = | \vee y_1$ for some $n\text{-tree} y_1$},
\\	f (y_1; u_1, \dots, u_n) \cdot_M u_{n+1} & \text{if $y = y_1 \vee |$ for some $n$-tree $y_1$},
\\	0 & \text{otherwise},
\end{cases}
\end{equation}
for $u_1, \dots, u_{n+1} \in M$. Then we have the following.

\begin{lemm}
For $f \in CY^m (M, A)$ and $g \in CY^n (M, A)$, we have
\[
\bracks[\big]{\Theta_m (f), \Theta_n (g)}_{\MM} = \Theta_{m+n} \parens[\big]{\llbracket f,g \rrbracket}.
\]
In other words, the collection $\{\Theta_n\}_{n=0}^\infty$ defines a morphism of graded Lie algebras from $\parens[\big]{CY^\bullet (M,A),$ $\llbracket\vide\rrbracket}$ to $\parens[\big]{CY^{\bullet +1} (M_P, M_P), [\vide]_{\MM}}$.
\end{lemm}

\begin{proof}
Let $y \in Y_{m+n+1}$ be an $(m+n+1)$-tree and $u_0, u_1, \dots, \dots, u_{m+n}$ be elements of $M$. If $y = | \vee y_1$, for some $(m+n)$-tree $y_1$, then
\begin{align*}
	& \bracks[\big]{\Theta_m (P), \Theta_n (Q)}_{\MM} \parens[\big]{y; u_0, u_1, \dots, u_{m+n}}
\\	& \quad  = \parens[\Bigg]{\sum_{i=1}^{m+1} (-1)^{(i-1)n} \Theta_m (P) \circ_i \Theta_n (Q) - (-1)^{mn} \sum_{i=1}^{n+1} (-1)^{(i-1)m} \Theta_n (Q) \circ_i \Theta_m (P)} \parens[\big]{y; u_0, u_1, \dots, u_{m+n}}
\\	& \quad  = \Theta_m (P) \parens[\big]{R_0^{m+1; 1, n+1} (y); \Theta_n (Q) \parens[\big]{R_1^{m+1;1,n+1} (y); u_0, \dots, u_n}, u_{n+1}, \dots, u_{m+n}}
\\	& \qquad		\begin{multlined}[b][.924\displaywidth]
				+ \sum_{i=1}^m (-1)^{in} \Theta_m (P) \parens[\big]{R_0^{m+1; i+1, n+1} (y); u_0, \dots, u_{i-1},
				\\	\Theta_n (Q) \parens[\big]{R_{i+1}^{m+1; i+1, n+1} (y); u_i, \dots, u_{i+n}}, u_{i+n+1}, \dots, u_{m+n}}
				\end{multlined}
\\	& \qquad - (-1)^{mn} \Biggl\{\Theta_n (Q) \parens[\big]{R_0^{n+1; 1, m+1} (y); \Theta_m (P) \parens[\big]{R_1^{n+1;1,m+1} (y); u_0, \dots, u_m}, u_{m+1}, \dots, u_{m+n}}
\\	& \qquad		\begin{multlined}[b][.924\displaywidth]
				+ \sum_{i=1}^n (-1)^{im} \Theta_n (Q) \parens[\big]{R_0^{n+1; i+1, m+1} (y); u_o, \dots, u_{i-1},
				\\	\Theta_m (P) \parens[\big]{R_{i+1}^{n+1; i+1, m+1} (y); u_i, \dots, u_{i+m}}, u_{i+m+1}, \dots, u_{m+n}}\Biggr\}
				\end{multlined}
\\	& \quad = (-1)^{m+n+1} u_0 \cdot_M \parens[\big]{\llbracket P, Q \rrbracket (y_1; u_1, \dots, u_{m+n})}
\\	& \quad = \parens[\big]{\Theta_{m+n} \llbracket P, Q \rrbracket} (y; u_0, u_1, \dots, u_{m+n}).
\end{align*}
On the other hand, if $y = y_1 \vee |$, for some $(m+n)$-tree $y_1$, and $u_1, \dots, u_{m+n+1}$ are elements of $M$, then
\begin{align*}
	& \bracks[\big]{\Theta_m (P), \Theta_n (Q)}_{\MM} (y; u_1, u_2, \dots, u_{m+n+1})
\\	& \quad  = \parens[\Bigg]{\sum_{i=1}^{m+1} (-1)^{(i-1)n} \Theta_m (P) \circ_i \Theta_n (Q) - (-1)^{mn} \sum_{i=1}^{n+1} (-1)^{(i-1)m} \Theta_n (Q) \circ_i \Theta_m (P)} \parens[\big]{y; u_0, u_1, \dots, u_{m+n}}
\\	& \quad  = \sum_{i=1}^m (-1)^{(i-1) n} \Theta_m (P) \parens[\big]{R_0^{m+1; i, n+1} (y) ; u_1, \dots, u_{i-1}, \Theta_n (Q) \parens[\big]{R_i^{m+1; i, n+1} (y) ; u_i, \dots, u_{i+n}}, \dots, u_{m+n+1}}
\\	& \qquad + (-1)^{mn} \Theta_m (P) \parens[\big]{R_0^{m+1; m+1, n+1} (y); u_1, \dots, u_{m}, \Theta_n (Q) \parens[\big]{R_{m+1}^{m+1; m+1, n+1} (y); u_{m+1}, \dots, u_{m+n+1}}}
\\	& \qquad		\begin{multlined}[b][.955\displaywidth]
				- (-1)^{mn} \Biggl\{\sum_{i=1}^n (-1)^{(i-1) m} \Theta_n (Q) \parens[\big]{R_0^{n+1; i, m+1} (y) ; u_1, \dots, u_{i-1},
				\\	\Theta_m (P) \parens[\big]{R_i^{n+1; i, m+1} (y) ; u_i, \dots, u_{i+m}}, \dots, u_{m+n+1}}
				\end{multlined}
\\	& \qquad + (-1)^{mn} \Theta_n (Q) \parens[\big]{R_0^{n+1; n+1, m+1} (y); u_1, \dots, u_{n}, \Theta_m (P) \parens[\big]{R_{n+1}^{n+1; n+1, m+1} (y); u_{n+1}, \dots, u_{m+n+1}}}\Biggr\}
\\	& \quad  = \parens[\big]{\llbracket P, Q \rrbracket (y; u_1, \dots, u_{m+n})} \cdot_M u_{m+n+1} = \parens[\big]{\Theta_{m+n} \llbracket P, Q \rrbracket} (y; u_1, \dots, u_{m+n+1}).
\end{align*}
Finally, for any other $y$'s in $Y_{m+n+1}$ (that are not of the form $| \vee y_1$ or $y_1 \vee |$), one can easily verify from the partial compositions~\eqref{partial-comp} that
\[
\bracks[\big]{\Theta_m (P), \Theta_n (Q)} (y; u_0, u_1, \dots, u_{m+n}) = 0 = \parens[\big]{\Theta_{m+n} \llbracket P, Q \rrbracket} (y; u_0, u_1, \dots, u_{m+n}).
\]
This concludes the proof.
\end{proof}

Let $\pi_P \in CY^2 (M_P, M_P)$ be the Maurer--Cartan element corresponding to the induced diassociative algebra $M_P$. In other words, $\pi_P$ is given by
\begin{equation*}
\pi_P \parens[\big]{\Ytwoa{0.08} ; u, v} = u \dashv_P v 
\quad \text{and}
\quad
\pi_P \parens[\big]{\Ytwob{0.08} ; u, v} = u \vdash_P v,
\quad \text{for $u, v \in M$}.
\end{equation*}

Then it follows from the above lemma and the fact that a differential graded Lie algebra morphism preserves Maurer--Cartan elements, we have the following commutative diagram:
\[
\xymatrix{CY^n(M, A) \ar[rr]^{\Theta_n} \ar[d]_{\delta^P_{\Diass} = (-1)^n d_P} && CY^{n+1} (M_P, M_P) \ar[d]^{\delta_{\Diass} = (-1)^n [\pi_P,\cdot\,]_{\MM}} \\
CY^{n+1} (M, A) \ar[rr]_{\Theta_{n+1}} && CY^{n+2} (M_P, M_P).}
\]
As a consequence, we get the following result.

\begin{theo}\label{n-func}
Let $P \colon M \to A$ be a relative averaging operator. Then there is a morphism
\[
\Theta_\bullet \colon {H^\bullet_P (M, A)} \to H^{\bullet +1}_{\Diass} (M_P, M_P)
\]
from the cohomology of the relative averaging operator $P$ to the cohomology of the induced diassociative algebra $M_P$ with coefficients in the adjoint representation.
\end{theo}

\section{The controlling algebra and cohomology for relative averaging algebras}\label{sec-5}

In this section, we first construct an $L_\infty$-algebra whose Maurer--Cartan elements are precisely relative averaging algebras. Next, given a relative averaging algebra, we construct the corresponding controlling $L_\infty$-algebra. Finally, we define the cohomology of a relative averaging algebra with coefficients in a given bimodule.

\subsection*{\texorpdfstring{$L_\infty$}{L\_ infty}-algebras}

The notion of $L_\infty$-algebras (also known as strongly homotopy Lie algebras) first appeared in the work of Lada and Stasheff~\cite{lada-stasheff}. In this paper, we follow the equivalent definition by a degree shift~\cite{lada-markl}.

\begin{defi}
An \emph{$L_\infty$-algebra} is a pair $\parens[\big]{L,\{l_k\}^\infty_{k=1}}$ consisting of a graded vector space $L =\bigoplus_{i \in \mathbb{Z}} L_i$ equipped with a collection $\braces[\big]{l_k \colon L^{\otimes k} \to L}_{k=1}^\infty$ of degree~$1$ graded linear maps that are graded symmetric in the sense that
\[
l_k (x_{\sigma (1)}, \dots, x_{\sigma (k)}) = \epsilon (\sigma) l_k (x_1, \dots, x_k),
\quad \text{for $k \geq 1$ and $\sigma \in \mathbb{S}_k$},
\]
and satisfy the following higher Jacobi identities:
\[
\sum_{i+j= n+1} \sum_{\sigma \in \mathbb{S}_{(i, n-i)}} \epsilon (\sigma)~l_j \parens[\big]{l_i (x_{\sigma(1)}, \dots, x_{\sigma(i)}), x_{\sigma (i+1)}, \dots, x_{\sigma(n)}} = 0,
\]
for all $n \geq 1$ and homogeneous elements $x_1, \dots, x_n \in {L}$. Here $\epsilon (\sigma)$ is the Koszul sign that appears in the graded context.
\end{defi}

Throughout the paper, we assume that all $L_\infty$-algebras are weakly filtered~\cite{getzler} (see also~\cite{laza-rota}). Thus, certain infinite sums in $L$ are always convergent.

\begin{defi}
Let $\parens[\big]{{L},\{l_k\}^\infty_{k=1}}$ be an $L_\infty$-algebra. An element $\alpha \in {L}_0$ is said to be a \emph{Maurer--Cartan element} of the $L_\infty$-algebra if it satisfies
\[
l_1 (\alpha) + \frac{1}{2\mathpunct{!}} l_2 (\alpha, \alpha) + \dots + \frac{1}{n\mathpunct{!}} l_n (\alpha, \dots, \alpha) + \dots \cdot = 0 \qquad \text{i.e.} \ \sum_{k=1}^\infty \frac{1}{k\mathpunct{!}} l_k (\alpha, \dots, \alpha) = 0.
\]
\end{defi}

If $\parens[\big]{{L},\{l_k\}^\infty_{k=1}}$ is an $L_\infty$-algebra and $\alpha \in {L}_0$ is a Maurer--Cartan element of it, then one can construct a new $L_\infty$-algebra $\parens[\big]{{L},\{l_k^\alpha\}^\infty_{k=1}}$ on the same graded vector space ${L}$ with the structure maps given by
\[
l_k^\alpha (x_1, \dots, x_k) = l_k (x_1, \dots, x_k) + l_{1+k} (\alpha, x_1, \dots, x_k) + \dots + \frac{1}{n\mathpunct{!}} l_{n+k} (\underbrace{\alpha, \dots, \alpha}_{\text{$n$ copies}}, x_1, \dots, x_k) + \dots \cdot,
\quad \text{for $k \geq 1$}.
\]
This is called the $L_\infty$-algebra obtained from $\parens[\big]{{L},\{l_k\}^\infty_{k=1}}$ twisted by the Maurer--Cartan element $\alpha$.

\begin{rema}[\cite{getzler}]\label{rem-get}
Let $\alpha$ be a Maurer--Cartan element of the $L_\infty$-algebra $\parens[\big]{{L},\{l_k\}^\infty_{k=1}}$. Then for any $\alpha' \in L_0$, the sum $\alpha + \alpha'$ is a Maurer--Cartan element of the $L_\infty$-algebra $\parens[\big]{{L},\{l_k\}^\infty_{k=1}}$ if and only if $\alpha'$ is a Maurer--Cartan element of the twisted $L_\infty$-algebra $\parens[\big]{{L},\{l_k^\alpha\}^\infty_{k=1}}$.
\end{rema}

There is a well-known construction of an $L_\infty$-algebra given by Voronov~\cite{voro}. Let $(\mathfrak{g}, \mathfrak{a}, p, \Delta)$ be a quadruple consisting of a graded Lie algebra $\mathfrak{g}$ (with the graded Lie bracket $[\vide]$), an abelian graded Lie subalgebra $\mathfrak{a} \subset \mathfrak{g}$, a projection map $p \colon \mathfrak{g} \to \mathfrak{g}$ with $\image(p) = \mathfrak{a}$ and $\ker(p) \subset \mathfrak{g}$ a graded Lie subalgebra, and an element $\Delta \in \ker(p)_1$ that satisfies $[\Delta, \Delta] = 0$. Such a quadruple is called a \emph{$V$-data}.

\begin{theo}\label{v-data-l}
Let $(\mathfrak{g}, \mathfrak{a}, p, \Delta)$ be a $V$-data.
\begin{enumerate}[leftmargin=*]
\item \label{v-data-l_i} The graded vector space $\mathfrak{a}$ can be equipped with an $L_\infty$-algebra with the structure maps
\[
l_k (a_1, \dots, a_k) = p \bracks[\big]{\dotsb \bracks[\big]{[\Delta, a_1], a_2}, \dots, a_k}, \quad \text{for $k \geq 1$}.
\]
\item \label{v-data-l_ii} Let $\mathfrak{h} \subset \mathfrak{g}$ be a graded Lie subalgebra that satisfies $[\Delta, \mathfrak{h}] \subset \mathfrak{h}$. Then the graded vector space $s^{-1} \mathfrak{h} \oplus \mathfrak{a}$ can be given an $L_\infty$-algebra with the structure maps
\begin{align*}
	l_1 \parens[\big]{(s^{-1}x, a)} & = \parens[\big]{-s^{-1}[\Delta, x], p \parens[\big]{x + [\Delta, a]}},
\\	l_2 \parens[\big]{(s^{-1}x,0), (s^{-1}y, 0)} & = \parens[\big]{(-1)^{\abs{x}} s^{-1}[x, y], 0},
\\	l_k \parens[\big]{(s^{-1}x,0),(0, a_1), \dots, (0,a_{k-1})} & = \parens[\big]{0, p \bracks[\big]{\dotsb \bracks[\big]{[x, a_1], a_2}, \dots, a_{k-1}}}, \quad k \geq 2,
\\	l_k \parens[\big]{(0,a_1), \dots, (0,a_k)} & = \parens[\big]{0, p \bracks[\big]{\dotsb \bracks[\big]{[\Delta, a_1], a_2}, \dots, a_k}}, \quad k \geq 2,
\end{align*}
for homogeneous elements $x, y \in \mathfrak{h}$ (which are considered as elements $s^{-1}x, s^{-1} y \in s^{-1} \mathfrak{h}$ by a degree shift) and homogeneous elements $a_1, \dots, a_k \in \mathfrak{a}$. Up to permutations of the above inputs, all other maps vanish.
\end{enumerate}
\end{theo}

\subsection*{Maurer--Cartan characterization of relative averaging algebras}

Let $A$ and $M$ be two vector spaces. Consider the graded Lie algebra
\[
\mathfrak{g} = \parens[\big]{\textstyle\bigoplus_{n = 0}^\infty CY^{n+1} (A \oplus M, A \oplus M), [\vide]_{\MM}}
\]
associated to the vector space $A \oplus M$. For any $k, l \geq 0$, let $\mathcal{A}^{k, l}$ be the direct sum of all possible $(k+l)$ tensor powers of $A$ and $M$ in which $A$ appears $k$ times and $M$ appears $l$ times. For instance,
\[
\mathcal{A}^{2,0} = A \otimes A,
\qquad \mathcal{A}^{0,2} = M \otimes M
\qquad \text{and}
\qquad \mathcal{A}^{1,1} = (A \otimes M) \oplus (M \otimes A).
\]
Then for any $n \geq 1$, there is an isomorphism $(A \oplus M)^{\otimes n} \cong \bigoplus_{k+l=n} \mathcal{A}^{k,l}$ of vector spaces. A linear map $f \in CY^{n+1} (A \oplus M, A \oplus M)$ is said to have \emph{bidegree} $k \vert l$ with $k+l = n$ if
\[
\begin{aligned}
	& f \parens[\big]{\mathbf{k}[Y_{n+1}] \otimes \mathcal{A}^{k+1, l}} \subset A,
\\	& f \parens[\big]{\mathbf{k}[Y_{n+1}] \otimes \mathcal{A}^{k, l+1}} \subset M
\\	\text{and} \qquad & f = 0 \quad \text{otherwise}.
\end{aligned}
\]
We denote the set of all linear maps of bidegree $k \vert l$ by $CY^{k \vert l} (A \oplus M, A \oplus M)$. Note that there are natural isomorphisms
\begin{align*}
	CY^{k \vert 0} (A \oplus M, A \oplus M) & \cong \Hom \parens[\big]{\mathbf{k}[Y_{k+1}] \otimes A^{\otimes k+1}, A} \oplus \Hom \parens[\big]{\mathbf{k}[Y_{k+1}] \otimes \mathcal{A}^{k, 1}, M},
\\	CY^{-1 \vert l} (A \oplus M, A \oplus M) & \cong \Hom \parens[\big]{\mathbf{k}[Y_l] \otimes M^{\otimes l}, A}.
\end{align*}
Moreover, we have the following interesting result.

\begin{prop}\label{deg-pre}
For $f \in CY^{k_f \vert l_f} (A \oplus M, A \oplus M)$ and $g \in CY^{k_g \vert l_g} (A \oplus M, A \oplus M)$, we have
\[
[f, g]_{\MM} \in CY^{k_f + k_g \vert l_f + l_g} (A \oplus M, A \oplus M).
\]
\end{prop}

\begin{proof}
Let $f \in CY^{m+1} (A \oplus M, A \oplus M)$ and $g \in CY^{n+1} (A \oplus M, A \oplus M)$. Then we have $k_f + l_f = m$ and $k_g + l_g = n$. For any $y \in Y_{m+n+1}$, $1 \leq i \leq m+1$ and $x_1 \otimes \dots \otimes x_{m+n+1} \in \mathcal{A}^{k_f + k_g + 1, l_f + l_g}$, we have
\begin{multline}\label{fg-term}
(f \circ_i g) \parens[\big]{y ; x_1, \dots, x_{m+n+1}}
\\	= f \parens[\big]{R_0^{m+1; i, n+1} (y) ; x_1, \dots, x_{i-1}, g \parens[\big]{R_{i}^{m+1; i, n+1} (y); x_i, \dots, x_{i+n}}, \dots, x_{m+n+1}}.
\end{multline}
Note that the term $g \parens[\big]{R_{i}^{m+1; i, n+1} (y); x_i, \dots, x_{i+n}}$ is nonvanishing only when the tensor product $x_i \otimes x_{i+1} \otimes \dots \otimes x_{i+n}$ lies in $\mathcal{A}^{k_g +1, l_g}$ or lies in $\mathcal{A}^{k_g, l_g + 1}$.
\begin{case}
Let $x_i \otimes x_{i+1} \otimes \dots \otimes x_{i+n} \in \mathcal{A}^{k_g +1, l_g}$. In this case, $g \parens[\big]{R_{i}^{m+1; i, n+1} (y); x_i, \dots, x_{i+n}} \in A$. Hence the tensor product
\[
x_1 \otimes \dots \otimes x_{i-1} \otimes g \parens[\big]{R_{i}^{m+1; i, n+1} (y); x_i, \dots, x_{i+n}} \otimes x_{i+n+1} \otimes \dots \otimes x_{m+n+1} \in \mathcal{A}^{k_f +1, l_f}.
\]
As a consequence, the term~\eqref{fg-term} lies in $A$.
\end{case}
\begin{case}
Let $x_i \otimes x_{i+1} \otimes \dots \otimes x_{i+n} \in \mathcal{A}^{k_g, l_g + 1}$. In this case, $g \parens[\big]{R_{i}^{m+1; i, n+1} (y); x_i, \dots, x_{i+n}} \in M$. Hence the tensor product
\[
x_1 \otimes \dots \otimes x_{i-1} \otimes g \parens[\big]{R_{i}^{m+1; i, n+1} (y); x_i, \dots, x_{i+n}} \otimes x_{i+n+1} \otimes \dots \otimes x_{m+n+1} \in \mathcal{A}^{k_f +1, l_f}.
\]
As a consequence, the term~\eqref{fg-term} also lies in $A$. Therefore, we always have $(f \circ_i g) (\mathcal{A}^{k_f + k_g +1, l_f + l_g}) \subset A$. Similarly, we can show that
\[
\begin{aligned}
	& (f \circ_i g) (\mathcal{A}^{k_f + k_g, l_f + l_g + 1}) \subset M
\\	\text{and} \qquad & f \circ_i g = 0 \quad \text{otherwise}.
\end{aligned}
\]
By interchanging the roles of $f$ and $g$, we get similar results for $g \circ_i f$. Therefore, it follows from~\eqref{mm-circ} that
\[
\begin{aligned}
	& [f, g]_{\MM} (\mathcal{A}^{k_f + k_g +1, l_f + l_g}) \subset A,
\\	& [f, g]_{\MM} (\mathcal{A}^{k_f + k_g, l_f + l_g +1}) \subset M
\\	\text{and} \qquad & [f, g]_{\MM} = 0 \quad \text{otherwise}.
\end{aligned}
\]
Hence we get that $[f, g]_{\MM} \in CY^{k_f + k_g \vert l_f + l_g} (A \oplus M, A \oplus M)$. \qedhere
\end{case}
\let\qed\relax
\end{proof}

As a consequence of the previous proposition, we get the following.

\begin{prop}\label{sublie}
Let $A$ and $M$ be two vector spaces. Then:
\begin{enumerate}\romanenumi
\item $\mathfrak{h} = CY^{\bullet \vert 0} (A \oplus M, A \oplus M) = \bigoplus_{n = 0}^\infty CY^{n \vert 0} (A \oplus M, A \oplus M) \subset \mathfrak{g}$ is a graded Lie subalgebra;
\item $\mathfrak{a} = CY^{-1 \vert \bullet +1} (A \oplus M, A \oplus M) = \bigoplus_{n = 0}^\infty CY^{-1 \vert n +1} (A \oplus M, A \oplus M) \subset \mathfrak{g}$ is an abelian subalgebra.
\end{enumerate}
\end{prop}

Next, we construct a $V$-data as follows. Let $\mathfrak{g} = \parens[\big]{\bigoplus_{n = 0}^\infty CY^{n+1} (A \oplus M, A \oplus M), [\vide]_{\MM}}$ be the graded Lie algebra associated to the vector space $A \oplus M$. Consider the abelian Lie subalgebra $\mathfrak{a} = \bigoplus_{n = 0}^\infty CY^{-1 \vert n +1} (A \oplus M, A \oplus M)$, and let $p \colon \mathfrak{g} \to \mathfrak{g}$ be the projection onto the subspace $\mathfrak{a}$. Then the quadruple $(\mathfrak{g}, \mathfrak{a}, p, \overline{\Delta} = 0)$ is a $V$-data. Moreover, it follows from Proposition~\ref{sublie} that $\mathfrak{h} = \bigoplus_{n = 0}^\infty CY^{n \vert 0} (A \oplus M, A \oplus M)$ is a graded Lie subalgebra of $\mathfrak{g}$ that obviously satisfies $[\overline{\Delta}, \mathfrak{h}]_{\MM} \subset \mathfrak{h}$. Hence by applying Theorem~\ref{v-data-l}, we obtain the following.

\begin{theo}\label{ll-iinnff}
Let $A$ and $M$ be two vector spaces. Then there is an $L_\infty$-algebra structure on the graded vector space $s^{-1} \mathfrak{h} \oplus \mathfrak{a}$ with the structure maps $\{l_k\}_{k = 1}^\infty$ are given by
\begin{align*}
	l_2 \parens[\big]{(s^{-1} f,0),(s^{-1} g,0)} & = \parens[\big]{(-1)^{\abs{f}} \, s^{-1} [f,g]_{\MM}, 0},
\\	l_k \parens[\big]{(s^{-1}f,0),(0, h_1), \dots, (0,h_{k-1})} & = \parens[\big]{0,p \bracks[\big]{\dotsb \bracks[\big]{[f, h_1]_{\MM}, h_2}_{\MM}, \dots, h_{k-1}}_{\MM}},
\quad k \geq 2,
\end{align*}
for homogeneous elements $f, g \in \mathfrak{h}$ (considered as elements $s^{-1} f, s^{-1} g \in s^{-1} \mathfrak{h}$) and homogeneous elements $h_1, \dots, h_{k-1} \in \mathfrak{a}$. Up to permutations of the above entries, all other maps vanish.
\end{theo}

Let $A$ and $M$ be two vector spaces. Suppose there are maps
\[
\mu \in \Hom (A^{\otimes 2}, A),
\quad l_M \in \Hom (A \otimes M, M),
\quad r_M \in \Hom (M \otimes A, M)
\quad \text{and}
\quad P \in \Hom (M, A).
\]
We define an element $\Delta \in \mathfrak{h}_1 = CY^{1 \vert 0} (A \oplus M, A \oplus M) = \Hom \parens[\big]{\mathbf{k}[Y_2] \otimes A^{\otimes 2}, A} \oplus \Hom\parens[\big]{\mathbf{k}[Y_2] \otimes \mathcal{A}^{1,1}, M}$ by
\begin{align}\label{del-del}
\Delta \parens[\big]{\Ytwoa{0.08} ; (a, u), (b, v)} = \parens[\big]{\mu (a, b), r_M(u, b)}
\qquad \text{and} \qquad 
\Delta \parens[\big]{\Ytwob{0.08} ; (a, u), (b, v)} = \parens[\big]{\mu(a, b), l_M(a, v)},
\end{align}
for $(a, u), (b, v) \in A \oplus M$. Note that $\Delta$ can be regarded as an element $s^{-1} \Delta \in (s^{-1} \mathfrak{h})_0$.

\begin{theo}\label{mc-ravg-thm}
With the above notations, $A_\mu \coloneqq (A, \mu)$ is an associative algebra, $M_{l_M, r_M} \coloneqq (M, l_M, r_M)$ is an $A_\mu$-bimodule and $P \colon M \to A$ is a relative averaging operator (in short, $M_{l_M,r_M} \overset{P}{\to} A_\mu$ is a relative averaging algebra) if and only if $\alpha = (s^{-1} \Delta, P) \in (s^{-1} \mathfrak{h} \oplus \mathfrak{a})_0$ is a Maurer--Cartan element of the $L_\infty$-algebra $\parens[\big]{s^{-1} \mathfrak{h} \oplus \mathfrak{a}, \{l_k\}_{k=1}^\infty}$.
\end{theo}

\begin{proof}
First observe that $l_1 \parens[\big]{(s^{-1} \Delta, P)} = 0$. Moreover, it follows from Proposition~\ref{deg-pre} that
\begin{align*}
	& [\Delta, P]_{\MM} \in CY^{0 \vert 1} (A \oplus M, A \oplus M),
\\	& \bracks[\big]{[\Delta, P]_{\MM}, P}_{\MM} \in CY^{-1 \vert 2} (A \oplus M, A \oplus M)
\\	\text{and} \qquad & \bracks[\big]{\bracks[\big]{[\Delta, P]_{\MM}, P}_{\MM}, P}_{\MM} \in CY^{-2 \vert 3} (A \oplus M, A \oplus M).
\end{align*}
Since the space $CY^{-2 \vert 3} (A \oplus M, A \oplus M)$ is trivial, we have $\bracks[\big]{\bracks[\big]{[\Delta, P]_{\MM}, P}_{\MM}, P}_{\MM} =0$. As a consequence, we have $l_k \parens[\big]{(s^{-1} \Delta, P), \dots, (s^{-1} \Delta, P)} = 0$ for $k \geq 4$. Hence
\begin{multline}\label{some-ee}
\smash{\sum_{k=1}^\infty} \frac{1}{k\mathpunct{!}} l_k \parens[\big]{(s^{-1} \Delta, P), \dots, (s^{-1} \Delta, P)} 
\\	\begin{aligned}
		& = \frac{1}{2\mathpunct{!}} l_2 \parens[\big]{(s^{-1} \Delta, P), (s^{-1} \Delta, P)} + \frac{1}{3\mathpunct{!}} l_3 \parens[\big]{(s^{-1} \Delta, P), (s^{-1} \Delta, P), (s^{-1} \Delta, P)}
	\\	& = \parens[\big]{- \tfrac{1}{2} s^{-1} [\Delta, \Delta]_{\MM}, \: \tfrac{1}{2} \bracks[\big]{[\Delta, P]_{\MM}, P}_{\MM}}.
	\end{aligned}
\end{multline}
Observe that
\begin{align*}
	[\Delta, \Delta]_{\MM} & = 0 \ \text{if and only if $A_\mu$ is an associative algebra and $M_{l_M, r_M}$ is an $A_\mu$-bimodule},
\\	\bracks[\big]{[\Delta, P]_{\MM}, P}_{\MM} & = 0 \ \text{if and only if $P$ is a relative averaging operator (cf.\ Theorem \ref{mc-thm-opp})}.
\end{align*}
Thus, it follows from~\eqref{some-ee} that $\alpha = (s^{-1} \Delta, P)$ is a Maurer--Cartan element of the $L_\infty$-algebra $\parens[\big]{s^{-1} \mathfrak{h} \oplus \mathfrak{a}, \{l_k\}_{k=1}^\infty}$ if and only if $M_{l_M,r_M} \overset{P}{\to} A_\mu$ is a relative averaging algebra.
\end{proof}

Let $M_{l_M,r_M} \overset{P}{\to} A_\mu$ be a given relative averaging algebra. Here $\mu$ denotes the associative multiplication on $A$, and $l_M, r_M$ respectively denote the left and right $A$-actions on $M$. We have seen in the previous theorem that $\alpha = (s^{-1} \Delta, P) \in (s^{-1} \mathfrak{h} \oplus \mathfrak{a})_0$ is a Maurer--Cartan element of the $L_\infty$-algebra $\parens[\big]{s^{-1} \mathfrak{h} \oplus \mathfrak{a}, \{l_k\}_{k=1}^\infty}$, where $\Delta$ is given by~\eqref{del-del} or~\eqref{del-de}. Therefore, we can consider the $L_\infty$-algebra $\parens[\big]{s^{-1} \mathfrak{h} \oplus \mathfrak{a}, \braces{l_k^{(s^{-1} \Delta, P)}}_{k=1}^\infty}$ twisted by the Maurer--Cartan element $\alpha = (s^{-1} \Delta, P)$. Then by following Remark~\ref{rem-get}, we get the next result.

\begin{theo}
Let $M_{l_M, r_M} \overset{P}{\to} A_\mu$ be a given relative averaging algebra with the corresponding Maurer--Cartan element $\alpha = (s^{-1} \Delta, P) \in (s^{-1} \mathfrak{h} \oplus \mathfrak{a})_0$. Suppose there are maps
\[
\begin{aligned}
	& \mu' \in \Hom (A^{\otimes 2}, A),
\\	& l'_M \in \Hom (A \otimes M, M),
\\	& r'_M \in \Hom (M \otimes A, M)
\\	\text{and} \qquad & P' \in \Hom (M, A).
\end{aligned}
\]
Then $M_{l_M + l'_M, r_M+ r'_M} \xrightarrow{P+P'} A_{\mu+ \mu'}$ is a relative averaging algebra if and only if $\alpha' = (s^{-1} \Delta', P')$ is a Maurer--Cartan element of the $L_\infty$-algebra $\parens[\big]{s^{-1} \mathfrak{h} \oplus \mathfrak{a}, \braces{l_k^{(s^{-1} \Delta, P)}}_{k=1}^\infty}$, where $\Delta'$ is defined in similar to~\eqref{del-del}.
\end{theo}

The above theorem shows that the $L_\infty$-algebra $\parens[\big]{s^{-1} \mathfrak{h} \oplus \mathfrak{a}, \braces{l_k^{(s^{-1} \Delta, P)}}_{k=1}^\infty}$ controls the deformations of the relative averaging algebra $M_{l_M, r_M} \overset{P}{\to} A_\mu$. For this reason, the $L_\infty$-algebra $\parens[\big]{s^{-1} \mathfrak{h} \oplus \mathfrak{a}, \braces{l_k^{(s^{-1} \Delta, P)}}_{k=1}^\infty}$ is called the \emph{controlling algebra} for the given relative averaging algebra \smash{$M_{l_M, r_M} \overset{P}{\to} A_\mu$}.

\begin{rema}\label{last-rem}
Let $M \overset{P}{\to} A$ be a relative averaging algebra. Since the corresponding controlling algebra $\parens[\big]{s^{-1} \mathfrak{h} \oplus \mathfrak{a}, \braces{l_k^{(s^{-1} \Delta, P)}}_{k=1}^\infty}$ is an $L_\infty$-algebra, it follows that $(l_1^{(s^{-1} \Delta, P)})^2 = 0$. We will use this fact in the construction of the cochain complex of the relative averaging algebra $M \overset{P}{\to} A$.
\end{rema}

\subsection*{Cohomology of relative averaging algebras (with adjoint bimodule)}

Here we will define the cohomology of a relative averaging algebra $M \overset{P}{\to} A$ (with coefficients in the adjoint bimodule). For each $n \geq 0$, we define an abelian group $C^n_{\rAvg} (M \overset{P}{\to} A)$ by
\[
C^n_{\rAvg} (M \overset{P}{\rightarrow} A) =
\begin{cases}
	0 & \text{if $n=0$},
\\	\Hom(A,A) \oplus \Hom(M, M) & \text{if $n=1$},
\\	\Hom(A^{\otimes n}, A) \oplus \Hom(\mathcal{A}^{n-1, 1}, M) \oplus \Hom\parens[\big]{\mathbf{k}[Y_{n-1}] \otimes M^{\otimes n-1}, A} & \text{if $n \geq 2$}.
\end{cases}
\]
Before we define the coboundary map $\delta_{\rAvg} \colon C^n_{\rAvg} (M \overset{P}{\to} A) \to C^{n+1}_{\rAvg} (M \overset{P}{\to} A)$, we observe the following. First, there is an embedding $\Hom \parens[\big]{(A \oplus M)^{\otimes n}, A \oplus M} \hookrightarrow \Hom \parens[\big]{\mathbf{k}[Y_n] \otimes (A \oplus M)^{\otimes n}, A \oplus M}$, $f \mapsto \widetilde{f}$, where $\widetilde{f}$ is given by
\[
\widetilde{f} (y; x_1, \dots, x_n) = f(x_1, \dots, x_n),
\quad \text{for all $y \in Y_n$ and $x_1, \dots, x_n \in A \oplus M$}.
\]
With this, the classical Gerstenhaber bracket $[\vide]_{\Gersten}$ on the graded space $\bigoplus_{n=1}^\infty \Hom \parens[\big]{(A \oplus M)^{\otimes n}, A \oplus M}$ embeds into the Majumdar--Mukherjee bracket $[\vide]_{\MM}$. When we restrict the above embedding, we obtain embeddings
\begin{alignat*}{2}
	\Hom(A^{\otimes n}, A) & \longhookrightarrow \Hom\parens[\big]{\mathbf{k} [Y_n] \otimes A^{\otimes n}, A},
	& \quad f & \mapsto \widetilde{f},
\\	\Hom(\mathcal{A}^{n-1, 1}, M) & \longhookrightarrow \Hom\parens[\big]{\mathbf{k}[Y_n] \otimes \mathcal{A}^{n-1, 1}, M},
	& \quad g & \mapsto \widetilde{g}.
\end{alignat*}
Note that an element $(f,g) \in C^1_{\rAvg} (M \overset{P}{\to} A) = \Hom (A,A) \oplus \Hom(A,A)$ can be identified with the element $\parens[\big]{s^{-1} (\widetilde{f} + \widetilde{g}), 0} \in (s^{-1} \mathfrak{h} \oplus \mathfrak{a})_{-1}$. Here we assume that $\mathfrak{a}_{-1} = 0$. Similarly, an element $(f,g, \gamma) \in C^{n \geq 2}_{\rAvg} (M \overset{P}{\to} A)$ can be identified with the element $\parens[\big]{s^{-1} (\widetilde{f} + \widetilde{g}), \gamma} \in (s^{-1} \mathfrak{h} \oplus \mathfrak{a})_{n-2}$. Using the above identifications, we now define a map $\delta_{\rAvg} \colon C^n_{\rAvg} (M \overset{P}{\to} A) \to C^{n+1}_{\rAvg} (M \overset{P}{\to} A)$ by
\begin{alignat}{2}
	\delta_{\rAvg} \parens[\big]{(f,g)} & = - l_1^{(s^{-1} \Delta, P)} \parens[\big]{s^{-1} (\widetilde{f}+\widetilde{g}), 0},
	\quad && \text{for $(f,g) \in C^1_{\rAvg} (M \overset{P}{\rightarrow} A)$},
\\	\delta_{\rAvg} \parens[\big]{(f,g, \gamma)} & = (-1)^{n-2} l_1^{(s^{-1} \Delta, P)} \parens[\big]{s^{-1} (\widetilde{f}+\widetilde{g}), \gamma},
	\quad && \text{for $(f,g,h) \in C^{n \geq 2}_{\rAvg} (M \overset{P}{\rightarrow} A)$}.
\end{alignat}
It follows from Remark~\ref{last-rem} that $(\delta_{\rAvg})^2 = 0$. In other words, $\braces[\big]{C^\bullet_{\rAvg} (M \overset{P}{\to} A), \delta_{\rAvg}}$ is a cochain complex. The corresponding cohomology is called the \emph{cohomology} of the relative averaging algebra $M \overset{P}{\to} A$. We denote the corresponding $n$-th cohomology group by $H^n_{\rAvg} (M \overset{P}{\to} A)$.

Note that
\begin{align}\label{ident-diff}
	& \delta_{\rAvg} \parens[\big]{(f, g, \gamma)} \nonumber
\\	& \quad  = (-1)^{n-2} l_1^{(s^{-1} \Delta, P)} \parens[\big]{s^{-1} (\widetilde{f} + \widetilde{g}), \gamma} \nonumber
\\	& \quad  = (-1)^{n-2} \sum_{k=0}^\infty \frac{1}{k\mathpunct{!}} l_{k+1} \parens[\big]{\underbrace{(s^{-1} \Delta, P), \dots, (s^{-1} \Delta, P)}_{\text{$k$ times}}, \parens[\big]{s^{-1} (\widetilde{f} + \widetilde{g}), \gamma}} \nonumber
\\	& \quad	\begin{multlined}[b][.885\displaywidth] \nonumber
			= (-1)^{n-2} \braces[\bigg]{l_2 \parens[\big]{(s^{-1} \Delta, 0),
				\parens[\big]{s^{-1} (\widetilde{f} + \widetilde{g}), 0}} + l_3 \parens[\big]{(s^{-1} \Delta, 0), (0,P), (0, \gamma)}
			\\	+ \frac{1}{n\mathpunct{!}} l_{n+1} \parens[\big]{\parens[\big]{s^{-1} (\widetilde{f} + \widetilde{g}), 0}, \underbrace{(0, P), \dots, (0, P)}_{\text{$n$ times}}}} \quad (\text{as the other terms vanish})
			\end{multlined}
\\	& \quad = (-1)^{n-2} \parens[\bigg]{-s^{-1} [\Delta, \widetilde{f} + \widetilde{g}]_{\MM}, \ \bracks[\big]{[\Delta, P]_{\MM}, \gamma}_{\MM} + \frac{1}{n\mathpunct{!}} \underbrace{\bigl[\dotsb \bigl[[}_{\text{$n$ times}} \!\! \widetilde{f} + \widetilde{g}, P]_{\MM}, P\bigr]_{\MM}, \dots, P\bigr]_{\MM}} \nonumber
\\	& \quad	\begin{multlined}[b][.885\displaywidth]
			= \parens[\bigg]{(-1)^{n-1} s^{-1} [\Delta, \widetilde{f} + \widetilde{g}]_{\MM},
			\\	\underbrace{(-1)^{n}\bracks[\big]{[\Delta, P]_{\MM}, \gamma}_{\MM}}_{\text{$= \delta_{\Diass}^P (\gamma)$}} + \underbrace{\frac{(-1)^n}{n\mathpunct{!}} \bracks[\big]{\dotsb \bracks[\big]{[\widetilde{f} + \widetilde{g}, P]_{\MM}, P}_{\MM}, \dots, P}_{\MM}}_{\text{$= h_P (f,g)$ (say)}}}.
			\end{multlined}
\end{align}
Using the above identifications, the term~\eqref{ident-diff} (which lies in $(s^{-1} \mathfrak{h} \oplus \mathfrak{a})_{n-1}$) can be identified with the element
\[
\parens[\Big]{(-1)^{n-1} [\mu, f]_{\Gersten}, \ (-1)^{n-1} [\mu + l_M + r_M, f + g]_{\Gersten}, \ \delta_{\Diass}^P (\gamma) + h_P (f, g)} \in C^{n+1}_{\rAvg} (M \overset{P}{\rightarrow} A).
\]
Here the first component $(-1)^{n-1} [\mu, f]_{\Gersten}$ is nothing but $\delta_{\Hoch}(f)$, where $\delta_{\Hoch}$ is the Hochschild coboundary operator of the associative algebra $A$ with coefficients in the adjoint $A$-bimodule. We denote the second component $(-1)^{n-1} [\mu + l_M + r_M, f + g]_{\Gersten} \in \Hom(\mathcal{A}^{n,1}, M)$ by the notation $\delta_{\Hoch}^f (g)$ and it is given by
\begin{multline*}
\parens[\big]{\delta_{\Hoch}^f (g)}(a_1, \dots, a_{n+1}) = a_1 \cdot_M (f+g)(a_2, \dots, a_{n+1})
\\	+ \sum_{i=1}^n (-1)^i g (a_1, \dots, a_{i-1}, (\mu + \cdot_M) (a_i, a_{i+1}), \dots, a_{n+1}) + (-1)^{n+1} (f+g)(a_1, \dots, a_{n}) \cdot_M a_{n+1},
\end{multline*}
for $a_1 \otimes \dots \otimes a_{n+1} \in \mathcal{A}^{n,1}$ (i.e.\ all $a_i$'s are from $A$ except one, which is from $M$). Finally, to better understand the term $h_P (f,g)$, we first realize an element of $\Hom \parens[\big]{\mathbf{k}[Y_l] \otimes (A \oplus M)^{\otimes l}, A \oplus M}$ as a degree $(l-1)$ coderivation on the free dendriform coalgebra $\bigoplus_{n=1}^\infty \mathbf{k}[Y_n] \otimes (s^{-1} A \oplus s^{-1} M)^{\otimes n}$. See~\cite{val-manin} for details. With this identification, the Majumdar--Mukherjee bracket can be seen as the commutator bracket of coderivations on the dendriform coalgebra $\bigoplus_{n=1}^\infty \mathbf{k}[Y_n] \otimes (s^{-1} A \oplus s^{-1} M)^{\otimes n}$. Hence, for any $y \in Y_n$ (say $y = y_1 \vee y_2$ for some unique $(i-1)$-tree $y_1 \in Y_{i-1}$ and $(n-i)$-tree $y_2 \in Y_{n-i}$) and $u_1, \dots, u_n \in M$,
\begin{multline*}
\parens[\big]{h_P (f,g)} (y; u_1, \dots, u_n)
\\	\begin{aligned}
		& = \frac{(-1)^n}{n\mathpunct{!}} \sum_{j=0}^n (-1)^j \binom{n}{j} \parens[\big]{\underbrace{P \circ \dots \circ P}_{\text{$j$ times}} \circ (\widetilde{f} + \widetilde{g}) \circ \underbrace{P \circ \dots \circ P}_{\text{$(n-j)$ times}}} (y; u_1, \dots, u_n)
	\\	& = \frac{(-1)^n}{n\mathpunct{!}} \braces[\big]{n\mathpunct{!} f \parens[\big]{P(u_1), \dots, P(u_n)} - n (n-1)\mathpunct{!} P g \parens[\big]{P(u_1), \dots, u_i, \dots, P(u_n)}}
	\\	& = (-1)^n \braces[\big]{f \parens[\big]{P(u_1), \dots, P(u_n)} - P g \parens[\big]{P(u_1), \dots, P(u_{i-1}), u_i, P(u_{i+1}), \dots, P(u_n)}}.
	\end{aligned}
\end{multline*}
Hence the coboundary map $\delta_{\rAvg}$ is given by $\delta_{\rAvg} \parens[\big]{(f,g, \gamma)} = \parens[\big]{\delta_{\Hoch} (f), \delta_{\Hoch}^f (g), \delta_{\Diass}^P (\gamma) + h_P (f,g)}$, for $(f, g, \gamma) \in C^n_{\rAvg} (M \overset{P}{\to} A)$.

Let $M \overset{P}{\to} A$ be a relative averaging algebra. In the following, we construct a long exact sequence that connects the cohomology of the operator $P$ and the cohomology of the full relative averaging algebra $M \overset{P}{\to} A$. We first consider a new cochain complex $\braces[\big]{C^\bullet_{\AssBimod} (\prescript{A}M^A, \prescript{A}M^A), \delta_{\AssBimod}}$, where
\[
C^0_{\AssBimod} (\prescript{A}M^A, \prescript{A}M^A) = 0
\qquad \text{and}
\qquad C^{n \geq 1}_{\AssBimod} (\prescript{A}M^A, \prescript{A}M^A) = \Hom(A^{\otimes n}, A) \oplus \Hom(\mathcal{A}^{n-1,1}, M).
\]
The coboundary map $\delta_{\AssBimod}$ is given by
\[
\delta_{\AssBimod} \parens[\big]{(f,g)} = \parens[\big]{\delta_{\Hoch} (f), \delta_{\Hoch}^f (g)}, 
\quad \text{for $(f,g) \in C^{n \geq 1}_{\AssBimod} (\prescript{A}M^A, \prescript{A}M^A)$}.
\]
We denote the $n$-th cohomology of this complex by $H^{n}_{\AssBimod} (\prescript{A}M^A, \prescript{A}M^A)$. Since this cohomology captures precisely the information of the associative algebra $A$ and the $A$-bimodule $M$, we call this cohomology the cohomology of the associative bimodule $\prescript{A} M^{A}$ (i.e.\ associative algebra $A$ together with the $A$-bimodule $M$).

\begin{theo}\label{long-thm}
Let $M \overset{P}{\to} A$ be a relative averaging algebra. Then there is a long exact sequence
\begin{equation}\label{long-long}
\dotsb \to H^{n-1}_P (M, A) \to H^n_{\rAvg} (M \overset{P}{\rightarrow} A) \to H^n_{\AssBimod} (\prescript{A}M^A, \prescript{A}M^A) \to H^{n}_P (M, A) \to \dotsb.
\end{equation}
\end{theo}

\begin{proof}
Note that there is a short exact sequence of cochain complexes
\begin{multline*}
0
\to \braces[\big]{CY^{\bullet -1} (M_P, A), \delta^P_{\Diass}}
\to \braces[\big]{C^\bullet_{\rAvg} (M \overset{P}{\rightarrow} A), \delta_{\rAvg}}
\\	\to \braces[\big]{C^\bullet_{\AssBimod} (\prescript{A}M^A, \prescript{A}M^A), \delta_{\AssBimod}}
\to 0
\end{multline*}
with obvious maps between complexes. This short exact sequence induces the long exact sequence~\eqref{long-long} on the cohomology groups.
\end{proof}

\paragraph{Cohomology of an averaging algebra (with coefficients in the adjoint bimodule)}
Let $A \overset{P}{\to} A$ be an averaging algebra. For each $n \geq 0$, we define the space $C^n_{\Avg} (A \overset{P}{\to} A)$ of $n$-cochains by
\[
C^n_{\Avg} (A \overset{P}{\rightarrow} A) =
\begin{cases}
	0 & \text{if $n = 0$},
\\	\Hom (A, A) & \text{if $n=1$},
\\	\Hom (A^{\otimes n}, A) \oplus \Hom \parens[\big]{\mathbf{k}[Y_{n-1}] \otimes A^{\otimes n-1}, A} & \text{if $n \geq 2$}.
\end{cases}
\]
Then there is an embedding ${i} \colon C^n_{\Avg} (A \overset{P}{\to} A) \hookrightarrow C^n_{\rAvg} (A \overset{P}{\to} A)$ given by
\begin{alignat}{2}
	i (f) & = (f,f),
	& \quad & \text{for $f \in C^1_{\Avg} (A \overset{P}{\rightarrow} A)$},
\\	{i} (f, \gamma) & = (f, f, \gamma),
	& \quad & \text{for $(f, \gamma) \in C^{n \geq 2}_{\Avg} (A \overset{P}{\rightarrow} A)$}.
\end{alignat}
Let $(f, \gamma) \in C^{n}_{\Avg} (A \overset{P}{\to} A)$. Here we assume that $\gamma = 0$ when $n =1$. Then
\[
\delta_{\rAvg} \parens[\big]{i(f, \gamma)} = \delta_{\rAvg} \parens[\big]{(f,f,\gamma)} = \parens[\big]{\delta_{\Hoch} (f), \underbrace{\delta_{\Hoch}^f (f)}_{= \delta_{\Hoch} (f)}, \delta_{\Diass}^P (\gamma) + h_P (f,f)} \in \image(i).
\]
This shows that the map $\delta_{\rAvg} \colon C^n_{\rAvg} (A \overset{P}{\to} A) \to C^{n+1}_{\rAvg} (A \overset{P}{\to} A)$ restricts to a map
\[
\delta_{\Avg} \colon C^n_{\Avg} (A \overset{P}{\rightarrow} A)
\ \to \
C^{n+1}_{\Avg} (A \overset{P}{\rightarrow} A)
\]
that satisfies $\delta_{\rAvg} \circ i = i \circ \delta_{\Avg}$. Explicity, the map $\delta_{\Avg}$ is given by
\[
\delta_{\Avg} \parens[\big]{(f, \gamma)} = \parens[\big]{\delta_{\Hoch} (f), \delta_{\Diass}^P (\gamma) + h_P (f,f)},
\quad \text{for $(f, \gamma) \in C^n_{\Avg} (A \overset{P}{\rightarrow} A)$}.
\]
It follows from the condition $(\delta_{\rAvg})^2 = 0$ that the map $\delta_{\Avg}$ is also a differential (i.e.\ $(\delta_{\Avg})^2 = 0$). Hence $\braces[\big]{C^\bullet_{\Avg} (A \overset{P}{\to} A), \delta_{\Avg}}$ is a cochain complex. The corresponding cohomology is called the \emph{cohomology} of the averaging algebra $A \overset{P}{\to} A$. We denote the $n$-th cohomology group by $H^n_{\Avg} (A \overset{P}{\to} A)$.

The next result shows that the cohomology of an averaging algebra fits into a long exact sequence. This is a particular case of Theorem~\ref{long-thm}.

\begin{theo}
Let $A \overset{P}{\to} A$ be an averaging algebra. Then there is a long exact sequence
\[
\dotsb \to H^{n-1}_P (A, A) \to H^n_{\Avg} (A \overset{P}{\rightarrow} A) \to H^n_{\Hoch} (A, A) \to H^n_P (A,A) \to \dotsb.
\]
Here $H^n_P (A,A) $ is the $n$-th cohomology group of the averaging operator $P$ and $H^n_{\Hoch}(A,A)$ is the $n$-th Hochschild cohomology group of the associative algebra $A$.
\end{theo}

\subsection*{Cohomology of relative averaging algebras (with arbitrary bimodule)}

Here we will introduce the cohomology of a relative averaging algebra with coefficients in a bimodule. We will use this cohomology in Section~\ref{sec-7} to study abelian extensions.

Let $M \overset{P}{\to} A$ be a relative averaging algebra and $(N \overset{Q}{\to} B, l, r)$ be a bimodule over it. For each $n \geq 0$, we define the space of $n$-cochains $C^n_{\rAvg} (M \overset{P}{\to} A; N \overset{Q}{\to} B)$ by
\[
C^n_{\rAvg} (M \overset{P}{\rightarrow} A; N \overset{Q}{\rightarrow} B) =
\begin{cases}
	0 & \text{if $n=0$},
\\	\Hom(A,B) \oplus \Hom(M, N) & \text{if $n=1$},
\\	\Hom(A^{\otimes n}, B) \oplus \Hom(\mathcal{A}^{n-1, 1}, N) \oplus \Hom\parens[\big]{\mathbf{k}[Y_{n-1}] \otimes M^{\otimes n-1}, B} & \text{if $n \geq 2$}.
\end{cases}
\]
To define the coboundary map, we first consider the cochain complex $\braces[\big]{C^\bullet_{\rAvg} (M \oplus N \xrightarrow{P \oplus Q} A \oplus B), \delta_{\rAvg}}$ of the semidirect product relative averaging algebra $M \oplus N \xrightarrow{P \oplus Q} A \oplus B$ (given in Theorem~\ref{thm-semid}) with coefficients in the adjoint bimodule. Then for each $n \geq 0$, there is an obvious inclusion
\[
C^n_{\rAvg} (M \overset{P}{\rightarrow} A; N \overset{Q}{\rightarrow} B)
\ \longhookrightarrow \
C^n_{\rAvg} (M \oplus N \xrightarrow{P \oplus Q} A \oplus B).
\]
Moreover, the map $\delta_{\rAvg} \colon C^n_{\rAvg} (M \oplus N \xrightarrow{P \oplus Q} A \oplus B) \to C^{n+1}_{\rAvg} (M \oplus N \xrightarrow{P \oplus Q} A \oplus B)$ restricts to a map (denoted by the same notation) $\delta_{\rAvg} \colon C^n_{\rAvg} (M \overset{P}{\to} A; N \overset{Q}{\to} B) \to C^{n+1}_{\rAvg} (M \overset{P}{\to} A; N \overset{Q}{\to} B)$. Hence $\braces[\big]{C^\bullet_{\rAvg} (M \overset{P}{\to} A; N \overset{Q}{\to} B), \delta_{\rAvg}}$ becomes a cochain complex. Note that the restricted map $\delta_{\rAvg}$ is explicitly given by
\[
\delta_{\rAvg} \parens[\big]{(f, g, \gamma)} = \parens[\big]{\delta_{\Hoch} (f), \delta_{\Hoch}^f (g), \delta_{\Diass}^P (\gamma) + h_{P, Q} (f, g)},
\]
for $(f,g, \gamma) \in C^n_{\rAvg} (M \overset{P}{\to} A; N \overset{Q}{\to} B)$. Here $\delta_{\Hoch}$ is the Hochschild coboundary operator of the associative algebra $A$ with coefficients in the $A$-bimodule $B$, and for any $f \in \Hom(A^{\otimes n}, B)$, the map $\delta_{\Hoch}^f \colon \Hom(\mathcal{A}^{n-1, 1}, N) \to \Hom(\mathcal{A}^{n, 1}, N)$ is given by
\[
\begin{split}
\parens[\big]{\delta_{\Hoch}^f (g)} (a_1, \dots, a_{n+1})
	& = (l + \cdot_N) \parens[\big]{a_1, (f+g) (a_2, \dots, a_{n+1})}
\\	& \quad + \sum_{i=1}^n (-1)^i g \parens[\big]{a_1, \dots, a_{i-1}, (\mu + l_M + r_M) (a_i, a_{i+1}), \dots, a_{n+1}}
\\	& \quad + (-1)^{n+1} (r + \cdot_N) \parens[\big]{(f + g) (a_1, \dots, a_n), a_{n+1}},
\end{split}
\]
for $g \in \Hom(\mathcal{A}^{n,1}, N)$ and $a_1 \otimes \dots \otimes a_{n+1} \in \mathcal{A}^{n,1}$. The map $\delta_{\Diass}^P$ is the coboundary operator of the induced diassociative algebra $M_P$ with coefficients in the representation $B$ (given in Proposition~\ref{aa-b}). Finally, the map $h_{P, Q} (f,g)$ is given by
\[
\parens[\big]{h_{P, Q} (f,g)} (y; u_1, \dots, u_n) = (-1)^n \parens[\big]{f \parens[\big]{P(u_1), \dots, P(u_n)} - Qg \parens[\big]{P(u_1), \dots, u_i, \dots, P(u_n)}},
\]
for $y \in Y_n$ (which can be uniquely written as $y = y_1 \vee y_2$ for some $(i-1)$-tree $y_1$ and $(n-i)$-tree $y_2$) and $u_1, \dots, u_n \in M$.

The cohomology of the complex $\braces[\big]{C^\bullet_{\rAvg} (M \overset{P}{\to} A; N \overset{Q}{\to} B), \delta_{\rAvg}}$ is called the \emph{cohomology} of the relative averaging algebra $M \overset{P}{\to} A$ with coefficients in the bimodule $(N \overset{Q}{\to} B, l, r)$. We denote the $n$-th cohomology group by $H^n_{\rAvg} (M \overset{P}{\to} A; N \overset{Q}{\to} B)$.

\begin{rema}
In Example~\ref{avg-alg-bimod} we have seen that a bimodule over an averaging algebra can be seen as a bimodule over the corresponding relative averaging algebra. With this view, one can define the cohomology of an averaging algebra with coefficients in a bimodule over it.
\end{rema}

\vspace{.25\baselineskip}

\section{Deformations of relative averaging algebras}\label{sec-6}

\vspace{.25\baselineskip}

In this section, we study formal and infinitesimal deformations of a relative averaging algebra in terms of the cohomology theory. In particular, we show that the set of all equivalence classes of infinitesimal deformations of a relative averaging algebra $M \overset{P}{\to} A$ has a bijection with the second cohomology group $H^2_{\rAvg}(M \overset{P}{\to} A)$.

Let $\Ring$ be a commutative unital ring with unity $1_\Ring$. An augmentation of $\Ring$ is a homomorphism $\varepsilon \colon \Ring \to \mathbf{k}$ satisfying $\varepsilon (1_\Ring) = 1_\mathbf{k}$. Throughout this section, we assume that $\Ring$ is a commutative unital ring with an augmentation $\varepsilon$. Given such $\Ring$, one may always define the notion of $\Ring$-relative averaging algebra similar to Definition~\ref{first-defn}\eqref{first-defn_ii} by replacing the vector spaces and linear maps by $\Ring$-modules and $\Ring$-linear maps. In other words, an $\Ring$-relative averaging algebra is a relative averaging algebra in the category of $\Ring$-modules. Morphisms between $\Ring$-relative averaging algebras can be defined similarly. Note that any relative averaging algebra $M \overset{P}{\to} A$ can be regarded as an $\Ring$-relative averaging algebra, where the $\Ring$-module structures on $A$ and $M$ are respectively given by $r \cdot a = \varepsilon (r) a$ and $r \cdot u = \varepsilon (r) u$, for $r \in \Ring$, $a \in A$, $u \in M$.

\begin{defi}
An \emph{$\Ring$-deformation} of a relative averaging algebra $M \overset{P}{\to} A$ consists of a quadruple $(\mu_\Ring, l_\Ring, r_\Ring, P_\Ring)$ of $\Ring$-bilinear maps
\begin{align*}
	& \mu_\Ring \colon (\Ring \otimes_\mathbf{k} A) \times (\Ring \otimes_\mathbf{k} A) \to \Ring \times_\mathbf{k} A,
\\	& l_\Ring \colon (\Ring \otimes_\mathbf{k} A) \times (\Ring \otimes_\mathbf{k} M) \to \Ring \otimes_\mathbf{k} M,
\\	& r_\Ring \colon (\Ring \otimes_\mathbf{k} M) \times (\Ring \otimes_\mathbf{k} A) \to \Ring \otimes_\mathbf{k} M
\\	\text{and an $\Ring$-linear map} \ & P_\Ring \colon \Ring \otimes_\mathbf{k} M \to \Ring \otimes_\mathbf{k} A
\end{align*}
such that the following conditions hold:
\begin{enumerate}\romanenumi
\item $(\Ring \otimes_\mathbf{k} A, \mu_\Ring)$ is an $\Ring$-associative algebra, $(\Ring \otimes_\mathbf{k} M, l_\Ring, r_\Ring)$ a bimodule over it and the $\Ring$-linear map $P_R \colon \Ring \otimes_\mathbf{k} M \to \Ring \otimes_\mathbf{k} A$ is a relative averaging operator; in other words, $\Ring \otimes_\mathbf{k} M \xrightarrow{P_\Ring} \Ring \otimes_\mathbf{k} A$ is an $\Ring$-relative averaging algebra by considering the above structures on $\Ring \otimes_\mathbf{k} A$ and $\Ring \otimes_\mathbf{k} M$;
\item the pair $(\varepsilon \otimes_\mathbf{k} \id_A, \varepsilon \otimes_\mathbf{k} \id_M) \colon (\Ring \otimes_\mathbf{k} M \xrightarrow{P_\Ring} \Ring \otimes_\mathbf{k} A) \rightsquigarrow (M \overset{P}{\to} A)$ is a morphism of $\Ring$-relative averaging algebras.
\end{enumerate}
\end{defi}

\begin{defi}
Let $M \overset{P}{\to} A$ be a relative averaging algebra. Two $\Ring$-deformations $(\mu_\Ring, l_\Ring, r_\Ring, P_\Ring)$ and $(\mu'_\Ring, l'_\Ring, r'_\Ring, P'_\Ring)$ are said to be \emph{equivalent} if there exists an isomorphism of $\Ring$-relative averaging algebras
\[
(\Phi, \Psi) \colon (\Ring \otimes_\mathbf{k} M \xrightarrow{P_\Ring} \Ring \otimes_\mathbf{k} A) \longrightsquigarrow (\Ring \otimes_\mathbf{k} M \xrightarrow{P'_\Ring} \Ring \otimes_\mathbf{k} A)
\]
satisfying $(\varepsilon \otimes_\mathbf{k} \id_A) \circ \Phi = (\varepsilon \otimes_\mathbf{k} \id_A)$ and $(\varepsilon \otimes_\mathbf{k} \id_M) \circ \Psi = (\varepsilon \otimes_\mathbf{k} \id_M)$.
\end{defi}

\goodbreak

We will now consider the cases when $\Ring = \mathbf{k}\bbracks{t}$ (the ring of formal power series) and $\Ring = \mathbf{k}\bbracks{t} /(t^2)$ (the local Artinian ring of dual numbers). In the first case, an $\Ring$-deformation is called a formal deformation, and in the second case, an $\Ring$-deformation is called an infinitesimal deformation. A more precise description of formal deformation is given below.

\begin{defi}\label{formal-definition}
\
\begin{enumerate}[leftmargin=*]
\item \label{formal-definition_i} Let $M_{l_M, r_M} \overset{P}{\to} A_\mu$ be a given relative averaging algebra. A \emph{formal deformation} of it consists of a quadruple $(\mu_t, l_t, r_t, P_t)$ of formal sums
\begin{align}\label{formal-component}
\mu_t = \sum_{i=0}^\infty t^i \mu_i,
\qquad l_t = \sum_{i=0}^\infty t^i l_i,
\qquad r_t = \sum_{i=0}^\infty t^i r_i
\qquad \text{and}
\qquad P_t = \sum_{i=0}^\infty t^i P_i
\end{align}
(where $\mu_i \colon A \times A \to A$, $l_i \colon A \times M \to M$, $r_i \colon M \times A \to M$ and $P_i \colon M \to A$ are bilinear/linear maps, for $i \geq 0$, with $\mu_0 = \mu$, $l_0 = l_M$, $r_0 = r_M$ and $P_0 = P$) such that $A\bbracks{t} = \parens[\big]{A\bbracks{t}, \mu_t}$ is an associative algebra over $\mathbf{k} \bbracks{t}$, and $M\bbracks{t} = \parens[\big]{M\bbracks{t}, l_t, r_t}$ is a bimodule over the algebra $A\bbracks{t}$, and the $\mathbf{k}\bbracks{t}$-linear map $P_t \colon M \bbracks{t} \to A\bbracks{t}$ is a relative averaging operator. In other words, $M \bbracks{t} \xrightarrow{P_t} A\bbracks{t}$ is a relative averaging algebra over $\mathbf{k}\bbracks{t}$.
\item \label{formal-definition_ii} Two formal deformations $(\mu_t, l_t, r_t, P_t)$ and $(\mu_t', l_t', r_t', P_t')$ are \emph{equivalent} if there exists a pair $(\varphi_t, \psi_t)$ of formal sums
\[
\varphi_t = \sum_{i=0}^\infty t^i \varphi_i
\qquad \text{and}
\qquad \psi_t = \sum_{i=0}^\infty t^i \psi_i
\]
(where $\varphi_i \colon A \to A$ and $\psi_i \colon M \to M$ are linear maps, for $i \geq 0$, with $\varphi_0 = \id_A$ and $\psi_0 = \id_M$) such that
\[
(\varphi_t, \psi_t) \colon \parens[\big]{M\bbracks{t} \xrightarrow{P_t} A\bbracks{t}} \longrightsquigarrow \parens[\big]{M\bbracks{t} \xrightarrow{P_t'} A\bbracks{t}}
\]
is an isomorphism of relative averaging algebras over $\mathbf{k} \bbracks{t}$. Then we write $(\mu_t, l_t, r_t, P_t) \sim (\mu_t', l_t', r_t', P_t')$.
\end{enumerate}
\end{defi}

It follows from the above definition that a quadruple $(\mu_t, l_t, r_t, P_t)$ given by~\eqref{formal-component} is a formal deformation of the relative averaging algebra $M \overset{P}{\to} A$ if the following system of equations hold:
\begin{align}
	& \sum_{i+j = n}^{\hphantom{{i+j+k = n}}} \mu_i \parens[\big]{\mu_j (a, b), c} = \sum_{i+j = n} \mu_i \parens[\big]{a, \mu_j (b, c)}, \label{defeqn-1}
\\	& \sum_{i+j = n}^{\hphantom{{i+j+k = n}}} l_i \parens[\big]{\mu_j (a, b), u} = \sum_{i+j = n} l_i \parens[\big]{a, l_j (b, u)}, \label{defeqn-2}
\\	& \sum_{i+j = n}^{\hphantom{{i+j+k = n}}} r_i \parens[\big]{l_j (a, u), b} = \sum_{i+j = n} l_i \parens[\big]{a, r_j (u,b)}, \label{defeqn-3}
\\	& \sum_{i+j = n}^{\hphantom{{i+j+k = n}}} r_i \parens[\big]{r_j (u, a), b} = \sum_{i+j = n} r_i \parens[\big]{u, \mu_j (a,b)}, \label{defeqn-4}
\\	& \sum_{i+j+k = n} \mu_i \parens[\big]{P_j (u), P_k (v)} = \sum_{i+j+k = n} P_i \parens[\big]{l_j (P_k (u), v)} = \sum_{i+j+k = n} P_i \parens[\big]{r_j \parens[\big]{u, P_k (v)}}, \label{defeqn-5}
\end{align}
for all $a, b, c \in A$, $u,v \in M$ and $n \geq 0$. These are called the deformation equations. Note that the deformation equations hold for $n=0$ as $M_{l_M, r_M} \overset{P}{\to} A_\mu$ is a relative averaging algebra.

\paragraph{For $n=1$}
It follows from~\eqref{defeqn-1} that
\[
\mu_1 (a \cdot b, c) + \mu_1 (a, b) \cdot c = \mu_1 (a, b \cdot c) + a \cdot \mu_1 (b, c),
\quad \text{for $a, b, c \in A$},
\]
which is equivalent to $\delta_{\Hoch}(\mu_1) = 0$. To summarize the identities~\eqref{defeqn-2}, \eqref{defeqn-3}, \eqref{defeqn-4} for $n=1$, we define an element $\beta_1 \in \Hom(\mathcal{A}^{1,1}, M)$ by
\begin{equation}\label{beta-1}
\beta_1 (a, u) = l_1 (a, u)
\quad \text{and}
\quad \beta_1 (u, a) = r_1 (u, a), 
\quad \text{for $a \in A$, $u \in M$}.
\end{equation}
Then we get that $\delta_{\Hoch}^{\mu_1} (\beta_1) = 0$. Finally, the identity~\eqref{defeqn-5} for $n=1$ is equivalent to
\[
\parens[\big]{\delta_{\Diass}^P (P_1) + h_P (\mu_1, \beta_1)} (y; u, v) = 0, 
\quad \text{for $y = \Ytwoa{0.08}, \Ytwob{0.08}$ and $u, v \in M$}.
\]
Combining these, we get that $\delta_{\rAvg} (\mu_1, \beta_1, P_1) = 0$. In other words, $(\mu_1, \beta_1, P_1) \in Z^2_{\rAvg} (M \overset{P}{\to} A)$ is a $2$-cocycle in the cochain complex of the relative averaging algebra $M \overset{P}{\to} A$ with coefficients in the adjoint bimodule.

Next, let $(\mu_t, l_t, r_t, P_t)$ and $(\mu'_t, l'_t, r'_t, P'_t)$ be two equivalent formal deformations of a relative averaging algebra $M_{l_M, r_M} \overset{P}{\to} A_\mu$. Then it follows from Definition~\ref{formal-definition}\eqref{formal-definition_ii} that there exists a pair $(\varphi_t, \psi_t)$ of formal sums such that the following hold:
\begin{align*}
	\sum_{i+j=n} \varphi_i \parens[\big]{\mu_j (a, b)} & = \sum_{i+j+k =n} \mu_i' \parens[\big]{\varphi_j (a), \varphi_k (b)},
\\	\sum_{i+j=n} \psi_i \parens[\big]{l_j (a, u)} & = \sum_{i+j+k =n} l_i' \parens[\big]{\varphi_j (a), \psi_k (u)},
\\	\sum_{i+j=n} \psi_i \parens[\big]{r_j (u,a)} & = \sum_{i+j+k =n} r_i' \parens[\big]{\psi_j (u), \varphi_k (a)},
\\	\sum_{i+j = n} \varphi_i \circ P_j & = \sum_{i+j=n} P_i' \circ \psi_j,
\end{align*}
for $a, b \in A$ and $u \in M$. As before, all these relations hold for $n =0$ as $\varphi_0 = \id_A$ and $\psi_0 = \id_M$. However, for $n=1$, we get that
\begin{align*}
	\mu_1 (a, b) - \mu_1' (a, b) & = a \cdot \varphi_1 (b) + \varphi_1(a) \cdot b - \varphi_1 (a \cdot b),
\\	\beta_1 (a, u) - \beta_1' (a, u) & = a \cdot_M \psi_1 (u) + \varphi_1 (a) \cdot_M u - \psi_1 (a \cdot_M u),
\\	\beta_1 (u, a) - \beta_1' (u, a) & = u \cdot_M \varphi_1 (a) + \psi_1(u) \cdot_M a - \psi_1 (u \cdot_M a),
\\	P_1 - P_1' & = P \circ \psi_1 - \varphi_1 \circ P.
\end{align*}
Combining these relations, we get that
\[
(\mu_1, \beta_1, P_1) - (\mu_1', \beta_1', P_1) = \parens[\big]{\delta_{\Hoch} (\varphi_1), \delta_{\Hoch}^{\varphi_1} (\psi_1), h_P (\varphi_1, \psi_1)} = \delta_{\rAvg} \parens[\big]{(\varphi_1, \psi_1)}.
\]
Thus, equivalent formal deformations give rise to cohomologous $2$-cocycles.

As mentioned earlier, an infinitesimal deformation of a relative averaging algebra is an $\Ring$-deformation, where $\Ring = \mathbf{k}\bbracks{t}/(t^2)$. Thus, an infinitesimal deformation can be regarded as a truncated version (modulo $t^2$) of formal deformation. Equivalences between infinitesimal deformations can be defined similarly.

\begin{theo}
Let $M \overset{P}{\to} A$ be a relative averaging algebra. Then there is a bijection
\[
(\text{infinitesimal deformations of $M \overset{P}{\rightarrow} A$})/{\sim}
\ \leftrightsquigarrow \
H^2_{\rAvg} (M \overset{P}{\rightarrow} A).
\]
\end{theo}

\begin{proof}
Let $(\mu_t = \mu + t \mu_1, l_t = l + t l_1, r_t = r+ t r_1, P_t = P + t P_1)$ be an infinitesimal deformation of the relative averaging algebra $M \overset{P}{\to} A$. Then one can show that (similar to formal deformation) the triple $(\mu_1, \beta_1, P_1) \in Z^2_{\rAvg} (M \overset{P}{\to} A)$ is a $2$-cocycle, where $\beta_1 \in \Hom (\mathcal{A}^{1,1}, M)$ is given by~\eqref{beta-1}. Moreover, equivalent infinitesimal deformations give rise to cohomologous $2$-cocycles. Hence, there is a well-defined map
\[
\Gamma \colon (\text{infinitesimal deformations of $M \overset{P}{\rightarrow} A$})/{\sim}
\ \to \
H^2_{\rAvg} (M \overset{P}{\rightarrow} A).
\]
To obtain a map in the other direction, we first consider a $2$-cocycle $(\mu_1, \beta_1, P_1) \in Z^2_{\rAvg} (M \overset{P}{\to} A)$. Then it is easy to see that the $2$-cocycle $(\mu_1, \beta_1, P_1)$ induces an infinitesimal deformation
\[
(\mu_t = \mu + t \mu_1, l_t = l + t l_1, r_t = r+ t r_1, P_t = P + t P_1)
\]
of the relative averaging algebra $M \overset{P}{\to} A$, where the maps $l_1, r_1$ are defined from $\beta_1$ by~\eqref{beta-1}. Let $(\mu_1', \beta_1', P_1')$ be another $2$-cocycle cohomologous to $(\mu_1, \beta_1, P_1)$, i.e.\ $(\mu_1, \beta_1, P_1) - (\mu_1', \beta_1', P_1') = \delta_{\rAvg} \parens[\big]{(\varphi_1, \psi_1)}$, for some $(\varphi_1, \psi_1) \in C^1_{\rAvg} (M \overset{P}{\to} A)$. Then it is easy to verify that the corresponding infinitesimal deformations $(\mu_t, l_t, r_t, P_t)$ and $(\mu'_t, l'_t, r'_t, P'_t)$ are equivalent via the pair $(\varphi_t = \id_A + t \varphi_1, \psi_t = \id_M + t \psi_1)$. As a consequence, we obtain a map
\[
\Theta \colon H^2_{\rAvg} (M \overset{P}{\rightarrow} A)
\ \to \
(\text{infinitesimal deformations of $M \overset{P}{\rightarrow} A$})/{\sim}.
\]
Finally, it is routine task to check that the maps $\Gamma$ and $\Theta$ are inverses to each other. This completes the proof.
\end{proof}

\section{Abelian extensions of relative averaging algebras}\label{sec-7}

Our aim in this section is to study abelian extensions of a relative averaging algebra $M \overset{P}{\to} A$ by a bimodule $(N \overset{Q}{\to} B, l, r)$ of it. We show that the isomorphism classes of such abelian extensions are in bijective correspondence with the second cohomology group $H^2_{\rAvg} (M \overset{P}{\to} A; N \overset{Q}{\to} B)$.

Let $M \overset{P}{\to} A$ be a relative averaging algebra and $N \overset{Q}{\to} B$ be a $2$-term chain complex (not necessarily a bimodule). Note that $N \overset{Q}{\to} B$ can be regarded as a relative averaging algebra with the trivial associative multiplication on $B$ and the trivial $B$-bimodule structure on $N$. With this consideration, we have the following definition.

\begin{defi}
An \emph{abelian extension} of a relative averaging algebra $M \overset{P}{\to} A$ by a $2$-term chain complex $N \overset{Q}{\to} B$ is a relative averaging algebra $\widehat{M} \overset{\widehat{P}}{\to} \widehat{A}$ with a short exact sequence of relative averaging algebras of the form
\begin{equation}\label{abl-fig}
\begin{aligned}
\xymatrix{0 \ar[r] & N \ar[r]^{\overline{i}} \ar[d]_Q & \widehat{M} \ar[r]^{\overline{p}} \ar[d]^{\widehat{P}} & M \ar[r] \ar[d]^P & 0 \\
0 \ar[r] & B \ar[r]_i & \widehat{A} \ar[r]_p & A \ar[r] & 0.}
\end{aligned}
\end{equation}
Sometimes, we denote an abelian extension as above by the relative averaging algebra $\widehat{M} \overset{\widehat{P}}{\to} \widehat{A}$ when the exact sequence is understood.
\end{defi}

A section of the abelian extension~\eqref{abl-fig} is given by a pair $(s, \overline{s})$ of linear maps $s \colon A \to \widehat{A}$ and $\overline{s} \colon M \to \widehat{M}$ satisfying $p \circ s = \id_A$ and $\overline{p} \circ \overline{s} = \id_M$. Given any section $(s, \overline{s})$, we define two bilinear maps (both denoted by the same notation) $\cdot_B \colon A \times B \to B$ and $\cdot_B \colon B \times A \to B$ by
\[
a \cdot_B b = s(a) \cdot_{\widehat{A}} i(b)
\quad \text{and}
\quad b \cdot_B a = i(b) \cdot_{\widehat{A}} s(a),
\quad \text{for $a \in A$, $b \in B$}.
\]
These two maps make $B$ into an $A$-bimodule. Similarly, there are two bilinear maps (both denoted by the same notation) $\cdot_N \colon A \times N \to N$ and $\cdot_N \colon N \times A \to N$ given by
\[
a \cdot_N n = s(a) \cdot_{\widehat{M}} \overline{i}(n)
\quad \text{and}
\quad n \cdot_N a = \overline{i}(n) \cdot_{\widehat{M}} s(a),
\quad \text{for $a \in A$, $n \in N$}.
\]
Here $\cdot_{\widehat{M}}$ denotes both the left and right $\widehat{A}$-actions on $\widehat{M}$. These two maps make $N$ into an $A$-bimodule. Finally, we define bilinear maps $l \colon M \times B \to N$ and $r \colon B \times M \to N$ by
\[
l(u, b) = \overline{s}(u) \cdot_{\widehat{M}} i(b)
\quad \text{and}
\quad r (b, u) = i(b) \cdot_{\widehat{M}} \overline{s}(u),
\quad \text{for $u \in M$, $b \in B$}.
\]
It is straightforward to see that the maps $l, r$ satisfy the identities~\eqref{dasm1} and~\eqref{dasm2}. Finally, for any $u \in M$ and $n \in N$,
\[
\begin{split}
P(u) \cdot_B Q(n)
	& = sP(u) \cdot_{\widehat{A}} i Q (n)
\\	& = \widehat{P} \overline{s} (u) \cdot_{\widehat{A}} \widehat{P} \overline{i}(n)
\\	& =
\begin{cases}
	= \widehat{P} \parens[\big]{\widehat{P}\parens[\big]{\overline{s}(u)} \cdot_{\widehat{M}} \overline{i}(n)}
\\	= \widehat{P} \parens[\big]{\overline{s}(u) \cdot_{\widehat{M}} \widehat{P} \overline{i}(n)}
\end{cases}
\\	& =
\begin{cases}
	= \widehat{P} \parens[\big]{{s}P(u) \cdot_{\widehat{M}} \overline{i}(n)} = Q \parens[\big]{P(u) \cdot_N n},
\\	= \widehat{P} \parens[\big]{\overline{s}(u) \cdot_{\widehat{M}} {i}Q(n)} = Q \parens[\big]{l \parens[\big]{u, Q(n)}}.
\end{cases}
\end{split}
\]
Similarly, one can show that
\[
\begin{split}
Q(n) \cdot_B P(u)
	& = i Q (n) \cdot_{\widehat{A}} s P (u)
\\	& = \widehat{P} \overline{i}(n) \cdot_{\widehat{A}} \widehat{P} \overline{s} (u)
\\	& =
\begin{cases}
	= \widehat{P} \parens[\big]{\widehat{P} \overline{i}(n) \cdot_{\widehat{M}} \overline{s}(u)}
\\	= \widehat{P} \parens[\big]{\overline{i}(n) \cdot_{\widehat{M}} \widehat{P} \overline{s}(u)}
\end{cases}
\\	& =
\begin{cases}
	= \widehat{P} \parens[\big]{i Q (n) \cdot_{\widehat{M}} \overline{s}(u)} = Q \parens[\big]{r \parens[\big]{Q(n), u}},
\\	= \widehat{P} \parens[\big]{\overline{i}(n) \cdot_{\widehat{M}} s P(u)} = Q \parens[\big]{n \cdot_N P(u)}.
\end{cases}
\end{split}
\]
Combining all these, we get that $(N \overset{Q}{\to} B, l, r)$ is a bimodule over the relative averaging algebra $M \overset{P}{\to} A$. This is called the induced bimodule structure starting from the abelian extension~\eqref{abl-fig}. Note that this bimodule structure is independent of the choice of section. To see this, let $(s', \overline{s}')$ be any other section of~\eqref{abl-fig}. Then we observe that $s(a) - s'(a) \in \ker (p) = \image(i)$ and $\overline{s} (u) - \overline{s}'(u) \in \ker (\overline{p}) = \image(\overline{i})$, for $a \in A$ and $u \in M$. Let $\cdot_B'$, $\cdot_N'$ and $l', r'$ be the maps induced by the section $(s', \overline{s}')$. Then we have
\begin{alignat*}{2}
	a \cdot_B b - a \cdot_B' b = \parens[\big]{s(a) - s'(a)} \cdot_{\widehat{A}} i(b) = 0 & \quad \text{and}
	& \quad & b \cdot_B a - b \cdot_B' a = i(b) \cdot_{\widehat{A}} \parens[\big]{s(a) - s'(a)} = 0,
\\	a \cdot_N n - a \cdot_N' n = \parens[\big]{s(a) - s'(a)} \cdot_{\widehat{M}} \overline{i}(n) = 0 & \quad \text{and}
	& \quad & n \cdot_N a - n \cdot_N' a = \overline{i}(n) \cdot_{\widehat{M}} \parens[\big]{s(a) - s'(a)} = 0,
\\	l (u, b) - l'(u,b) = \parens[\big]{\overline{s}(u) - \overline{s}' (u)} \cdot_{\widehat{M}} i(b) = 0 & \quad \text{and}
	& \quad & r(b, u) - r' (b,u) = i(b) \cdot_{\widehat{M}} \parens[\big]{\overline{s}(u) - \overline{s}' (u)} = 0.
\end{alignat*}
Hence our claim follows.

\begin{defi}
Let $M \overset{P}{\to} A$ be a relative averaging algebra and $N \overset{Q}{\to} B$ be a $2$-term chain complex. Two abelian extensions $\widehat{M} \xrightarrow{\widehat{P}} \widehat{A}$ and $\widehat{M}' \xrightarrow{\widehat{P}'} \widehat{A}'$ are said to be \emph{isomorphic} if there is an isomorphism $(\varphi, \psi) \colon (\widehat{M} \xrightarrow{\widehat{P}} \widehat{A}) \rightsquigarrow (\widehat{M}' \xrightarrow{\widehat{P}'} \widehat{A}') $ of relative averaging algebras that makes the following diagram commutative:
\begin{equation}
\begin{aligned}
\xymatrixrowsep{0.36cm}
\xymatrixcolsep{0.36cm}
\xymatrix{0 \ar[rr] & & N \ar[rr] \ar[dd] \ar@{=}[rd] & & \widehat{M} \ar[rr] \ar[rd]^\psi \ar[dd] & & M \ar[dd] \ar[rr] \ar@{=}[rd] & & 0 \\
& 0 \ar[rr] & & N \ar[rr] \ar[dd] & & \widehat{M}' \ar[rr] \ar[dd] & & M \ar[rr] \ar[dd] & & 0 \\
0 \ar[rr] & & B \ar[rr] \ar@{=}[rd] & & \widehat{A} \ar[rr] \ar[rd]^\varphi & & A \ar[rr] \ar@{=}[rd] & & 0 \\
& 0 \ar[rr] & & B \ar[rr] & & \widehat{A}' \ar[rr] & & A \ar[rr] & & 0. \\
}
\end{aligned}
\end{equation}
\end{defi}

Let $\widehat{M} \xrightarrow{\widehat{p}} \widehat{A}$ and $\widehat{M}' \xrightarrow{\widehat{p}'} \widehat{A}'$ be two isomorphic abelian extensions as in the above definition. Then it is easy to see that the corresponding induced bimodules on the $2$-term chain complex $N \overset{Q}{\to} B$ are the same.

\begin{nota}
Let $M \overset{P}{\to} A$ be a relative averaging algebra and $(N \overset{Q}{\to} B, l, r)$ be a given bimodule over it. We denote by $\Ext (M \xrightarrow{{P}} {A} ; N \overset{Q}{\to} B) $ the set of all isomorphism classes of abelian extensions of $M \overset{P}{\to} A$ by the $2$-term complex $N \overset{Q}{\to} B$ so that the induced bimodule coincides with the prescribed one.
\end{nota}

In the following result, we parametrize the space $\Ext (M \xrightarrow{{P}} {A} ; N \overset{Q}{\to} B) $ by the second cohomology group of the relative averaging algebra.

\begin{theo}
Let $M \overset{P}{\to} A$ be a relative averaging algebra and $(N \overset{Q}{\to} B, l, r)$ be a given bimodule over it. Then there is a bijective correspondence between $\Ext (M \xrightarrow{{P}} {A} ; N \overset{Q}{\to} B) $ and the second cohomology group $H^2_{\rAvg} (M \xrightarrow{{P}} {A} ; N \overset{Q}{\to} B)$.
\end{theo}

\begin{proof}
Let $\widehat{M} \overset{\widehat{P}}{\to} \widehat{A}$ be an abelian extension of the relative averaging algebra $M \overset{P}{\to} A$ by the $2$-term complex $N \overset{Q}{\to} B$ representing an element in $\Ext(M \overset{P}{\to} A ; N \overset{Q}{\to} B)$. Let $(s, \overline{s})$ be a section. Then we define a triple $(\alpha, \beta, \gamma)$ of maps
\begin{alignat*}{2}
	& \alpha \in \Hom(A^{\otimes 2}, B), && \quad \alpha (a, b) = s(a) \cdot_{\widehat{A}} s(b) - s(a \cdot b),
\\	& \beta \in \Hom(\mathcal{A}^{1,1}, N), \quad &&
\begin{cases}
	\beta (a, u) = s(a) \cdot_{\widehat{M}} \overline{s}(u) - \overline{s} (a \cdot_M u),
\\	\beta (u, a) = \overline{s}(u) \cdot_{\widehat{M}} {s}(a) - \overline{s} (u \cdot_M a),
\end{cases}
\\	& \gamma \in \Hom(M, B), && \quad \gamma (u) = (\widehat{P} \circ \widehat{s} - s \circ P)(u),
\end{alignat*}
for $a, b \in A$ and $u \in M$. Then it is easy to verify that $(\alpha, \beta, \gamma) \in Z^2_{\rAvg}(M \overset{P}{\to} A; N \overset{Q}{\to} B)$ is a $2$-cocycle in the cohomology complex of the relative averaging algebra $M \overset{P}{\to} A$ with coefficients in the bimodule $(N \overset{Q}{\to} B, l, r)$. Moreover, the corresponding cohomology class in $H^2_{\rAvg}(M \overset{P}{\to} A; N \overset{Q}{\to} B)$ doesn't depend on the choice of the section.

Let $\widehat{M} \overset{\widehat{P}}{\to} \widehat{A}$ and $\widehat{M}' \overset{\widehat{P}'}{\to} \widehat{A}'$ be two isomorphic abelian extensions. For any section $(s, \overline{s})$ of the first abelian extension, we have
\[
p' \circ (\varphi \circ s) = p \circ s = \id_A
\qquad \text{and} \qquad
\overline{p}' \circ (\psi \circ \overline{s}) = \overline{p} \circ \overline{s} = \id_M.
\]
Thus $(\varphi \circ s, \psi \circ \overline{s})$ is a section of the second abelian extension. If $(\alpha', \beta', \gamma') \in Z^2_{\rAvg}(M \overset{P}{\to} A; N \overset{Q}{\to} B)$ is the $2$-cocycle corresponding to the second abelian extension and its section $(\varphi \circ s, \psi \circ \overline{s})$, then
\[
\begin{split}
\alpha' (a, b)
	& = (\varphi \circ s)(a) \cdot_{\widehat{A}'} (\varphi \circ s)(b) - (\varphi \circ s)(a \cdot b)
\\	& = \varphi \parens[\big]{s(a) \cdot_{\widehat{A}} s(b) - s(a \cdot b)}
\\	& = \varphi \parens[\big]{\alpha (a, b)}
\\	& = \alpha (a, b) \quad (\because \restr{\varphi}{B} = \id_B).
\end{split}
\]
Similarly, one can show that $\beta' = \beta$ and $\gamma' = \gamma$. Thus, we obtain $(\alpha, \beta, \gamma) = (\alpha', \beta', \gamma')$. As a consequence, we obtain a well-defined map
\[
\Lambda \colon \Ext(M \overset{P}{\rightarrow} A; N \overset{Q}{\rightarrow} B)
\ \to \
H^2_{\rAvg} (M \overset{P}{\rightarrow} A; N \overset{Q}{\rightarrow} B).
\]
To obtain a map in the other direction, we take a $2$-cocycle $(\alpha, \beta, \gamma) \in Z^2_{\rAvg} (M \overset{P}{\to} A ; N \overset{Q}{\to} B)$. Take $\widehat{A} = A \oplus B$ and $\widehat{M} = M \oplus N$, and consider bilinear maps
\begin{alignat*}{2}
	\mu_{\widehat{A}} \colon \widehat{A} \times \widehat{A} & \to \widehat{A}, \quad & \mu_{\widehat{A}} \parens[\big]{(a, b), (a', b')} & = \parens[\big]{a \cdot a', a \cdot_B b' + b \cdot_B a' + \alpha (a, a')},
\\	l_{\widehat{M}} \colon \widehat{A} \times \widehat{M} & \to \widehat{M}, \quad & l_{\widehat{M}} \parens[\big]{(a, b), (u,n)} & = \parens[\big]{a \cdot_M u, a \cdot_N n + r (b, u) + \beta(a, u)},
\\	r_{\widehat{M}} \colon \widehat{M} \times \widehat{A} & \to \widehat{M}, \quad & r_{\widehat{M}} \parens[\big]{(u,n), (a,b)} & = \parens[\big]{u \cdot_M a, l(u, b) + n \cdot_N a + \beta (u, a)},
\end{alignat*}
for $(a, b), (a', b') \in \widehat{A}$ and $(u,n) \in \widehat{M}$. Then it is easy to see that $(\widehat{A}, \mu_{\widehat{A}})$ is an associative algebra and $(\widehat{M}, l_{\widehat{M}}, r_{\widehat{M}})$ is a bimodule over it. Finally, we define a map $\widehat{P} \colon \widehat{M} \to \widehat{A}$ by
\[
\widehat{P}\parens[\big]{(u,n)} = \parens[\big]{P(u), Q(n) + \gamma (u)},
\quad \text{for $(u,n) \in \widehat{M}$}.
\]
Then $\widehat{P}$ is a relative averaging operator. In other words, $\widehat{M} \overset{\widehat{P}}{\to} \widehat{A}$ is a relative averaging algebra. This is an abelian extension of the relative averaging algebra $M \overset{P}{\to} A$ by the $2$-term chain complex $N \overset{Q}{\to} B$, and defines an element in $\Ext (M \overset{P}{\to} A; N \overset{Q}{\to} B)$. Finally, let $(\alpha, \beta, \gamma)$ and $(\alpha', \beta', \gamma')$ be two cohomologous $2$-cocycles, say $(\alpha, \beta, \gamma) - (\alpha', \beta', \gamma') = \delta_{\rAvg} \parens[\big]{(\kappa, \eta)}$, for some $(\kappa, \eta) \in C^1_{\rAvg} (M \overset{P}{\to} A; N \overset{Q}{\to} B)$. If $\widehat{M}' \overset{\widehat{P}'}{\to} \widehat{A}'$ is the relative averaging algebra induced by the $2$-cocycle $(\alpha', \beta', \gamma')$, then the pair of maps
\[
(\varphi, \psi) \colon (\widehat{M} \overset{\widehat{P}}{\rightarrow} \widehat{A})
\ \longrightsquigarrow \
(\widehat{M}' \overset{\widehat{P}'}{\rightarrow} \widehat{A}')
\]
is an isomorphism of abelian extensions, where $\varphi \colon \widehat{A} \to \widehat{A}'$, $\varphi (a, b) = \parens[\big]{a, b + \kappa (a)}$ and $\psi \colon \widehat{M} \to \widehat{M}'$, $\psi (u,n) = \parens[\big]{u, n + \eta (u)}$. This shows that there is a well-defined map
\[
\Upsilon \colon H^2_{\rAvg} (M \overset{P}{\rightarrow} A; N \overset{Q}{\rightarrow} B)
\ \to \
\Ext(M \overset{P}{\rightarrow} A; N \overset{Q}{\rightarrow} B).
\]
Finally, the maps $\Lambda$ and $\Upsilon$ are inverses to each other. This shows the required bijection.
\end{proof}

\section{Homotopy relative averaging algebras and homotopy diassociative algebras}\label{sec-8}

In this section, we first consider $\Diass_\infty$-algebras introduced by Loday. However, our definition is more simple to use. Next, we introduce the homotopy relative averaging operators and homotopy relative averaging algebras. We show that a homotopy relative averaging algebra naturally induces a $\Diass_\infty$-algebra structure. We first recall some basic definitions related to $A_\infty$-algebras~\cite{keller}.

\begin{defi}
An \emph{$A_\infty$-algebra} is a pair $\parens[\big]{{A}, \{\mu_k\}_{k=1}^\infty}$ consisting of a graded vector space ${A} = \bigoplus_{i \in \mathbb{Z}} {A}_i$ together with a collection $\{\mu_k\}_{k=1}^\infty$ of degree~$1$ graded linear maps $\mu_k \colon {A}^{\otimes k} \to {A}$, for $k \geq 1$, satisfying the following identities (called higher associativities)
\begin{equation}\label{a-inf-iden}
\sum_{k+l=n+1} \sum_{i=1}^{n-l+1} (-1)^{\abs{a_1} + \dots + \abs{a_{i-1}}} \mu_k \parens[\big]{a_1, \dots, a_{i-1}, \mu_l (a_i, \dots, a_{i+l-1}), a_{i+l}, \dots, a_{n}} = 0,
\end{equation}
for all $n \geq 1$ and homogeneous elements $a_1, \dots, a_n \in {A}$.
\end{defi}

Let ${A} = \bigoplus_{i \in \mathbb{Z}} {A}_i$ be a graded vector space. Let $\overline{T}(A) = \bigoplus_{n = 1}^\infty A^{\otimes n}$ be the free tensor algebra over the graded vector space $A$. For each $n \in \mathbb{Z}$, let $C^n (A, A) \coloneqq \Hom_n \parens[\big]{\overline{T}(A), A}$ be the space of all degree $n$ graded linear maps from the graded vector space $\overline{T}(A)$ to $A$. Thus, an element $\mu \in C^n (A,A)$ is given by a sum $\mu = \sum_{k = 1}^\infty \mu_k$, where $\mu_k \colon A^{\otimes k} \to A$ is a degree $n$ linear map, for $k \geq 1$. For $\mu = \sum_{k = 1}^\infty \mu_k \in C^m (A,A)$ and $\nu = \sum_{l = 1}^\infty \nu_l \in C^n(A,A)$, we define a bracket $[\mu, \nu] \in C^{m+n}(A,A)$ by
\[
[\mu, \nu] \coloneqq \sum_{s=1}^\infty \sum_{k+l = s + 1} \parens[\big]{\mu_k \circ \nu_l - (-1)^{mn} \nu_l \circ \mu_k},
\]
where
\[
(\mu_k \circ \nu_l) (a_1, \dots, a_{s}) = \sum_{i=1}^{s-l+1} (-1)^{\abs{a_1} + \dots + \abs{a_{i-1}}} \mu_k \parens[\big]{a_1, \dots, a_{i-1}, \nu_l (a_i, \dots, a_{i+l-1}), a_{i+l}, \dots, a_{s}}.
\]
The graded vector space $\bigoplus_{n \in \mathbb{Z}} C^n (A,A)$ with the above bracket is a graded Lie algebra. An element $\mu = \sum_{k = 1}^\infty \mu_k \in C^1(A,A)$ is a Maurer--Cartan element of the graded Lie algebra $\parens[\big]{\bigoplus_{n \in \mathbb{Z}} C^n (A,A), [\vide]}$ if and only if the pair $\parens[\big]{A, \{\mu_k\}_{k=1}^\infty}$ is an $A_\infty$-algebra.

Let $\parens[\big]{A, \{\mu_k\}_{k=1}^\infty}$ be an $A_\infty$-algebra. A \emph{representation} of this $A_\infty$-algebra is given by a pair $\parens[\big]{M, \{\eta_k\}_{k=1}^\infty}$ that consists of a graded vector space $M = \bigoplus_{i \in \mathbb{Z}} M_i$ with a collection $\braces[\big]{\eta_k \colon \mathcal{A}^{k-1,1} \to M}_{k=1}^\infty$ of degree~$1$ linear maps satisfying the identities~\eqref{a-inf-iden} when exactly one of the variables $a_1, \dots, a_n$ comes from $M$ and the corresponding linear operation $\mu_i$ or $\mu_j$ replaced by $\eta_i$ or $\eta_j$. Like the ungraded case, here $\mathcal{A}^{k-1,1}$ denotes the direct sum of all possible tensor powers of $A$~and~$M$ in which $A$ appears $k-1$ times (and hence $M$ appears exactly once). Note that any $A_\infty$-algebra $\parens[\big]{A, \{\mu_k\}_{k=1}^\infty}$ can be realized as a representation of itself, where $\eta_k = \mu_k$, for $k \geq 1$.

\begin{defi}
A \emph{$\Diass_\infty$-algebra} (also called a \emph{strongly homotopy diassociative algebra}) is a pair $\parens[\big]{D, \{\pi_k\}_{k=1}^\infty}$ consisting of a graded vector space $D= \bigoplus_{i \in \mathbb{Z}} D_i$ equipped with a collection of degree~$1$ graded linear maps $\braces[\big]{\pi_k \colon \mathbf{k}[Y_k] \otimes D^{\otimes k} \to D}_{k=1}^\infty$ satisfying the following set of identities
\begin{multline}\label{higher-diass}
\smash{\sum_{k+l=n+1} \sum_{i=1}^{n-l+1}} (-1)^{\abs{a_1} + \dots + \abs{a_{i-1}}} \pi_k \parens[\big]{R_0^{k;i,l} (y);
\\	a_1, \dots, a_{i-1}, \pi_l \parens[\big]{R_i^{k; i, l} (y); a_i, \dots, a_{i+l-1}}, a_{i+l}, \dots, a_n} = 0,
\end{multline}
for all $n \geq 1$, $y \in Y_n$ and homogeneous elements $a_1, \dots, a_n \in D$. The maps $R_0^{k; i,l}$ and $R_i^{k; i, l}$ are described in~\eqref{r0-maps}, \eqref{ri-maps}.
\end{defi}

Note that any diassociative algebra can be realized as a $\Diass_\infty$-algebra concentrated in degree $-1$. More precisely, if $(D, \dashv, \vdash)$ is a diassociative algebra then $s^{-1}D$ (considered as a graded vector space with $(s^{-1}D)_{-1} = D$ and $(s^{-1} D)_i = 0$ for $i \neq -1$) can be given a $\Diass_\infty$-algebra structure with the operations $\braces[\big]{\pi_k \colon \mathbf{k}[Y_k] \otimes (s^{-1} D)^{\otimes k} \to s^{-1} D}_{k=1}^\infty$ given by
\[
\begin{aligned}
	& \pi_2 \parens[\big]{\Ytwoa{0.08} ; s^{-1} a, s^{-1} b} = s^{-1} (a \dashv b),
\\	& \pi_2 \parens[\big]{\Ytwob{0.08} ; s^{-1} a, s^{-1} b} = s^{-1} (a \dashv b)
\\	\text{and} \qquad & \pi_k = 0 \quad \text{for $k \neq 2$}.
\end{aligned}
\]

\begin{rema}
Let $\parens[\big]{D, \{\pi_k\}_{k=1}^\infty}$ be any $\Diass_\infty$-algebra. Using the higher diassociative identities~\eqref{higher-diass} and the mathematical induction on $k$, we can show that
\[
\pi_k (y; a_1, \dots, a_k) = \pi_k (y'; a_1, \dots, a_k),
\quad \text{for $a_1, \dots, a_k \in D$},
\]
when both of $y, y' \in Y_k$ can be written as the grafting of a $(i-1)$-tree and $(k-i)$-tree.
\end{rema}

\begin{prop}
Let $\parens[\big]{A, \{\mu_k\}_{k=1}^\infty}$ be an $A_\infty$-algebra and $\parens[\big]{M, \{\eta_k\}_{k=1}^\infty}$ be a representation of it. Then the graded vector space $A \oplus M$ can be equipped with a $\Diass_\infty$-algebra structure with the operations $\braces[\big]{\pi_k \colon \mathbf{k}[Y_k] \otimes (A \oplus M)^{\otimes k} \to A \oplus M}_{k=1}^\infty$ given by
\begin{equation}\label{pi-k}
\pi_k \parens[\big]{y; (a_1, u_1), \dots, (a_k, u_k)} = \parens[\big]{\mu_k (a_1, \dots, a_k), \eta_k (a_1, \dots, a_{i-1}, u_i, a_{i+1}, \dots, a_k)},
\end{equation}
for $k \geq 1$, $y \in Y_k$ (which can be uniquely written as $y = y_1 \vee y_2$ for some $(i-1)$-tree $y_1 \in Y_{i-1}$ and $(k-i)$-tree $y_2 \in Y_{k-i}$) and $(a_1, u_1), \dots, (a_k, u_k) \in A \oplus M$.
\end{prop}

We denote the above $\Diass_\infty$-algebra simply by $A \oplus_{\Diass_\infty} M$. Note that $A \oplus_{\Diass_\infty} M$ generalizes the diassociative algebra of Proposition~\ref{am-diass} in the homotopy context. It is important to mention that the converse of the above proposition is also true. More precisely, let $A = \bigoplus_{i \in \mathbb{Z}} A_i$ and $M = \bigoplus_{i \in \mathbb{Z}} M_i$ be two graded vector spaces equipped with two collections $\braces[\big]{\mu_k \colon A^{\otimes k} \to A}_{k=1}^\infty$ and $\braces[\big]{\eta_k \colon \mathcal{A}^{k-1,1} \to M}_{k=1}^\infty$ of degree~$1$ graded linear maps. Then $\parens[\big]{A, \{\mu_k\}_{k=1}^\infty}$ is an $A_\infty$-algebra and $\parens[\big]{M, \{\eta_k\}_{k=1}^\infty}$ is a representation if and only if $\parens[\big]{A \oplus M, \{\pi_k\}_{k=1}^\infty}$ is a $\Diass_\infty$-algebra, where the maps $\pi_k$'s are given in~\eqref{pi-k}.

In the following, we construct a graded Lie algebra whose Maurer--Cartan elements correspond to $\Diass_\infty$-algebra structures on a given graded vector space. Let $D = \bigoplus_{i \in \mathbb{Z}} D_i$ be a graded vector space. For each $n \in \mathbb{Z} $, we define the space $CY^n (D, D) \coloneqq \Hom_n \parens[\big]{\mathbf{k}[\overline{Y}] \otimes \overline{T}(D), D}$ whose elements are of the form $\pi = \sum_{k=1}^\infty \pi_k$, where $\pi_k \colon \mathbf{k}[Y_k] \otimes D^{\otimes k} \to D$ is a degree $n$ linear map. For $\pi = \sum_{k=1}^\infty \pi_k \in CY^m (D,D)$ and $\varpi = \sum_{l=1}^\infty \varpi_l \in CY^l (D,D)$, we define an element $\grbracks{\pi, \varpi} \in CY^{m+n} (D,D)$ by
\begin{equation}\label{di-bracket}
\grbracks{\pi, \varpi} = \sum_{s=1}^\infty \sum_{k+l=s+1} \parens[\big]{\pi_k \diamond \varpi_l - (-1)^{mn} \varpi_l \diamond \pi_k},
\end{equation}
where
\[
(\pi_k \diamond \varpi_l) (y; a_1, \dots, a_s) = \sum_{i=1}^{s-l+1} (-1)^{\abs{a_1} + \dots + \abs{a_{i-1}}} \pi_k \parens[\big]{R_0^{k; i, l} (y); a_1, \dots, \varpi_l (R_i^{k; i, l} (y); a_i, \dots, a_{i+l-1}), \dots, a_s},
\]
for $y \in Y_s = Y_{k+l-1}$ and homogeneous elements $a_1, \dots, a_s \in D$. The bracket $\grbracks{\vide}$ is the graded version of the Majumdar--Mukherjee bracket given in~\eqref{mm-circ}. In particular, the bracket $\grbracks{\vide}$ makes the graded space $\bigoplus_{n \in \mathbb{Z}} CY^n (D,D) = \bigoplus_{n \in \mathbb{Z}} \Hom_n \parens[\big]{\mathbf{k}[\overline{Y}] \otimes \overline{T}(D), D}$ into a graded Lie algebra.

\begin{prop}
Let $D$ be a graded vector space. Then there is a one-to-one correspondence between $\Diass_\infty$-algebra structures on the graded vector space $D$ and Maurer--Cartan elements of the graded Lie algebra $\parens[\big]{\bigoplus_{n \in \mathbb{Z}} CY^n (D,D), \grbracks{\vide}}$.
\end{prop}

\begin{proof}
Note that an element $\pi \in CY^1 (D,D) = \Hom_1 \parens[\big]{\mathbf{k}[\overline{Y}] \otimes \overline{T}(D), D}$ is equivalent to having a collection $\braces[\big]{\pi_k \colon \mathbf{k}[Y_k] \otimes D^{\otimes k} \to D}_{k=1}^\infty $ of degree~$1$ graded linear maps. Then it follows from~\eqref{di-bracket} that $\grbracks{\pi, \pi} = 0$ if and only if the collection $\{\pi_k\}_{k=1}^\infty$ defines a $\Diass_\infty$-algebra structure on $D$.
\end{proof}

Given an $A_\infty$-algebra and a representation of it, we will now introduce the notion of a homotopy relative averaging operator. Let $\parens[\big]{A, \{\mu_k\}_{k=1}^\infty}$ be an $A_\infty$-algebra and $\parens[\big]{M, \{\eta_k\}_{k=1}^\infty}$ be a representation of it. Consider the graded Lie algebra
\[
\mathfrak{g} = \parens[\Big]{\textstyle\bigoplus_{n \in \mathbb{Z}} CY^n (A \oplus M, A \oplus M) = \bigoplus_{n \in \mathbb{Z}} \Hom_n \parens[\big]{\mathbf{k} [\overline{Y}] \otimes \overline{T}(A \oplus M), A \oplus M}, \grbracks{\vide}}
\]
associated to the graded vector space $A \oplus M$. Then it is easy to see that the graded subspace $\mathfrak{a} = \bigoplus_{n \in \mathbb{Z}} CY^n (M, A) = \bigoplus_{n \in \mathbb{Z}} \Hom_n \parens[\big]{\mathbf{k} [\overline{Y}] \otimes \overline{T}(M), A}$ is an abelian Lie subalgebra of $\mathfrak{g}$. Let $p \colon \mathfrak{g} \to \mathfrak{g}$ be the projection map onto the subspace $\mathfrak{a}$. On the other hand, since $A \oplus_{\Diass_\infty} M = \parens[\big]{A \oplus M, \{\pi_k\}_{k=1}^\infty}$ is a $\Diass_\infty$-algebra, it defines a Maurer--Cartan element $\pi = \sum_{k=1}^\infty \pi_k \in CY^1 (A \oplus M, A \oplus M)$ of the graded Lie algebra $\mathfrak{g}$ (i.e.\ $\grbracks{\pi, \pi} = 0$). Further, the element $\pi \in \ker(p)_1$. Hence we obtain a $V$-data $(\mathfrak{g}, \mathfrak{a}, p, \pi)$. Therefore, by Theorem~\ref{v-data-l}\eqref{v-data-l_i}, the graded vector space $\mathfrak{a}$ inherits an $L_\infty$-algebra structure with the operations $\braces[\big]{l_k \colon \mathfrak{a}^{\otimes k} \to \mathfrak{a}}_{k=1}^\infty$ given by
\[
l_k (\gamma_1, \dots, \gamma_k) = p \biggrbracks{\dots \biggrbracks{\grbracks{\pi, \gamma_1}, \gamma_2}, \dots, \gamma_k},
\]
for homogeneous $ \gamma_1, \dots, \gamma_k \in \mathfrak{a}$. This $L_\infty$-algebra can be seen as the homotopy analogue of the graded Lie algebra given in Theorem~\ref{mc-thm-opp}. Our next definition is motivated by the Maurer--Cartan characterization of a relative averaging operator given in Theorem~\ref{mc-thm-opp}.

\begin{defi}
A \emph{homotopy relative averaging operator} on $\parens[\big]{M, \{\eta_k\}_{k=1}^\infty}$ over the $A_\infty$-algebra $\parens[\big]{A, \{\mu_k\}_{k=1}^\infty}$ is a Maurer--Cartan element of the $L_\infty$-algebra $\parens[\big]{\mathfrak{a}, \{l_k\}_{k=1}^\infty}$.
\end{defi}

It follows from the above definition that a homotopy relative averaging operator is an element $P = \sum_{k=1}^\infty P_k \in \Hom_0 \parens[\big]{\mathbf{k}[\overline{Y}] \otimes \overline{T} (M), A}$ that satisfies
\begin{equation}\label{homo-avg}
\sum_{k=1}^\infty \frac{1}{k\mathpunct{!}} l_k (P, \dots, P) = 0.
\end{equation}
In other words, $P$ must satisfy $\sum_{k=1}^\infty \frac{1}{k\mathpunct{!}} p \biggrbracks{\dotsb \biggrbracks{\grbracks{\pi, P}, P}, \dots, P} = 0$, which is equivalent to the condition that $p (e^{\grbracks{-, P}} \pi) = 0$. Note that a homotopy relative averaging operator can be equivalently described by a collection $P = \braces[\big]{P_k \colon \mathbf{k}[Y_k] \otimes M^{\otimes k} \to A}_{k=1}^\infty$ of degree~$0$ linear maps satisfying $p (e^{\grbracks{-, P}} \pi) = 0$.

While expanding the equation~\eqref{homo-avg}, we observe that the map $P_1 \in \Hom_0 \parens[\big]{\mathbf{k}[Y_1] \otimes M, A} = \Hom_0 (M, A)$ satisfies
\begin{align*}
\mu_2 \parens[\big]{P_1 (u), P_1 (v)}
& = P_1 \parens[\big]{\eta_2 \parens[\big]{P_1 (u), v}} + \mu_1 \parens[\big]{P_2 \parens[\big]{\Ytwob{0.08}; u, v}}
+ P_2 \parens[\big]{\Ytwob{0.08} ; \eta_1 (u), v}
+ (-1)^{\abs{u}} P_2 \parens[\big]{\Ytwob{0.08}; u, \eta_1 (v)},
\\
\mu_2 \parens[\big]{P_1 (u), P_1 (v)}
& = P_1 \parens[\big]{\eta_2 \parens[\big]{u, P_1 (v)}}
+ \mu_1 \parens[\big]{P_2 \parens[\big]{\Ytwoa{0.08}; u, v}}
+ P_2 \parens[\big]{\Ytwoa{0.08}; \eta_1 (u), v}
+ (-1)^{\abs{u}} P_2 \parens[\big]{\Ytwoa{0.08}; u, \eta_1 (v)},
\end{align*}
for all $u, v \in M$. Similarly, the maps $P_2, P_3, \dots$ satisfy some other identities with respect to the $A_\infty$-algebra structure on $A$ and representation on $M$.

\begin{defi}
A \emph{homotopy relative averaging algebra} is a triple $(A, M, P)$ consisting of an $A_\infty$-algebra $A = \parens[\big]{A, \{\mu_k\}_{k=1}^\infty}$, a representation $M= \parens[\big]{M, \{\eta_k\}_{k=1}^\infty}$ and a homotopy relative averaging operator $P = \{P_k\}_{k=1}^\infty$. We often denote a homotopy relative averaging algebra as above by
\[
M \xrightarrow{\{P_k\}_{k=1}^\infty} A.
\]
\end{defi}

\begin{prop}\label{diass-inf-ind}
Let $M \xrightarrow{\{P_k\}_{k=1}^\infty} A$ be a homotopy relative averaging algebra. Then $\parens[\big]{M, \{\pi_k^P\}_{k=1}^\infty}$ is a $\Diass_\infty$-algebra, where
\[
\pi_k^P (y; u_1, \dots, u_k) = (e^{\grbracks{-, P}} \pi) (y; u_1, \dots, u_k),
\quad \text{for $k \geq 1$, $y \in Y_k$ and $u_1, \dots, u_k \in M$}.
\]
\end{prop}

\begin{proof}
We have
\[
\biggrbracks{e^{\grbracks{-, P}} \pi, e^{\grbracks{-, P}} \pi} = e^{\grbracks{-, P}} \grbracks{\pi, \pi} = 0
\quad (\text{as $\grbracks{\pi, \pi} = 0$}).
\]
This shows that $ e^{\grbracks{-, P}} \pi$ is a Maurer--Cartan element of the graded Lie algebra $\mathfrak{g}$. Hence the collection of maps $\{\pi_k\}_{k=1}^\infty$ defines a $\Diass_\infty$-algebra structures on $M$, where $\pi_k = \restr{(e^{\grbracks{-, P}} \pi)}{\mathbf{k}[Y_k] \otimes M^{\otimes k}}$, for $k \geq 1$. This completes the proof.
\end{proof}

Note that the above proposition can be also understood in the following way. Let $\parens[\big]{A, \{\mu_k\}_{k=1}^\infty}$ be an $A_\infty$-algebra and $\parens[\big]{M, \{\eta_k\}_{k=1}^\infty}$ be a representation of it. Then there is an $L_\infty$-algebra morphism
\[
\parens[\Big]{\mathfrak{a} = \textstyle\bigoplus_{n \in \mathbb{Z}} \Hom_n \parens[\big]{\mathbf{k} [\overline{Y}] \otimes \overline{T}(M), A}, \{l_k\}_{k=1}^\infty}
\ \xrightarrow{\Phi = \{\Phi_k\}_{k \geq 1}} \
\parens[\Big]{s^{-1} \parens[\big]{\textstyle\bigoplus_{n \in \mathbb{Z}} \Hom_n \parens[\big]{\mathbf{k} [\overline{Y}] \otimes \overline{T}(M), M}}, \grbracks{\vide}}
\]
extending the natural map $\Phi_1$ which is the graded version of the map~\eqref{theta-n}. For an arbitrary element $P = \sum_{k=1}^\infty P_k \in \Hom_0 \parens[\big]{\mathbf{k} [\overline{Y}] \otimes \overline{T}(M), A}$, it is easy to see that $\Phi (P) = e^{\grbracks{-, P}} \pi$. Thus, $P = \sum_{k=1}^\infty P_k$ is a homotopy relative averaging operator (i.e.\ Maurer--Cartan element in the $L_\infty$-algebra $\parens[\big]{\mathfrak{a}, \{l_k\}_{k=1}^\infty}$) implies that $\Phi (P)$ defines a $\Diass_\infty$-algebra structure on $M$.

A homotopy relative averaging operator $\{P_k\}_{k=1}^\infty$ is said to be \emph{strict} if $P_k = 0$ for $k \neq 1$. It follows from~\eqref{homo-avg} that a strict homotopy relative averaging operator is a degree~$0$ linear map $P \colon M \to A$ that satisfies
\[
\mu_k \parens[\big]{P(u_1), \dots, P(u_k)} = P \parens[\big]{\eta_k \parens[\big]{P(u_1), \dots, u_i, \dots, P(u_k)}},
\quad \text{for $k \geq 1$ and $1 \leq i \leq k$}.
\]
A strict homotopy relative averaging algebra is a triple that consists of an $A_\infty$-algebra, a representation and a strict homotopy relative averaging operator. In this case, Theorem~\ref{diass-inf-ind} reads as follows.

\begin{theo}
Let $M \overset{P}{\to} A$ be a strict homotopy relative averaging algebra. Then $\parens[\big]{M, \{\pi_k^P\}_{k=1}^\infty}$ is a $\Diass_\infty$-algebra, where
\[
\pi_k^P (y; u_1, \dots, u_k) \coloneqq \eta_k \parens[\big]{P(u_1), \dots, u_i, \dots, P(u_k)},
\]
for $k \geq 1$, $y \in Y_k$ (which can be uniquely written as $y= y_1 \vee y_2$ for some $(i-1)$-tree $y_1 \in Y_{i-1}$ and $(k-i)$-tree $y_2 \in Y_{k-i}$) and $u_1, \dots, u_k \in M$.
\end{theo}

In the following, we show that any $\Diass_\infty$-algebra is always induced from a strict homotopy relative averaging algebra. Let $\parens[\big]{D, \{\pi_k\}_{k=1}^\infty}$ be a given $\Diass_\infty$-algebra. Consider the graded vector space $D/ I$ which is obtained from $D$ quotient by the homogeneous ideal $I$ generated by the set
\[
\braces[\big]{\pi_k (y; a_1, \dots, a_k) - \pi_k (y'; a_1, \dots, a_k) \st[\big] k \geq 1, \ y, y' \in Y_k \ \text{and} \ a_1, \dots, a_k \in D}.
\]
It is easy to see that the graded vector space $D/I$ carries an $A_\infty$-algebra structure with the operations $\braces[\big]{\mu_k \colon (D/I)^{\otimes k} \to D/I}_{k=1}^\infty$ given by
\[
\mu_k \parens[\big]{[a_1], \dots, [a_k]} = \bracks[\big]{\pi_k (y; a_1, \dots, a_k)},
\quad \text{for $k \geq 1$ and $[a_1], \dots, [a_k] \in D/I$}.
\]
We denote this $A_\infty$-algebra structure simply by $D_{\Ass_\infty}$. It is also easy to check that the $A_\infty$-algebra $D_{\Ass_\infty}$ has a representation on the graded vector space $D$ with the action maps
\[
\eta_k \parens[\big]{[a_1], \dots, [a_{i-1}], a_i, [a_{i+1}], \dots, [a_k]} = \pi_k (y; a_1, \dots, a_k),
\]
for $k \geq 1$, $[a_1], \dots, [a_{i-1}], [a_{i+1}], \dots, [a_k] \in D_{\Ass_\infty}$ and $a_i \in D$. Here $y \in Y_k$ is any $k$-tree which is the grafting of some $(i-1)$-tree and $(k-i)$-tree. Moreover, $D \overset{q}{\to} D_{\Ass_\infty}$ is a strict homotopy relative averaging algebra, where $q$ is the quotient map. Further, the induced $\Diass_\infty$-algebra structure on $D$ coincides with the given one.

\begin{rema}
Given a $2$-term $A_\infty$-algebra (i.e.\ an $A_\infty$-algebra whose underlying graded vector space is concentrated in arities $0$ and $1$), one can explicitly define its representation. In this case, it is also worth to explicitly write a homotopy relative averaging operator. A $2$-term homotopy relative averaging algebra is a $2$-term $A_\infty$-algebra together with a representation of it and a homotopy relative averaging operator. A $2$-term homotopy relative averaging algebra is said to be ``skeletal'' if the underlying $2$-term $A_\infty$-algebra and its representation both are skeletal. Similar to the work of Baez and Crans~\cite{baez}, one may show that skeletal $2$-term homotopy relative averaging algebras bijectively correspond to third cocycles of relative averaging algebras introduced in Section~\ref{sec-5}. This gives another reason for considering planar binary trees in the study of (relative) averaging algebras.
\end{rema}

\section*{Acknowledgments}

The author would like to thank the esteemed referee for carefully reading the manuscript in all revised versions and giving insightful suggestions on the earlier version of it. The author also wishes to thank Indian Institute of Technology (IIT) Kharagpur for providing the beautiful academic environment where the research has been carried out.

\section*{Declaration of interests}

The author does not work for, advise, own shares in, or receive funds from any organization that could benefit from this article, and has declared no affiliations other than their research organizations.

\printbibliography

\end{document}