# Ticket #15505: 15505_braid_rels.patch

File 15505_braid_rels.patch, 4.4 KB (added by mmarco, 8 years ago)
• ## sage/groups/braid.py

# HG changeset patch
# User Miguel Angel Marco Buzunariz <mmarco@unizar.es>
# Date 1386682613 28800
# Node ID cda8b4495ef90f3d8467f7013e8a826ec3d99c93
# Parent  ce0e25f19b062aa1086922719677996914d1107a
Add missing relations to braid group

diff --git a/sage/groups/braid.py b/sage/groups/braid.py
 a nfself = map(lambda i: i.Tietze(), self.left_normal_form()) nfother = map(lambda i: i.Tietze(), other.left_normal_form()) return cmp(nfself, nfother) def _latex_(self): """ Return a LaTeX representation The Burau matrix of the braid. It is a matrix whose entries are Laurent polynomials in the variable var. EXAMPLES:: sage: B = BraidGroup(4) OUTPUT: The matrix corresponding to the Lawence-Krammer-Bigelow representation of the braid. EXAMPLES:: sage: B = BraidGroup(3) P = self.parent() return tuple( [P._permutation_braid(delta).__pow__(a)] + map(lambda i:P._permutation_braid(i), l) ) def _left_normal_form_perm_(self): """ Return the left normal form of the braid, in permutation form. sage: B1 = BraidGroup(5) # indirect doctest sage: B1 Braid group on 5 strands Check that :trac:14081 is fixed:: sage: BraidGroup(2) Braid group on 2 strands sage: BraidGroup(('a',)) Braid group on 2 strands Check that :trac:15505 is fixed:: sage: B=BraidGroup(4) sage: B.relations() (s0*s1*s0*s1^-1*s0^-1*s1^-1, s0*s2*s0^-1*s2^-1, s1*s2*s1*s2^-1*s1^-1*s2^-1) sage: B=BraidGroup('a,b,c,d,e,f') sage: B.relations() (a*b*a*b^-1*a^-1*b^-1, a*c*a^-1*c^-1, a*d*a^-1*d^-1, a*e*a^-1*e^-1, a*f*a^-1*f^-1, b*c*b*c^-1*b^-1*c^-1, b*d*b^-1*d^-1, b*e*b^-1*e^-1, b*f*b^-1*f^-1, c*d*c*d^-1*c^-1*d^-1, c*e*c^-1*e^-1, c*f*c^-1*f^-1, d*e*d*e^-1*d^-1*e^-1, d*f*d^-1*f^-1, e*f*e*f^-1*e^-1*f^-1) """ n = len(names) if n<1: #n is the number of generators, not the number of strands (see ticket 14081) raise ValueError("the number of strands must be an integer bigger than one") free_group = FreeGroup(names) rels = [] for i in range(1, n): if i = BraidGroup(4) sage: F. = FreeGroup(4) sage: x0 * s1 """ import operator Action.__init__(self, G, M, is_left, operator.mul) def _call_(self, x, b): """ Return the action of b on x.