oscar-system / Oscar.jl

A comprehensive open source computer algebra system for computations in algebra, geometry, and number theory.
https://www.oscar-system.org
Other
370 stars 130 forks source link

abelian_group #4233

Open fieker opened 1 month ago

fieker commented 1 month ago
julia> abelian_group(PcGroup, [8])
ERROR: cannot create a PcGroup group with relative orders [8], perhaps try SubPcGroup
Stacktrace:
 [1] error(s::String)

but

pc_group(abelian_group([8]))
lgoettgens commented 1 month ago

@ThomasBreuer can you have a look at this?

ThomasBreuer commented 1 month ago

Yes. The point is that abelian_group(PcGroup, [8]) would have to create a PcGroup whose generators correspond to the given element orders, in this case [8]; GAP's PcGroup objects do not allow this, the cyclic pc group of order 8 would have three generators. On the other hand, abelian_group([8]) returns a FinGenAbGroup, and pc_group then creates a group with 3 generators.

ThomasBreuer commented 1 month ago

Ah, and concerning the obvious question why abelian_group(PcGroup, [8]) does not create an Oscar group with only one generators such that the underlying GAP group may have three generators: There was also the general requirement that the gens value of pc groups and fp groups correspond to the generators of the defining presentation.

thofma commented 1 month ago

I remember vaguely that we agreed on abelian_group(T, [...]) should have generators of the right order etc, but I can't find it written down anymore. Given this, I think everything is working as expected.

ThomasBreuer commented 1 month ago

@thofma The documentation of abelian_group says

The gens value of the returned group corresponds to v, that is, the number of generators is equal to length(v) and the order of the i-th generator is v[i].

And the documentation of PcGroup says

For a group G of type PcGroup, the elements in gens(G) satisfy the relators of the underlying presentation.