Monoidal structures on modules over derived coalgebras Given a Hopf-algebra $H$ (over a commutative ring), it is a classical fact that its category of (left) modules is monoidal, even if $H$ is not commutative. Given two left modules $M$ and $N$, we can form a new left module structure on $M\otimes N$ via the structure map $$H\otimes M\otimes N\overset{\Delta\otimes 1\otimes 1}\to H\otimes H\otimes M\otimes N\overset{1\otimes\tau\otimes 1}\to H\otimes M\otimes H \otimes N\to M\otimes N.$$
When working in a derived setting (let's assume $H$ is an object in a symmetric monoidal quasicategory $\mathscr{C}$), things can be slightly more complicated, and we should probably have $H$ with monoidal structure and comonoidal structure given by some operads like the little $n$-disk operads $\mathbb{E}_n.$ It's basically formal when working in quasicategories to say that $H$ is an $\mathbb{E}_n$-algebra with a compatible $\mathbb{E}_m$-coalgebra structure, making it into an $\mathbb{E}_n/\mathbb{E}_m$-bialgebra in $\mathscr{C}$. We just say that $H$ is an $\mathbb{E}_n$-algebra object in the quasicategory of $\mathbb{E}_m$-coalgebra objects in $\mathscr{C}$.
It's known that, in general, given an $\mathbb{E}_n$-algebra, the category of left modules over it is $\mathbb{E}_{n-1}$-monoidal. This is why, for instance, left modules over a noncommutative ring (i.e. an $\mathbb{E}_1$-algebra) are not monoidal at all. So my question is, to what extent can we perform the above trick in a "derived" way? Obviously it does not suffice to simply write down the structure map, since we need a whole lot of coherent data to write down a module structure now, but is there some other way to do it?
A good example would be, I think, the example of an $n$-fold loop space $X$. Any space, via the diagonal map, is an $\mathbb{E}_\infty$-coalgebra. In fact there's an equivalence of quasicategories $CoAlg_{\mathbb{E}_\infty}(Top)\simeq Top$. So an $n$-fold loop space is definitely an $\mathbb{E}_n$-algebra in $\mathbb{E}_\infty$-coalgebras in $Top$. So, is the category of modules in $Top$ over $X$ somehow "more monoidal than it should be?" In general, how well does this type of thing work?
 A: Not quite sure what your exact question is, but the general pattern is as follows: let $Pr$ be the $(\infty,1)$-symmetric monoidal category of presentable categories, cocontinuous functors, natural isos between them and so on. Let $S\in E_\infty-alg(Pr)$ be a presnetable symmetric monoidal category. Then you have a symmetric monoidal functors
$$E_1-alg(S)\longrightarrow Pr$$
sending $A$ to $A-mod$ and a morphism $A\rightarrow B$ to the corresponding induction functor $-\otimes_A B$. Likewise you have a symmetric monoidal functor
$$E_1-coalg(S)\longrightarrow Pr$$
sending $C$ to $C-comod$ and a morphism $C\rightarrow D$ to corestriction. Therefore you get a functor
$$E_1-bialg(S)=E_1-alg(E_1-coalg(S))\longrightarrow E_1-alg(Pr)$$
by applying "comod", hence the category of comodules over a bialgebra is $E_1$, i.e. monoidal. Likewise, modules over a bialgebra should really be regarded as a "comonoidal category", i.e. an $E_1$-coalgebra in $Pr$. It is also monoidal basically because restriction along algebra morphisms is also cocontinuous, i.e. there is also a contravariant functor from $E_1-alg(S)$ to $Pr$, but this is somewhat less natural and leads to some techincal issues (already in the classical/non-derived case).
Now applying Dunn's theorem you get similar statements for the higer versions of bialgebras.
A: I couldn't make the above answer work, so here's an approach explained to me by Rune Haugseng (of course any errors are entirely my own). Let $C$ be symmetric monoidal and $p\colon C^\otimes\to Fin_\ast$ be the cocartesian fibration witnessing this. First notice that $CoAlg(C)^{op}\simeq Alg(C^{op})$ has a "pointwise" symmetric monoidal structure which is given by HA.3.2.4.3, and therefore $CoAlg(C)$ also has a symmetric monoidal structure i.e. there is a cocartesian fibration $q\colon CoAlg(C)^\otimes\to Fin_\ast$. Here I'm using the fact that $C^{op}$ has a symmetric monoidal structure induced by taking the fiberwise dual of $p$ in the sense of this paper. Similar considerations give a symmetric monoidal structure to $LCoMod(C)\simeq LMod(C^{op})^{op}$. Moreover, there is a cartesian fibration $LMod(C^{op})\to Alg(C^{op})$ by HA.4.2.3.2 which gives a fiberwise cartesian fibration $LMod(C^{op})^\otimes\to Alg(C^{op})^\otimes$. By taking fiberwise duals again we get a fiberwise cocartesian fibration $LCoMod(C)^\otimes\to CoAlg(C)^\otimes$. It's a little tricky, but one can check that this fiberwise cocartesian fibration satisfies the condition A.1.8 of this paper and is therefore a cocartesian fibration. On a fixed fiber this says that if I've got a map of coalgebras $A\to B$ (or a finite list of maps of coalgebras) then I get a left adjoint functor $LCoMod_A(C)\to LCoMod_B(C)$ which takes the coaction $M\to A\otimes M$ to $M\to A\otimes M\to B\otimes M$ (this is the "opposite" of restriction of scalars). But now we've lifted it up to $LCoMod(C)^\otimes\to CoAlg(C)^\otimes$ so that it plays well with the monoidal structure, which we'll need.
Now suppose that $H$ is a bialgebra in $C$, i.e. $H$ is an algebra object in $CoAlg(C)\simeq Alg(C^{op})^{op}$ .  In other words, $H$ is determined by a functor of $\infty$-operads $H^\otimes\colon Assoc^\otimes\to CoAlg(C)^\otimes$. Then we can pull back the cocartesian fibration $LCoMod(C)^\otimes\to CoAlg(C)^\otimes$ along $H^\otimes$ to obtain a cocartesian fibration $LCoMod_H(C)^\otimes\to Assoc^\otimes$. There's a little bit of checking to do if you want to make sure that this pullback really is equivalent to $LCoMod_H(C)^n$ over each $\langle n\rangle\in Assoc^\otimes$, but it's not too bad.
I should add that you can fully analyze the cocartesian morphisms in $LCoMod_H(C)^\otimes$ and check that the $H$-coaction on the tensor product of two $H$-comodules $M$ and $N$ is indeed $M\otimes N\to M\otimes H\otimes N\otimes H\to M\otimes N\otimes H\otimes H\to M\otimes N\otimes H$.
