(h, base, orbits, transversals, j)
return h, base_len + 1
optimized _strip, with h, transversals and result in array form
    if the stripped elements is the identity, it returns False, base_len + 1

    j    h[base[i]] == base[i] for i <= j
optimized _strip, with h, transversals and result in array form
    if the stripped elements is the identity, it returns False, base_len + 1
optimized _strip with h transversals and result in array form if the stripped elements is the identity it returns False base_len + 1
def _strip_af(h, base, orbits, transversals, j):
    """
    optimized _strip, with h, transversals and result in array form
    if the stripped elements is the identity, it returns False, base_len + 1

    j    h[base[i]] == base[i] for i <= j
    """
    base_len = len(base)
    for i in range(j+1, base_len):
        beta = h[base[i]]
        if beta == base[i]:
            continue
        if beta not in orbits[i]:
            return h, i + 1
        u = transversals[i][beta]
        if h == u:
            return False, base_len + 1
        h = _af_rmul(_af_invert(u), h)
    return h, base_len + 1
def _strip_af ( h , base , orbits , transversals , j ) : base_len = len ( base ) for i in range ( j + 1 , base_len ) : beta = h [ base [ i ] ] if beta == base [ i ] : continue if beta not in orbits [ i ] : return h , i + 1 u = transversals [ i ] [ beta ] if h == u : return False , base_len + 1 h = _af_rmul ( _af_invert ( u ) , h ) return h , base_len + 1