Skip to content

Commit 11312f9

Browse files
author
Release Manager
committed
gh-39301: Using a new functions in libbraiding in zariski_vankampen <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes #12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes #12345". --> The file `zariski_vankampen` used some `libbraiding` functions in order to compute the relations of the group obtained applying Zariski-van Kampen method. The use of the `super_summit_set` allowed to end computations which did not finish with a straightforward approach. But, when one works with large braid groups, the mehtod `super_summit_set` can be very long, and running along its output is even longer. The new `libbraiding` version includes the method `super_summit_set_element` which simplifies and fasten the computations. The main changes are in method `conjugate_positive_form` ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [X] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - #12345: short description why this is a dependency --> <!-- - #34567: ... --> URL: #39301 Reported by: Enrique Manuel Artal Bartolo Reviewer(s): Travis Scrimshaw
2 parents cd1dd19 + b481917 commit 11312f9

File tree

4 files changed

+50
-46
lines changed

4 files changed

+50
-46
lines changed

src/sage/geometry/hyperplane_arrangement/ordered_arrangement.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ def projective_fundamental_group(self):
394394
< x0, x1, x2, x3, x4 | x4^-1*x3^-1*x2^-1*x3*x4*x0*x2*x0^-1,
395395
x4^-1*x2^-1*x4*x2, x4^-1*x1^-1*x0^-1*x1*x4*x0,
396396
x4^-1*x1^-1*x0^-1*x4*x0*x1,
397-
x4^-1*x1^-1*x3*x0*x1*x3^-1*x2^-1*x4*x0^-1*x2,
398397
x3^-1*x2^-1*x1^-1*x0^-1*x3*x0*x1*x2,
399398
x3^-1*x1^-1*x3*x1 >
400399
sage: G3.abelian_invariants()
@@ -406,9 +405,7 @@ def projective_fundamental_group(self):
406405
< x0, x1, x2, x3, x4 | x4^-1*x3^-1*x2^-1*x3*x4*x0*x2*x0^-1,
407406
x4^-1*x2^-1*x4*x2, x4^-1*x1^-1*x0^-1*x1*x4*x0,
408407
x4^-1*x1^-1*x0^-1*x4*x0*x1,
409-
x4^-1*x1^-1*x3*x0*x1*x3^-1*x2^-1*x4*x0^-1*x2,
410-
x3^-1*x2^-1*x1^-1*x0^-1*x3*x0*x1*x2,
411-
x3^-1*x1^-1*x3*x1 >
408+
x3^-1*x2^-1*x1^-1*x0^-1*x3*x0*x1*x2, x3^-1*x1^-1*x3*x1 >
412409
sage: G4.abelian_invariants()
413410
(0, 0, 0, 0, 0)
414411

