From 0afac326a19464b60ecab42203eebae0594165fe Mon Sep 17 00:00:00 2001 From: Friedrich Rober <37139927+FriedrichRober@users.noreply.github.com> Date: Thu, 19 Sep 2024 17:27:11 +0200 Subject: [PATCH 1/5] FIX: WreathProductElementList Replace `StructuralCopy` with `ShallowCopy`. Otherwise the list representation from the input gets replaced with the wreath product element outside of the scope. --- lib/gprd.gi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gprd.gi b/lib/gprd.gi index 359cedfec5..e32bf13af7 100644 --- a/lib/gprd.gi +++ b/lib/gprd.gi @@ -959,7 +959,7 @@ end); InstallMethod( WreathProductElementListNC, "generic wreath product", true, [ HasWreathProductInfo, IsList ], 0, function(G, list) - return Objectify(FamilyObj(One(G))!.defaultType, StructuralCopy(list)); + return Objectify(FamilyObj(One(G))!.defaultType, ShallowCopy(list)); end); ############################################################################# From 709433ddf56588cfad85b9b5ee83db39a2d36349 Mon Sep 17 00:00:00 2001 From: Friedrich Rober <37139927+FriedrichRober@users.noreply.github.com> Date: Fri, 20 Sep 2024 12:14:35 +0200 Subject: [PATCH 2/5] FIX: WreathProductElementList Add a test file for the bugfix --- tst/testinstall/opers/ListWreathProductElement.tst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tst/testinstall/opers/ListWreathProductElement.tst b/tst/testinstall/opers/ListWreathProductElement.tst index f8f40c5c32..31be0c5974 100644 --- a/tst/testinstall/opers/ListWreathProductElement.tst +++ b/tst/testinstall/opers/ListWreathProductElement.tst @@ -241,5 +241,19 @@ gap> list := ListWreathProductElement(G, x);; gap> x = WreathProductElementList(G, list); true +# +# Generic Wreath Product : Bugfix for immutable lists +# + +gap> K := FreeGroup("x", "y");; +gap> AssignGeneratorVariables(K);; +gap> H := SymmetricGroup(3);; +gap> W := WreathProduct(K, H);; +gap> l := [x*y, x, y, (1,2,3)];; +gap> MakeImmutable(l);; +gap> w := WreathProductElementList(W, l);; +gap> l = [x*y, x, y, (1,2,3)]; # was previously l = w +true + # gap> STOP_TEST("ListWreathProductElement.tst", 1); From 35a7d215c0841b25ba6962f4b8ce6caec2d90abf Mon Sep 17 00:00:00 2001 From: Friedrich Rober <37139927+FriedrichRober@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:07:00 +0200 Subject: [PATCH 3/5] FIX: WreathProductElementList tests --- tst/testinstall/opers/ListWreathProductElement.tst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tst/testinstall/opers/ListWreathProductElement.tst b/tst/testinstall/opers/ListWreathProductElement.tst index 31be0c5974..7815d72c28 100644 --- a/tst/testinstall/opers/ListWreathProductElement.tst +++ b/tst/testinstall/opers/ListWreathProductElement.tst @@ -246,7 +246,8 @@ true # gap> K := FreeGroup("x", "y");; -gap> AssignGeneratorVariables(K);; +gap> x := K.1;; +gap> y := K.2;; gap> H := SymmetricGroup(3);; gap> W := WreathProduct(K, H);; gap> l := [x*y, x, y, (1,2,3)];; From 1db5abe2057f1ca33c8ebfc786c41fa28c1e7ea4 Mon Sep 17 00:00:00 2001 From: Friedrich Rober <37139927+FriedrichRober@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:40:39 +0200 Subject: [PATCH 4/5] FIX: WreathProductElementList tests --- tst/testinstall/opers/ListWreathProductElement.tst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tst/testinstall/opers/ListWreathProductElement.tst b/tst/testinstall/opers/ListWreathProductElement.tst index 7815d72c28..0d9a5afe5b 100644 --- a/tst/testinstall/opers/ListWreathProductElement.tst +++ b/tst/testinstall/opers/ListWreathProductElement.tst @@ -253,7 +253,7 @@ gap> W := WreathProduct(K, H);; gap> l := [x*y, x, y, (1,2,3)];; gap> MakeImmutable(l);; gap> w := WreathProductElementList(W, l);; -gap> l = [x*y, x, y, (1,2,3)]; # was previously l = w +gap> l = [x*y, x, y, (1,2,3)]; true # From 6fa658927a819cf7514b768ff76154c9add7d764 Mon Sep 17 00:00:00 2001 From: Friedrich Rober <37139927+FriedrichRober@users.noreply.github.com> Date: Fri, 20 Sep 2024 16:48:48 +0200 Subject: [PATCH 5/5] FIX: WreathProductElementList tests --- tst/testinstall/opers/ListWreathProductElement.tst | 1 + 1 file changed, 1 insertion(+) diff --git a/tst/testinstall/opers/ListWreathProductElement.tst b/tst/testinstall/opers/ListWreathProductElement.tst index 0d9a5afe5b..f91332747a 100644 --- a/tst/testinstall/opers/ListWreathProductElement.tst +++ b/tst/testinstall/opers/ListWreathProductElement.tst @@ -245,6 +245,7 @@ true # Generic Wreath Product : Bugfix for immutable lists # +# gap> K := FreeGroup("x", "y");; gap> x := K.1;; gap> y := K.2;;