def _is_minimal_bsgs(base, gens):
    base1 = []
    sgs1 = gens[:]
    size = gens[0].size
    for i in range(size):
        if not all(h._array_form[i] == i for h in sgs1):
            base1.append(i)
            sgs1 = [h for h in sgs1 if h._array_form[i] == i]
    return base1 == base
Check if the BSGS has minimal base under lexigographic order.
dataset/ETHPy150Open sympy/sympy/sympy/combinatorics/tensor_can.py/_is_minimal_bsgs