I'm trying to understand the incomplete Cholesky decomposition process. In my book the following example is given:
Example: Suppose that the coefficient matrix $A\in\mathbb{R}^{N\times N}$ is a matrix with at most $5$ nonzero elements per row corresponding to a grid. Furthermore the matrix is symmetric and positive definite. The nonzero diagonals are numbered as follows: $m$ is the number of grid points in the $x$-direction.
$$A = \begin{bmatrix}a_1&b_1&&c_1\\b_1&a_2&b_2&&c_2\\\vdots&\ddots&\ddots&&&\ddots&&&\varnothing\\c_1&&b_m&a_{m+1}&b_{m+1}&&c_{m+1}\\&\ddots&\varnothing&\ddots&\ddots&\ddots&\varnothing&\ddots\\&\varnothing\end{bmatrix}$$ We want to compute an incomplete Cholesky decomposition $A = LD^{-1}L^T - R$ where the elements of the lower triangular matrix $L$ and diagonal matrix $D$ satisfy the following rules:
$a)$ $l_{ij} = 0$ for all $(i,j)$ where $a_{ij} = 0, i >j,$
$b)$ $l_{ii} = d_{ii},$
$c)$ $(LD^{-1}L^T)_{ij} = a_{ij}$ for all $(i,j)$ where $a_{ij} \neq 0, i \geq j.$
In this example $Q_0 = \{(i,j)\mid \left|i - j\right|\neq 0,1,m\}$ the set of places $(i,j)$ where $L$ should be zero. If the elements of $L$ are given as follows:
$$L = \begin{bmatrix}d_1\\\tilde{b}_1&d_2\\&\ddots&\ddots&\varnothing\\\tilde{c}_1&&\tilde{b}_m&d_{m+1}\\&\ddots&\varnothing&\ddots&\ddots\\\varnothing\end{bmatrix}$$ it is easy to see that using the form of $A$ we have$$d_i = a_i - \dfrac{b_{i-1}^2}{d_{i-1}} - \dfrac{c_{i-m}^2}{d_{i-m}}\\\tilde{b}_i = b_i\\\tilde{c}_i = c_i$$ for $i = 1,\ldots,N$
Question: Why are the diagonal elements of $L$ equal to $d_i = a_i - \dfrac{b_{i-1}^2}{d_{i-1}} - \dfrac{c_{i-m}^2}{d_{i-m}}$? If we have rule $b)$ and $d_i = a_i - \dfrac{b_{i-1}^2}{d_{i-1}} - \dfrac{c_{i-m}^2}{d_{i-m}}$ then rule $c)$, $(L D^{-1}L^T)_{ij} = a_{ij}$, doesn't hold. If $l_{ii} = d_{ii}$ then $LD^{-1} = I$ and $LD^{-1}L^T = L^T\neq A$.
Thanks in advance!