Yes, it's surely a bug; this example gives |gg|=2^27 (wow!), or a smaller one:

sage: g=AbelianGroup([2,2])
sage: gg=g.subgroup(g.list())
sage: gg.cardinality().factor() # what?
2^3
sage: g.cardinality().factor()
2^2

Maybe related to https://github.com/sagemath/sage/pull/36986 ?

On Thu, Apr 4, 2024 at 10:24 AM 'B. L.' via sage-devel
<sage-devel@googlegroups.com> wrote:
>
> Hello,
> to me it seems that with 10.3 there might be a bug in ".subgroup", see 
> example below. The subgroup cardinality is wrong and the equality test of the 
> group and the subgroup generated by all group elements yields "False". In 
> previous versionls of SAGE this worked as expected.
> Can anybody help?
> Thanks and kind regards,
> Barbara
>
>
> sage: g = AbelianGroup([4, 4])
> sage: gg = g.subgroup(g.list())
> sage: g
> Multiplicative Abelian group isomorphic to C4 x C4
> sage: gg
> Multiplicative Abelian subgroup isomorphic to C4 x C4 generated by {f1, f1^2, 
> f1^3, f0, f0*f1, f0*f1^2, f0*f1^3, f0^2, f0^2*f1, f0^2*f1^2, f0^2*f1^3, f0^3, 
> f0^3*f1, f0^3*f1^2, f0^3*f1^3}
> sage: g.cardinality()
> 16
> sage: gg.cardinality()
> 134217728
> sage: g==gg
> False
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/sage-devel/55ecbb00-3927-4339-8cb3-f68347358446n%40googlegroups.com.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/CAAWYfq12wP_ANzFv7RqPVrw1CTDRa8MuU0MA%2BXBXS6RnUGSKHQ%40mail.gmail.com.

Reply via email to