import re


def _un_camel(name):
    """
    Convert `CamelCase` to `camel_case`.

    EXAMPLES::

    sage: sage.interfaces.mathematica._un_camel('CamelCase')
    'camel_case'
    sage: sage.interfaces.mathematica._un_camel('EllipticE')
    'elliptic_e'
    sage: sage.interfaces.mathematica._un_camel('FindRoot')
    'find_root'
    sage: sage.interfaces.mathematica._un_camel('GCD')
    'gcd'
    """
    s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
    return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()