Strange bug connected to GAP as a backend

30 views
Skip to first unread message

Peter Mueller

unread,
Nov 21, 2022, 3:59:00 AM11/21/22
to sage-devel
The following lines do what is to be expected:

sage: g = SymmetricGroup(3)
....: u = g.subgroup([])
....: x1 = u.trivial_character().induct(g)
....: dummy = g.conjugacy_classes_subgroups()
....: x2 = u.trivial_character().induct(g)
....: print(x1 == x2)
....: print(x1.scalar_product(x1))
....: print(x2.scalar_product(x2))
True
6
6

However

sage: print(x1.scalar_product(x2))

raises a traceback. It seems that calling "g.conjugacy_classes_subgroups()" before creating x2, even though completely unrelated, messes something up internally.

This is well reproducible, as it happens with versions 9.7,  9.8.beta3, and also on the SageCell.

-- Peter Müller

(Remark: I reported a variant of this behavior previously at https://groups.google.com/g/sage-support/c/N4mAcl_fGCE.)

Dima Pasechnik

unread,
Nov 21, 2022, 7:36:30 AM11/21/22
to sage-...@googlegroups.com
These pexpect-based GAP classed in Sage are a mess.
The only reason they are still there is that few things are actually
implemented in Cython, avoiding GAP,
and they are somehow faster (while many things are much slower)...
(one needs to update https://trac.sagemath.org/ticket/26902 here)

Anyhow, GAP (and libgap) seem to be fine, and you can do essentially
the same using libgap:

sage: g = libgap.SymmetricGroup(3)
sage: u = g.TrivialSubgroup()
sage: x1 = libgap.InducedClassFunction(u.TrivialCharacter(),g); x1
Character( CharacterTable( Sym( [ 1 .. 3 ] ) ), [ 6, 0, 0 ] )
sage: _ = g.ConjugacyClassesSubgroups()
sage: x2 = libgap.InducedClassFunction(u.TrivialCharacter(),g)
sage: x1.ScalarProduct(x2)
6
sage: x1.ScalarProduct(x1)
6
sage: x2.ScalarProduct(x2)
6


By the way, you can instead write
x1 = u.TrivialCharacter().InducedClassFunction(g)
...
x2 = u.TrivialCharacter().InducedClassFunction(g)

Dima

(PS. That was computed with GAP 4.12.1, as in
https://trac.sagemath.org/ticket/34391
- where the bug you reported is still reproducible; so it's not a GAP bug)
> --
> You received this message because you are subscribed to the Google Groups "sage-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/ee9db8f7-c0b9-494a-802f-cfa9dfab856an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages