'Return (A,T) where T the Toeplitz matrix used in the Berkowitz algorithm
corresponding to `self` and A is the first principal submatrix.'

def _eval_berkowitz_toeplitz_matrix(self):

    if ((self.rows == 0) and (self.cols == 0)):
        return self._new(1, 1, [S.One])
    (a, R) = (self[(0, 0)], self[0, 1:])
    (C, A) = (self[1:, 0], self[1:, 1:])
    diags = [C]
    for i in range((self.rows - 2)):
        diags.append((A * diags[i]))
    diags = [((- R) * d)[(0, 0)] for d in diags]
    diags = ([S.One, (- a)] + diags)
    def entry(i, j):
        if (j > i):
            return S.Zero
        return diags[(i - j)]
    toeplitz = self._new((self.cols + 1), self.rows, entry)
    return (A, toeplitz)
