#NEWLINE# def test_canonicalize_no_slot_sym( ) : #NEWLINE# #INDENT# ( base1 , gens1 ) = get_symmetric_group_sgs ( 1 ) #NEWLINE# dummies = [ 0 , 1 ] #NEWLINE# g = Permutation ( [ 1 , 0 , 2 , 3 ] ) #NEWLINE# can = canonicalize ( g , dummies , 0 , ( base1 , gens1 , 1 , 0 ) , ( base1 , gens1 , 1 , 0 ) ) #NEWLINE# assert ( can == [ 0 , 1 , 2 , 3 ] ) #NEWLINE# can = canonicalize ( g , dummies , 0 , ( base1 , gens1 , 2 , None ) ) #NEWLINE# assert ( can == [ 0 , 1 , 2 , 3 ] ) #NEWLINE# can = canonicalize ( g , dummies , 1 , ( base1 , gens1 , 1 , 0 ) , ( base1 , gens1 , 1 , 0 ) ) #NEWLINE# assert ( can == [ 0 , 1 , 3 , 2 ] ) #NEWLINE# g = Permutation ( [ 0 , 1 , 2 , 3 ] ) #NEWLINE# dummies = [ ] #NEWLINE# t0 = t1 = ( base1 , gens1 , 1 , 0 ) #NEWLINE# can = canonicalize ( g , dummies , 0 , t0 , t1 ) #NEWLINE# assert ( can == [ 0 , 1 , 2 , 3 ] ) #NEWLINE# g = Permutation ( [ 1 , 0 , 2 , 3 ] ) #NEWLINE# can = canonicalize ( g , dummies , 0 , t0 , t1 ) #NEWLINE# assert ( can == [ 1 , 0 , 2 , 3 ] ) #NEWLINE# ( base2 , gens2 ) = get_symmetric_group_sgs ( 2 ) #NEWLINE# dummies = [ 2 , 3 ] #NEWLINE# g = Permutation ( [ 1 , 3 , 2 , 0 , 4 , 5 ] ) #NEWLINE# can = canonicalize ( g , dummies , 0 , ( base2 , gens2 , 2 , 0 ) ) #NEWLINE# assert ( can == [ 0 , 2 , 1 , 3 , 4 , 5 ] ) #NEWLINE# can = canonicalize ( g , dummies , 1 , ( base2 , gens2 , 2 , 0 ) ) #NEWLINE# assert ( can == [ 0 , 2 , 1 , 3 , 4 , 5 ] ) #NEWLINE# g = Permutation ( [ 0 , 3 , 2 , 1 , 4 , 5 ] ) #NEWLINE# can = canonicalize ( g , dummies , 1 , ( base2 , gens2 , 2 , 0 ) ) #NEWLINE# assert ( can == [ 0 , 2 , 1 , 3 , 5 , 4 ] ) #NEWLINE# dummies = [ 2 , 3 ] #NEWLINE# g = Permutation ( [ 1 , 3 , 2 , 0 , 4 , 5 ] ) #NEWLINE# can = canonicalize ( g , dummies , 0 , ( base2 , gens2 , 1 , 0 ) , ( base2 , gens2 , 1 , 0 ) ) #NEWLINE# assert ( can == [ 1 , 2 , 0 , 3 , 4 , 5 ] ) #NEWLINE# can = canonicalize ( g , dummies , 1 , ( base2 , gens2 , 1 , 0 ) , ( base2 , gens2 , 1 , 0 ) ) #NEWLINE# assert ( can == [ 1 , 2 , 0 , 3 , 5 , 4 ] ) #NEWLINE# ( base1 , gens1 ) = get_symmetric_group_sgs ( 1 ) #NEWLINE# ( base2 , gens2 ) = get_symmetric_group_sgs ( 2 ) #NEWLINE# g = Permutation ( [ 2 , 1 , 0 , 3 , 4 , 5 ] ) #NEWLINE# dummies = [ 0 , 1 , 2 , 3 ] #NEWLINE# t0 = ( base2 , gens2 , 1 , 0 ) #NEWLINE# t1 = t2 = ( base1 , gens1 , 1 , 0 ) #NEWLINE# can = canonicalize ( g , dummies , 0 , t0 , t1 , t2 ) #NEWLINE# assert ( can == [ 0 , 2 , 1 , 3 , 4 , 5 ] ) #NEWLINE# g = Permutation ( [ 2 , 1 , 0 , 3 , 4 , 5 ] ) #NEWLINE# dummies = [ 0 , 1 , 2 , 3 ] #NEWLINE# t0 = ( [ ] , [ Permutation ( list ( range ( 4 ) ) ) ] , 1 , 0 ) #NEWLINE# can = canonicalize ( g , dummies , 0 , t0 , t1 , t2 ) #NEWLINE# assert ( can == [ 0 , 2 , 3 , 1 , 4 , 5 ] ) #NEWLINE# t0 = t1 = ( [ ] , [ Permutation ( list ( range ( 4 ) ) ) ] , 1 , 0 ) #NEWLINE# dummies = [ 0 , 1 , 2 , 3 ] #NEWLINE# g = Permutation ( [ 2 , 1 , 3 , 0 , 4 , 5 ] ) #NEWLINE# can = canonicalize ( g , dummies , 0 , t0 , t1 ) #NEWLINE# assert ( can == [ 0 , 2 , 1 , 3 , 4 , 5 ] ) #NEWLINE# g = Permutation ( [ 1 , 2 , 3 , 0 , 4 , 5 ] ) #NEWLINE# can = canonicalize ( g , dummies , 0 , t0 , t1 ) #NEWLINE# assert ( can == [ 0 , 2 , 3 , 1 , 4 , 5 ] ) #NEWLINE# t0 = t1 = t2 = ( [ ] , [ Permutation ( list ( range ( 4 ) ) ) ] , 1 , 0 ) #NEWLINE# dummies = [ 2 , 3 , 4 , 5 ] #NEWLINE# g = Permutation ( [ 4 , 2 , 0 , 3 , 5 , 1 , 6 , 7 ] ) #NEWLINE# can = canonicalize ( g , dummies , 0 , t0 , t1 , t2 ) #NEWLINE# assert ( can == [ 2 , 4 , 0 , 5 , 3 , 1 , 6 , 7 ] ) #NEWLINE# t0 = ( base2 , gens2 , 1 , 0 ) #NEWLINE# t1 = t2 = ( [ ] , [ Permutation ( list ( range ( 4 ) ) ) ] , 1 , 0 ) #NEWLINE# dummies = [ 2 , 3 , 4 , 5 ] #NEWLINE# g = Permutation ( [ 4 , 2 , 0 , 3 , 5 , 1 , 6 , 7 ] ) #NEWLINE# can = canonicalize ( g , dummies , 0 , t0 , t1 , t2 ) #NEWLINE# assert ( can == [ 2 , 4 , 0 , 3 , 5 , 1 , 6 , 7 ] ) #NEWLINE# t0 = t2 = ( base2 , gens2 , 1 , 0 ) #NEWLINE# t1 = ( [ ] , [ Permutation ( list ( range ( 4 ) ) ) ] , 1 , 0 ) #NEWLINE# dummies = [ 2 , 3 , 4 , 5 ] #NEWLINE# g = Permutation ( [ 4 , 2 , 0 , 3 , 5 , 1 , 6 , 7 ] ) #NEWLINE# can = canonicalize ( g , dummies , 0 , t0 , t1 , t2 ) #NEWLINE# assert ( can == [ 2 , 4 , 0 , 3 , 1 , 5 , 6 , 7 ] ) #NEWLINE# t0 = ( base2 , gens2 , 1 , 0 ) #NEWLINE# t1 = ( [ ] , [ Permutation ( list ( range ( 4 ) ) ) ] , 1 , 0 ) #NEWLINE# ( base2a , gens2a ) = get_symmetric_group_sgs ( 2 , 1 ) #NEWLINE# t2 = ( base2a , gens2a , 1 , 0 ) #NEWLINE# dummies = [ 2 , 3 , 4 , 5 ] #NEWLINE# g = Permutation ( [ 4 , 2 , 0 , 3 , 5 , 1 , 6 , 7 ] ) #NEWLINE# can = canonicalize ( g , dummies , 0 , t0 , t1 , t2 ) #NEWLINE# assert ( can == [ 2 , 4 , 0 , 3 , 1 , 5 , 7 , 6 ] )