ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 11 Jan 2019 06:45:51 -0600braid closureshttp://ask.sagemath.org/question/45011/braid-closures/ Hi! I've noticed that when taking the closure of a braid on $n$ strands, the resulting link is obtained by ignoring any "unused" strand:
B = BraidGroup(3)
print B([1]).components_in_closure(), Link(B([1])).number_of_components()
outputs 2 1, instead of 2 2.
In the documentation for the braid group I've read "The behavior of removing unused strands from an element of a braid group may change without notice in the future. Do not rely on this feature."
Is there a workaround that allows to have the same number of components in a braid and in its closure?
Note that braids given as an array of generators (as in the example above) are automatically simplified, so closing the braid [2,-2] (which should give the $2$-component unlink) produces the unknot. (In particular, the empty braid on $n$ strands should close to the $n$-component unlink.)
danieleCFri, 11 Jan 2019 06:45:51 -0600http://ask.sagemath.org/question/45011/Free/Braid groups not workinghttp://ask.sagemath.org/question/44154/freebraid-groups-not-working/Hi, I am working with SageMath 8.1, and it seems like "FreeGroup()" (and as a consequence BraidGroup() ) are not working properly. If I write in the notebook
G.<a,b,c> = FreeGroup()
I get the following:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_7.py", line 10, in <module>
exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8 -*-\\n" + _support_.preparse_worksheet_cell(base64.b64decode("Ry48YSxiLGM+ID0gRnJlZUdyb3VwKCk="),globals())+"\\n"); execfile(os.path.abspath("___code___.py"))
File "", line 1, in <module>
File "/tmp/tmpFDI_RE/___code___.py", line 2, in <module>
exec compile(u"G = FreeGroup(names=('a', 'b', 'c',)); (a, b, c,) = G._first_ngens(3)" + '\n', '', 'single')
File "", line 1, in <module>
File "sage/misc/lazy_import.pyx", line 388, in sage.misc.lazy_import.LazyImport.__call__ (build/cythonized/sage/misc/lazy_import.c:4118)
File "/usr/lib/python2.7/dist-packages/sage/groups/free_group.py", line 648, in FreeGroup
return FreeGroup_class(names)
File "sage/misc/classcall_metaclass.pyx", line 330, in sage.misc.classcall_metaclass.ClasscallMetaclass.__call__ (build/cythonized/sage/misc/classcall_metaclass.c:1481)
File "sage/misc/cachefunc.pyx", line 1059, in sage.misc.cachefunc.CachedFunction.__call__ (build/cythonized/sage/misc/cachefunc.c:6162)
File "/usr/lib/python2.7/dist-packages/sage/structure/unique_representation.py", line 1021, in __classcall__
instance = typecall(cls, *args, **options)
File "sage/misc/classcall_metaclass.pyx", line 497, in sage.misc.classcall_metaclass.typecall (build/cythonized/sage/misc/classcall_metaclass.c:1931)
File "/usr/lib/python2.7/dist-packages/sage/groups/free_group.py", line 736, in __init__
libgap_free_group = libgap.FreeGroup(generator_names)
File "sage/libs/gap/element.pyx", line 2213, in sage.libs.gap.element.GapElement_Function.__call__ (build/cythonized/sage/libs/gap/element.c:17671)
ValueError: libGAP: Error, FreeGroup: function is not yet defined
Am I doing something wrong? Thanks!danieleCFri, 02 Nov 2018 06:05:55 -0500http://ask.sagemath.org/question/44154/problems with gauss code for knotshttp://ask.sagemath.org/question/41763/problems-with-gauss-code-for-knots/I am generating Gauss-codes for knots, and I would like to compute some of their invariants (e.g. knot polynomials).
However, I am running in some problems. For example:
A = Link([[[1, 2, -2, -1, -3, -4, 4, 3]], [1, 1, 1, 1]])
Is recognized as a knot (I can compute the fundamental group, the writhe and the Seifert circles, and tell if it is alternating), but If I try to compute the Alexander polynomial:
A.alexander_polynomial()
I get the following error:
ValueError ... Traceback (most recent call last)
in ()
1 A = Link([[[Integer(1),Integer(2),-Integer(2),-Integer(1),-Integer(3),-Integer(4),Integer(4),Integer(3)]],[Integer(1),Integer(1),Integer(1),Integer(1)]])
----> 2 A.alexander_polynomial()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in alexander_polynomial(self, var)
1792 R = LaurentPolynomialRing(ZZ, var)
1793 # The Alexander polynomial of disjoint links are defined to be 0
-> 1794 if len(self._braid_word_components()) > 1:
1795 return R.zero()
1796 t = R.gen()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in _braid_word_components(self)
1445 ([-2, 1, 1], [4, 4], [6])
1446 """
-> 1447 ml = list(self.braid().Tietze())
1448 if not ml:
1449 return tuple()
/path/to/sagedir/local/lib/python2.7/site-packages/sage/knots/link.pyc in braid(self)
666 C1 = newPD[newPD.index(heads[-a])]
667 C1[C1.index(-a)] = newedge + 1
--> 668 C2 = newPD[newPD.index(tails[-b])]
669 C2[C2.index(-b)] = newedge + 2
670 newPD.append([newedge + 2, newedge, newedge + 3, newedge + 1])
ValueError: [5, 8, 6, 1] is not in list
----------------------------------------
I think the problem is in the translation from Gauss code to an element in the braid group. Moreover, I get similar errors with other examples, also with really simple ones. Any idea on how to solve this? Thanks in Advance!brbMon, 26 Mar 2018 07:33:03 -0500http://ask.sagemath.org/question/41763/different results for Alexander polynomialshttp://ask.sagemath.org/question/39416/different-results-for-alexander-polynomials/ Hi! I just noticed that if one computes the Alexander polynomial of a knot, one gets different results according to whether the knot is presented as the closure of a braid or as a knot:
t = var('t')
B = BraidGroup(2)
b = B([1,1,1])
knot = Knot(b)
print b.alexander_polynomial()
print knot.alexander_polynomial()
Output: t^-2 - t^-1 + 1
t^-1 - 1 + t
Of course the polynomials differ only by a t^n multiplication, but I guess it would be better if the two coincided right away. My question is: is this issue going to be solved in the future? (I can live happily either way, just wanted to avoid modifying some stuff I'm working on!)
Thanks!
danieleCTue, 07 Nov 2017 05:00:18 -0600http://ask.sagemath.org/question/39416/