Gibbs Sampler - Sample mean convergence To simulate from the posterior distribution $p(\theta|Y)$ where $\theta = (\mu,\lambda_1,\lambda_2)$, I run a Gibbs sampler to draw approximately random values from $p(\theta|Y)$. 
This Gibbs sampler returns as output $$\lbrace \mu^{(n)}, \lambda_1^{(n)}, \lambda_2^{(n)} \rbrace_{n=1}^{N}$$ (after burn-in).
If interested in the parameter $\lambda_1$, to estimate this parameter $\lambda_1$, I use the statistic : $$\frac{1}{N}\sum_{i=1}^{N} \lambda_1^{(i)}$$ This is the naive Monte Carlo estimator that approximates the expectation of $\lambda_1$ by the strong law of large numbers (the sample has to be iid to make this work). 
My question: does the Gibbs sampler produce an iid sample from the posterior $p(\theta|Y)$ ?
 A: The validations for both the convergence of the Gibbs Markov chain and of the empirical average based on this Markov chain are (both) called ergodic theorems.

For a Harris positive chain $(X_n)$, with invariant distribution
  $\pi$, an atom $\alpha$ is ergodic if $$ \lim_{n\rightarrow\infty}\;
  |K^n(\alpha,\alpha)-\pi(\alpha)|=0 \;. $$ In the countable case, the
  existence of an ergodic atom is, in fact, sufficient to establish
  convergence according to the total variation norm, $$
  \|\mu_1-\mu_2\|_{TV} = \sup_A \; |\mu_1(A)-\mu_2(A)| . $$ Proposition 6.48:
  If $(X_n)$ is Harris positive on $\mathcal{X}$ and denumerable, and if
  there exists an ergodic atom $\alpha\subset \mathcal{X}$, then, for
  every $x \in \mathcal{X} $, $$ \lim_{n \rightarrow \infty} \;
  \|K^n(x,\cdot)-\pi\|_{TV} = 0 \;. $$ (extract from Monte Carlo
  Statistical Methods (2004), p.231)

and

Proposition 6.63: If $(X_n)$ has a $\sigma$-finite invariant measure $\pi$, the following two statements are equivalent:
  
  
*
  
*If $f,g\in L^1(\pi)$ with $\int g(x) d\pi(x)\neq 0$, then$$\lim_{N
     \rightarrow \infty} \; \frac{\sum_{i=1}^N f(X_i)}{\sum_{i=1}^N g(X_i)} ={\int f(x) \text{d}\pi(x)
     \over \int g(x) \text{d}\pi(x)} \;.$$
  
*The Markov chain $(X_n)$ is Harris recurrent.
  
  
  (extract from Monte Carlo Statistical Methods (2004), p.241)

None of those results requires i.i.d. sampling.
