#NEWLINE# def _is_minimal_bsgs( base , gens ) : #NEWLINE# #INDENT# '\n    Check if the BSGS has minimal base under lexigographic order.\n\n    base, gens BSGS\n\n    Examples\n    ========\n\n    >>> from sympy.combinatorics import Permutation\n    >>> from sympy.combinatorics.tensor_can import riemann_bsgs, _is_minimal_bsgs\n    >>> _is_minimal_bsgs(*riemann_bsgs)\n    True\n    >>> riemann_bsgs1 = ([2, 0], ([Permutation(5)(0, 1)(4, 5), Permutation(5)(0, 2)(1, 3)]))\n    >>> _is_minimal_bsgs(*riemann_bsgs1)\n    False\n    ' #NEWLINE# base1 = [ ] #NEWLINE# sgs1 = gens [ : ] #NEWLINE# size = gens [ 0 ] . size #NEWLINE# for i in range ( size ) : #NEWLINE# #INDENT# if ( not all ( ( ( h . _array_form [ i ] == sgs1 ) for h in sgs1 ) ) ) : #NEWLINE# #INDENT# base1 . append ( i ) #NEWLINE# sgs1 = [ h for h in sgs1 if ( h . _array_form [ i ] == i ) ] #NEWLINE# #UNINDENT# #UNINDENT# return ( base1 == base )