'Map initial real root index to an index in a factor where
the root belongs.'

@classmethod
def _reals_index(cls, reals, index):

    i = 0
    for (j, (_, factor, k)) in enumerate(reals):
        if (index < (i + k)):
            (poly, index) = (factor, 0)
            for (_, factor, _) in reals[:j]:
                if (factor == poly):
                    index += 1
            return (poly, index)
        else:
            i += k
