From 016cc0a2caceea46a140359568b223f6ec37aaeb Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 15 Oct 2026 13:09:11 +0200 Subject: [PATCH] Accept new plist matrix view format in tests GAP 4.17 views matrices in IsPlistMatrixRep as <2x2 plist matrix over R> instead of <2x2-matrix over R> (gap-system/gap#6686), which broke the standard tests and four manual examples. Update the expected outputs to the new format and normalise the old one via a transformFunction in SEMIGROUPS.TestRec and in the manual example runner, so the tests pass with both old and new GAP. The transform can be removed once GAP < 4.17 is no longer supported. Assisted-by: Claude Code (Opus 5.5) --- doc/maxplusmat.xml | 8 ++++---- doc/semiringmat.xml | 8 ++++---- gap/tools/utils.gi | 7 +++++++ tst/standard/elements/ffmat.tst | 2 +- tst/standard/elements/maxplusmat.tst | 18 +++++++++--------- tst/standard/elements/semiringmat.tst | 10 +++++----- tst/standard/greens/generic.tst | 2 +- 7 files changed, 31 insertions(+), 24 deletions(-) diff --git a/doc/maxplusmat.xml b/doc/maxplusmat.xml index f0e7d18d6..81c1eb37a 100644 --- a/doc/maxplusmat.xml +++ b/doc/maxplusmat.xml @@ -191,9 +191,9 @@ gap> PeriodNTPMatrix(mat); gap> mat := Matrix(Integers, [[0, 0, -1], > [0, 1, 0], > [1, 0, 0]]); -<3x3-matrix over Integers> +<3x3 plist matrix over Integers> gap> InverseOp(mat); -<3x3-matrix over Integers> +<3x3 plist matrix over Integers> gap> mat * InverseOp(mat) = One(mat); true ]]> @@ -219,14 +219,14 @@ true gap> mat := Matrix(Integers, [[0, 0, -1], > [0, 1, 0], > [1, 0, 0]]); -<3x3-matrix over Integers> +<3x3 plist matrix over Integers> gap> IsTorsion(mat); true gap> mat := Matrix(Integers, [[0, 0, -1, 0], > [0, -1, 0, 0], > [4, 4, 2, -1], > [1, 1, 0, 3]]); -<4x4-matrix over Integers> +<4x4 plist matrix over Integers> gap> IsTorsion(mat); false ]]> diff --git a/doc/semiringmat.xml b/doc/semiringmat.xml index a74cde721..b7812b338 100644 --- a/doc/semiringmat.xml +++ b/doc/semiringmat.xml @@ -90,7 +90,7 @@ gap> mat := Matrix(IsNTPMatrix, [[1, 2, 2], > [0, 2, 0], > [1, 3, 0]], 4, 5);; gap> Matrix(Integers, mat); -<3x3-matrix over Integers> +<3x3 plist matrix over Integers> gap> mat := Matrix(IsMinPlusMatrix, [[0, 1, 3], [1, 1, 6], [0, 4, 2]]);; gap> mat := AsMatrix(IsTropicalMinPlusMatrix, mat, 2); Matrix(IsTropicalMinPlusMatrix, [[0, 1, 2], [1, 1, 2], [0, 2, 2]], 2) @@ -118,7 +118,7 @@ Matrix(IsNTPMatrix, [[0, 1, 0], [1, 3, 1], [1, 0, 1]], 2, 6) gap> mat := AsMatrix(IsNTPMatrix, mat, 2, 1); Matrix(IsNTPMatrix, [[0, 1, 0], [1, 2, 1], [1, 0, 1]], 2, 1) gap> mat := Matrix(Integers, mat); -<3x3-matrix over Integers> +<3x3 plist matrix over Integers> gap> AsMatrix(IsNTPMatrix, mat, 1, 2); Matrix(IsNTPMatrix, [[0, 1, 0], [1, 2, 1], [1, 0, 1]], 1, 2)]]> @@ -351,11 +351,11 @@ Matrix(IsNTPMatrix, [[0, 0, 0], [2, 0, 1], [2, 2, 2]], 2, 1) gap> Matrix(Integers, [[-1, -2, 0], > [0, 3, -1], > [1, 0, -3]]); -<3x3-matrix over Integers> +<3x3 plist matrix over Integers> gap> Matrix(Integers, [[-1, -2, 0], > [0, 3, -1], > [1, 0, -3]]); -<3x3-matrix over Integers> +<3x3 plist matrix over Integers> ]]>