diff --git a/src/sage/matroids/chow_ring.py b/src/sage/matroids/chow_ring.py index 92e48f7147f..c8cd5eaa954 100644 --- a/src/sage/matroids/chow_ring.py +++ b/src/sage/matroids/chow_ring.py @@ -171,25 +171,25 @@ def basis(self): sage: ch = matroids.Uniform(3, 6).chow_ring(QQ, True, 'fy') sage: ch.basis() - Family (1, B1, B1*B012345, B0, B0*B012345, B01, B01^2, B2, - B2*B012345, B02, B02^2, B12, B12^2, B3, B3*B012345, B03, B03^2, - B13, B13^2, B23, B23^2, B4, B4*B012345, B04, B04^2, B14, B14^2, - B24, B24^2, B34, B34^2, B5, B5*B012345, B05, B05^2, B15, B15^2, - B25, B25^2, B35, B35^2, B45, B45^2, B012345, B012345^2, B012345^3) + Family (1, B0, B0*B012345, B1, B1*B012345, B01, B01^2, B2, + B2*B012345, B12, B12^2, B02, B02^2, B3, B3*B012345, B23, B23^2, + B13, B13^2, B03, B03^2, B4, B4*B012345, B34, B34^2, B24, B24^2, + B14, B14^2, B04, B04^2, B5, B5*B012345, B45, B45^2, B35, B35^2, + B25, B25^2, B15, B15^2, B05, B05^2, B012345, B012345^2, B012345^3) sage: set(ch.defining_ideal().normal_basis()) == set(ch.basis()) True sage: ch = matroids.catalog.Fano().chow_ring(QQ, False) sage: ch.basis() - Family (1, Abcd, Aace, Aabf, Adef, Aadg, Abeg, Acfg, Aabcdefg, - Aabcdefg^2) + Family (1, Abcd, Aace, Adef, Aabf, Acfg, Abeg, Aadg, Aabcdefg, + Aabcdefg^2) sage: set(ch.defining_ideal().normal_basis()) == set(ch.basis()) True sage: ch = matroids.Wheel(3).chow_ring(QQ, True, 'atom-free') sage: ch.basis() - Family (1, A0, A0*A012345, A2, A2*A012345, A3, A3*A012345, A23, - A23^2, A1, A1*A012345, A013, A013^2, A4, A4*A012345, A04, A04^2, - A124, A124^2, A5, A5*A012345, A025, A025^2, A15, A15^2, A345, - A345^2, A012345, A012345^2, A012345^3) + Family (1, A0, A0*A012345, A1, A1*A012345, A2, A2*A012345, A3, + A3*A012345, A23, A23^2, A013, A013^2, A4, A4*A012345, A124, A124^2, + A04, A04^2, A5, A5*A012345, A345, A345^2, A15, A15^2, A025, A025^2, + A012345, A012345^2, A012345^3) sage: set(ch.defining_ideal().normal_basis()) == set(ch.basis()) True """ @@ -208,7 +208,7 @@ def to_vector(self, order=None): sage: v = ch.an_element(); v -A01 - A02 - A03 - A04 - A05 - A012345 sage: v.to_vector() - (0, -1, -1, 0, -1, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0) + (0, -1, 0, -1, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, -1, -1, 0) """ P = self.parent() B = P.basis() @@ -249,20 +249,20 @@ def degree(self): ....: print(b, b.degree()) 1 0 A01 1 - A02 1 A12 1 - A03 1 - A13 1 + A02 1 A23 1 - A04 1 - A14 1 - A24 1 + A13 1 + A03 1 A34 1 - A05 1 - A15 1 - A25 1 - A35 1 + A24 1 + A14 1 + A04 1 A45 1 + A35 1 + A25 1 + A15 1 + A05 1 A012345 1 A012345^2 2 sage: v = sum(ch.basis()) @@ -298,18 +298,18 @@ def homogeneous_degree(self): Bace^2 2 Bf 1 Bf*Babcdefg 2 - Babf 1 - Babf^2 2 Bdef 1 Bdef^2 2 + Babf 1 + Babf^2 2 Bg 1 Bg*Babcdefg 2 - Badg 1 - Badg^2 2 - Bbeg 1 - Bbeg^2 2 Bcfg 1 Bcfg^2 2 + Bbeg 1 + Bbeg^2 2 + Badg 1 + Badg^2 2 Babcdefg 1 Babcdefg^2 2 Babcdefg^3 3 diff --git a/src/sage/matroids/chow_ring_ideal.py b/src/sage/matroids/chow_ring_ideal.py index 8c067432b33..3cabc4e7629 100644 --- a/src/sage/matroids/chow_ring_ideal.py +++ b/src/sage/matroids/chow_ring_ideal.py @@ -262,14 +262,15 @@ def normal_basis(self, algorithm='', *args, **kwargs): sage: ch = matroids.Z(3).chow_ring(QQ, False) sage: I = ch.defining_ideal() sage: I.normal_basis() - [1, Ax2x3y1, Ax1x3y2, Ax1x2y3, Ay1y2y3, Atx1y1, Atx2y2, Atx3y3, Atx1x2x3y1y2y3, Atx1x2x3y1y2y3^2] + [1, Ax2x3y1, Ax1x3y2, Ay1y2y3, Ax1x2y3, Atx3y3, Atx2y2, Atx1y1, + Atx1x2x3y1y2y3, Atx1x2x3y1y2y3^2] sage: set(I.gens().ideal().normal_basis()) == set(I.normal_basis()) True sage: ch = matroids.AG(2,3).chow_ring(QQ, False) sage: I = ch.defining_ideal() sage: I.normal_basis() - [1, A012, A236, A046, A156, A345, A247, A057, A137, A258, A678, - A038, A148, A012345678, A012345678^2] + [1, A012, A345, A236, A156, A046, A247, A137, A057, A678, A258, + A148, A038, A012345678, A012345678^2] sage: set(I.gens().ideal().normal_basis()) == set(I.normal_basis()) True """