我有一个矩阵,女巫的形式为
A = \begin{bmatrix}
a_{0} & a_{1} & a_{2} & a_{3} & \cdots & a_{r-1} \\ s_{0} & 0 & 0 & 0 & \cdots & b_{r-2} \\ 0 & s_{1} & 0 & 0 & \cdots & b_{r-3} \\ \vdots & \cdots & \ddots & \ddots & \ddots & \vdots \\ \vdots & \cdots & \ddots & \ddots & \ddots & \vdots \\ 0 & \cdots & \cdots & 0 & s_{r-2} & b_{0}
\end{bmatrix}
我想用一个形式为A的女巫创建一个双陪伴矩阵C,
C= \begin{bmatrix} a_{0} & a_{1}s_{0} & a_{2}s_{0}s_{1} & \cdots & a_{r-2}s_{0}s_{1} \cdots s_{r-3} & a_{r-1}s_{0}s_{1} \cdots s_{r-2} \\ 1 & 0 & \cdots & \cdots & 0 & b_{r-2}s_{1} \cdots s_{r-2} \\ 0 & \ddots & \ddots & \ddots & \vdots & b_{r-3}s_{2} \cdots s_{r-2} \\ \vdots & \ddots & \ddots & \ddots & \vdots & \vdots \\ \vdots & \ddots & \ddots & \ddots & 0 & b_{1} s_{r-2} \\ 0 & \cdots & \cdots & 0 & 1 & b_{0} \end{bmatrix}
我需要帮助从A构造这个双重陪伴矩阵C