Riemann-Stieltjes integral of simple functions I quote Øksendal (2003).

Let us consider a probability space
$\left(\Omega,\mathbb{P},\mathcal{A},\right)$ and a class of functions
$f:\left[0,\infty\right]\times\Omega\mapsto\mathbb{R}$. For $0\le
S<T$, $\left(B(t)\right)_{t\ge0}$ a Brownian motion and $f(t,\omega)$
given, we want to define: $$\int_S^T f(t,\omega)dB(t)(\omega)$$
It is reasonable to start with a definition for a simple class of functions $f$ and then extend by some approximation procedure. First assume that $f$ has the form:
$$\phi(t,\omega)=\sum_{j\ge0}e_j(\omega)\cdot1_{[j\cdot2^{-n}, (j+1)2^{-n})}(t)$$
where $1$ denotes the indicator function and $n$ is a natural number.
For such functions, it is reasonable to define:
$$\int_S^T\phi(t,\omega)dB_t(\omega)=\sum_{j\ge0}e_j(\omega)\left[B_{t_{j+1}}-B_{t_j}\right](\omega)\tag{1}$$
where:
$$t_k=t_k^{(n)}=\begin{cases}k\cdot 2^{-n}\hspace{0.3cm}\text{if } S\le k\cdot 2^{-n}\le T\tag{2}\\ S\hspace{0.3cm}\text{if } k\cdot 2^{-n}<S\\
T\hspace{0.3cm}\text{if } k\cdot 2^{-n}>T
\end{cases}$$



My doubts concern the part in italics. Namely:
Questions

*

*Why, according to $(1)$:
\begin{align}\int_S^T\phi(t,\omega)dB_t(\omega)&=\int_S^T\sum_{j\ge0}e_j(\omega)\cdot1_{[j\cdot2^{-n}, (j+1)2^{-n})}(t)dB_t(\omega)\\&=\sum_{j\ge0}e_j(\omega)\left[B_{t_{j+1}}-B_{t_j}\right](\omega)\end{align}?  Is that due to the fact that $\sum_{j\ge0}e_j(\omega)\cdot1_{[j\cdot2^{-n}, (j+1)2^{-n})}(t)$ do not depend on the variable of integration $B_{t}(\omega)$, hence they go outside sign of integration and one has:
\begin{align}\int_S^T\phi(t,\omega)dB_t(\omega)&=\int_S^T\sum_{j\ge0}e_j(\omega)\cdot1_{[j\cdot2^{-n}, (j+1)2^{-n})}(t)dB_t(\omega)\\&=\sum_{j\ge0}e_j(\omega)\left[B_{t_{j+1}}-B_{t_j}\right](\omega)\end{align} with $t_k$ as specified in $(2)$ and $\sum_{j\ge0}\left[B_{t_{j+1}}-B_{t_j}\right]=B_{T}-B_{S}$?

*Besides, could you please detail the reason why $(2)$ is defined that way? In particular, is there in place the choice of left-end point of every time interval? Why does the value $t_k$ depend on whether $k\cdot2^{-n}$ is positioned? What I would expect instead is something like:
$$t_k=t_k^{(n)}=\begin{cases}t_k\hspace{0.4cm}\text{if } k\cdot 2^{-n}\le t_k \le (k+1)\cdot2^{-n}\tag{2.bis}\\ 0\hspace{0.5cm}\text{otherwise}
\end{cases}$$
 A: (1) It is the definition of a stochastic integral for elementary functions w.r.t. a BM. (See the beginning of the next section.) Why is it reasonable? Consider a discrete-time analogue. Let $\{X_n\}$ be a martingale adapted to $\{\mathcal{F}_n\}$ and let $\{H_n\}$ be a bounded, previsible process, i.e., $H_n\in\mathcal{F}_{n-1}$. Then we define
$$
(H\cdot X)_n:=\sum_{i=1}^n H_i \Delta X_i,\quad (H\cdot X)_0=0
$$
as our discrete time stochastic integral (in fact, it is called the martingale transform of $X$). The standard example is that if you bet 1\$ each time (i.e., $H_n=1$), your total gain/loss at time $n$ is exactly $(H\cdot X)_n$. A nice property of this process is that it is a martingale (is it crucial that $H$ is predictable; take, for example, $H_n=\operatorname{sgn}(\Delta X_n)$). The corresponding processes in your case are $H_n=e_{n-1}$ and $X_n=B_{t_n}$ (setting $S=0$).
(2) The "logic" behind the definition of $t_k$ is related to the definition of elementary functions. For each $k$, such a function is constant on $[k 2^{-n},(k+1)2^{-n})$ and $(B_t)$ is "sampled" at the corresponding end-points.
