there are many questions on Mathexchange, e.g. Definition of conditional expectation, discussing the definition of conditional expectation. In most cases the random variable which is later named "conditional expectation" is assumed to be a measurable $\Omega\rightarrow\mathbb R$ function. In some lecture notes (that are maybe too advanced for me) conditional expectation is defined to be a $\Omega\rightarrow\mathbb R^n$ measurable function -- but imposes in the definition that this function is a.e. unqiue. For me it feels that we do not need a.e. uniqueness in the definition but that it can be proven (I failed though). So how is uniqueness of conditional expectation proven in $\mathbb R^n$ or even more general, in Banach spaces?
Edit: Interestingly, this five-year-old question receives some attention now. The conditional expectation $Z$ of a random variable $X:\Omega\rightarrow S$ given a sub-$\sigma$-algebra $\mathcal G$ satisfies $$\int_G Z\,\mathrm dP = \int_G X\,\mathrm dP$$ for all $G\in\mathcal G$. The common notation is $\mathbb E[X\mid\mathcal G] := Z$.
It can be shown in the case $S = \mathbb R$ that if such a random variable exists, it is unique. The proof can be found e.g. here: Proof that conditional expectation is defined uniquely almost everywhere? This proof does not work for $S = \mathbb R^n$, or more general $S = $ some Banach space. The question is: how can I prove uniqueness in these cases?