From 69f3ac3a41db504d24c77361a2bc6220f922608c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Fri, 21 Mar 2025 15:36:29 +0100 Subject: [PATCH 1/2] Fix cached orbits inside orbits --- src/Groups/gsets.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Groups/gsets.jl b/src/Groups/gsets.jl index a58919a7e2fa..c1e299faa8ce 100644 --- a/src/Groups/gsets.jl +++ b/src/Groups/gsets.jl @@ -376,7 +376,7 @@ function _orbit_generic(Omega::GSetByElements{<:GAPGroup, S}, omega::S) where S res = as_gset(acting_group(Omega), action_function(Omega), orb) # We know that this G-set is transitive. - set_attribute!(res, :orbits => [orb]) + set_attribute!(res, :orbits => [res]) return res end #T check whether omega lies in Omega? @@ -409,7 +409,7 @@ function _orbit_special_GAP(Omega::GSetByElements{<:GAPGroup, S}, omega::S) wher res = as_gset(acting_group(Omega), action_function(Omega), orb) # We know that this G-set is transitive. - set_attribute!(res, :orbits => [orb]) + set_attribute!(res, :orbits => [res]) return res end @@ -435,7 +435,7 @@ function orbit_via_Julia(Omega::GSet, omega) res = as_gset(acting_group(Omega), action_function(Omega), orbarray) # We know that this G-set is transitive. - set_attribute!(res, :orbits => [orbarray]) + set_attribute!(res, :orbits => [res]) return res end From 3076dc65325a866646e7b76ea20815f61bc2f804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20G=C3=B6ttgens?= Date: Fri, 21 Mar 2025 15:38:07 +0100 Subject: [PATCH 2/2] Add test --- test/Groups/gsets.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/Groups/gsets.jl b/test/Groups/gsets.jl index ff8f5f422ee1..ccdab8fe2492 100644 --- a/test/Groups/gsets.jl +++ b/test/Groups/gsets.jl @@ -153,7 +153,9 @@ # orbit G = symmetric_group(6) Omega = gset(G, permuted, [[0,1,0,1,0,1], [1,2,3,4,5,6]]) - @test length(orbit(Omega, [0,1,0,1,0,1])) == length(Oscar.orbit_via_Julia(Omega, [0,1,0,1,0,1])) + orb = orbit(Omega, [0,1,0,1,0,1]) + @test length(orb) == length(Oscar.orbit_via_Julia(Omega, [0,1,0,1,0,1])) + @test orbits(orb) == [orb] # permutation G = symmetric_group(6)