src/sage/schemes/curves/plane_curve_arrangement.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ def fundamental_group(self, simplified=True, vertical=True,
513513
{0: [x1, x2], 1: [x0], 2: [x3], 3: [x3^-1*x2^-1*x1^-1*x0^-1]}
514514
sage: A.fundamental_group(vertical=False)
515515
Finitely presented group
516-
< x0, x1, x2 | x2^-1*x1^-1*x2*x1, x1*x0*x1^-1*x0^-1, (x0*x2)^2*(x0^-1*x2^-1)^2 >
516+
< x0, x1, x2 | x2*x1^-1*x2^-1*x1, x1*x0*x1^-1*x0^-1, (x0*x2)^2*(x0^-1*x2^-1)^2 >
517517
sage: A.meridians(vertical=False)
518518
{0: [x2, x0*x2*x0^-1], 1: [x1], 2: [x0], 3: [x0*x2^-1*x0^-1*x2^-1*x1^-1*x0^-1]}
519519
sage: G = A.fundamental_group(simplified=False, vertical=False)
@@ -834,7 +834,7 @@ def fundamental_group(self, simplified=True):
834834
sage: A.fundamental_group().sorted_presentation()
835835
Finitely presented group < x0, x1 | x1^-1*x0^-1*x1*x0 >
836836
sage: A.meridians()
837-
{0: [x1], 1: [x0], 2: [x1^-1*x0^-1*x1^-1]}
837+
{0: [x1], 1: [x0], 2: [x0^-1*x1^-2]}
838838
sage: G = A.fundamental_group(simplified=False)
839839
sage: G.sorted_presentation()
840840
Finitely presented group
@@ -945,7 +945,7 @@ def meridians(self, simplified=True):
945945
sage: A.fundamental_group().sorted_presentation()
946946
Finitely presented group < x0, x1 | x1^-1*x0^-1*x1*x0 >
947947
sage: A.meridians()
948-
{0: [x1], 1: [x0], 2: [x1^-1*x0^-1*x1^-1]}
948+
{0: [x1], 1: [x0], 2: [x0^-1*x1^-2]}
949949
sage: A = H(y^2 + x*z, z, x)
950950
sage: A.fundamental_group()
951951
Finitely presented group < x0, x1 | (x1*x0)^2*(x1^-1*x0^-1)^2 >

src/sage/schemes/curves/projective_curve.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1775,8 +1775,9 @@ def fundamental_group(self):
17751775
sage: C = P.curve(x^2*z - y^3)
17761776
sage: C.fundamental_group() # needs sirocco
17771777
Finitely presented group < x0 | x0^3 >
1778-
sage: P.curve(z*(x^2*z - y^3)).fundamental_group() # needs sirocco
1779-
Finitely presented group < x0, x1 | x1*x0*x1*x0^-1*x1^-1*x0^-1 >
1778+
sage: g = P.curve(z*(x^2*z - y^3)).fundamental_group() # needs sirocco
1779+
sage: g.sorted_presentation() # needs sirocco
1780+
Finitely presented group < x0, x1 | x1^-1*x0^-1*x1^-1*x0*x1*x0 >
17801781
17811782
In the case of number fields, they need to have an embedding
17821783
into the algebraic field::

src/sage/schemes/curves/zariski_vankampen.py

Lines changed: 43 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,7 +1416,7 @@ def conjugate_positive_form(braid):
14161416
14171417
A list of `r` lists. Each such list is another list with two elements, a
14181418
positive braid `\alpha_i` and a list of permutation braids
1419-
`\gamma_{1}^{i},\dots,\gamma_{r}^{n_i}` such that if
1419+
`\gamma_{1}^{i},\dots,\gamma_{n_i}^{i}` such that if
14201420
`\gamma_i=\prod_{j=1}^{n_i} \gamma_j^i` then the braids
14211421
`\tau_i=\gamma_i\alpha_i\gamma_i^{-1}` pairwise commute
14221422
and `\alpha=\prod_{i=1}^{r} \tau_i`.
@@ -1426,51 +1426,56 @@ def conjugate_positive_form(braid):
14261426
sage: from sage.schemes.curves.zariski_vankampen import conjugate_positive_form
14271427
sage: B = BraidGroup(4)
14281428
sage: t = B((1, 3, 2, -3, 1, 1))
1429-
sage: conjugate_positive_form(t)
1430-
[[(s1*s0)^2, [s2]]]
1429+
sage: cpf = conjugate_positive_form(t); cpf
1430+
[[(s0*s1)^2, [s0*s2*s1*s0]]]
1431+
sage: t == prod(prod(b) * a / prod(b) for a, b in cpf)
1432+
True
14311433
sage: B = BraidGroup(5)
14321434
sage: t = B((1, 2, 3, 4, -1, -2, 3, 3, 2, -4))
14331435
sage: L = conjugate_positive_form(t); L
1434-
[[s1^2, [s3*s2]], [s1*s2, [s0]]]
1435-
sage: s = B.one()
1436-
sage: for a, l in L:
1437-
....: b = prod(l)
1438-
....: s *= b * a / b
1439-
sage: s == t
1436+
[[s0^2, [s0*s1*s2*s1*s3*s2*s1*s0]], [s3*s2, [s0*s1*s2*s1*s3*s2*s1*s0]]]
1437+
sage: t == prod(prod(b) * a / prod(b) for a, b in L)
14401438
True
14411439
sage: s1 = B.gen(1)^3
14421440
sage: conjugate_positive_form(s1)
14431441
[[s1^3, []]]
14441442
"""
14451443
B = braid.parent()
14461444
d = B.strands()
1447-
braid1 = braid.super_summit_set()[0]
1448-
L1 = braid1.Tietze()
1449-
sg0 = braid.conjugating_braid(braid1)
1450-
gns = set(L1)
1451-
cuts = [j for j in range(d + 1) if j not in gns]
1452-
blocks = []
1453-
for i in range(len(cuts) - 1):
1454-
block = [j for j in L1 if cuts[i] < j < cuts[i + 1]]
1455-
if block:
1456-
blocks.append(block)
1445+
rnf = rightnormalform(braid)
1446+
ex = rnf[-1][0]
1447+
if ex >= 0:
1448+
A1 = [B(a) for a in rnf[:-1]]
1449+
braid1 = prod(A1, B.delta() ** ex)
1450+
sg0 = B.one()
1451+
else:
1452+
braid1, sg0 = braid.super_summit_set_element()
1453+
if ex > 0:
1454+
blocks = [list(braid1.Tietze())]
1455+
else:
1456+
L1 = braid1.Tietze()
1457+
gns = set(L1)
1458+
cuts = [j for j in range(d + 1) if j not in gns]
1459+
blocks = []
1460+
for i in range(len(cuts) - 1):
1461+
block = [j for j in L1 if cuts[i] < j < cuts[i + 1]]
1462+
if block:
1463+
blocks.append(block)
14571464
shorts = []
14581465
for a in blocks:
1459-
A = B(a).super_summit_set()
1460-
res = None
1461-
for tau in A:
1462-
sg = (sg0 * B(a) / sg0).conjugating_braid(tau)
1466+
if sg0 == B.one():
1467+
res0 = [B(a), []]
1468+
else:
1469+
bra = sg0 * B(a) / sg0
1470+
br1, sg = bra.super_summit_set_element()
14631471
A1 = rightnormalform(sg)
14641472
par = A1[-1][0] % 2
1465-
A1 = [B(a) for a in A1[:-1]]
1466-
b = prod(A1, B.one())
1467-
b1 = len(b.Tietze()) / (len(A1) + 1)
1468-
if res is None or b1 < res[3]:
1469-
res = [tau, A1, par, b1]
1470-
if res[2] == 1:
1471-
r0 = res[0].Tietze()
1472-
res[0] = B([i.sign() * (d - abs(i)) for i in r0])
1473-
res0 = res[:2]
1473+
A1 = [B(a0) for a0 in A1[:-1]]
1474+
res = [br1, A1, par]
1475+
if res[2]:
1476+
r0 = res[0].Tietze()
1477+
res[0] = B([d - i for i in r0])
1478+
res0 = res[:2]
14741479
shorts.append(res0)
14751480
return shorts
14761481

@@ -1596,9 +1601,10 @@ def fundamental_group_from_braid_mon(bm, degree=None,
15961601
sage: bm = [s1*s2*s0*s1*s0^-1*s1^-1*s0^-1,
15971602
....: s0*s1^2*s0*s2*s1*(s0^-1*s1^-1)^2*s0^-1,
15981603
....: (s0*s1)^2]
1599-
sage: g = fundamental_group_from_braid_mon(bm, projective=True); g # needs sirocco
1604+
sage: g = fundamental_group_from_braid_mon(bm, projective=True) # needs sirocco
1605+
sage: g.sorted_presentation() # needs sirocco
16001606
Finitely presented group
1601-
< x1, x3 | x3^2*x1^2, x1^-1*x3^-1*x1*x3^-1*x1^-1*x3^-1 >
1607+
< x0, x1 | x1^-2*x0^-2, x1^-1*(x0^-1*x1)^2*x0 >
16021608
sage: print(g.order(), g.abelian_invariants()) # needs sirocco
16031609
12 (4,)
16041610
sage: B2 = BraidGroup(2)
@@ -1697,8 +1703,8 @@ def fundamental_group(f, simplified=True, projective=False, puiseux=True):
16971703
sage: from sage.schemes.curves.zariski_vankampen import fundamental_group, braid_monodromy
16981704
sage: R.<x, y> = QQ[]
16991705
sage: f = x^2 + y^3
1700-
sage: fundamental_group(f)
1701-
Finitely presented group < x0, x1 | x0*x1^-1*x0^-1*x1^-1*x0*x1 >
1706+
sage: fundamental_group(f).sorted_presentation()
1707+
Finitely presented group < x0, x1 | x1^-1*x0^-1*x1^-1*x0*x1*x0 >
17021708
sage: fundamental_group(f, simplified=False, puiseux=False).sorted_presentation()
17031709
Finitely presented group < x0, x1, x2 | x2^-1*x1^-1*x0*x1,
17041710
x2^-1*x0*x1*x0^-1,
@@ -1859,7 +1865,7 @@ def fundamental_group_arrangement(flist, simplified=True, projective=False,
18591865
sage: G.sorted_presentation()
18601866
Finitely presented group
18611867
< x0, x1, x2, x3 | x3^-1*x2^-1*x3*x2, x3^-1*x1^-1*x0^-1*x1*x3*x0,
1862-
x3^-1*x1^-1*x3*x0*x1*x0^-1, x2^-1*x0^-1*x2*x0 >
1868+
x3^-1*x1^-1*x0^-1*x3*x0*x1, x2^-1*x0^-1*x2*x0 >
18631869
sage: dic
18641870
{0: [x1], 1: [x3], 2: [x2], 3: [x0], 4: [x3^-1*x2^-1*x1^-1*x0^-1]}
18651871
sage: fundamental_group_arrangement(L, vertical=True)

0 commit comments

Comments
 (0)