Let $\boldsymbol \theta$ be a vector of parameters, with a known prior $\pi(\boldsymbol \theta)$. Let $\boldsymbol x_1,...,\boldsymbol x_n$ be i.i.d. samples with $\boldsymbol x|\boldsymbol \theta$ known. The problem is that we do not observe $\boldsymbol x_i$, but $\boldsymbol g(\boldsymbol x_i)$. Here $\boldsymbol g$ is a dimensional reduction transformation. How to numerically compute the posterior $\pi(\boldsymbol \theta | \boldsymbol g(\boldsymbol x_1),...,g(\boldsymbol x_n))$ or sampling from it efficiently?
A simple example is here. For a rectangle, the width $w\sim {\rm Uniform}(0, a)$ and the length $l\sim {\rm Uniform}(0,b)$, and $(a,b)$ follows a known prior. But we cannot observe $(w,l)$. Instead, we can observe the area $s = w\cdot l$. How to compute the posterior $\pi(a,b|s)$ numerically or sampling from it?