In case you just want a permutation action of W on the cosets of G, you can 
avoid dealing with cosets all together.
sage: f=libgap(W).FactorCosetAction(libgap(G)).Image()
sage: f.OrbitLength(1)
138240

In fact, libgap(W).FactorCosetAction(libgap(G)) is a proper group 
homomorphism, so you can go back and forth between W and f.
If you explain what you wanted  to do with your coset representatives, I 
can say more...

Dima

On Thursday, February 5, 2026 at 6:15:17 AM UTC-6 [email protected] 
wrote:

> Hmm I have to retract this last post.Using 
>
> for i in range(0, len(R)):
>   w = W(R[i])
>
> still triggers the bug.
>
> Best,
> Michel
>
>
>
>
>
>
>
>
>
> On Thursday, February 5, 2026 at 12:57:16 PM UTC+1 Michel VAN DEN BERGH 
> wrote:
>
>> On Thursday, February 5, 2026 at 12:15:21 PM UTC+1  wrote:
>>
>> As a workaround, I think that explicitly converting the gap list returned 
>> by libgap.RightTransversal(W, G) into a python list helps.  I.e.,
>>
>> list(libgap.RightTransversal(W, G))
>>
>> Martin
>>
>>
>> I use this initially also for G=trivial (basically I am trying to 
>> incrementally build the stabilizer of something by iterating over the 
>> cosets of a stabilizing group already found) so constructing a list  of 
>> which only a small part will be consumed is a bit inconvenient. However 
>> your issue suggests to use
>>
>> for i in range(0, len(R)):
>>   w = W(R[i])
>>
>> This seems to work perfectly!
>>
>> I must say that I am mildly surprised that this works. I was guessing 
>> that the coset representatives would be found on the fly in some way.
>>
>> In any case: thanks for investigating and filing the issue!
>>
>> Best,
>> Michel
>>
>>
>> On Thursday, 5 February 2026 at 11:16:52 UTC+1 Martin R wrote:
>>
>> That's a huge example.
>>
>> sage: len(libgap.RightTransversal(W, G))
>> 138240
>>
>> I think it is a gap bug, I am checking right now.
>>
>>
>> On Thursday, 5 February 2026 at 07:46:47 UTC+1 wrote:
>>
>> > This is very strange code - you are attempting to change the variable 
>> of a loop inside a loop. 
>> >
>> > What do you mean to do here? 
>> >
>> > Dima
>>
>> Well that's not the point. Writing v=W(w) gives the same bug...
>>
>> Best,
>> Michel
>>
>> PS. This was just some quick test code, but this being said, I think 
>> assigning to a loop variable is fine. This does not influence the state of 
>> the iterator. A quick test confirms this.
>>
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/sage-support/7a342148-73e5-4bf4-861c-9ccc35e79929n%40googlegroups.com.

Reply via email to