I've been trying to read Jacob Lurie's approach to the bar-cobar constructions (Higher algebra §5.2 in the 2014-09 version) but I don't recognize what I know about these constructions. I wonder if anybody has already digested this.
Before I can ask my question, I need to recall some elements of Lurie's work.
In 5.2.1 he considers the twisted arrow category $TwAr({\cal C})$ for ${\cal C}$ an $\infty$-category. Essentially the objects are maps $f:X\to Y\in {\cal C}$ and maps from $f$ to $f':X'\to Y'$ are pairs of maps $(X\to X',Y'\to Y)$ such that the obvious square commutes.
$(f:X\to Y) \mapsto (X,Y)$ defines a functor $TwAr({\cal C})\to {\cal C}\times {\cal C}^{op}$. This functor is the right fibration classified by the mapping space functor : $Map:{\cal C}^{op}\times {\cal C}\to {\cal S}$ (where ${\cal S}$ is the $\infty$-category of Kan complexes).
Then, Lurie develops the formalism of bimodules and adjunctions representing them. A pairing is a functor $M:{\cal C}\times {\cal D}\to {\cal S}$, we say that it is representable in the first variable if there exists a functor $f:{\cal C}\to {\cal D}$ such that $M(X,Y) = Map(f(X),Y)$. Same thing for the second variable with a functor $g:{\cal D}\to {\cal C}$. If $M$ is representable in both variables, the functor $f$ and $g$ are adjoint.
In 5.2.2, ${\cal C}$ is assumed symmetric monoidal and Lurie considers monoids in $TwAr({\cal C})$. Such a monoid is a map $f:A\to C$ from a monoid $A$ to a comonoid $C$ satisfying some unusual condition (*): essentially, the map $\Delta_Cfm_A:A\otimes A\to A\to C\to C\otimes C$ must be equal to $f\otimes f$.
Then, essentially because the functor $Map$ is always lax monoidal, we get a pairing $Mon(TwAr({\cal C}))\to Mon({\cal C})\times Mon({\cal C}^{op})$. The main result (Thm 5.2.2.17) is that this pairing is representable in both variables when ${\cal C}$ satisfies some mild assumptions. The corresponding adjunction is the bar-cobar adjunction for monoids and comonoids in ${\cal C}$. It is written $$ Map_{Mon({\cal C})}(A,Cobar(C)) = Map_{coMon({\cal C})}(Bar(A),C). $$
Remark : this result is perfectly symmetric in ${\cal C}$ and ${\cal C}^{op}$ replacing one by the another gives the exact same adjunction.
Now, here is what I find strange: classically the bar-cobar adjunction is going the other way (Bar is right adjoint and Cobar left adjoint) so why the change here ?
Variation on the same question : the classical the bar-cobar adjunction is related to "twisting cochains" which are Maurer-Cartan elements in the convolution dg-algebra $[C,A]$, hence some kind of maps from the comonoid $C$ to the monoid $A$. But in Higher Algebra the adjunction is related to maps from $A$ to $C$. Is there a way to relate twisting cochains $\alpha:C\to A$ to maps $f:A\to C$ satisfying the condition (*) ?
Last remark : a version of the convolution algebra does appear in Lurie's approach, provided we consider comonoids in $TwAr({\cal C})$ instead of monoids. They correspond to maps $f:C\to A$ from a comonoid $C$ to a monoid $A$ which are idempotent for the convolution product in the (external) convolution algebra $Map(C,A)$ (this is the condition dual to (*)).
I'm puzzled... I'll be glad if anybody has some insight into this.