@@ -165,7 +165,6 @@ class GroupMorphismWithGensImages(SetMorphism):
165
165
Defn: x0 |--> ()
166
166
x1 |--> ()
167
167
x2 |--> ()
168
-
169
168
"""
170
169
171
170
def _repr_defn (self ):
@@ -476,7 +475,6 @@ class RewritingSystem():
476
475
477
476
- Miguel Angel Marco Buzunariz (2013-12-16)
478
477
"""
479
-
480
478
def __init__ (self , G ):
481
479
"""
482
480
Initialize ``self``.
@@ -1355,14 +1353,13 @@ def abelian_invariants(self):
1355
1353
invariants = self .gap ().AbelianInvariants ()
1356
1354
return tuple (i .sage () for i in invariants )
1357
1355
1358
-
1359
1356
def abelianization_map (self ):
1360
1357
r"""
1361
1358
Return the abelianization map of ``self``.
1362
1359
1363
1360
OUTPUT:
1364
1361
1365
- The abelianization map of ``self`` as a homomorphism of finitely presented groups.
1362
+ The abelianization map of ``self`` as a homomorphism of finitely presented groups.
1366
1363
1367
1364
EXAMPLES::
1368
1365
@@ -1373,11 +1370,11 @@ def abelianization_map(self):
1373
1370
Group morphism:
1374
1371
From: Finitely presented group < g0, g1, g2, g3 | g1^2, g2*g1*g2^-1*g1^-1, g1*g3^-2, g0^4 >
1375
1372
To: Finitely presented group < f2, f3, f4 | f2^-1*f3^-1*f2*f3, f2^-1*f4^-1*f2*f4, f3^-1*f4^-1*f3*f4, f2^4, f3^4 >
1376
- sage: g= FreeGroup(0)/ []
1373
+ sage: g = FreeGroup(0) / []
1377
1374
sage: g.abelianization_map()
1378
1375
Group endomorphism of Finitely presented group < | >
1379
1376
"""
1380
- if len ( self .generators ()) == 0 :
1377
+ if not self .generators ():
1381
1378
return self .hom (codomain = self , im_gens = [])
1382
1379
hom_ab_libgap = libgap (self ).MaximalAbelianQuotient ()
1383
1380
ab_libgap = hom_ab_libgap .Range ()
@@ -1408,12 +1405,9 @@ def abelianization_to_algebra(self, ring=QQ):
1408
1405
1409
1406
- ``ab`` -- the abelianization of ``self`` as a finitely presented group
1410
1407
with a minimal number `n` of generators.
1411
-
1412
1408
- ``R`` -- a Laurent polynomial ring with `n` variables with base ring ``ring``.
1413
-
1414
1409
- ``ideal`` -- a list of generators of an ideal ``I`` in ``R`` such that ``R/I``
1415
1410
is the group algebra of the abelianization over ``ring``
1416
-
1417
1411
- ``image`` -- a list with the images of the generators of ``self`` in ``R/I``
1418
1412
1419
1413
EXAMPLES::
@@ -1427,11 +1421,11 @@ def abelianization_to_algebra(self, ring=QQ):
1427
1421
f3^-1*f4^-1*f3*f4, f2^4, f3^4 >,
1428
1422
Multivariate Laurent Polynomial Ring in f2, f3, f4 over Rational Field,
1429
1423
[f2^4 - 1, f3^4 - 1], [f2^-1*f3^-2, f3^-2, f4, f3])
1430
- sage: g=FreeGroup(0)/ []
1424
+ sage: g=FreeGroup(0) / []
1431
1425
sage: g.abelianization_to_algebra()
1432
1426
(Finitely presented group < | >, Rational Field, [], [])
1433
1427
"""
1434
- if len ( self .generators ()) == 0 :
1428
+ if not self .generators ():
1435
1429
return self , ring , [], []
1436
1430
hom_ab = self .abelianization_map ()
1437
1431
ab = hom_ab .codomain ()
@@ -1657,37 +1651,34 @@ def abelian_alexander_matrix(self, ring=QQ, abelianized=None, simplified=True):
1657
1651
OUTPUT:
1658
1652
1659
1653
- ``A`` -- a matrix with coefficients in ``R``
1660
-
1661
- - ``R`` -- a ring of Laurent polynomials over ``ring``
1662
-
1663
- - ``ideal`` -- an list of generators of an ideal ``I`` of ``R`` such that ``R/I`` is
1654
+ - ``ideal`` -- an list of generators of an ideal ``I`` of ``R = A.base_ring()`` such that ``R/I`` is
1664
1655
the group algebra of the abelianization of ``self``
1665
1656
1666
1657
EXAMPLES::
1667
1658
1668
1659
sage: G.<a,b,c> = FreeGroup()
1669
1660
sage: H = G.quotient([a*b/a/b, a*c/a/c, c*b/c/b])
1670
- sage: A, R, ideal = H.abelian_alexander_matrix()
1661
+ sage: A, ideal = H.abelian_alexander_matrix()
1671
1662
sage: A
1672
1663
[-f2 + 1 f1 - 1 0]
1673
1664
[-f3 + 1 0 f1 - 1]
1674
1665
[ 0 f3 - 1 -f2 + 1]
1675
- sage: R
1666
+ sage: A.base_ring()
1676
1667
Multivariate Laurent Polynomial Ring in f1, f2, f3 over Rational Field
1677
1668
sage: ideal
1678
1669
[]
1679
1670
sage: abel = H.abelianization_to_algebra()
1680
- sage: (A, R, ideal) == H.abelian_alexander_matrix(abelianized=abel)
1671
+ sage: (A, ideal) == H.abelian_alexander_matrix(abelianized=abel)
1681
1672
True
1682
- sage: G= FreeGroup(3)/[(2,1, 1), (1,2,2,3, 3)]
1683
- sage: A, R, ideal = G.abelian_alexander_matrix(simplified=True); A
1673
+ sage: G = FreeGroup(3)/[(2, 1, 1), (1, 2, 2, 3, 3)]
1674
+ sage: A, ideal = G.abelian_alexander_matrix(simplified=True); A
1684
1675
[-f3^2 - f3^4 - f3^6 f3^3 + f3^6]
1685
- sage: g= FreeGroup(1)/ []
1676
+ sage: g = FreeGroup(1) / []
1686
1677
sage: g.abelian_alexander_matrix()
1687
- ([], Integer Ring, [])
1688
- sage: g= FreeGroup(0)/ []
1678
+ ([], [])
1679
+ sage: g = FreeGroup(0) / []
1689
1680
sage: g.abelian_alexander_matrix()
1690
- ([], Integer Ring, [])
1681
+ ([], [])
1691
1682
"""
1692
1683
if abelianized is None :
1693
1684
ab , R , ideal , images = self .abelianization_to_algebra (ring = ring )
@@ -1696,9 +1687,8 @@ def abelian_alexander_matrix(self, ring=QQ, abelianized=None, simplified=True):
1696
1687
A = self .alexander_matrix (im_gens = images )
1697
1688
if simplified :
1698
1689
n , m = A .dimensions ()
1699
- R = A .base_ring ()
1700
- if 0 in (n , m ):
1701
- return A , R , ideal
1690
+ if n == 0 or m == 0 :
1691
+ return A , ideal
1702
1692
simpli = True
1703
1693
while simpli :
1704
1694
i = 0
@@ -1721,9 +1711,9 @@ def abelian_alexander_matrix(self, ring=QQ, abelianized=None, simplified=True):
1721
1711
i += 1
1722
1712
j = 0
1723
1713
simpli = unidad
1724
- return A , R , ideal
1714
+ return A , ideal
1725
1715
1726
- def char_var (self , ring = QQ , matrix_ideal = None , abelianized = None , groebner = False ):
1716
+ def characteristic_varieties (self , ring = QQ , matrix_ideal = None , abelianized = None , groebner = False ):
1727
1717
r"""
1728
1718
Return the characteristic varieties of the group ``self``.
1729
1719
@@ -1736,7 +1726,7 @@ def char_var(self, ring=QQ, matrix_ideal=None, abelianized=None, groebner=False)
1736
1726
1737
1727
V_k(G) = \{\xi\in\mathbb{T}\mid \dim H^1(G;\xi)\geq k\}.
1738
1728
1739
- These varieties are defined by ideals in `\Lambda`
1729
+ These varieties are defined by ideals in `\Lambda`.
1740
1730
1741
1731
INPUT:
1742
1732
@@ -1757,7 +1747,7 @@ def char_var(self, ring=QQ, matrix_ideal=None, abelianized=None, groebner=False)
1757
1747
1758
1748
sage: L = [2*(i, j) + 2* (-i, -j) for i, j in ((1, 2), (2, 3), (3, 1))]
1759
1749
sage: G = FreeGroup(3) / L
1760
- sage: G.char_var (groebner=True)
1750
+ sage: G.characteristic_varieties (groebner=True)
1761
1751
[[(f1 - 1, f2 - 1, f3 - 1),
1762
1752
(f1 + 1, f2 - 1, f3 - 1),
1763
1753
(f1 - 1, f2 - 1, f3 + 1),
@@ -1770,25 +1760,25 @@ def char_var(self, ring=QQ, matrix_ideal=None, abelianized=None, groebner=False)
1770
1760
(f2*f3 + 1, f1 - f2),
1771
1761
(f2*f3 + 1, f1 - f3),
1772
1762
(f1*f3 + 1, f2 - f3)]]
1773
- sage: A, R, I = G.abelian_alexander_matrix()
1774
- sage: G.char_var (groebner=True) == G.char_var (groebner=True, matrix_ideal=(A, I))
1763
+ sage: A, I = G.abelian_alexander_matrix()
1764
+ sage: G.characteristic_varieties (groebner=True) == G.characteristic_varieties (groebner=True, matrix_ideal=(A, I))
1775
1765
True
1776
1766
sage: G = FreeGroup(2)/[2*(1,2,-1,-2)]
1777
- sage: G.char_var ()
1767
+ sage: G.characteristic_varieties ()
1778
1768
[Ideal (-2*f2 + 2, 2*f1 - 2) of Multivariate Laurent Polynomial Ring in f1, f2 over Rational Field]
1779
- sage: G.char_var (ring=ZZ)
1769
+ sage: G.characteristic_varieties (ring=ZZ)
1780
1770
[Ideal (-2*f2 + 2, 2*f1 - 2) of Multivariate Laurent Polynomial Ring in f1, f2 over Integer Ring]
1781
1771
sage: G = FreeGroup(2)/[(1,2,1,-2,-1,-2)]
1782
- sage: G.char_var ()
1772
+ sage: G.characteristic_varieties ()
1783
1773
[Ideal (1 - f2 + f2^2, -1 + f2 - f2^2) of Univariate Laurent Polynomial Ring in f2 over Rational Field]
1784
- sage: G.char_var (groebner=True)
1774
+ sage: G.characteristic_varieties (groebner=True)
1785
1775
[[1 - f2 + f2^2]]
1786
1776
"""
1787
1777
if matrix_ideal is None :
1788
- A , R , ideal = self .abelian_alexander_matrix (ring = ring , abelianized = abelianized , simplified = True )
1778
+ A , ideal = self .abelian_alexander_matrix (ring = ring , abelianized = abelianized , simplified = True )
1789
1779
else :
1790
1780
A , ideal = matrix_ideal
1791
- R = A .base_ring ()
1781
+ R = A .base_ring ()
1792
1782
res = []
1793
1783
S = R .polynomial_ring ()
1794
1784
ideal = [S (elt ) for elt in ideal ]
@@ -1806,7 +1796,7 @@ def char_var(self, ring=QQ, matrix_ideal=None, abelianized=None, groebner=False)
1806
1796
res1 .append ([R (0 )])
1807
1797
else :
1808
1798
fct = [q [0 ] for q in R (p ).factor ()]
1809
- if len ( fct ) > 0 :
1799
+ if fct :
1810
1800
res1 .append (fct )
1811
1801
return res1
1812
1802
res1 = []
0 commit comments