Q:

Quadratic variation of ito integral

Is it true in general that if $f$ is a deterministic function, and $W$ is brownian motion, then the quadratic variation of $\int_0^t f(W_s) dW_s$ is $\int_0^t f^2(W_s) ds$? 
Is it also true in general that the quadratic variation of $\int_0^t f(s)dW_s$ is $\int_0^t f^2(s)ds$?
Also, is the quadratic variation of $\int_0^t f(W_s) ds =0$?
I have been using these formulas in my work as they seem to be generally true, but I haven't been able to prove them (I struggle to work with quadratic variation from the definition) and I would love to see a proof. 
My definition of quadratic variation of a continuous local martingale $M$ is the unique, continuous, increasing and adapted process $\langle M\rangle$ with $\langle M\rangle _0 
=0 $ such that $M^2 - \langle M \rangle$ is a continuous local martingale. 
Thanks very much!

A:

Let $X,Y$ be semimartingales and $\xi$ be an $X$-integrable process. Then,
$$\left[\int\xi\,dX,Y\right] = \int\xi\,d[X,Y]$$
and 
$$\left[\int\xi\,dX\right]=\int\xi^2\,d[X]$$
where $[\cdot, \cdot ]$ denotes the quadratic covariation of two processes and $[\cdot ]$ denotes the quadratic covariation of a process with itself.
The proof of such statements is much easier if you use the following definition of $[\cdot]$:
Given a stochastic partition ${\mathcal P} = \left\{0=\tau_0\le\tau_1\le\tau_2\le\cdots\uparrow\infty\right\}$, we define
$$[X]^{{\mathcal P}}(t) \equiv \sum_{n=1}^\infty\left(X(\tau_n\wedge t)-X(\tau_{n-1}\wedge t)\right)^2$$
Taking a sequence of such partitions such that the mesh of the partitions is going to 0 in probability as $n$ increases, we define $[X]$ as the following limit
$$ [X]^{{\mathcal P}_n} \xrightarrow{ucp}[X]$$
The "ucp" convergence is the uniform convergence on compacts in probability.

