def top(root_ideal, start_index):
    """ Given a column index ``start_index``, look at it's :meth:`up_path` and return the final index.

        EXAMPLES:

        The picture below represents the root ideal ``ri``:

        .. image:: _static/root-ideal.JPG
            :width: 180px
            :align: center
            :alt: The root ideal [(0,2), (0,3), (0,4), (1,3), (1,4), (2,4)]

        ::

            sage: ri = RootIdeals().init_from_partition([3, 2, 1], 5)
            sage: ri.top(0)
            0
            sage: ri.top(1)
            1
            sage: ri.top(2)
            0
            sage: ri.top(3)
            1
            sage: ri.top(4)
            0

        ..  SEEALSO::

            :meth:`down`, :meth:`up`, :meth:`down_path`, :meth:`up_path`, :meth:`bottom`
        """
    return root_ideal.up_path(start_index)[-1]
