text:
\section*{Introduction}

The Koszul duality theory of associative algebras first appeared in the work of \cite{Priddy}. It has then been extended to operads \cite{GetzlerJones, GinzburgKapranov} and to properads \cite{Vallette2}. The Koszul duality theory has a wide range of applications in mathematics: BGG correspondence \cite{BGG}, equivariant cohomology \cite{GKMP}, and homotopy algebras \cite{GinzburgKapranov, GetzlerJones}. For even more applications, we refer to the introduction of \cite{PolishchukPositselski}. Following the ideas of \cite{Quillen}, one defines a cohomology theory associated to any type of algebras \cite{Hinich, GoerssHopkins} and the Koszul duality theory of operads provides explicit chain complexes which allow us to compute it \cite{Milles}.\\

The Koszul duality theory of associative algebras is based on a chain complex, called the \emph{Koszul complex}, built on the tensor product of chain complexes. The notions of algebras, operads and properads are ``associative'' notions in the sense that they are all monoids in a monoidal category. This makes the generalization of the \emph{Koszul complex} to operads and properads possible. To define a Koszul duality theory for algebras over an operad $\mathcal{P}$, we have to find a good generalization for this Koszul complex in a non-associative setting.\\

In \cite{Milles}, we studied the André-Quillen cohomology theory of algebra over an operad. The latter is represented by a chain complex, called the \emph{cotangent complex} of a $\mathcal{P}$-algebra $A$. Thanks to the Koszul duality theory of operads, we made a representation of the cotangent complex explicit. In this paper, we prove that the cotangent complex gives a good generalization of the Koszul complex in the sense that we get an algebraic twisting morphisms fundamental theorem (Theorem \ref{atmft}) and a Koszul criterion (Theorem \ref{algKoszulcriterion}).\\

When the $\mathcal{P}$-algebra $A$ is \emph{quadratic} or \emph{monogene}, we introduce a Koszul dual coalgebra $A^{\textrm{!`}}$. The Koszul criterion provides a way to test whether the Koszul dual coalgebra $A^{\textrm{!`}}$ is a good space of \emph{syzygies} to resolve the $\mathcal{P}$-algebra $A$. If applicable, the Koszul complex, which is thus a representation of the cotangent complex, is a ``small'' chain complex allowing to compute the cohomology theory of the $\mathcal{P}$-algebra $A$.\\

Retrospectively, the present Koszul duality theory applied to associative algebras gives the Koszul duality theory of associative algebras originally defined by Priddy \cite{Priddy}. For commutative algebras, resp. Lie algebras, the present Koszul duality theory provides Sullivan minimal models, resp. Quillen models. An example is given by the commutative algebra of the cohomology groups of the complement of an hyperplane arrangement. It is given by the Orlik-Solomon algebra and, in the quadratic case, the Koszul dual algebra is the holonomy Lie algebra defined by Kohno \cite{Yuzvinsky, PapadimaYuzvinsky, Kohno, Kohno2}. More generally, this theory applies to give all the rational homotopy groups of formal spaces whose cohomology groups forms a Koszul (quadratic) algebra. Moreover, an associative algebra $A$, eventually commutative, is an example of operad and an ``algebra'' over this operad is a $A$-module. The present Koszul duality theory in this case gives the Koszul duality theory of modules which provides a good candidate for the syzygies of an $A$-module \cite{PolishchukPositselski, Eisenbud}.\\

The following table gives a summary.
$$\begin{tabular}{l||p{3.1cm}|p{3.4cm}|}
\cline{2-3}
& \multicolumn{2}{c|}{\bf Koszul duality theory}\\
\hline \hline
\multicolumn{1}{|p{3.5cm}||}{{\bf Monoids}\hspace{2cm} Section 1} & Associative algebras \cite{Priddy} & Operads \cite{GinzburgKapranov, GetzlerJones}\\
\hline
\multicolumn{1}{|p{3.5cm}||}{{\bf Representations}\hspace{2cm} Sections 2, 3 and 4} & Modules \hspace{1cm} \cite{PolishchukPositselski} & $\mathcal{P}$-algebras\hspace{1.5cm} {\it Goal} of the paper\\
\hline
\end{tabular}$$\\

We recall in the first section the Koszul duality theory for associative algebras and operads. We recall the results of \cite{GetzlerJones} on twisting morphisms for $\mathcal{P}$-algebras and we prove the algebraic twisting morphisms fundamental theorem in Section 2. We extend the results of \cite{GinzburgKapranov} on quadratic $\mathcal{P}$-algebras and state the Koszul criterion in Section 3. The section 4 is devoted to the applications of the Koszul duality theory for $\mathcal{P}$-algebras. We prove a comparison Lemma for the twisted tensor product in the framework of $\mathcal{P}$-algebras in Appendix A.\\

In all this paper, $\mathbb{K}$ is a field of characteristic $0$, however most constructions work over a ring. Moreover, we assume that all the chain complexes are non-negatively graded.

\tableofcontents

\section{Twisting morphisms for associative algebras and operads}\label{twbar}

The notion of \emph{twisting morphism} (or twisting cochain) for associative algebras, introduced by Cartan \cite{Cartan} and Brown \cite{Brown}, was generalized to operads by Getzler and Jones \cite{GetzlerJones}. We recall their definitions and the fact that the induced bifunctor is represented by the bar and the cobar constructions. We also recall the definition of the \emph{twisted tensor product} and the \emph{twisted composition product} and the notion of \emph{(operadic) Koszul morphism}. We gives the twisting morphisms fundamental theorems and the Koszul criteria. We refer to the book of Loday and Vallette \cite{LodayVallette} for a complete exposition.

\subsection{Twisting morphisms for associative algebras}\label{casas}

