Skip to content

Commit fbd6cb0

Browse files
authored
Fix cached orbits inside orbits (#4753)
1 parent 73ace91 commit fbd6cb0

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/Groups/gsets.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ function _orbit_generic(Omega::GSetByElements{<:GAPGroup, S}, omega::S) where S
376376

377377
res = as_gset(acting_group(Omega), action_function(Omega), orb)
378378
# We know that this G-set is transitive.
379-
set_attribute!(res, :orbits => [orb])
379+
set_attribute!(res, :orbits => [res])
380380
return res
381381
end
382382
#T check whether omega lies in Omega?
@@ -409,7 +409,7 @@ function _orbit_special_GAP(Omega::GSetByElements{<:GAPGroup, S}, omega::S) wher
409409

410410
res = as_gset(acting_group(Omega), action_function(Omega), orb)
411411
# We know that this G-set is transitive.
412-
set_attribute!(res, :orbits => [orb])
412+
set_attribute!(res, :orbits => [res])
413413
return res
414414
end
415415

@@ -435,7 +435,7 @@ function orbit_via_Julia(Omega::GSet, omega)
435435

436436
res = as_gset(acting_group(Omega), action_function(Omega), orbarray)
437437
# We know that this G-set is transitive.
438-
set_attribute!(res, :orbits => [orbarray])
438+
set_attribute!(res, :orbits => [res])
439439
return res
440440
end
441441

test/Groups/gsets.jl

+3-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@
153153
# orbit
154154
G = symmetric_group(6)
155155
Omega = gset(G, permuted, [[0,1,0,1,0,1], [1,2,3,4,5,6]])
156-
@test length(orbit(Omega, [0,1,0,1,0,1])) == length(Oscar.orbit_via_Julia(Omega, [0,1,0,1,0,1]))
156+
orb = orbit(Omega, [0,1,0,1,0,1])
157+
@test length(orb) == length(Oscar.orbit_via_Julia(Omega, [0,1,0,1,0,1]))
158+
@test orbits(orb) == [orb]
157159

158160
# permutation
159161
G = symmetric_group(6)

0 commit comments

Comments
 (0)