4444import itertools
4545
4646from copy import copy
47- from datetime import datetime
4847from itertools import combinations
4948
5049from sage .combinat .permutation import Permutation
@@ -1417,7 +1416,7 @@ def conjugate_positive_form(braid):
14171416
14181417 A list of `r` lists. Each such list is another list with two elements, a
14191418 positive braid `\alpha_i` and a list of permutation braids
1420- `\gamma_{1}^{i},\dots,\gamma_{r }^{n_i }` such that if
1419+ `\gamma_{1}^{i},\dots,\gamma_{n_i }^{i }` such that if
14211420 `\gamma_i=\prod_{j=1}^{n_i} \gamma_j^i` then the braids
14221421 `\tau_i=\gamma_i\alpha_i\gamma_i^{-1}` pairwise commute
14231422 and `\alpha=\prod_{i=1}^{r} \tau_i`.
@@ -1428,11 +1427,11 @@ def conjugate_positive_form(braid):
14281427 sage: B = BraidGroup(4)
14291428 sage: t = B((1, 3, 2, -3, 1, 1))
14301429 sage: conjugate_positive_form(t)
1431- [[(s1*s0 )^2, [s2 ]]]
1430+ [[(s0*s1 )^2, [s0*s2*s1*s0 ]]]
14321431 sage: B = BraidGroup(5)
14331432 sage: t = B((1, 2, 3, 4, -1, -2, 3, 3, 2, -4))
14341433 sage: L = conjugate_positive_form(t); L
1435- [[s1 ^2, [s3*s2]], [s1 *s2, [s0]]]
1434+ [[s0 ^2, [s0*s1*s2*s1* s3*s2*s1*s0 ]], [s3 *s2, [s0*s1*s2*s1*s3*s2*s1* s0]]]
14361435 sage: s = B.one()
14371436 sage: for a, l in L:
14381437 ....: b = prod(l)
@@ -1452,9 +1451,7 @@ def conjugate_positive_form(braid):
14521451 braid1 = prod (A1 , B .delta () ** ex )
14531452 sg0 = B .one ()
14541453 else :
1455- A = braid .super_summit_set ()
1456- braid1 = A [0 ]
1457- sg0 = braid .conjugating_braid (braid1 )
1454+ braid1 , sg0 = braid .super_summit_set_element ()
14581455 if ex > 0 :
14591456 blocks = [list (braid1 .Tietze ())]
14601457 else :
@@ -1467,30 +1464,18 @@ def conjugate_positive_form(braid):
14671464 if block :
14681465 blocks .append (block )
14691466 shorts = []
1470- oneblock = len (blocks ) == 1
14711467 for a in blocks :
14721468 if sg0 == B .one ():
14731469 res0 = [B (a ), []]
14741470 else :
1475- if not oneblock :
1476- A = B ( a ). super_summit_set ()
1471+ bra = sg0 * B ( a ) / sg0
1472+ br1 , sg = bra . super_summit_set_element ()
14771473 res = None
1478- t0 = datetime .now ()
1479- for j , tau in enumerate (A ):
1480- if j == 1 :
1481- sg = sg0
1482- else :
1483- sg = (sg0 * B (a ) / sg0 ).conjugating_braid (tau )
1484- A1 = rightnormalform (sg )
1485- par = A1 [- 1 ][0 ] % 2
1486- A1 = [B (a ) for a in A1 [:- 1 ]]
1487- b = prod (A1 , B .one ())
1488- b1 = len (b .Tietze ()) / (len (A1 ) + 1 )
1489- if res is None or b1 < res [3 ]:
1490- res = [tau , A1 , par , b1 ]
1491- if (datetime .now () - t0 ).total_seconds () > 60 :
1492- break
1493- if res [2 ] == 1 :
1474+ A1 = rightnormalform (sg )
1475+ par = A1 [- 1 ][0 ] % 2
1476+ A1 = [B (a0 ) for a0 in A1 [:- 1 ]]
1477+ res = [br1 , A1 , par ]
1478+ if res [2 ]:
14941479 r0 = res [0 ].Tietze ()
14951480 res [0 ] = B ([i .sign () * (d - abs (i )) for i in r0 ])
14961481 res0 = res [:2 ]
@@ -1619,9 +1604,10 @@ def fundamental_group_from_braid_mon(bm, degree=None,
16191604 sage: bm = [s1*s2*s0*s1*s0^-1*s1^-1*s0^-1,
16201605 ....: s0*s1^2*s0*s2*s1*(s0^-1*s1^-1)^2*s0^-1,
16211606 ....: (s0*s1)^2]
1622- sage: g = fundamental_group_from_braid_mon(bm, projective=True); g # needs sirocco
1607+ sage: g = fundamental_group_from_braid_mon(bm, projective=True) # needs sirocco
1608+ sage: g.sorted_presentation() # needs sirocco
16231609 Finitely presented group
1624- < x1, x3 | x3^2*x1^ 2, x1^-1*x3 ^-1*x1*x3^-1*x1^-1*x3^-1 >
1610+ < x0, x1 | x1^-2*x0^- 2, x1^-1*(x0 ^-1*x1)^2*x0 >
16251611 sage: print(g.order(), g.abelian_invariants()) # needs sirocco
16261612 12 (4,)
16271613 sage: B2 = BraidGroup(2)
@@ -1720,8 +1706,8 @@ def fundamental_group(f, simplified=True, projective=False, puiseux=True):
17201706 sage: from sage.schemes.curves.zariski_vankampen import fundamental_group, braid_monodromy
17211707 sage: R.<x, y> = QQ[]
17221708 sage: f = x^2 + y^3
1723- sage: fundamental_group(f)
1724- Finitely presented group < x0, x1 | x0* x1^-1*x0^-1*x1^-1*x0*x1 >
1709+ sage: fundamental_group(f).sorted_presentation()
1710+ Finitely presented group < x0, x1 | x1^-1*x0^-1*x1^-1*x0*x1*x0 >
17251711 sage: fundamental_group(f, simplified=False, puiseux=False).sorted_presentation()
17261712 Finitely presented group < x0, x1, x2 | x2^-1*x1^-1*x0*x1,
17271713 x2^-1*x0*x1*x0^-1,
@@ -1882,7 +1868,7 @@ def fundamental_group_arrangement(flist, simplified=True, projective=False,
18821868 sage: G.sorted_presentation()
18831869 Finitely presented group
18841870 < x0, x1, x2, x3 | x3^-1*x2^-1*x3*x2, x3^-1*x1^-1*x0^-1*x1*x3*x0,
1885- x3^-1*x1^-1*x3*x0*x1*x0^-1 , x2^-1*x0^-1*x2*x0 >
1871+ x3^-1*x1^-1*x0^-1* x3*x0*x1, x2^-1*x0^-1*x2*x0 >
18861872 sage: dic
18871873 {0: [x1], 1: [x3], 2: [x2], 3: [x0], 4: [x3^-1*x2^-1*x1^-1*x0^-1]}
18881874 sage: fundamental_group_arrangement(L, vertical=True)
0 commit comments