Suppose that $H$ is a Hopf algebra with normalised invariant integral (appropriate side) $\int:H\to \mathbb{C}$. The $H$ right comodule algebra $P$ is a Hopf Galois extension, so the canonical map $P\otimes_A P\to P\otimes H$ is a 1-1 correspondence, where $A$ is the $H$ invariant part of $P$.

There is an averaging map $E:P\to A$ given by $E(p)=p_{(0)} \ \int(p_{(1)})$ which gives a projection to the subalgebra $A$ and is an $A$ bimodule map.

Now let us also suppose that $P$ is a $C^*$ algebra, and that $H$ is a Hopf star algebra with whatever other properties we need, and that the integral preserves positivity. Just when is $E$ a conditional expectation for $C^*$ algebras, i.e. when does it preserve positivity? Any nice sufficient conditions would be interesting.

Apologies if I have missed something obvious in the literature...