Preliminaries of the Martingale Representation Theorem 
I cannot understand why we are taking a dense subset of $[0,T]$.
Furthermore, I cannot see a result that would allow each such $g_n(B_{t_1},\ldots,B_{t_n})$ to be approximated in $L^2(\mathcal{F_T},P)$ by functions as $\phi_n(B_{t_1},\ldots,B_{t_n})$.
(This is an extract from Oksendal's SDE's)
 A: *

*Let $(t_i)_{i \in \mathbb{N}}$ be a dense subset of $[0,T]$ such that $t_k = T$ for some $k \geq 1$. If we set $\mathcal{H}_n := \sigma(B_{t_1},\ldots,B_{t_n})$ and $$\mathcal{H}_{\infty}:= \sigma \left( \bigcup_{n \in \mathbb{N}} \mathcal{H}_n \right) \qquad \quad \mathcal{F}_T := \sigma(B_s; s \leq T),$$ then $\mathcal{H}_{\infty} = \mathcal{F}_T$. Indeed: Obviously, $\mathcal{H}_{\infty} \subseteq \mathcal{F}_T$. On the other hand, if $t \in [0,T)$, then we can choose $(s_k) \subseteq (t_i)_i$ such that $s_k \to t$ since $(t_i)_{i}$ is dense in $[0,T]$. Consequently, by the continuity of Brownian motion, we get that $$B_t = \lim_{k \to \infty} B_{s_k}$$ is $\mathcal{H}_{\infty}$-measurable. Hence, $\mathcal{F}_T \subseteq \mathcal{H}_{\infty}$. The fact that $\mathcal{H}_{\infty} = \mathcal{F}_T$ is used in the martingale representation theorem in order to get the following equality: $$g = \mathbb{E}(g \mid \mathcal{F}_T) = \lim_{n \to \infty} \mathbb{E}(g \mid \mathcal{H}_n).$$

*Since $g \in L^2(\mathbb{P})$, it follows from the definition of conditional expectation that $g_n(B_{t_1},\ldots,B_{t_n}) \in L^2(\mathbb{P})$, i.e. $$\int_{\Omega} g_n(B_{t_1},\ldots,B_{t_n})^2 \,d\mathbb{P} = \int_{\mathbb{R}^n} g_n(x_1,\ldots,x_n)^2 \underbrace{p_{t_1,\ldots,t_n}(x_1,\ldots,x_n) \, dx}_{:=d\mu(x)} < \infty.$$ Here $p_{t_1,\ldots,t_n}$ denotes the joint density of $(B_{t_1},\ldots,B_{t_n})$. This shows $g_n \in L^2(\mu)$. Since $\mu$ is a probability measure on $(\mathbb{R}^n,\mathcal{B}(\mathbb{R}^n))$, we know that $C_0^{\infty}$ is dense in $L^2(\mu)$, i.e. we can find $\phi_n \in C_0^{\infty}$ such that $$ \|\phi_n(B_{t_1},\ldots,B_{t_n})-g_n(B_{t_1},\ldots,B_{t_n})\|_{L^2(\mathbb{P})}=\|\phi_n-g_n\|_{L^2(\mu)} < \frac{1}{n}.$$