Let $(A,\, \gamma_{A},\, d_{A})$ be a \emph{differential graded associative algebra}, \emph{dga algebra} for short, and let $(C,\, \Delta_{C},\, d_{C})$ be a \emph{differential graded coassociative coalgebra}, \emph{dga coalgebra} for short. We associate to $C$ and $A$ the \emph{dg convolution algebra} $(\mathrm{Hom}(C,\, A),\, \star,\, \partial)$ where $\star$ and $\partial$ are defined as follows
$$\left\{\begin{array}{l}
f \star g : C \xrightarrow{\Delta_{C}} C \otimes C \xrightarrow{f \otimes g} A \otimes A \xrightarrow{\gamma_{A}} A,\\
\partial(f) := d_{A} \circ f - (-1)^{|f|}f \circ d_{C},
\end{array} \right.$$
for $f,\, g \in \mathrm{Hom}(C,\, A)$. The associative product $\star$ on $\mathrm{Hom}(C,\, A)$ induces a Lie bracket and the solutions of degree $-1$ of the \emph{Maurer-Cartan equation}
$$\partial (\alpha) + \alpha \star \alpha = \partial(\alpha) + \frac{1}{2} [\alpha,\, \alpha] = 0$$
are called \emph{twiting morphisms}. The set of twisting morphisms is denoted by $\mathrm{Tw}(C,\, A)$.

When $A$ is augmented, that is $A \cong \mathbb{K} \oplus \overline{A}$ as dga algebras, we recall the \emph{bar construction on $A$} defined by $\mathrm{B} A := (T^{c}(s\overline{A}),\, d := d_{1} + d_{2})$, where $s$ is the homological suspension, $d_{1}$ is induced by the differential $d_{A}$ on $A$ and $d_{2}$ is the unique coderivation which extends, up to suspension, the restriction of the product $\gamma_{A}$ on $\overline{A}$. When $C$ is coaugmented, that is $C \cong \mathbb{K} \oplus \overline{C}$ as coassociative coalgebras,  we recall dually the \emph{cobar construction on $C$} defined by $\Omega C := (T(s^{-1}\overline{C}),\, d := d_{1} - d_{2})$, where $s^{-1}$ is the homological desuspension, $d_{1}$ is induced by $d_{C}$ and $d_{2}$ is the unique derivation which extends, up to desuspension, the restriction of $\Delta_{C}$ on $\overline{C}$.

When $A$ is augmented and $C$ is coaugmented, we require that the composition of a twisting morphism with the augmentation map, respectively the coaugmentation map, vanishes. These constructions satisfy the following adjunction
$$\begin{array}{c}
\mathrm{Hom_{\mathsf{aug.\ dga\ alg.}}}(\Omega C,\, A) \cong \mathrm{Tw}(C,\, A) \cong \mathrm{Hom_{\mathsf{coaug.\ dga\ coalg.}}}(C,\, \mathrm{B} A)\\
\xymatrix@C=40pt@M=8pt{f_{\alpha} & \ar@{<->}[l] \alpha \ar@{<->}[r] &  g_{\alpha},}
\end{array}$$
when the coalgebra $C$ is \emph{conilpotent} (see \cite{LodayVallette} for a definition).

To a twisting morphism $\alpha$ between a coaugmented coalgebra $C$ and an augmented algebra $A$, we associate the \emph{left twisted tensor product}
$$A \otimes_{\alpha} C := (A \otimes C,\, d_{\alpha} := d_{A\otimes C} - d_{\alpha}^{l}),$$
where $d_{\alpha}^{l}$ is defined by
$$A \otimes C \xrightarrow{id_{A} \otimes \Delta_{C}} A \otimes C \otimes C \xrightarrow{id_{A} \otimes \alpha \otimes id_{C}} A \otimes A \otimes C \xrightarrow{\gamma_{A} \otimes id_{C}} A \otimes C.$$
It is a chain complex since $\alpha$ is a twisting morphism. We refer to \cite{LodayVallette} for the symmetric definition of the \emph{right twisted tensor product}
$$C \otimes_{\alpha} A := (C \otimes A,\, d_{\alpha} := d_{C \otimes A} + d_{\alpha}^{r})$$
and one gets the \emph{twisted tensor product}
$$A \otimes_{\alpha} C \otimes_{\alpha} A := (A \otimes C \otimes A,\, d_{\alpha} := d_{A \otimes C \otimes A} - d_{\alpha}^{l} \otimes id_{A} + id_{A} \otimes d_{\alpha}^{r}).$$
We say that $\alpha$ is a \emph{Koszul morphism} when $A \otimes_{\alpha} C \otimes_{\alpha} A \xrightarrow{\sim} A$. We denote by $\mathrm{Kos}(C,\, A)$ the set of Koszul morphisms.

\begin{ex}
To $id_{\mathrm{B} A}$ and $id_{\Omega C}$ correspond two universal twisting morphisms $\pi : \mathrm{B} A \rightarrow A$ and $\iota : C \rightarrow \Omega C$. They are examples of Koszul morphisms, that is $A \otimes_{\pi} \mathrm{B} A \otimes_{\pi} A \xrightarrow{\sim} A$ and $\Omega C \otimes_{\iota} C \otimes_{\iota} \Omega C \xrightarrow{\sim} \Omega C$.
\end{ex}

Later, we will need an extra grading, called \emph{weight grading}, which differs from the homological grading. We refer to the first chapter of \cite{LodayVallette} for more details about this and for a definition of connected wdga algebras and connected wdga coalgebras. This adjunction satisfies the following property.
\begin{thm}[Twisting morphisms fundamental theorem]\label{tmft}
Let $A$ be a connected wdga algebra and let $C$ be a connected wdga coalgebra. For any twisting morphism $\alpha : C \rightarrow A$, the following assertions are equivalent:
\begin{enumerate}
\item The twisting morphism $\alpha$ is Koszul, that is $A \otimes_{\alpha} C \otimes_{\alpha} A \xrightarrow{\sim} A$;
\item The left twisted tensor product is acyclic, that is $A \otimes_{\alpha} C \xrightarrow{\sim} \mathbb{K}$;
\item The right twisted tensor product is acyclic, that is $C \otimes A \xrightarrow{\sim} \mathbb{K}$;
\item The morphism of dga algebras $f_{\alpha} : \Omega C \rightarrow A$ is a quasi-isomorphism;
\item The morphism of dga coalgebras $g_{\alpha} : C \rightarrow \mathrm{B} A$ is a quasi-isomorphism.
\end{enumerate}
\end{thm}

\begin{pf}
A proof of the equivalences $(2) \Leftrightarrow (3) \Leftrightarrow (4) \Leftrightarrow (5)$ can be found in \cite{LodayVallette} and comes from \cite{Brown}. We show the equivalence $(1) \Leftrightarrow (2)$ in the more general case of operads, see Theorem \ref{otmft}.
$\ \hfill \square$
\end{pf}

Let $(V,\, S)$ be a \emph{quadratic data}, that is a graded vector space $V$ and a graded subspace $R \subseteq V \otimes V$. A \emph{quadratic algebra} is an associative algebra $A(V,\, S)$ of the form $T(V)/(S)$. Dually the \emph{quadratic coalgebra} $C(V,\, S)$ is by definition the sub-coalgebra of the cofree coalgebra $T^{c}(V)$ which is \emph{universal} among the sub-coalgebras $C$ of $T^{c}(V)$ such that the composite
$$C \rightarrowtail \mathcal{F}^{c}(V) \twoheadrightarrow \mathcal{F}^{c}(V)^{(2)}/S$$
is $0$. The word ``universal'' means that for any such coalgebra $C$, there exists a unique morphism of coalgebras $C \rightarrow C(V,\, S)$ such that the following diagram commutes
$$\xymatrix@M=6pt@R=12pt{C \ar@{>->}[dr] \ar[r] & C(V,\, S) \ar@{>->}[d] \\
& T^{c}(V).}$$

To a quadratic data $(V,\, S)$, we associate the \emph{Koszul dual coalgebra of $A$} given by $A^{\textrm{!`}} := C(sV,\, s^{2}S)$ where $s$ is the homological suspension. We associate to the coalgebra $C(sV,\, s^{2}S)$ and to the algebra $A(V,\, S)$ the twisting morphism $\varkappa$ defined by
$$\varkappa : A^{\textrm{!`}} = C(sV,\, s^{2}S) \twoheadrightarrow sV \cong V \rightarrowtail A(V,\, S) = A.$$
The equality $\partial(\varkappa) + \varkappa \star \varkappa = 0$ follows from the coassociativity of $\Delta_{A^{\textrm{!`}}}$, the associativity of $\gamma_{A}$ and to the fact that ${A^{\textrm{!`}}}^{(2)} = s^{2}S$ and $A^{(2)} = V^{\otimes 2}/S$.

The weight grading comes from the graduation in $T(V)$ and $T^{c}(V)$ by the number of generators in $V$. The universality of the twisting morphisms $\pi$ and $\iota$ provides an inclusion of coalgebras $g_{\varkappa} : A^{\textrm{!`}} \rightarrowtail \mathrm{B} A$ and a surjection of algebras $f_{\varkappa} : \Omega A^{\textrm{!`}} \twoheadrightarrow A$. The twisting morphisms fundamental theorem writes:
\begin{thm}[Koszul criterion, \cite{Priddy}]\label{Koszulcriterion}
Let $(V,\, S)$ be a quadratic data. Let $A := A(V,\, S)$ be the associated quadratic algebra and let $A^{\textrm{!`}} := C(sV,\, s^{2}S)$ its Koszul dual coalgebra. The following assertions are equivalent:
\begin{enumerate}
\item The twisting morphism $\varkappa$ is Koszul, that is $A \otimes_{\varkappa} A^{\textrm{!`}} \otimes_{\varkappa} A \xrightarrow{\sim} A$;
\item The Koszul complex $A \otimes_{\varkappa} A^{\textrm{!`}}$ is acyclic, that is $A \otimes_{\varkappa} A^{\textrm{!`}} \xrightarrow{\sim} \mathbb{K}$;
\item The Koszul complex $A^{\textrm{!`}} \otimes_{\varkappa} A$ is acyclic, that is $A^{\textrm{!`}} \otimes_{\varkappa} A \xrightarrow{\sim} \mathbb{K}$;
\item The morphism of dga algebras $f_{\varkappa} : \Omega A^{\textrm{!`}} \rightarrow A$ is a quasi-isomorphism;
\item The morphism of dga coalgebras $g_{\varkappa} : A^{\textrm{!`}} \rightarrow \mathrm{B} A$ is a quasi-isomorphism.
\end{enumerate}
\end{thm}

Priddy \cite{Priddy} called the chain complexes $A^{\textrm{!`}} \otimes_{\varkappa} A$, resp. $A \circ_{\varkappa} A^{\textrm{!`}}$, the \emph{Koszul complexes}. We extend this definition and we call also $A \otimes_{\varkappa} A^{\textrm{!`}} \otimes_{\varkappa} A$ the Koszul complex. An algebra is called a \emph{Koszul algebra} when the twisting morphism $\varkappa : A^{\textrm{!`}} \rightarrow A$ is a Koszul morphism, that is $A \circ_{\varkappa} A^{\textrm{!`}} \otimes_{\varkappa} A \xrightarrow{\sim} A$. The previous Koszul criterion
shows that this definition is equivalent to the classical one.

\subsection{$\mathbb{S}$-module and operad}

We recall the definition of an \emph{$\mathbb{S}$-module} and of an \emph{operad}. For a complete exposition of the concepts of this section, we refer to the books \cite{LodayVallette} and \cite{MarklShniderStasheff}.\\

An \emph{$\mathbb{S}$-module} $M$ is a collection of dg modules $\{ M(n)\}_{n \geq 0}$ endowed with an action of the group $\mathbb{S}_{n}$ of permutations on $n$ elements. Let $M,\, M',\, N$ and $N'$ be $\mathbb{S}$-modules. We recall the definition of the composition product $\circ$
$$(M\circ N) (n) := \bigoplus_{k \geq 0} M(k) \otimes_{\mathbb{S}_k} \left(\bigoplus_{i_1 + \cdots + i_k = n}
\mathrm{Ind}_{\mathbb{S}_{i_{1}}\times \cdots \times \mathbb{S}_{i_{k}}}^{\mathbb{S}_{n}} \big(N(i_1) \otimes \cdots \otimes N(i_k)\big)\right).$$
The unit for the monoidal product is $I := (0,\, \mathbb{K},\, 0,\, \ldots)$. Notice that $\circ$ is not linear on the right hand side. As a consequence, we define the right linear analog $M \circ (N;\, N')$ of the composition product, linear in $M$ and in $N'$, by the following formula
\begin{eqnarray*}
&& M \circ (N;\, N')(n) :=\\
&& \bigoplus_{k \geq 0} M(k) \otimes_{\mathbb{S}_k} \left(\bigoplus_{i_1 + \cdots + i_k = n} \bigoplus_{j = 1}^{k} \mathrm{Ind}_{\mathbb{S}_{i_{1}}\times \cdots \times \mathbb{S}_{i_{k}}}^{\mathbb{S}_{n}} (N(i_1) \otimes \cdots \otimes \underbrace{N'(i_{j})}_{j^{th} \textrm{ position}} \otimes \cdots \otimes N(i_k))\right).
\end{eqnarray*}
Let $f : M \rightarrow M'$ and $g : N \rightarrow N'$ be maps of $\mathbb{S}$-modules. We denote by $\circ'$ the \emph{infinitesimal composite of morphisms}:
$$f \circ' g : M \circ N \rightarrow M' \circ (N,\, N')$$
defined by
$$\sum_{j=1}^k f \otimes (id_{N} \otimes \cdots \otimes \underbrace{g}_{j^{th} \textrm{ position}} \otimes \cdots \otimes id_{N}).$$
The differential on $M\circ N$ is given by $d_{M\circ N} := d_M \circ id_N + id_M \circ' d_N$. The term $id_{M} \circ' d_{N}$ goes normally to $M \circ (N;\, N)$ but we assume it composed with the projection $M \circ (N;\, N) \twoheadrightarrow M \circ N$. We define the \emph{infinitesimal composite product} $M\circ_{(1)} N$ by $M\circ (I;\, N)$, which is linear in $M$ and in $N$. Moreover we denote by $f\circ_{(1)} g$ the map $f \circ (id_{I},\, g) : M\circ_{(1)} N \rightarrow M'\circ_{(1)} N'$.

The category of dg $\mathbb{S}$-modules $(\mathbb{S} \textrm{-mod},\, \circ,\, I)$ is a monoidal category. A monoid $(\mathcal{P},\, \gamma,\, u)$ in this category is called a \emph{differential graded operad}, \emph{dg operad} for short. Dually, a comonoid $(\mathcal{C},\, \Delta,\, \eta)$ in this category is called a \emph{dg cooperad}.

Let $(\mathcal{P},\, \gamma,\, u)$ be a dg operad and $(\mathcal{C},\, \Delta,\, \eta)$ be a dg cooperad. We denote by $\gamma_{(1)}$ the \emph{partial product} of the operad $\mathcal{P}$
$$\mathcal{P} \circ_{(1)} \mathcal{P} \rightarrowtail \mathcal{P} \circ \mathcal{P} \xrightarrow{\gamma} \mathcal{P}.$$
Dually, we denote by $\Delta_{(1)}$ the \emph{partial coproduct} of the cooperad $\mathcal{C}$
$$\mathcal{C} \xrightarrow{\Delta} \mathcal{C} \circ \mathcal{C} \twoheadrightarrow \mathcal{C} \circ_{(1)} \mathcal{C}.$$

The free operad $\mathcal{F}(E)$ on a $\mathbb{S}$-module $E$ is given by all the trees whose vertices of arity $n$ are indexed by elements in $E(n)$. The product is given by the grafting of trees. Dually, the free cooperad $\mathcal{F}^{c}(E)$ has the same underlying $\mathbb{S}$-module as $\mathcal{F}(E)$ and the coproduct is given by the splitting of trees.

\subsection{Operadic twisting morphism}

We recall from \cite{GetzlerJones, GinzburgKapranov} the definitions of \emph{operadic twisting morphism}, \emph{left twisted composition product} and \emph{bar and cobar construction} in the setting of operads. We state the operadic twisting morphisms fundamental theorem and recall the notion of \emph{Koszul operad}.\\

Let $\mathcal{P}$ be a dg operad and $\mathcal{C}$ be a dg cooperad. We recall from Chapter 6 of \cite{LodayVallette} the \emph{dg convolution PreLie algebra} $(\mathrm{Hom_{\mathbb{S}\textrm{-mod}}}(\mathcal{C},\, \mathcal{P}),\, \star,\, \partial)$ where
$$\left\{ \begin{array}{l}
f\star g : \mathcal{C} \xrightarrow{\Delta_{(1)}} \mathcal{C} \circ_{(1)} \mathcal{C} \xrightarrow{f\circ_{(1)}g} \mathcal{P} \circ_{(1)} \mathcal{P} \xrightarrow{\gamma_{(1)}} \mathcal{P},\\
\partial(f) := d_{\mathcal{P}} \circ f - (-1)^{|f|} f \circ d_{\mathcal{C}},
\end{array} \right.$$
for $f,\, g \in \mathrm{Hom}(\mathcal{C},\, \mathcal{P})$. The PreLie product $\star$ induces a Lie bracket on $\mathrm{Hom}(\mathcal{C},\, \mathcal{P})$ and an \emph{operadic twisting morphism} is a map $\alpha : \mathcal{C} \rightarrow \mathcal{P}$ of degree $-1$, solution of the \emph{Maurer-Cartan equation}
$$\partial (\alpha) + \alpha \star \alpha = \partial(\alpha) + \frac{1}{2} [\alpha,\, \alpha] = 0.$$
We denote the set of operadic twisting morphisms from $\mathcal{C}$ to $\mathcal{P}$ by Tw$(\mathcal{C},\, \mathcal{P})$.

In \cite{GetzlerJones, GinzburgKapranov}, the authors extend the bar construction and the cobar construction of associative algebras/coalgebras to operads/cooperads. When $\mathcal{P}$ is an \emph{augmented operad}, that is $\mathcal{P} \cong I \oplus \overline{\mathcal{P}}$, we have $\mathrm{B} \mathcal{P} := (\mathcal{F}^{c}(s\overline{\mathcal{P}}),\, d := d_{1} + d_{2})$ where $\mathcal{F}^{c}(s\overline{\mathcal{P}})$ is the free cooperad on the homological suspension of $\overline{\mathcal{P}}$, $d_{1}$ is the unique coderivation which extends, up to suspension, the differental $d_{\overline{\mathcal{P}}}$ and $d_{2}$ is the unique coderivation which extends, up to suspension, the restriction of the partial product $\overline{\gamma}_{(1)} : \overline{\mathcal{P}} \circ_{(1)} \overline{\mathcal{P}} \rightarrow \overline{\mathcal{P}}$. When $\mathcal{C}$ is a \emph{coaugmented cooperad}, that is $\mathcal{C} \cong I \oplus \overline{\mathcal{C}}$ as cooperads, we have $\Omega \mathcal{C} := (\mathcal{F}(s^{-1}\overline{\mathcal{C}}),\, d := d_{1} - d_{2})$, where $\mathcal{F}(s^{-1}\overline{\mathcal{C}})$ is the free operad on the homological desuspension of $\overline{\mathcal{C}}$, $d_{1}$ is the unique derivation which extends, up to desuspension, the differential $d_{\overline{\mathcal{C}}}$ and $d_{2}$ is the unique derivation which extends, up to desuspension, the partial coproduct $\overline{\Delta}_{(1)} : \overline{\mathcal{C}} \rightarrow \overline{\mathcal{C}} \circ_{(1)} \overline{\mathcal{C}}$. When $\mathcal{P}$ is an augmented operad and $\mathcal{C}$ is a coaugmented cooperad, we require that the composition of an operadic twisting morphism with the augmentation map, respectively the coaugmentation map, vanishes. As for associative algebras, these constructions satisfy the following bar-cobar adjunction.

\begin{thm}[Theorem $2.17$ of \cite{GetzlerJones}]
The functors $\Omega$ and $\mathrm{B}$ form a pair of adjoint functors between the category of conilpotent coaugmented dg cooperads and augmented dg operads. The natural bijections are given by the set of operadic twisting morphisms:
$$\begin{array}{c}
\mathrm{Hom}_{\mathsf{dg\ op.}}(\Omega \mathcal{C},\, \mathcal{P}) \cong \mathrm{Tw(\mathcal{C}, \mathcal{P})} \cong \mathrm{Hom}_{\mathsf{dg\ coop.}}(\mathcal{C},\, \mathrm{B} \mathcal{P})\\
\xymatrix@C=40pt@M=8pt{f_{\alpha} & \ar@{<->}[l] \alpha \ar@{<->}[r] &  g_{\alpha}.}
\end{array}$$
\end{thm}

\begin{ex}[of operadic twisting morphisms]
\begin{itemize}
\item[]
\item When $\mathcal{C} = \mathrm{B} \mathcal{P}$, the previous theorem gives a natural operadic twisting morphism $\pi : \mathrm{B} \mathcal{P} \rightarrow \mathcal{P}$, associated to $id_{\mathrm{B} \mathcal{P}}$, which is equal to $\mathrm{B} \mathcal{P} = \mathcal{F}^{c}(s\overline{\mathcal{P}}) \twoheadrightarrow s \overline{\mathcal{P}} \xrightarrow{s^{-1}} \overline{\mathcal{P}} \rightarrowtail \mathcal{P}$. This morphism is universal in the sense that each operadic twisting morphism $\alpha : \mathcal{C} \rightarrow \mathcal{P}$ factorizes through $\pi$
$$\xymatrix{\mathcal{C} \ar[rr]^{\alpha} \ar@{-->}[dr]_{f_{\alpha}} && \mathcal{P}\\
& \mathrm{B} \mathcal{P}, \ar[ur]_{\pi}}$$
where $f_{\alpha}$ is a morphism of dg cooperads.
\item When $\mathcal{P} = \Omega \mathcal{C}$, the previous theorem gives a natural operadic twisting morphism $\iota : \mathcal{C} \rightarrow \Omega \mathcal{C}$, associated to $id_{\Omega \mathcal{C}}$, which is equal to $\mathcal{C} \twoheadrightarrow \overline{\mathcal{C}} \xrightarrow{s^{-1}} s^{-1}\overline{\mathcal{C}} \rightarrowtail \Omega \mathcal{C} = \mathcal{F} (s^{-1}\overline{\mathcal{C}})$. This morphism is universal in the sense that each operadic morphism $\alpha : \mathcal{C} \rightarrow \mathcal{P}$ factorizes through $\iota$
$$\xymatrix{& \Omega \mathcal{C} \ar@{-->}[dr]^{g_{\alpha}} &\\
\mathcal{C} \ar[ur]^{\iota} \ar[rr]^{\alpha} && \mathcal{P},}$$
where $g_{\alpha}$ is a morphism of dg operads.
\end{itemize}
\end{ex}

To an operadic twisting morphism $\alpha$ between a coaugmented cooperad $\mathcal{C}$ and an augmented operad $\mathcal{P}$, we associate the \emph{left twisted composition product} \cite{Vallette2, LodayVallette}
$$\mathcal{P} \circ_{\alpha} \mathcal{C} := (\mathcal{P} \circ \mathcal{C},\, d_{\alpha} := d_{\mathcal{P} \circ \mathcal{C}} - d_{\alpha}^{l}),$$
where $d_{\alpha}^{l}$ is given by the composite
$$\mathcal{P} \circ \mathcal{C} \xrightarrow{id_{\mathcal{P}} \circ' \Delta} \mathcal{P} \circ (\mathcal{C};\, \mathcal{C} \circ \mathcal{C}) \xrightarrow{id_{\mathcal{P}} \circ (id_{\mathcal{C}},\, \alpha \circ id_{\mathcal{C}})} \mathcal{P} \circ (\mathcal{C};\, \mathcal{P} \circ \mathcal{C}) \cong (\mathcal{P} \circ_{(1)} \mathcal{P}) \circ \mathcal{C} \xrightarrow{\gamma_{(1)} \circ id_{\mathcal{C}}} \mathcal{P} \circ \mathcal{C}.$$
Since $\alpha$ is an operadic twisting morphism, $d_{\alpha}$ is a differential (see \cite{LodayVallette}). We refer to \cite{LodayVallette} for a definition of the \emph{right twisted composite product}
$$\mathcal{C} \circ_{\alpha} \mathcal{P} := (\mathcal{C} \circ \mathcal{P},\, d_{\alpha} := d_{\mathcal{C} \circ \mathcal{P}} + d_{\alpha}^{r})$$
and one gets the \emph{twisted composite product}
$$\mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} \mathcal{P} := (\mathcal{P} \circ \mathcal{C} \circ \mathcal{P},\, d_{\alpha} := d_{\mathcal{P} \circ \mathcal{C} \circ \mathcal{P}} - d_{\alpha}^{l} \circ id_{\mathcal{P}} + id_{\mathcal{P}} \circ d_{\alpha}^{r}).$$
We say that $\alpha$ is an \emph{operadic Koszul morphism} when $\mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} \mathcal{P} \xrightarrow{\sim} \mathcal{P}$. We denote by $\mathrm{Kos}(\mathcal{C},\, \mathcal{P})$ the set of operadic Koszul morphisms.

\begin{lem}[\cite{GetzlerJones, Fresse, Vallette2}]\label{augbarres}
The twisting morphisms $\pi : \mathrm{B} \mathcal{P} \rightarrow \mathcal{P}$ and $\iota : \mathcal{C} \rightarrow \Omega \mathcal{C}$ are operadic Koszul morphisms, that is
$$\mathcal{P} \circ_{\pi} \mathrm{B} \mathcal{P} \circ_{\pi} \mathcal{P} \xrightarrow{\sim} \mathcal{P} \textrm{ and } \Omega \mathcal{C} \circ_{\iota} \mathcal{C} \circ_{\iota} \Omega \mathcal{C} \xrightarrow{\sim} \Omega \mathcal{C}.$$
\end{lem}

Sometimes, we need an extra grading, called \emph{weight grading}, which differs from the homological degree. We say that a \emph{weight graded dg $\mathbb{S}$-module}, \emph{wdg $\mathbb{S}$-module} for short, $M$ is \emph{connected} when $M^{(0)} = I$ and $M = I \oplus M^{(1)} \oplus \cdots \oplus M^{(\omega)} \oplus \cdots$. These definitions hold for operads and cooperads. For example, the weight grading on the free operad $\mathcal{F}(E)$ or on the free cooperad $\mathcal{F}^{c}(E)$ is given by the number $\omega$ of vertices and denoted by $\mathcal{F} (E)^{(\omega)}$ or $\mathcal{F}^{c}(E)^{(\omega)}$. This induces a weight grading on each \emph{quadratic operad} $\mathcal{P} = \mathcal{F}(E)/(R)$, where $R \subset \mathcal{F}(E)^{(2)}$ and on each sub-cooperad of a free cooperad. In the weight graded setting, we assume that the maps preserve the weight grading. For example, a twisting morphism $\alpha$ preserves the weight grading and when the underlying modules are connected, we have $\alpha = \alpha^{(\geq 1)}$.

As for associative algebras, the twisted composite products and the bar and cobar constructions satisfy the following property.
\begin{thm}[Operadic twisting morphisms fundamental theorem, \cite{LodayVallette}]\label{otmft}
Let $\mathcal{P}$ be a connected wdg operad and let $\mathcal{C}$ be a connected wdg cooperad. For any operadic twisting morphism $\alpha : \mathcal{C} \rightarrow \mathcal{P}$, the following assertions are equivalent:
\begin{enumerate}
\item The twisting morphism $\alpha$ is Koszul, that is $\mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} \mathcal{P} \xrightarrow{\sim} \mathcal{P}$;
\item The left twisted composite product $\mathcal{P} \circ_{\alpha} \mathcal{C}$ is acyclic, that is $\mathcal{P} \circ_{\alpha} \mathcal{C} \xrightarrow{\sim} I$;
\item The right twisted composite product $\mathcal{C} \circ_{\alpha} \mathcal{P}$ is acyclic, that is $\mathcal{C} \circ_{\alpha} \mathcal{P} \xrightarrow{\sim} I$;
\item The morphism of dg operads $f_{\alpha} : \Omega \mathcal{C} \rightarrow \mathcal{P}$ is a quasi-isomorphism;
\item The morphism of dg cooperads $g_{\alpha} : \mathcal{C} \rightarrow \mathrm{B} \mathcal{P}$ is a quasi-isomorphism.
\end{enumerate}
\end{thm}

\begin{pf}
A proof of the equivalences $(2) \Leftrightarrow (3) \Leftrightarrow (4) \Leftrightarrow (5)$ can be find in \cite{LodayVallette}. We show the equivalence $(1) \Leftrightarrow (2)$.

$(1) \Rightarrow (2)$: The Koszul complex $\mathcal{P} \circ_{\alpha} \mathcal{C}$ is equal to the relative composite product $(\mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} \mathcal{P}) \circ_{\mathcal{P}} I$ which is defined by the short exact sequence
$$0 \rightarrow (\mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} \mathcal{P}) \circ \mathcal{P} \circ I \rightarrow (\mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} \mathcal{P}) \circ I \rightarrow (\mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} \mathcal{P}) \circ_{\mathcal{P}} I \rightarrow 0.$$
Since we work over a field of characteristic zero, the ring $\mathbb{K} [\mathbb{S}_{n}]$ is semi-simple by Maschke's theorem, that is every $\mathbb{K} [\mathbb{S}_{n}]$-module is projective. So the K\"unneth formula implies $\mathrm{H}_{\bullet}((\mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} \mathcal{P}) \circ \mathcal{P} \circ I) \cong \mathrm{H}_{\bullet}(\mathcal{P}) \circ \mathrm{H}_{\bullet}(\mathcal{P}) \circ I$. Moreover $\mathrm{H}_{\bullet}((\mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} \mathcal{P}) \circ I) \cong \mathrm{H}_{\bullet}(\mathcal{P}) \circ I$. Finally, this gives $\mathrm{H}_{\bullet}(\mathcal{P} \circ_{\alpha} \mathcal{C}) \cong \mathrm{H}_{\bullet}((\mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} \mathcal{P}) \circ_{\mathcal{P}} I) \cong \mathrm{H}_{\bullet}(\mathcal{P}) \circ_{\mathrm{H}_{\bullet}(\mathcal{P})} I \cong I$.

$(2) \Rightarrow (1)$: We define a filtration $F_{p}$ on $\mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} \mathcal{P}$ by
$$F_{p}(\mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} \mathcal{P}) := \oplus_{\omega \leq p}(\mathcal{P} \circ_{\alpha} \mathcal{C})^{(\omega)} \circ_{\alpha} \mathcal{P}.$$
The differential on $\mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} \mathcal{P}$ is given by $d_{\alpha} := d_{\mathcal{P} \circ \mathcal{C} \circ \mathcal{P}} - d_{\alpha}^{l} \circ id_{\mathcal{P}} + id_{\mathcal{P}} \circ d_{\alpha}^{r}$ and satisfies
$$\left\{ \begin{array}{ccl}
d_{\mathcal{P} \circ \mathcal{C} \circ \mathcal{P}} & : & F_{p} \rightarrow F_{p}\\
d_{\alpha}^{l} & : & F_{p} \rightarrow F_{p}\\
d_{\alpha}^{r} & : & F_{p} \rightarrow F_{p-1}.
\end{array} \right.$$
So the filtration is a filtration of chain complexes. Moreover, the filtration is exhaustive and bounded below. We can apply the classical theorem of convergence of spectral sequences (Theorem 5.5.1 of \cite{Weibel}) and we get that the induced spectral sequence $E_{p,\, q}^{\bullet}$ converges to the homology of $\mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} \mathcal{P}$. We consider the trivial chain complex filtration on $\mathcal{P}$, that is $F_{p}\mathcal{P} := \mathcal{P}$ for all $\mathcal{P}$, so that the map $\mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} \mathcal{P} \rightarrow \mathcal{P}$ respects the filtration. This last map induces a map on the $E^{1}$-pages which is an isomorphism since $E_{p,\, q}^{1} \cong \mathrm{H}_{\bullet}(\mathcal{P} \circ_{\alpha} \mathcal{C}) \circ \mathrm{H}_{\bullet}(\mathcal{P}) \cong \mathrm{H}_{\bullet}(\mathcal{P}) \cong E_{0,\, q}^{1}$ by the K\"unneth formula. The convergence of the spectral sequences concludes the proof.
$\ \hfill \square$
\end{pf}

\subsubsection{\bf Koszul operad}\label{Koszuloperad}

An \emph{operadic quadratic data} $(E,\, R)$ is a graded $\mathbb{S}$-module $E$ and a graded sub-$\mathbb{S}$-module $R \subset \mathcal{F}(E)^{(2)}$. The quotient $\mathcal{P}(E,\, R) := \mathcal{F}(E)/(R)$ is called a \emph{quadratic operad}. Dually the \emph{quadratic cooperad} $\mathcal{C}(E,\, R)$ is by definition the sub-cooperad of the cofree cooperad $\mathcal{F}^{c}(E)$ which is \emph{universal} among the sub-cooperads $\mathcal{C}$ of $\mathcal{F}^{c}(E)$ such that the composite
$$\mathcal{C} \rightarrowtail \mathcal{F}^{c}(E) \twoheadrightarrow \mathcal{F}^{c}(E)^{(2)}/R$$
is $0$. The word ``universal'' means that for any such cooperad $\mathcal{C}$, there exists a unique morphism of cooperads $\mathcal{C} \rightarrow \mathcal{C}(E,\, R)$ such that the following diagram commutes
$$\xymatrix@M=6pt@R=12pt{\mathcal{C} \ar@{>->}[dr] \ar[r] & \mathcal{C}(E,\, R) \ar@{>->}[d] \\
& \mathcal{F}^{c}(E).}$$

To a quadratic data $(E,\, R)$, we associate the \emph{Koszul dual cooperad of $\mathcal{P}$} given by $\Po^{\textrm{!`}} := \mathcal{C}(sE,\, s^{2}R)$ where $s$ is the homological suspension.

\begin{ex1}[of operadic twisting morphism]
When $\mathcal{C} = \mathcal{P}^{\textrm{!`}}$, the map $\kappa : \mathcal{P}^{\textrm{!`}} \rightarrowtail \mathrm{B} \mathcal{P} \xrightarrow{\pi} \mathcal{P}$ is an operadic twisting morphism. It is equal to $\mathcal{P}^{\textrm{!`}} \twoheadrightarrow sE \xrightarrow{s^{-1}} E \rightarrowtail \mathcal{P}$.
\end{ex1}

The universality of the twisting morphisms $\pi$ and $\iota$ provides an inclusion of cooperads $g_{\kappa} : \Po^{\textrm{!`}} \rightarrowtail \mathrm{B} \mathcal{P}$ and a surjection of operads $f_{\kappa} : \Omega \Po^{\textrm{!`}} \twoheadrightarrow \mathcal{P}$. The operadic twisting morphisms fundamental theorem writes:
\begin{thm}[Koszul criterion, \cite{LodayVallette}]\label{opKoszulcriterion}
Let $(E,\, R)$ be an operadic quadratic data. Let $\mathcal{P} := \mathcal{P}(E,\, R)$ be the associated quadratic operad and let $\Po^{\textrm{!`}} := \mathcal{C}(sE,\, s^{2}R)$ its Koszul dual cooperad. The following assertions are equivalent:
\begin{enumerate}
\item The operadic twisting morphism $\kappa$ is Koszul, that is $\mathcal{P} \circ_{\kappa} \Po^{\textrm{!`}} \circ_{\kappa} \mathcal{P} \xrightarrow{\sim} \mathcal{P}$;
\item The Koszul complex $\mathcal{P} \circ_{\kappa} \Po^{\textrm{!`}}$ is acyclic, that is $\mathcal{P} \circ_{\kappa} \Po^{\textrm{!`}} \xrightarrow{\sim} I$;
\item The Koszul complex $\Po^{\textrm{!`}} \circ_{\kappa} \mathcal{P}$ is acyclic, that is $\Po^{\textrm{!`}} \circ_{\kappa} \mathcal{P} \xrightarrow{\sim} I$;
\item The morphism of dg operads $f_{\kappa} : \Omega \Po^{\textrm{!`}} \rightarrow \mathcal{P}$ is a quasi-isomorphism;
\item The morphism of dg cooperads $g_{\kappa} : \Po^{\textrm{!`}} \rightarrow \mathrm{B} \mathcal{P}$ is a quasi-isomorphism.
\end{enumerate}
\end{thm}

The chain complexes $\mathcal{P} \circ_{\kappa} \Po^{\textrm{!`}} \circ_{\kappa} \mathcal{P}$, resp. $\Po^{\textrm{!`}} \circ_{\kappa} \mathcal{P}$, resp. $\mathcal{P} \circ_{\kappa} \Po^{\textrm{!`}}$, are called the \emph{Koszul complexes}. An operad is called a \emph{Koszul operad} when the operadic twisting morphism $\kappa : \Po^{\textrm{!`}} \rightarrow \mathcal{P}$ is an operadic Koszul morphism, that is $\mathcal{P} \circ_{\kappa} \Po^{\textrm{!`}} \circ_{\kappa} \mathcal{P} \xrightarrow{\sim} \mathcal{P}$.

\section{Twisting morphism for $\mathcal{P}$-algebras}\label{algtwbar}

In this section, we extend the Koszul duality theory for associative algebras to algebras over an operad. We recall the notions already in \cite{GetzlerJones} of \emph{algebraic twisting morphism} and the \emph{bar and the cobar constructions}. However, to describe the Koszul duality theory for $\mathcal{P}$-algebras, we need to generalize the Koszul complex. A cohomology theory associated to $\mathcal{P}$-algebras is represented by the \emph{cotangent complex}, that we make explicit thanks to the Koszul duality theory for operads. We show that this cotangent complex generalizes the Koszul complex and we state and prove in this setting the algebraic twisting morphisms fundamental theorem.

We fix an augmented dg operad $\mathcal{P}$, a coaugmented dg cooperad $\mathcal{C}$ and an operadic twisting morphism $\alpha : \mathcal{C} \rightarrow \mathcal{P}$. From now on and until the end of the paper, we assume that $\mathcal{P}(0) = 0$ and $\mathcal{C}(0)=0$.

\subsection{$\mathcal{P}$-algebra}

A \emph{$\mathcal{P}$-algebra} is a dg module $A$ endowed with a morphism of dg operads
$$\mathcal{P} \rightarrow End_{A} := \{ \mathrm{Hom}(A^{\otimes n},\, A)\}_{n\geq 0}.$$
Equivalently, a structure of $\mathcal{P}$-algebra $(A,\, \gamma_{A})$ is given by a map $\gamma_A : \mathcal{P} (A) \rightarrow A$ which is compatible with the composition product of the operad $\mathcal{P}$ and the unit of the operad $\mathcal{P}$, where
$$\mathcal{P} (A) := \mathcal{P} \circ (A,\, 0,\, 0,\, \cdots) = \bigoplus_{n\geq 0} \mathcal{P}(n) \otimes_{\mathbb{S}_{n}} A^{\otimes n}.$$
Dually, a structure of \emph{$\mathcal{C}$-coalgebra  $(C,\, \Delta_{C})$} is a dg module $C$ endowed with a map
$$\Delta_{C} : C \rightarrow \mathcal{C} (C) := \prod_{n\geq 0} (\mathcal{C}(n) \otimes C^{\otimes n})^{\mathbb{S}_{n}}$$
which is compatible with the coproduct and the counit and where $(-)^{\mathbb{S}_{n}}$ stands for the coinvariants with respect to the diagonal action. We say that the $\mathcal{C}$-coalgebra $C$ is \emph{conilpotent} when the map $\Delta_{C}$ factors through $\oplus_{n \geq 0} (\mathcal{C}(n) \otimes C^{\otimes n})^{\mathbb{S}_{n}}$.

The notation $\otimes_{H}$ stands for the \emph{Hadamard product}: for any $\mathbb{S}$-modules $M$ and $N$, $(M\otimes_{H} N)(n) := M(n) \otimes N(n)$ with the diagonal action of $\mathbb{S}_{n}$. Let ${\mathcal{S}^{-1}}$ be the cooperad $\mathrm{End}^{c}_{s\mathbb{K}} := \{\textrm{Hom}((s\mathbb{K})^{\otimes n},\, s\mathbb{K})\}_{n \geq 0}$ endowed with a natural action of $\mathbb{S}_{n}$ given by the signature, where $s$ stands for the homological suspension of vector spaces. To the cooperad $\mathcal{C}$, we associate its \emph{operadic homological desuspension} given by the cooperad ${\mathcal{S}^{-1}} \C := {\mathcal{S}^{-1}} \otimes_{H} \mathcal{C}$. A structure of ${\mathcal{S}^{-1}} \C$-coalgebra $\Delta_{sC}$ on $sC$ is equivalent to a structure of $\mathcal{C}$-coalgebra $\Delta_{C}$ on $C$ because ${\mathcal{S}^{-1}} \mathcal{C} (sC) \cong s\mathcal{C} (C)$.

\begin{ex1}
Let $\mathcal{P} = \mathcal{A}s$ be the non-symmetric operad encoding associative algebras. An $\mathcal{A}s$-algebra $A$ is an associative algebra without unit. Moreover, a structure of ${\mathcal{S}^{-1}} \mathcal{A}s^{\textrm{!`}}$-coalgebra is exactly that of a coassociative coalgebra as in Section \ref{casas} but without counit. The category of $\mathcal{A}s$-algebras $A$ is equivalent to the category of augmented associative algebra by adding a unit $A_{+} := \mathbb{K} \oplus A$. The Koszul duality theory of $\mathcal{A}s$-algebras will be the classical Koszul duality theory of augmented associative algebras.
\end{ex1}

A \emph{weight graded dg module}, or \emph{wdg module} for short, is a chain complex endowed with a weight grading. We say that a \emph{wdg $\mathcal{P}$-algebra} or \emph{wdg $\mathcal{C}$-coalgebra} $V$ is \emph{connected} when it satisfies $V = V^{(1)} \oplus V^{(2)} \oplus \cdots$. Moreover, we require that the structure maps, as the composite product $\gamma_{A}$, preserve the weight grading.

\subsection{Algebraic twisting morphism}\label{algtwmorph}

From \cite{GetzlerJones}, we recall the definition of twisting morphisms between a coalgebra over a cooperad and an algebra over an operad. We describe the bar and the cobar constructions in this setting.\\

Let $(A,\, \gamma_{A})$ be a $\mathcal{P}$-algebra and $(C,\, \Delta_{C})$ be a $\mathcal{C}$-coalgebra. Associated to $\varphi \in \mathrm{Hom_{dg\, mod}}(sC,\, A)$, we define the applications
$$\left\{ \begin{array}{l}
\star_{\alpha} (\varphi) : sC \xrightarrow{\Delta_{C}} s\mathcal{C} (C) \xrightarrow{(s^{-1}\alpha) \circ (s\varphi)} \mathcal{P} (A) \xrightarrow{\gamma_{A}} A\\
\partial(\varphi) := d_{A} \circ \varphi - (-1)^{|\varphi|} \varphi \circ d_{sC}.
\end{array} \right.$$

An \emph{algebraic twisting morphism with respect to $\alpha$} is a map $\varphi : sC \rightarrow A$ of degree $-1$ solution to the Maurer-Cartan equation
$$\partial (\varphi) + \star_{\alpha} (\varphi) = 0.$$
We denote by Tw$_{\alpha}(C, A)$ the set of algebraic twisting morphisms with respect to $\alpha$. In the weight graded setting, we require that the algebraic twisting morphisms preserve the weight grading.

\begin{rem}
We proved in \cite{Milles} that when $\mathcal{P}$ is binary quadratic operad and $\mathcal{C} = \Po^{\textrm{!`}}$ is the Koszul dual cooperad, the aforementioned Maurer-Cartan equation is equal to a Maurer-Cartan equation in a dg Lie algebra.
\end{rem}

To the operadic twisting morphism $\alpha : \mathcal{C} \rightarrow \mathcal{P}$, one associates a functor
$$\mathrm{B}_{\alpha} : \textsf{dg}\ \mathcal{P} \textsf{-algebras} \rightarrow \textsf{dg}\ {\mathcal{S}^{-1}} \C \textsf{-coalgebras}$$
defined by $\mathrm{B}_{\alpha} A = s\mathcal{C} \circ_{\alpha} A := (s\mathcal{C} (A),\, d_{\alpha} := id_{s} \otimes (d_{\mathcal{C}(A)} + d_{\alpha}^{r}))$, where
$$d_{\alpha}^{r} : \mathcal{C} (A) \xrightarrow{\Delta_{(1)} \circ id_{A}} (\mathcal{C} \circ_{(1)} \mathcal{C}) (A) \xrightarrow{(id_{\mathcal{C}} \circ_{(1)} \alpha) \circ id_{A}} \mathcal{C} \circ \mathcal{P} (A) \xrightarrow{id_{\mathcal{C}}\circ \gamma_{A}} \mathcal{C} (A).$$
The coproduct defining the ${\mathcal{S}^{-1}} \mathcal{C}$-coalgebra structure on $s\mathcal{C}(A)$ is given by
$$s\mathcal{C}(A) \xrightarrow{s\Delta_{\mathcal{C}} \circ id_{A}} s\mathcal{C} \circ \mathcal{C} (A) \cong {\mathcal{S}^{-1}} \C(s\mathcal{C} (A)).$$

\begin{lem}[\cite{GetzlerJones}]
The map $d_{\alpha}$ is a differential, that is $d_{\alpha}^{2} = 0$ and $\mathrm{B}_{\alpha} A$ is a dg ${\mathcal{S}^{-1}} \C$-coalgebra.
\end{lem}

In a similar way, one associates to the operadic twisting morphism $\alpha : \mathcal{C} \rightarrow \mathcal{P}$ a functor
$$\Omega_{\alpha} : \textsf{dg}\ {\mathcal{S}^{-1}} \C \textsf{-coalgebras} \rightarrow \textsf{dg}\ \mathcal{P} \textsf{-algebras}$$
given on a ${\mathcal{S}^{-1}} \C$-coalgebra $sC$ by $\Omega_{\alpha} sC := (\mathcal{P}(C),\, d_{\alpha} := d_{\mathcal{P}(C)} - d_{\alpha}^{l})$, where
$$d_{\alpha}^{l} : \mathcal{P}(C) \xrightarrow{id_{\mathcal{P}}\circ' \Delta_{C}} \mathcal{P} \circ (C,\, \mathcal{C} (C)) \xrightarrow{id_{\mathcal{P}} \circ (id_{C},\, \alpha \circ id_{C})} (\mathcal{P} \circ_{(1)} \mathcal{P}) (C) \xrightarrow{\gamma_{(1)} \circ id_{\mathcal{C}}} \mathcal{P} (C).$$

\begin{lem}[\cite{GetzlerJones}]
The map $d_{\alpha}$ is a differential, that is $d_{\alpha}^{2} = 0$ and $\Omega_{\alpha} sC$ is a $\mathcal{P}$-algebra.
\end{lem}

Notice that the notation $d_{\alpha}$ stands for different differentials. The differential is given without ambiguity by the context.

\begin{ex1}
Assume that $\mathcal{P} = \mathcal{A}s$ is the operad encoding associative algebras, $\mathcal{C} = \mathcal{A}s^{\textrm{!`}}$ and $\kappa : \mathcal{A}s^{\textrm{!`}} \rightarrow \mathcal{A}s$. Let $A$ be an $\mathcal{A}s$-algebra, that is an associative algebra.

The bar construction $\mathrm{B}_{\kappa}A$ of the $\mathcal{A}s$-algebra $A$ is equal to the classical (reduced) bar construction $\overline{\mathrm{B}} A_{+} := (\overline{T}^{c}(sA),\, d)$ \cite{EilenbergMacLane} of the associative algebra $A_{+} = \mathbb{K} \oplus A$. Moreover, let $C$ be an $\mathcal{A}s^{\textrm{!`}}$-coalgebra, that is $sC$ is a coassociative coalgebra without counit. The cobar construction $\Omega_{\kappa}sC$ is equal to the classical (reduced) cobar construction $\overline{\Omega} sC_{+} := (\overline{T}(C),\, d)$ \cite{Adams} of the coaugmented coassociative coalgebras $sC_{+} = \mathbb{K} \oplus sC$.
\end{ex1}

The bar construction and the cobar construction form the \emph{bar-cobar adjunction}.

\begin{prop}[Proposition $2.18$ of \cite{GetzlerJones}]\label{bijbar}
For every conilpotent $\mathcal{C}$-coalgebra $C$ and every $\mathcal{P}$-algebra $A$, there is a natural bijection
$$\begin{array}{c}
\mathrm{Hom}_{\mathsf{dg\, \mathcal{P}} \textsf{-}\mathsf{alg.}}(\Omega_{\alpha}sC,\, A) \cong \mathrm{Tw}_{\alpha}(C,\, A) \cong \mathrm{Hom}_{\mathsf{dg\, {\mathcal{S}^{-1}} \C} \textsf{-}\mathsf{cog.}}(sC,\, \mathrm{B}_{\alpha}A)\\
\xymatrix@C=40pt@M=8pt{f_{\varphi} & \ar@{<->}[l] \varphi \ar@{<->}[r] &  g_{\varphi}.}
\end{array}$$
\end{prop}

This adjunction produces two particular morphisms. Consider a $\mathcal{P}$-algebra $A$ and its bar construction $sC = \mathrm{B}_{\alpha}A$. The morphism of dg ${\mathcal{S}^{-1}} \C$-coalgebras $id_{\mathrm{B}_{\alpha}A}$ gives a universal algebraic twisting morphism
$$\pi_{\alpha} : \mathrm{B}_{\alpha}A \cong s\mathcal{C}(A) \twoheadrightarrow sA \xrightarrow{s^{-1}} A$$
and the \emph{counit} of the adjunction
$$\varepsilon_{\alpha} : \Omega_{\alpha}\mathrm{B}_{\alpha}A = \mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} A \xrightarrow{id_{\mathcal{P}} \circ (s\pi_{\alpha})} \mathcal{P} (A) \xrightarrow{\gamma_{A}} A.$$
Similarly, when $C$ is a dg $\mathcal{C}$-coalgebra and $A = \Omega_{\alpha}sC$, the morphism $id_{\Omega_{\alpha}sC}$ of dg $\mathcal{P}$-algebras gives a universal algebraic twisting morphism
$$\iota_{\alpha} : sC \xrightarrow{s^{-1}} C \rightarrowtail \Omega_{\alpha}sC \cong \mathcal{P} (C)$$
and the \emph{unit} of the adjunction
$$u_{\alpha} : sC \xrightarrow{\Delta{sC}} s\mathcal{C}(C) \xrightarrow{id_{s\mathcal{C}} \circ (s\iota_{\alpha})} \mathrm{B}_{\alpha}\Omega_{\alpha}\, sC.$$
The morphisms $\pi_{\alpha}$ and $\iota_{\alpha}$ are universal in the following meaning.

\begin{lem}[\cite{GetzlerJones}]
With the above notations, any algebraic twisting morphism $\varphi : sC \rightarrow A$ with respect to $\alpha$ factors through the universal algebraic twisting morphisms
$$\xymatrix{& \Omega_{\alpha}sC \ar@{-->}[dr]^{f_{\varphi}} &\\
sC \ar[rr]^{\varphi} \ar[ur]^{\iota_{\alpha}} \ar@{-->}[dr]_{g_{\varphi}} && A\\
& \mathrm{B}_{\alpha}A. \ar[ur]_{\pi_{\alpha}} &}$$
\end{lem}

\begin{pf}
The dashed arrows are just the images of $\varphi$ by the two bijections of Proposition \ref{bijbar}.
$\ \hfill \square$
\end{pf}

We now prove that the bar and the cobar construction behave well in the weight graded setting.

\begin{lem}\label{cobarbarpreserve}
Let $\alpha : \mathcal{C} \rightarrow \mathcal{P}$ be a Koszul morphism between a wdg connected cooperad $\mathcal{C}$ and a wdg connected operad $\mathcal{P}$. The cobar construction $\Omega_{\alpha}$ sends quasi-isomorphisms $g : sC \xrightarrow{\sim} sC'$ between wdg connected ${\mathcal{S}^{-1}} \mathcal{C}$-coalgebras to quasi-isomorphisms $\Omega_{\alpha} sC \xrightarrow{\sim} \Omega_{\alpha} sC'$ of $\mathcal{P}$-algebras.

Similarly, the bar construction $\mathrm{B}_{\alpha}$ sends quasi-isomorphisms $f : A \xrightarrow{\sim} A'$ between wdg connected $\mathcal{P}$-algebras to quasi-isomorphisms $\mathrm{B}_{\alpha} A \xrightarrow{\sim} \mathrm{B}_{\alpha} A'$ of ${\mathcal{S}^{-1}} \C$-coalgebras.
\end{lem}

\begin{pf}
We show first the result for the cobar construction. Since $\mathbb{K}$ is a field of characterisic $0$, every dg module is projective. Moreover, by Maschke's theorem, every $\mathbb{K}[\mathbb{S}_{n}]$-module is projective. So the quasi-isomorphism $sC \xrightarrow{\sim} sC'$ implies the quasi-isomorphism $C \xrightarrow{\sim} C'$, $C^{\otimes n} \xrightarrow{\sim} {C'}^{\otimes n}$ and $\mathcal{P} (n) \otimes_{\mathbb{S}_{n}} C^{\otimes n} \xrightarrow{\sim} \mathcal{P} (n) \otimes_{\mathbb{S}_{n}} {C'}^{\otimes n}$. Finally $(\mathcal{P} (C),\, d_{\mathcal{P}(C)}) \xrightarrow{\sim} (\mathcal{P} (C'),\, d_{\mathcal{P}(C')})$. We filter the chain complex $\Omega_{\alpha}sC = (\mathcal{P} (C),\, d_{\mathcal{P}(C)} - d_{\alpha}^{l})$ by the total weight in $C$
$$F_{p}(\mathcal{P} (C)) := \bigoplus_{\omega_{1}+ \cdots +\omega_{m}\leq p} \bigoplus_{n \in \mathbb{N}} \mathcal{P}(n) \otimes_{\mathbb{S}_{n}} C^{(\omega_{1})} \otimes \cdots \otimes C^{(\omega_{n})}.$$
The part $d_{\mathcal{P}(C)}$ of the differential keeps the total weight in $C$ constant. Since $\mathcal{C}$ and $\mathcal{P}$ are wdg connected, the twisting morphisms are zero on weight zero and the part $d_{\alpha}^{l}$ of the differential decreases the total weight at least by $1$. The differential respects the filtration. This filtration is exhaustive and bounded below. So we apply the classical theorem of convergence of spectral sequences (Theorem $5.5.1$ of \cite{Weibel}) and we get that the induced spectral sequence converges to the homology of $\Omega_{\alpha}sC$. We consider the same filtration for $C'$. The terms $E^1_{p,\, q}(\mathcal{P} (C))$ are given by the homology of $(\mathcal{P} (C),\, d_{\mathcal{P}(C)})$ and are isomorphic to the terms $E^1_{p,\, q}(\mathcal{P} (C'))$, that is to the homology of $(\mathcal{P} (C'),\, d_{\mathcal{P}(C')})$. Since moreover $g$ is a morphism of dg $\mathcal{C}$-coalgebras, the pages $E^r$, $r\geq 1$ are isomorphic and $\Omega_{\alpha}sC \xrightarrow{\sim} \Omega_{\alpha}sC'$ is a quasi-isomorphism.

To prove the result for the bar construction, we consider the filtration $F_{p}$ on $\mathrm{B}_{\alpha} A$ given by
$$F_{p}(s\mathcal{C} (A)) := \bigoplus_{\omega \leq p} \mathcal{C}^{(\omega)}(A).$$
The rest of the proof is similar.
$\ \hfill \square$
\end{pf}

\subsection{Cotangent complex}\label{cotangentcomplex}

Operadic Koszul morphisms provide functorial resolutions of $\mathcal{P}$-alge\-bras. We use these resolutions to make the cotangent complex involved in the André-Quillen cohomology theory of $\mathcal{P}$-algebras explicit.\\

The \emph{cotangent complex} associated to a $\mathcal{P}$-algebra $A$ is a (class of) chain complexes which represents the \emph{André-Quillen cohomology theory of $A$ with coefficients in a module}. We make it explicit following \cite{GoerssHopkins} and \cite{Milles}, where the reader can find complete exposition about the André-Quillen cohomology theory and the cotangent complex.

To a resolution of the $\mathcal{P}$-algebra $A$ is associated a representation of the cotangent complex of $A$.

\begin{prop}[Proposition 10.3.6 of \cite{LodayVallette}]\label{Koszulandresolution}
The operadic twisting morphism $\alpha : \mathcal{C} \rightarrow \mathcal{P}$ is Koszul, that is $\mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} \mathcal{P} \xrightarrow{\sim} \mathcal{P}$ if and only if the counit of the adjunction $\Omega_{\alpha}\mathrm{B}_{\alpha}A \xrightarrow{\sim} A$ is a quasi-isomorphism for every $\mathcal{P}$-algebra $A$.
\end{prop}

As a consequence, we recover the following theorems.

\begin{thm}[Theorem 2.19 of \cite{GetzlerJones}]
For any $\mathcal{P}$-algebra $A$, there is a quasi-isomorphism
$$\xymatrix{\Omega_{\pi} \mathrm{B}_{\pi}A = \mathcal{P} \circ_{\pi} \mathrm{B} \mathcal{P} \circ_{\pi} A \ar@{->>}[r]^{\hspace{1.6cm}\sim} & A.}$$
\end{thm}

\begin{thm}[Theorem 2.25 of \cite{GetzlerJones}]
When the operad $\mathcal{P}$ is Koszul, there is a smaller resolution of any $\mathcal{P}$-algebra $A$
$$\xymatrix{\Omega_{\kappa}\mathrm{B}_{\kappa}A = \mathcal{P} \circ_{\kappa} \Po^{\textrm{!`}} \circ_{\kappa} A \ar@{->>}[r]^{\hspace{1.5cm}\sim} & A.}$$
\end{thm}

To an operadic twisting morphism $\alpha : \mathcal{C} \rightarrow \mathcal{P}$ and to an algebraic twisting morphism $\varphi : sC \rightarrow A$ with respect to $\alpha$, we associate the following coequalizer $A\otimes^{\mathcal{P}} C$:
$$\xymatrix{\mathcal{P} \circ (\mathcal{P} (A),\, C) \ar@<0.5ex>[r]^{c_{0}} \ar@<-0.5ex>[r]_{c_{1}} & \mathcal{P} \circ (A,\, C) \ar@{->>}[r] & A\otimes^{\mathcal{P}} C,}$$
where $\left\{ \begin{array}{l}
c_0 : \mathcal{P} \circ (\mathcal{P}(A),\, C) \rightarrow (\mathcal{P} \circ \mathcal{P})(A,\, C) \xrightarrow{\gamma (id_{A},\, id_{C})} \mathcal{P} (A,\, C)\\
c_1 : \mathcal{P} \circ (\mathcal{P}(A),\, C) \xrightarrow{id_{\mathcal{P}} (\gamma_{A},\, id_{C})} \mathcal{P}(A,\, C)
\end{array} \right.$.

The differential $d_{\varphi} := d_{A\otimes^{\mathcal{P}} C} - d_{\varphi}^{l}$ on $A\otimes^{\mathcal{P}} C$ depends on the differentials on $A$, $\mathcal{P}$ and $C$ and on a twisting term $d_{\varphi}^{l}$, which is the map on the quotient $A\otimes^{\mathcal{P}} C$ induced by $d_{1}^{l} := \sum d_{1}^{l}(n)$ where
$$\hspace{-2cm} d_{1}^{l}(n) : \mathcal{P} (A,\, C) \xrightarrow{id_{\mathcal{P}} (id_{A},\, \Delta_{C}(n))} \mathcal{P} (A,\, (\mathcal{C}(n)\otimes C^{\otimes n})^{\mathbb{S}_{n}}) \xrightarrow{id_{\mathcal{P}} (id_{A},\, \alpha \otimes (s\varphi)^{\otimes n-1} \otimes id_{C})}$$
$$\hspace{4cm}\mathcal{P} (A,\, \mathcal{P}(n) \otimes A^{\otimes n-1} \otimes C) \rightarrow (\mathcal{P} \circ \mathcal{P}) (A,\, C) \xrightarrow{\gamma (id_{A},\, id_{C})} \mathcal{P} (A,\, C),$$
with $\Delta_{C}(n) : C \xrightarrow{\Delta_{C}} \mathcal{C}(C) \twoheadrightarrow (\mathcal{C}(n) \otimes C^{\otimes n})^{\mathbb{S}_{n}}$ (see Section 2 in \cite{Milles} for more details).

When $\Omega_{\alpha} sC = \mathcal{P} \circ_{\alpha} C \xrightarrow{\sim} A$ is a resolution of the $\mathcal{P}$-algebra $A$, the chain complex $A\otimes^{\mathcal{P}} C$ is a representation of the \emph{cotangent complex}. For example, when $\alpha$ is a Koszul morphism, the universal twisting morphism $\pi_{\alpha} : \mathrm{B}_{\alpha}A \rightarrow A$ gives the functorial resolution $\Omega_{\alpha} \mathrm{B}_{\alpha} A \cong \mathcal{P} \circ_{\alpha} \mathcal{C} \circ_{\alpha} A \xrightarrow{\sim} A$ and a representation of the cotangent complex is given by $A\otimes^{\mathcal{P}} \mathrm{B}_{\alpha}A$.

\begin{rem}
We denote it by $A\otimes^{\mathcal{P}} \mathrm{B}_{\alpha}A$ instead of $A\otimes^{\mathcal{P}} s^{-1}\mathrm{B}_{\alpha}A$ to simplify the notation.
\end{rem}

\begin{ex1}
In the case $\mathcal{P} = \mathcal{A}s$, $\mathcal{C} = \mathcal{A}s^{\textrm{!`}}$ and $\alpha = \kappa : \mathcal{A}s^{\textrm{!`}} \rightarrow \mathcal{A}s$. The cotangent complex $A \otimes^{\mathcal{A}s} \mathrm{B}_{\kappa}A$ is equal to the augmented bar construction $A_{+} \otimes \overline{\mathrm{B}} A_{+} \otimes A_{+}$, where $A_{+} := \mathbb{K} \oplus A$ since $\mathrm{B}_{\kappa} A = \overline{B} A_{+}$ (see \cite{Milles} for more details).
\end{ex1}

\subsection{Algebraic Koszul morphisms}\label{algKosmorph}

Let $\alpha : \mathcal{C} \rightarrow \mathcal{P}$ be an operadic Koszul morphism and let $\varphi : sC \rightarrow A$ be an algebraic twisting morphism. The associated ${\mathcal{S}^{-1}} \mathcal{C}$-algebras morphism $g_{\varphi} : sC \rightarrow \mathrm{B}_{\alpha} A$ induces a natural morphism of dg $A$-modules $A\otimes^{\mathcal{P}} C \rightarrow A\otimes^{\mathcal{P}} \mathrm{B}_{\alpha}A$. We say that $\varphi$ is an \emph{algebraic Koszul morphism} when the morphism $A\otimes^{\mathcal{P}} C \rightarrow A\otimes^{\mathcal{P}} \mathrm{B}_{\alpha}A$ is a quasi-isomorphism. We denote by $\mathrm{Kos}_{\alpha}(C,\, A)$ the set of algebraic Koszul morphisms from $sC$ to $A$.

There are some operads $\mathcal{P}$ such that the André-Quillen cohomology theory of any $\mathcal{P}$-algebra $A$ is an Ext-functor over the enveloping algebra of $A$. These operads satisfy the following property:
\begin{equation}
\textrm{There is a quasi-isomorphism $A \otimes^{\mathcal{P}} \mathrm{B}_{\alpha}A \xrightarrow{\sim} \Omega_{\mathcal{P}}(A)$ for any $\mathcal{P}$-algebra $A$,}\tag{$\star$}
\end{equation}
where $\Omega_{\mathcal{P}}(A)$ is the module of K\"ahler differentials forms. We refer to \cite{Milles} for the complete study. Hence, in this case, an algebraic twisting morphism $\varphi : sC \rightarrow A$ is an algebraic Koszul morphism if and only if the map $A \otimes^{\mathcal{P}} C \xrightarrow{\sim} \Omega_{\mathcal{P}}(A)$ is a quasi-isomorphism.

\begin{thm}[Algebraic twisting morphisms fundamental theorem]\label{atmft}
Let $\alpha : \mathcal{C} \rightarrow \mathcal{P}$ be a Koszul morphism between a wdg connected cooperad $\mathcal{C}$ and a wdg connected operad $\mathcal{P}$. Let $C$ be a wdg connected $\mathcal{C}$-coalgebra and $A$ be a wdg connected $\mathcal{P}$-algebra. Let $\varphi : sC \rightarrow A$ be an algebraic twisting morphism. The following assertions are equivalent:
\begin{enumerate}
\item the twisting morphism $\varphi$ is an algebraic Koszul morphism, that is $A\otimes^{\mathcal{P}} C \xrightarrow{\sim} A\otimes^{\mathcal{P}} \mathrm{B}_{\alpha}A$;
\item the map of ${\mathcal{S}^{-1}} \C$-coalgebras $g_{\varphi} : sC \xrightarrow{\sim} \mathrm{B}_{\alpha}A$ is a quasi-isomorphism;
\item the map of $\mathcal{P}$-algebras $f_{\varphi} : \Omega_{\alpha}sC \xrightarrow{\sim} A$ is a quasi-isomorphism.
\end{enumerate}
Moreover, when $\mathcal{P}$ satisfies Condition $(\star)$, the previous assertions are equivalent to
\begin{enumerate}
\item[(1')] the natural map $A\otimes^{\mathcal{P}} C \xrightarrow{\sim} \Omega_{\mathcal{P}}(A)$ is a quasi-isomorphism;
\end{enumerate}
\end{thm}

\begin{rem}
When the operad $\mathcal{P}$ and the $\mathcal{P}$-algebra $A$ are concentrated in homological degree $0$, the module of K\"ahler differential forms $\Omega_{\mathcal{P}}(A)$ is concentrated in homological degree $0$ and Condition $(1')$ writes: $A \otimes^{\mathcal{P}} C$ is acyclic.
\end{rem}

\begin{pf}
We apply the comparison Lemma proved in Appendix \ref{comparisonlemma} to $sC$ and $sC' = \mathrm{B}_{\alpha}A$ to get the equivalence between $(1)$ and $(2)$.

To prove the equivalence $(2) \Leftrightarrow (3)$, we apply Lemma \ref{cobarbarpreserve} to the quasi-isomorphism $sC \xrightarrow{\sim} \mathrm{B}_{\alpha}A$ to get the quasi-isomorphism $\Omega_{\alpha}sC \xrightarrow{\sim} \Omega_{\alpha}\mathrm{B}_{\alpha}A$. Since $\alpha$ is a Koszul morphism, $\Omega_{\alpha}\mathrm{B}_{\alpha}A \xrightarrow{\sim} A$ by Proposition \ref{Koszulandresolution} and we get the implication $(2) \Rightarrow (3)$.

To prove the reverse implication, we apply Lemma \ref{cobarbarpreserve} to the quasi-isomorphism $\Omega_{\alpha} sC \xrightarrow{\sim} A$ to get the quasi-isomorphism $\mathrm{B}_{\alpha} \Omega_{\alpha}\, sC \xrightarrow{\sim} \mathrm{B}_{\alpha}A$. Then we just need to prove that $\mathrm{B}_{\alpha} \Omega_{\alpha} sC = s\mathcal{C} \circ_{\alpha} \mathcal{P} \circ_{\alpha} C \xrightarrow{\sim} sC$ for each $\mathcal{C}$-coalgebra $C$, provided that $\mathcal{C} \circ_{\alpha} \mathcal{P} \xrightarrow{\sim} I$ (by Theorem \ref{otmft}). To prove this, we endow $\mathcal{C} \circ_{\alpha} \mathcal{P} \circ_{\alpha} C$ with a filtration $F_{p}$ given by
$$F_{p}(\mathcal{C} \circ_{\alpha} \mathcal{P} \circ_{\alpha} C) := \bigoplus_{\omega \leq p} \mathcal{C} \circ_{\alpha} \mathcal{P} \circ_{\alpha} \underbrace{C}_{(\omega)}.$$
The differential $d_{\mathcal{C} \circ \mathcal{P} \circ C} + d_{\alpha}^{r} \circ id_{C} - id_{\mathcal{C}} \circ d_{\alpha}^{l}$ satisfies
$$\left\{ \begin{array}{lcl}
d_{\mathcal{C} \circ \mathcal{P} \circ C} & : & F_{p} \rightarrow F_{p}\\
d_{\alpha}^{r} \circ id_{C} & : & F_{p} \rightarrow F_{p}\\
id_{\mathcal{C}} \circ d_{\alpha}^{l} & : & F_{p} \rightarrow F_{p-1}.
\end{array} \right.$$
So the filtration is a filtration of chain complexes. Moreover, it is bounded below and exhaustive so the classical theorem of convergence of spectral sequences (Theorem 5.5.1 of \cite{Weibel}) gives that the induced spectral sequence $E_{p,\, q}^{\bullet}$ converges to the homology of $\mathcal{C} \circ_{\alpha} \mathcal{P} \circ_{\alpha} C$. We endow similarly $C$ with the filtration by the weight grading and we get an isomorphism between the $E^{1}$-pages, provided that $E_{p,\, q}^{1} \cong \mathrm{H}_{\bullet}(\mathcal{C} \circ_{\alpha} \mathcal{P}) \circ \mathrm{H}_{\bullet}(C) \cong \mathrm{H}_{\bullet}(C)$ by the K\"unneth formula. The convergence of the spectral sequences concludes the proof.
$\ \hfill \square$
\end{pf}

\begin{ex1}
When $\mathcal{P} = \mathcal{A}s$, we recover Theorem \ref{tmft}, provided that the category of $\mathcal{A}s$-algebras is equivalent to the category of augmented associative algebras and that a conipoltent ${\mathcal{S}^{-1}} \mathcal{A}s$-coalgebra is exactly a conilpotent coaugmented coassociative coalgebra.
\end{ex1}

\section{Koszul duality theory for algebra over an operad}

We proved in the previous section the algebraic twisting morphisms fundamental theorem. In this section, we define the notion of \emph{monogene $\mathcal{P}$-algebra} and we associate to such a $\mathcal{P}$-algebra $A$ its Koszul dual ${\mathcal{S}^{-1}} \Po^{\textrm{!`}}$-coalgebra , which is a good candidate for the algebraic twisting morphisms fundamental theorem. We show the link with the Koszul dual $\mathcal{P}^{!}$-algebra defined in \cite{GinzburgKapranov}. We give the Koszul criterion for $\mathcal{P}$-algebra and the definition of a Koszul $\mathcal{P}$-algebra. Thus we obtain a criterion to prove that we have a ``small'' resolution of $A$. This generalizes the Koszul duality theory for quadratic associative algebras \cite{Priddy} and conceptually explains the form of the Koszul complex by the fact that it is a representation of the cotangent complex when the $\mathcal{P}$-algebra is Koszul.

\subsection{Monogene $\mathcal{P}$-algebra}

The notion of quadratic algebra over a quadratic operad appears in \cite{GinzburgKapranov}. We extend this definition to \emph{monogene} $\mathcal{P}$-algebra and we give the definition of \emph{monogene} $\mathcal{C}$-coalgebra. We use the word monogene to express the fact that the relations in the $\mathcal{P}$-algebra are linearly generated by the generators of the operad.\\

Let $(E,\, R)$ be an operadic quadratic data (see Section \ref{Koszuloperad}) and $\mathcal{P} := \mathcal{F}(E)/(R)$ its associated quadratic operad. A \emph{monogene data $(V,\, S)$ of the operadic quadratic data $(E,\, R)$} is a graded vector space $V$ and a subspace $S \subseteq E(V)$. We associate to this monogene data the \emph{monogene $\mathcal{P}$-algebra}
$$A(V,\, S) := \mathcal{P}(V)/(S).$$

The operad $\mathcal{P}$ is weight graded and we endow $\mathcal{P}(V)$ with a weight grading equal to the weight grading in $\mathcal{P}$. The space $S$ is homogeneous for this grading since the weight of $E(V)$ is equal to $1$, so the $\mathcal{P}$-algebra $A(V,\, S)$ is weight graded.

\begin{prop}
When $\mathcal{P} = \mathcal{P}(E,\, R)$ is a binary quadratic operad, that is $E = E(2) = \mathcal{P}(2)$, we have $\mathcal{P}(0) = 0$ and $\mathcal{P}(1) = \mathbb{K}$ and explicitly
$$A(V,\, S) = \bigoplus_{n\geq 0}A(V,\, S)^{(n)} = V \oplus (E \otimes_{\mathbb{S}_{2}} V^{\otimes 2})/S \oplus \cdots \oplus (\mathcal{P} (n) \otimes_{\mathbb{S}_{n}} V^{\otimes n})/ \mathrm{Im}(\psi_{n}) \oplus \cdots,$$
where $\psi_{n}$ is the composite
$$\bigoplus_{j=0}^{n-1} \mathcal{P} (n-1) \otimes_{\mathbb{S}_{n-1}}(V^{\otimes j} \otimes S \otimes V^{\otimes n-2-j}) \rightarrow (\mathcal{P} \circ_{(1)} E) (n) \otimes_{\mathbb{S}_{n}} V^{\otimes n} \rightarrowtail \mathcal{P} \circ \mathcal{P} (V)\xrightarrow{\gamma \circ id_{V}} \mathcal{P} (V).$$
In this case, the monogene $\mathcal{P}$-algebra is a \emph{quadratic $\mathcal{P}$-algebra} as defined in \cite{GinzburgKapranov}.
\end{prop}

\begin{pf}
The image of the map $\psi_{n}$ is exactly the definition of the ideal of $\mathcal{P}(V)$ generated by $S \subseteq E(V)$.
$\ \hfill \square$
\end{pf}

\begin{ex1}
When $\mathcal{P} = \mathcal{A}s$, we recover the notion of quadratic associative algebra $T(V)/(S)$ and the weight grading is given by the number of elements in $V$ minus $1$.
\end{ex1}

Dually, let $\mathcal{C} = \mathcal{C}(E,\, R)$ be the cooperad associated to the operadic quadratic data $(E,\, R)$. The \emph{monogene $\mathcal{C}$-coalgebra} associated to the monogene data $(V,\, S)$ of the operadic quadratic data $(E,\, R)$ is the $\mathcal{C}$-coalgebra $C(V,\, S)$ which is universal among the sub-$\mathcal{C}$-coalgebras $C$ such that the composite
$$C \rightarrowtail \mathcal{C}(V) \twoheadrightarrow E(V)/S$$
is equal to $0$. The word ``universal'' means that for any such $\mathcal{C}$-coalgebra $C$, there exists a unique morphism of $\mathcal{C}$-coalgebras $C \rightarrow C(V,\, S)$ such that the following diagram commutes
$$\xymatrix@R=12pt@M=8pt@W=12pt@H=1pt{C(V,\, S) \ar@{>->}[r] & \mathcal{C} (V).\\
C \ar@{>->}[ur] \ar[u] & }$$
The cooperad $\mathcal{C}$ is weight graded, so the $\mathcal{C}$-coalgebra $C(V,\, S)$ is weight graded by the weight on $\mathcal{C}$.

\begin{prop}
When $\mathcal{C} = \mathcal{C}(E,\, R)$ is a binary quadratic cooperad, that is $E = E(2) = \mathcal{C}(2)$, we have $\mathcal{C}(0) = 0$ and $\mathcal{C}(1) = \mathbb{K}$. Dually to the algebra case, we have explicitly
$$C(V,\, S) = \bigoplus_{n\geq 0}C(V,\, S)^{(n)} = V \oplus S \oplus \cdots \oplus \mathrm{Ker}(\phi_{n}) \oplus \cdots,$$
where $\phi_{n}$ is the composite\\
$\mathcal{C}(V) \xrightarrow{\Delta \circ id_{V}} \mathcal{C} \circ \mathcal{C} (V) \twoheadrightarrow ((\mathcal{C} \circ_{(1)} E)(n) \otimes V^{\otimes n})^{\mathbb{S}_{n}} \rightarrow$
$$\hspace{2.7cm} ((\mathcal{C} \circ_{(1)} E)(n) \otimes V^{\otimes n})^{\mathbb{S}_{n}}/\bigcap_{j=0}^{n-1} (\mathcal{C}(n-1) \otimes V^{\otimes j} \otimes S \otimes V^{n-2-j})^{\mathbb{S}_{n}}.$$
In this case, the monogene $\mathcal{C}$-coalgebra is a \emph{quadratic $\mathcal{C}$-coalgebra}.
\end{prop}

\begin{pf}
We dualize the map $\psi_{n}$ of the previous proposition to get the map $\phi_{n}$ and the notion of ``coideal'' of $\mathcal{C}(V)$ ``cogenerated'' by $S$.
$\ \hfill \square$
\end{pf}

\subsection{Koszul dual coalgebra}

We define the \emph{Koszul dual ${\mathcal{S}^{-1}} \Po^{\textrm{!`}}$-coalgebra}, the \emph{Koszul dual $\mathcal{P}^!$-algebra} of a monogene $\mathcal{P}$-algebra and the corresponding algebraic twisting morphism. When the operad $\mathcal{P}$ is binary and finitely generated, we recover the definition of the Koszul dual $\mathcal{P}^{!}$-algebra of \cite{GinzburgKapranov}. We show that the Koszul dual ${\mathcal{S}^{-1}} \Po^{\textrm{!`}}$-coalgebra associated to a monogene $\mathcal{P}$-algebra is the zero homology group for a certain degree of the bar construction of this $\mathcal{P}$-algebra.\\

To an operadic quadratic data $(E,\, R)$, we associate the operad $\mathcal{P} := \mathcal{P}(E,\, R)$, the Koszul dual cooperad $\Po^{\textrm{!`}} := \mathcal{C}(sE,\, s^{2}R)$ and its homological desuspension ${\mathcal{S}^{-1}} \Po^{\textrm{!`}} := {\mathcal{S}^{-1}} \otimes_{H} \Po^{\textrm{!`}}$. We assume that $\mathcal{P}$ is a Koszul operad (cf. \ref{Koszuloperad}).

Let $V$ be a vector space and let $S$ be a subspace of $E(V)$. We have $sS \subset sE(V) \rightarrowtail \Po^{\textrm{!`}}(V)$. The \emph{Koszul dual ${\mathcal{S}^{-1}} \Po^{\textrm{!`}}$-coalgebra} of the monogene $\mathcal{P}$-algebra $A(V,\, S)$ is the monogene ${\mathcal{S}^{-1}} \Po^{\textrm{!`}}$-coalgebra
$$A^{\textrm{!`}} := sC(V,\, sS).$$

We define the morphism $\varkappa : A^{\textrm{!`}} \rightarrow A$ by the linear map of degree $-1$:
$$A^{\textrm{!`}} := sC(V,\, sS) \twoheadrightarrow sV \xrightarrow{s^{-1}} V \rightarrowtail A(V,\, S) = A.$$

\begin{lem}\label{kappaKos}
We have $\star_{\kappa}(\varkappa) = 0$ and therefore $\varkappa$ is an algebraic twisting morphism.
\end{lem}

\begin{pf}
Due to the definition of $\varkappa$, the term $\star_{\kappa}(\varkappa)$ is $0$ everywhere except maybe on $s^{2}S \subset s^{2}E(V)$ where it is equal to
$$s^2 S \xrightarrow{\Delta_{A^{\textrm{!`}}}} s^{2}E(V) \xrightarrow{(s^{-1}\kappa) \circ (s\varkappa)} E(V) \xrightarrow{\gamma_{A}} E(V)/S.$$
This last map is $0$ by definition.
$\ \hfill \square$
\end{pf}

\begin{ex1}
When $\mathcal{P} = \mathcal{A}s$, up to adding a unit, we recover the Koszul dual coalgebra defined in \cite{Priddy}.
\end{ex1}

Let $\mathcal{C} = \oplus_{n\geq 0} \mathcal{C}^{(n)}$ be a weight graded cooperad. We define the \emph{weight-graded linear dual} of $\mathcal{C}$ by $\mathcal{C}^* := \oplus_{n\geq 0} {\mathcal{C}^{(n)}}^* = \oplus_{n \geq 0} \mathrm{Hom}_{\mathbb{K}}(\mathcal{C}^{(n)},\, \mathbb{K})$. The weight-graded linear dual of ${\mathcal{S}^{-1}} \Po^{\textrm{!`}}$ is denoted by
$$\mathcal{P}^! := ({\mathcal{S}^{-1}} \Po^{\textrm{!`}})^* = ({\mathcal{S}^{-1}} \otimes_{H} \Po^{\textrm{!`}})^*$$
and is a weight graded operad. When $E$ is a finite dimensional $\mathbb{S}_{2}$-module, it corresponds to the operad defined in \cite{GinzburgKapranov} by $\mathcal{P}^! = \mathcal{F} (E^{\vee})/(R^{\bot})$ (see Theorem 7.6.5 in \cite{LodayVallette} for a proof of this fact). In the coalgebra case, let $C = \oplus_{n\geq 0} C^{(n)}$ be a weight graded ${\mathcal{S}^{-1}} \Po^{\textrm{!`}}$-coalgebra. We define the \emph{weight-graded linear dual} of $C$ by $C^* := \oplus_{n\geq 0} {C^{(n)}}^*$. The \emph{Koszul dual $\mathcal{P}^!$-algebra $A^!$} is the following $\mathcal{P}^!$-algebra
$$A^! := \left(\bigoplus_{n \geq 0} {s^{-n}A^{\textrm{!`}}}^{(n)}\right)^* = \bigoplus_{n \geq 0} s^{n}\left({A^{\textrm{!`}}}^{(n)}\right)^{*}.$$

\begin{prop}
Let $\mathcal{P}$ be a finitely generated binary Koszul operad. Let $(V,\, S)$ be a finitely generated monogene data. The Koszul dual $\mathcal{P}^!$-algebra $A^!$ of $A = A(V,\,S)$ is equal to the monogene $\mathcal{P}^!$-algebra $A^! = A(V^*,\, R^{\bot})$ defined in \cite{GinzburgKapranov} by $V^{*} := \mathrm{Hom}(V,\, \mathbb{K})$ and $S^{\bot}$ is the annihilator of $S$ for the natural pairing $\langle -,- \rangle : E^{*}(V^{*}) \otimes E(V) \rightarrow \mathbb{K}$.
\end{prop}

\begin{pf}
Since $E$ and $V$ are finite dimensional, we remark that
$$\left(s \bigoplus_{n \geq 0} s^{-n}{\Po^{\textrm{!`}}}^{(n)}(V)\right)^{*} = \mathcal{P}^! (V^*).$$
After a weight graded desuspension, we linearly dualize the exact short sequence
$$0 \rightarrow A^{\textrm{!`}} \rightarrow s\Po^{\textrm{!`}}(V) \rightarrow s^{2}E(V)/s^{2}S \rightarrow 0$$
satisfied by $A^{\textrm{!`}}$. We get the exact sequence
$$0 \leftarrow A^! \leftarrow \mathcal{P}^! (V^*) \leftarrow S^{\bot} \leftarrow 0,$$
where the orthogonal space $S^{\bot}$ is the annihilator $S$ for the natural pairing $\langle -,- \rangle : E^{*}(V^{*}) \otimes E(V) \rightarrow \mathbb{K}$. Since $A^{\textrm{!`}}$ is universal for the first exact sequence, the dual $A^!$ is universal for the second one and is equal to $\mathcal{P}^{!}(V^{*})/(S^{\bot})$.
$\ \hfill \square$
\end{pf}

Recall that the operad $\mathcal{P}$ is weight graded by the number of elements in $E$. It induces a weight grading on $A$ (the weight of $V$ being equal to $0$). Hence, we endow the bar construction $\mathrm{B}_{\kappa}A$ with a non-negative \emph{weight-degree} induced only by the weight grading on $A$. We denote it by $\mathrm{B}_{\kappa}^{\omega}A$.

The internal differential on $A$ is $0$ since the differential on $\mathcal{P}$ and on $V$ are $0$. Thus the differential on $\mathrm{B}_{\kappa}A$ reduces to $d_{\kappa} = id_{s} \otimes d_{\kappa}^{r}$ (defined in Section \ref{algtwmorph}). The differential $d_{\kappa}$ raises the weight-degree by $1$ and we get a cochain complex with respect to this degree. The elements of weight-degree $0$ in $\mathrm{B}_{\kappa}A = s\Po^{\textrm{!`}} (A)$ are given by $s\Po^{\textrm{!`}}(V)$, then $A^{\textrm{!`}} \rightarrowtail \mathrm{B}_{\kappa}^{0}A = s\Po^{\textrm{!`}}(V)$.

\begin{prop}
Let $(E,\, R)$ be an operadic quadratic data. Let $(V,\, S)$ be a monogene data. The natural ${\mathcal{S}^{-1}} \Po^{\textrm{!`}}$-coalgebras inclusion $g_{\varkappa} : A^{\textrm{!`}} = sC(V,\, sS) \rightarrowtail \mathrm{B}_{\kappa}A = \mathrm{B}_{\kappa} A(V,\, S)$ induces an isomorphism of graded ${\mathcal{S}^{-1}} \Po^{\textrm{!`}}$-coalgebras
$$\xymatrix@M=8pt{g_{\varkappa} : A^{\textrm{!`}} \ar@{>->}[r]^{\hspace{-.4cm} \cong} & \mathrm{H}^{0}(\mathrm{B}_{\kappa}^{\bullet}A).}$$
\end{prop}

\begin{pf}
Since there is no element in negative weight-degree, we just need to prove that the inclusion $g_{\varkappa}$ is exactly the kernel of the differential ${id_{s} \otimes d_{\kappa}^{r}}_{|s\Po^{\textrm{!`}}(V)}$. The image of $g_{\varkappa}$ lives in weight-degree $0$. Moreover, the morphism $g_{\varkappa}$ commutes with the differentials $d_{A^{\textrm{!`}}} = 0$ and $d_{\kappa}$ so $d_{\kappa} \circ g_{\varkappa} = g_{\varkappa} \circ d_{A^{\textrm{!`}}} = 0$ and $A^{\textrm{!`}} \rightarrowtail \mathrm{Ker}({d_{\kappa}}_{|weight = 0}) = \mathrm{Ker}({id_{s} \otimes d_{\kappa}^{r}}_{|s\Po^{\textrm{!`}}(V)}) =: K$. Since $K$ is the kernel of a ${\mathcal{S}^{-1}} \Po^{\textrm{!`}}$-coalgebras morphism, it is a ${\mathcal{S}^{-1}} \Po^{\textrm{!`}}$-coalgebra. It is easy to see that the composition $K \rightarrowtail s\Po^{\textrm{!`}}(V) \twoheadrightarrow s^{2}E(V)/s^{2}S$ is equal to $0$ since the differential in weight $1$ is the quotient map $s^{2}E(V) \rightarrow s(E(V)/S)$. Due to the universal property of $A^{\textrm{!`}}$ and since $A^{\textrm{!`}} \rightarrowtail K$ is a monomorphism, we get that $A^{\textrm{!`}} = K = \mathrm{Ker}({id_{s} \otimes d_{\kappa}^{r}}_{|s\Po^{\textrm{!`}}(V)})$.
$\ \hfill \square$
\end{pf}

\subsection{Koszul criterion and Koszul $\mathcal{P}$-algebra}

The previous proposition shows that the Koszul dual ${\mathcal{S}^{-1}} \Po^{\textrm{!`}}$-coalgebra is a good candidate to replace the bar construction in the cotangent complex. We state the Koszul criterion shows that it is the case when the algebraic twisting morphism $\varkappa$ is Koszul. We define the notion of \emph{Koszul $\mathcal{P}$-algebra}.\\

Let $(E,\, R)$ be an operadic quadratic data, $\mathcal{P} := \mathcal{P}(E,\, R)$, $\Po^{\textrm{!`}} := \mathcal{C}(sE,\, s^{2}R)$ and $\kappa : \Po^{\textrm{!`}} \rightarrow \mathcal{P}$. Let $(V,\, S)$ be a monogene data, $A := A(V,\, S) = \mathcal{P}(V)/(S)$ the associated monogene $\mathcal{P}$-algebra and $A^{\textrm{!`}} := sC(V,\, sS)$ the Koszul dual ${\mathcal{S}^{-1}} \Po^{\textrm{!`}}$-coalgebra.

When $\mathcal{P}$ is a Koszul operad, the bar-cobar construction $\Omega_{\kappa} \mathrm{B}_{\kappa}A$ of $A$ is a cofibrant resolution of $A$. To simplify this resolution, we can replace $\mathrm{B}_{\kappa}A$ by $A^{\textrm{!`}} \cong \mathrm{H}^{0}(\mathrm{B}_{\kappa}^{\bullet} A)$. This works when $\mathrm{H}^{\bullet}(\mathrm{B}_{\kappa}^{\bullet} A) = \mathrm{H}^{0}(\mathrm{B}_{\kappa}^{\bullet} A)$. The following Koszul criterion shows that it is the case if and only if the algebraic twisting morphism $\varkappa : A^{\textrm{!`}} \rightarrow A$ is Koszul.

We apply the algebraic twisting morphism fundamental theorem of the previous section (Theorem \ref{atmft}) to get the following theorems, which are the main theorems of Koszul duality for $\mathcal{P}$-algebras.

\begin{thm}[Koszul criterion]\label{algKoszulcriterion}
Let $(E,\, R)$ be an operadic quadratic data such that $\mathcal{P} = \mathcal{P} (E,\, R)$ is a Koszul operad. Let $(V,\, S)$ be a monogene data associated to $(E,\, R)$. The following assertions are equivalent:
\begin{enumerate}
\item the twisting morphism $\kappa$ is an algebraic Koszul morphism, that is
$$A \otimes^{\mathcal{P}} A^{\textrm{!`}} \xrightarrow{\sim} A \otimes^{\mathcal{P}} \mathrm{B}_{\kappa}A$$
is a quasi-isomorphism;
\item the inclusion $g_{\varkappa} : A^{\textrm{!`}} \rightarrowtail \mathrm{B}_{\kappa}A$ is a quasi-isomorphism;
\item the projection $f_{\varkappa} : \Omega_{\kappa}A^{\textrm{!`}} \twoheadrightarrow A$ is a quasi-isomorphism.
\end{enumerate}
Moreover, when $\mathcal{P}$ satisfies Condition $(\star)$, the previous assertions are equivalent to
\begin{enumerate}
\item[(1')] the natural map $A\otimes^{\mathcal{P}} A^{\textrm{!`}} \xrightarrow{\sim} \Omega_{\mathcal{P}}(A)$ is a quasi-isomorphism.
\end{enumerate}
When these assertions hold, the cobar construction on $A^{\textrm{!`}}$ gives a cofibrant resolution of the $\mathcal{P}$-algebra $A$ (a minimal resolution when $\mathcal{P}(0) = 0$ and $\mathcal{P}(1) = \mathbb{K}$).
A monogene $\mathcal{P}$-algebra $A$ is called \emph{Koszul} when it satisfies the equivalent properties of this theorem.
\end{thm}

\begin{pf}
We apply Lemma \ref{kappaKos} and Theorem \ref{atmft} to $\mathcal{C} := \Po^{\textrm{!`}}$, $A := A(V,\, S)$, $C := A^{\textrm{!`}}$ and $\varphi := \varkappa$ since the weight assumptions are satisfied.

When the assertions of the theorem hold, $\Omega_{\kappa}A^{\textrm{!`}}$ is a cofibrant resolution of $A$ since it is a resolution of $A$ and since $\Omega_{\kappa}A^{\textrm{!`}}$ is a quasi-free $\mathcal{P}$-algebra on the connected weight graded $\mathcal{A}s$-coalgebra $s^{-1}A^{\textrm{!`}}$. Moreover, when the operad satisfies $\mathcal{P}(0)=0$ and $\mathcal{P}(1)=0$, the differential satisfies
$$d_{\Omega_{\kappa}A}(s^{-1}A^{\textrm{!`}}) = -d_{\kappa}^{l}(s^{-1}A^{\textrm{!`}}) \subset \oplus_{n\geq 2}\mathcal{P}(n) \otimes_{\mathbb{S}_{n}} (s^{-1}A^{\textrm{!`}})^{\otimes n}$$
by construction and $\Omega_{\kappa}A$ is a minimal resolution of $A$.
$\ \hfill \square$
\end{pf}

\begin{rem}
We recall that when the operad $\mathcal{P}$ and the $\mathcal{P}$-algebra $A$ are concentrated in homological degree $0$, the module of K\"ahler differential forms $\Omega_{\mathcal{P}}(A)$ is concentrated in homological degree $0$ and the condition $(1')$ writes simply: $A \otimes^{\mathcal{P}} A^{\textrm{!`}}$ is acyclic.
\end{rem}

The chain complex $A\otimes^{\mathcal{P}} A^{\textrm{!`}}$ is called the \emph{Koszul complex}. Thus, when the algebraic twisting morphism $\varkappa : A^{\textrm{!`}} \rightarrow A$ is an algebraic Koszul morphism, the Koszul complex $A\otimes^{\mathcal{P}} A^{\textrm{!`}}$ is a representation of the cotangent complex, representing the cohomology theory of the $\mathcal{P}$-algebra $A$.

\begin{ex1}
Assume that $\mathcal{P} = \mathcal{A}s$, $\mathcal{C} = \mathcal{A}s^{\textrm{!`}}$ and $\kappa : \mathcal{A}s^{\textrm{!`}} \rightarrow \mathcal{A}s$ is the operadic twisting morphism between them. The operad $\mathcal{A}s$ satisfies the Condition $(\star)$ of Section \ref{algKosmorph}, so an $\mathcal{A}s$-algebra $A$ is Koszul if and only if for $A_{+} := \mathbb{K} \oplus A$, the $A$-bimodules morphism $A_{+} \otimes s^{-1}\overline{(A_{+})^{\textrm{!`}}} \otimes A_{+} \cong A \otimes^{\mathcal{A}s} A^{\textrm{!`}} \xrightarrow{\sim} \Omega_{\mathcal{A}s}A \cong A \otimes A_{+}$ is a quasi-isomorphism. This is equivalent to $A_{+} \otimes (A_{+})^{\textrm{!`}} \otimes A_{+} \cong s(A \otimes^{\mathcal{A}s} A^{\textrm{!`}}) \oplus (A_{+} \otimes A_{+}) \xrightarrow{\sim} A_{+}$ is a quasi-isomorphism. This last quasi-isomorphism is the classical definition for a quadratic augmented associative algebra $A_{+}$ to be Koszul (see Theorem \ref{Koszulcriterion} and the definition after).\\
\end{ex1}

For an associative algebra $A$, we already know that $A$ is Koszul if and only if $A^{!}$ is Koszul. As an application of the Koszul criterion theorem, we obtain the same result for $\mathcal{P}$-algebras.

\begin{thm}\label{AAdual}
Let $(E,\, R)$ be a finitely generated binary operadic quadratic data such that $\mathcal{P} = \mathcal{P} (E,\, R)$ is a Koszul operad. Let $(V,\, S)$ be a finitely generated monogene data associated to $(E,\, R)$. The $\mathcal{P}$-algebra $A := A(V,\, S)$ is Koszul if and only if the $\mathcal{P}^{!}$-algebra $A^{!} = \mathcal{P}^{!}(V^{*},\, S^{\bot})$ is Koszul.
\end{thm}

\begin{pf}
The Koszul criterion Theorem \ref{algKoszulcriterion} (2) implies that $A$ is a Koszul $\mathcal{P}$-algebra if and only if $A^{\textrm{!`}} \xrightarrow{\sim} \mathrm{B}_{\kappa} A = \mathcal{P}^{\textrm{!`}}(A)$ is a quasi-isomorphism. We consider the $n$-desuspension of the weight-degree $n$ part: it is a chain complex morphism (and a quasi-isomorphism of chain complexes)
$$\bigoplus_{n \geq 0} s^{-n}{A^{\textrm{!`}}}^{(n)} \rightarrow \bigoplus_{n \geq 0} s^{-n}(\Po^{\textrm{!`}} (A))^{(n)}$$
since the differentials preserve the weight grading. We linearly dualize the quasi-isomorphisms $s^{-n}{A^{\textrm{!`}}}^{(n)} \rightarrow s^{-n}(\Po^{\textrm{!`}} (A))^{(n)}$ to get the quasi-isomorphisms $\left(s^{-n}{A^{\textrm{!`}}}^{(n)}\right)^{*} \leftarrow \left(s^{-n}(\Po^{\textrm{!`}} (A))^{(n)}\right)^{*}$ since $\mathbb{K}$ is a field. The sum of these quasi-isomorphisms gives the quasi-isomorphism $A^{!} \xleftarrow{\sim} \mathcal{P}^{!}(A^{*}) = \mathcal{P}^{!}({{A^{!}}^{!}}^{*}) = \mathcal{P}^{!}({A^{!}}^{\textrm{!`}})$. By the Koszul criterion Theorem \ref{algKoszulcriterion} (3), this implies that $A^{!}$ is a Koszul $\mathcal{P}^{!}$-algebra.
$\ \hfill \square$
\end{pf}

\section{Links and applications}

In this section, we give examples of applications of the present Koszul duality theory. We have seen the case of associative algebras, we describe now the case of commutative algebras and the case of Lie algebras. We also recover the case of modules.

\subsection{The case of commutative algebras}

\subsubsection{\bf Commutative algebras and Lie coalgebras}

Let $\mathcal{P} = \mathcal{C}om$ be the operad encoding (non necessarily unital) associative and commutative algebras. A $\mathcal{C}om$-algebra structure on $A$ is equivalent to commutative and associative algebra structure on $A$ given by a commutative product $\gamma_{A} : A^{\otimes 2} \rightarrow A$ satisfying the associativity relation.

\smallskip

The Koszul dual cooperad of $\mathcal{C}om$ is $\mathcal{C}om^{\textrm{!`}}$, that is the suspension of the cooperad $\mathcal{L}ie^{c}$, which encodes Lie coalgebras. A $\mathcal{L}ie^{c}$-coalgebra structure on $sC$ is equivalent to a Lie coalgebra structure on $sC$ given by an anti-commutative coproduct $\Delta_{sC} : sC \rightarrow s(\mathcal{C}om^{\textrm{!`}}(2) \otimes C^{\otimes 2})^{\mathbb{S}_{2}} \cong \{c_{1} \otimes c_{2} + (-1)^{|c_{1}||c_{2}|} c_{2} \otimes c_{1};\, c_{1},\, c_{2} \in sC\}$ which satisfies the coJacobi relation (see \cite{LodayVallette} for more details). We remark that $\mathrm{Im} \Delta_{sC} \subset sC \otimes sC$. When $C$ is finitely generated and concentrated in degree $0$, we have $s(\mathcal{C}om^{\textrm{!`}}(2) \otimes C^{\otimes 2})^{\mathbb{S}_{2}} \cong \Lambda^{2} C$ where $|\Lambda^{2}| = 2$.

\subsubsection{\bf The cotangent complex}

Let $A$ be a $\mathcal{C}om$-algebra, let $sC$ be a Lie coalgebra and let $\varphi : sC \rightarrow A$ be an algebraic twisting morphism. The twisted tensor product $A\otimes^{\mathcal{C}om} C$ is given by
$$A_{+} \otimes_{\varphi} C := (A_{+} \otimes C, d_{\varphi} := d_{A_{+} \otimes C} - d_{\varphi}^{l}),$$
where $A_{+} := \mathbb{K} \oplus A$ is the augmented algebra of $A$. The differential $d_{A_{+} \otimes C}$ is equal to $d_{A_{+}} \otimes id_{C} + id_{A_{+}} \otimes d_{C}$ and the twisting differential $d_{\varphi}^{l}$ is given by
$$A_{+} \otimes C \xrightarrow{id_{A_{+}} \otimes s^{-1}\Delta_{sC}} A_{+} \otimes sC \otimes C \xrightarrow{id_{A_{+}} \otimes \varphi \otimes id_{C}} A_{+} \otimes A \otimes C \xrightarrow{\tilde{\gamma}_{A} \otimes id_{C}} A_{+} \otimes C,$$
where $\tilde{\gamma}_{A} : A_{+} \otimes A \cong A \oplus A \otimes A \xrightarrow{id_{A} + \gamma_{A}} A \rightarrowtail A_{+}$. We remark that this construction is close to the twisted tensor product of an associative algebra and a coassociative coalgebra.

\smallskip

The algebraic twisting morphism $\varphi$ is Koszul when the $A$-modules morphism $A_{+} \otimes_{\varphi} C \xrightarrow{\sim} A_{+} \otimes_{\pi_{\kappa}} s^{-1}\mathrm{B}_{\kappa} A \cong A_{+} \otimes_{\pi_{\kappa}} s^{-1}\mathcal{L}ie^{c}(sA)$, where $\mathcal{L}ie^{c}(sA)$ is the cofree Lie coalgebra on $sA$, is a quasi-isomorphism.

\smallskip

Under certain assumptions as the smoothness or the regularity of $A$ \cite{Quillen}, the cotangent complex is quasi-isomorphic to the $A$-module of K\"ahler differential forms $\Omega^{1}(A)$, therefore $\varphi$ is a Koszul morphism when the $A$-modules morphism $A_{+} \otimes_{\varphi} C \xrightarrow{\sim} \Omega^{1}(A)$ is a quasi-isomorphism.

\subsubsection{\bf Quadratic setting}

The operad $\mathcal{C}om$ is binary and therefore a monogene $\mathcal{C}om$-algebra is a quadratic commutative algebra: $A := \mathcal{S}(V)/(S)$, where $\mathcal{S}(V) := \mathcal{C}om(V)$ is the symmetric algebra and where $S \subseteq \mathcal{S}(V)^{(2)} = V \otimes_{\mathbb{S}_{2}} V =: V^{\odot 2}$. The Koszul dual Lie coalgebra $A^{\textrm{!`}}$ is the quadratic Lie coalgebra $sC(V,\, sS)$. When $V$ is finite dimensional, we desuspend and linearly dualize $A^{\textrm{!`}}$ to get $A^{!} = \mathcal{L}ie(V^{*})/(R^{\bot})$, where $\mathcal{L}ie(V^{*})$ is the free Lie algebra on $V^{*}$. Provided the fact that $\varkappa : A^{\textrm{!`}} \rightarrow A$ is a Koszul morphism, the Koszul criterion gives resolutions $A^{\textrm{!`}} \xrightarrow{\sim} \mathrm{B}_{\kappa} A$ and $\Omega_{\kappa} A^{\textrm{!`}} \xrightarrow{\sim} A$.

\subsubsection{\bf Applications to rational homotopy theory}

In this paper, we work in the homological setting. However, we can reverse the arrows and work in the cohomological setting. When the algebras $A$ are generated by a finitely generated vector space $V$, the theory of this paper still works for commutative algebras. In this example, this condition is always verified.\\

The latter quasi-isomorphism $\Omega_{\kappa} A^{\textrm{!`}} = \Lambda A^{\textrm{!`}} \xrightarrow{\sim} A$ is a quadratic model in rational homotopy theory \cite{Sullivan}. Assume that $X$ is a formal simply connected space and that the cohomology ring $A = \mathrm{H}^{\bullet}(X,\, \mathbb{Q})$ is a finitely generated quadratic algebra $\mathcal{S}(V)/(S)$, where $V$ is homological graded. When $A$ forms a Koszul algebra, the Koszul dual algebra $A^{!} = \mathcal{L}ie (V^{*})/(S^{\bot})$ is equal to the rational homotopy groups of $X$. Therefore the Koszul duality theory generates from the quadratic data all the syzygies; we do not have to compute the syzygies one by one. The Lie algebra structure on $A^{!}$ is the Whitehead Lie bracket. By Theorem \ref{AAdual}, we can either prove that $A$ is Koszul or that $A^{\textrm{!`}}$ is Koszul. Moreover, the Koszul criterion \ref{algKoszulcriterion} (1) provides a new way to prove these conditions.

\smallskip

The complement of a complex hyperplane arrangement is always a formal space. However, it is not necessarily simply connected. To a complex hyperplane arrangement $\mathcal{A}$, one associates the \emph{Orlik-Solomon algebra} $A := A(\mathcal{A})$. This algebra is naturally isomorphic to the cohomology groups of the complement $X$ of the hyperplane arrangement $\mathcal{A}$, that is $A = A(\mathcal{A}) \cong \mathrm{H}^{\bullet}(X,\, \mathbb{Q})$. The conditions on $\mathcal{A}$ for $A$ to be quadratic are studied in \cite{Yuzvinsky}. When the Orlik-Solomon algebra $A$ is quadratic, the Koszul dual algebra $A^{!}$ is the \emph{holonomy Lie algebra} defined by Kohno \cite{Kohno, Kohno2}. When $A$ is a Koszul algebra, the holonomy Lie algebra $A^{!}$ computes the $n$-homotopy groups of the $\mathbb{Q}$-completion of the space $X$ for $n \geq 2$.

\subsubsection{\bf Relationship with the Koszul duality theory of associative algebras}

The free commutative algebra $\mathcal{S}(V)$ is equal to the quadratic associative algebra $T(V)/\langle v\otimes w - w \otimes v \rangle$, where $T(V)$ is the tensor algebra or the free associative algebra on $V$. Thus, there is a weight preserving projection $p : T(V) \twoheadrightarrow \mathcal{S}(V)$ and a functor
$$\begin{array}{lcl}
\textsf{quad. comm. alg.} & \rightarrow & \textsf{quad. assoc. alg.}\\
A := \mathcal{S}(V)/(S) & \mapsto & A_{as} := T(V)/p^{-1}(S).
\end{array}$$

We emphasize the fact that the Koszul complexes associated to $A$ and $A_{as}$ are distinct. The Koszul dual coalgebra $A^{\textrm{!`}}$ is a Lie coalgebra whereas the Koszul dual coalgebra ${A_{as}}^{\textrm{!`}}$ is a coassociative coalgebra. However, the Koszul dual algebras are linked by the equality ${A_{as}}^{!} = U(A^{!})$, where $U(A^{!})$ is the enveloping algebra of the Lie algebra $A^{!}$ (see \cite{GinzburgKapranov} for example):
$$\xymatrix@R=20pt{\mathcal{A}s \textsf{-alg.} : & A_{as} \ar@{<->}[r]^{\hspace{-.7cm} !} \ar@{<->}[d] & {A_{as}}^{!} = U(A^{!}) \ar@{<->}[d] & : \mathcal{A}s \textsf{-alg}\\
\mathcal{C}om \textsf{-alg} : & A \ar@{<->}[r]^{!} & A^{!} & \hspace{.1cm}: \mathcal{L}ie \textsf{-alg}.}$$

A priori, the enveloping algebra of a Lie algebra has quadratic and linear relations. However, when the Lie algebra is a homogeneous quadratic Lie algebra, the enveloping algebra admits a homogeneous quadratic presentation as an associative algebra. In \cite{PapadimaYuzvinsky}, the authors proved the following theorem:
\begin{thm}[Proposition 4.4 of \cite{PapadimaYuzvinsky}]
The quadratic associative algebra $A_{as}$ is Koszul if and only if the quadratic commutative algebra $A$ is Koszul.
\end{thm}

They also proved that for a formal space $X$, the algebra $A = \mathrm{H}^{\bullet}(X,\, \mathbb{Q})$, or $A_{as}$, is Koszul if and only if the space $X$ is a rational $K(\pi,\, 1)$. We emphasize however the fact that the definition for an algebra $A$ to be Koszul in \cite{PapadimaYuzvinsky} is slightly different that the one in this paper. They require the generators of $A$ to be in degree $1$, assumptions which is not required in the present paper.

\subsection{The case of Lie algebras}

Let $\mathcal{P} = \mathcal{L}ie$ be the operad encoding Lie algebras. The Koszul dual cooperad of $\mathcal{L}ie$ is $\mathcal{L}ie^{\textrm{!`}}$, that is the suspension of the cooperad $\mathcal{C}om^{c}$ encoding co-commutative coalgebras.

\subsubsection{\bf The twisted tensor product and the cotangent complex}

Let $\mathfrak{g}$ be a Lie algebra, let $sC$ be a commutative coalgebra and let $\varphi : sC \rightarrow \mathfrak{g}$ be a twisting morphism. The twisted tensor product $\mathfrak{g} \otimes^{\mathcal{L}ie} C$ is given by $U(\mathfrak{g}) \otimes_{\varphi} C := (U(\mathfrak{g}) \otimes C,\, d_{\varphi})$ where $U(\mathfrak{g})$ is the enveloping algebra of the Lie algebra $\mathfrak{g}$ and where the differential $d_{\varphi}$ is obtained in the same way as the case of commutative algebras.

\smallskip

The cotangent complex is the Chevalley-Eilenberg complex $U(\mathfrak{g}) \otimes_{\pi_{\kappa}} \Lambda^{\bullet}(\mathfrak{g})$ and it is always quasi-isomorphic to the module of K\"ahler differential forms $\Omega_{\mathcal{L}ie} (\mathfrak{g})$. Therefore,  the twisting morphism $\varphi$ is a Koszul morphism when $U(\mathfrak{g}) \otimes_{\varphi} C \xrightarrow{\sim} \Omega_{\mathcal{L}ie} (\mathfrak{g})$ is a quasi-isomorphism, or equivalently, by the algebraic fundamental twisting morphism, when $\mathcal{L}ie(C) \xrightarrow{\sim} \mathfrak{g}$ is a quasi-isomorphim or when $C \xrightarrow{\sim} \Lambda^{\bullet}(\mathfrak{g})$ is a quasi-isomorphism.

\subsubsection{\bf Quadratic setting}

When $\mathfrak{g}$ is a quadratic Lie algebra, its Koszul dual coalgebra $\mathfrak{g}^{\textrm{!`}}$ is a co-commutative coalgebra and the Koszul complex is $U(\mathfrak{g}) \otimes _{\varkappa} \mathfrak{g}^{\textrm{!`}}$, or equivalently, by the Koszul criterion, when $\mathcal{L}ie(\mathfrak{g}^{\textrm{!`}}) \xrightarrow{\sim} \mathfrak{g}$ is a quasi-isomorphim or when $\mathfrak{g}^{\textrm{!`}} \xrightarrow{\sim} \Lambda^{\bullet}(\mathfrak{g})$ is a quasi-isomorphism.

\smallskip

This provides examples of quadratic Quillen models for Lie algebras \cite{Quillen3}.

\subsection{Koszul duality theory of quadratic modules over an associative algebra}

\subsubsection{\bf Twisted tensor product for modules}
Let $A$ be an associative algebra. Let $\mathcal{P} = A$ concentrated in arity $1$, that is $A$ is an associative algebra. A $\mathcal{P}$-algebra $M$ is a left $A$-module $(M,\, \gamma_{M})$. Dually, $\mathcal{C} = C$ and a $\mathcal{C}$-coalgebra is a left $C$-comodule $(N,\, \Delta_{N})$. Let $\alpha : C \rightarrow A$ be a Koszul morphism. The bar construction on $M$ is the chain complex $C\otimes_{\alpha} M := (C \otimes M,\, d_{\alpha} := d_{C \otimes M} + d_{\alpha}^{r})$ where $d_{\alpha}^{r}$ is the composite of
$$C \otimes M \xrightarrow{\Delta_{C} \otimes id_{M}} C \otimes C \otimes M \xrightarrow{id_{C} \otimes \alpha \otimes id_{M}} C \otimes A \otimes M \xrightarrow{id_{C} \otimes \gamma_{M}} C \otimes M.$$
The cobar construction on $N$ is given dually by $A \otimes_{\alpha} N$.

\smallskip

The twisted tensor product is given by the cobar construction $A \otimes_{\alpha} N$ and a twisting morphism $\varphi : sN \rightarrow N$ is Koszul when $A \otimes_{\alpha} N \xrightarrow{\sim} A \otimes_{\alpha} C \otimes_{\alpha} M$ is a quasi-isomorphism. Since $\alpha : C \rightarrow A$ is a Koszul morphism, this is equivalent to $A \otimes_{\alpha} N \xrightarrow{\sim} M$ is a quasi-isomorphism.

\subsubsection{\bf Quadratic module}

Assume now that $A = A(E,\, R)$ is a quadratic algebra $T(E)/(R)$ and $C = A^{\textrm{!`}}$ its Koszul dual coalgebra. We assume moreover that $A$ is a Koszul algebra, so $\alpha = \kappa$ is a Koszul morphism. An $A$-module $M$ is a \emph{quadratic $A$-module} if $M = (A \otimes V)/A \cdot S$ where $V$ is a vector space of generators, $S \subseteq A\otimes V$ is a subvector space of relations and $A \cdot S$ is the image of the map $A \otimes S \rightarrowtail A \otimes A \otimes V \xrightarrow{\gamma_{A} \otimes id_{V}} A \otimes V$. We define dually the notion of quadratic comodule and we get the Koszul dual $A^{\textrm{!`}}$-comodule $M^{\textrm{!`}}$.

\smallskip

In this case, the Koszul complex is equal to the cobar construction $A \otimes_{\kappa} M^{\textrm{!`}}$ and the Koszul criterion collapses to $A \otimes_{\kappa} M^{\textrm{!`}} \xrightarrow{\sim} M$ is equivalent to $M^{\textrm{!`}} \xrightarrow{\sim} A^{\textrm{!`}} \otimes_{\kappa} M$. Thus we recover the Koszul duality theory of $A$-modules given in \cite{PolishchukPositselski}.

\subsubsection{\bf Modules over a commutative algebra}

Assume now that $A$ is a commutative algebra. In this case, the Koszul duality theory provides resolutions of modules  needed in algebraic geometry \cite{Eisenbud}. When $A = \mathbb{K} [x_{1},\, \ldots ,\, x_{n}]$ or $A = \mathbb{K} [x_{1},\, \ldots ,\, x_{n}]/(I)$ where $I$ is homogeneous of degree $2$, the Koszul dual comodule $M^{\textrm{!`}}$ of a quadratic module $M$ provides a good candidate for the \emph{syzygies} of $M$.

\subsection{Other fields of applications}

It is also possible to apply the present Koszul duality theory to many other examples of the literature. For example, this Koszul duality theory for algebras applies to the operad encoding Poisson or Leibniz algebras, with possible applications in differential and Poisson geometry \cite{Kosmann, Fresse2}, to the operad encoding PreLie algebras, with possible applications in algebraic combinatorics and links with renormalisation theory in theoretical physics \cite{ChapotonLivernet, ConnesKreimer}, to the operad encoding hyper-commutative or gravity algebras, linked with the Gromov-Witten invariants \cite{Getzler, Manin}.

\smallskip

There are several ways to prove Koszulity for associative algebra that we plan to extend to algebras over an operad such as Poincaré-Birkhoff-Witt bases \cite{Priddy, Hoffbeck} and Gr\"obner bases \cite{Buchberger, DotsenkoKhoroshkin, BokutChenLi}.

\smallskip

Another direction is also to extend this Koszul duality theory beyond the homogeneous quadratic case: when the algebra has quadratic and linear relations, the Koszul dual coalgebra should have an extra differential \cite{Priddy, Ga-CaToVa}, when the algebra has quadratic, linear and constant relations, the Koszul dual coalgebra should have an extra differential and a curvature \cite{PolishchukPositselski, HirshMilles} and when the algebra has quadratic and higher relations, the Koszul dual coalgebra should be a homotopy coalgebra \cite{MerkulovVallette}.

redpajama_set_name: RedPajamaArXiv


Marrying or not marrying is not the issue. The issue is the state of mind. And if a person is living a very selfish life – me, mine, my pleasure, my money, my comforts, etc, he is going to get into an imbalanced state because somewhere this would make him so selfish that he can't tolerate little things in life, can't adjust, gets irritated, becomes such a perfectionist that he demands from others the same perfectionism.
A person with very high ego is of no use to the society. He has come, he is born, has lived his life and is gone. So this is not what a person should aim at. A person has to understand that he has to live a life where he has to become more useful to others, to society, nation and humanity. And because of that, a system was made in our country where the first 25 years of life, you devote your time in studying and gaining more knowledge about life and so on. The next 25 years of life, a person has to shift from 'me' to 'us' and then the focus will be our duties towards wife, children, parents, etc. Until this doesn't happen, there is no development.
A good householder is equal to a thousand Sanyasis. A householder Yogi can be a good Sanyasi because when living in a household, his mind does not wander here and there; his life is focussed and he doesn't live for himself but for others and this is what makes him the superior human being. I don't know how many of you have seen Sanyasis moving around, the Naga Babas in the Kumbh Melas and many others, they have iPods, mobiles and television with them; not interested in self control, self-realization and God realization. They are more like beggars. Dr. Jayadeva's father, Founder Shri Yogendraji used to hate all the Sanyasis, with few clothes, big Tikkas, Rudraksha garlands and all that stuff and living a life which is totally dependant on others. They are a burden to society. Anyway, there are vices in every kind of group.
These days there are a lot of attractions and pleasure seeking areas. Even food incites excitement. I see young school going children who drink alcohol and smoke at least twice or thrice a week. They have relationships with each other and then go through a lot of frustrations when relationships don't work out. Life is not so easy. You can't just do whatever you feel like doing or get what you want. Rather, the best thing is to not desire, not expect anything and lead a very organized and systematic life. And so, in the first 25 years, a person should focus one's energy on education and not let the mind waver. Children who are into a combination of study with sport or music, or dance or art, etc. are very focussed and rarely get tempted by vices.
The problem comes when we don't learn to do this in the first 25 years of our life. Then things like extramarital relationships etc. destroy the identity of a person. This leads to frustration, no matter what you do. If you cannot live with each other, adopt the policy of 'live and let live.' There was a lady whose husband was having extramarital relationships. I asked her, 'Do you love him or not?' She said 'I love him and will always love him.' So she should continue doing her duty as a wife and not bring in negativity because he goes to someone else. 'If he can't see love in you, it is his problem, not yours.' People cannot digest this advice of mine. But those who have followed it have been really successful because they don't choose to suffer because of others in life and come to the level of self-upliftment. When this comes, there is no fear about what will happen to children, etc.