Open HereAround opened 2 years ago
The convention for the "classical" part of Oscar is that all such functions (sub, quo, class_group, unit_group, maximal_abelian_quotient, ...) return a pair
Pic
I assume is also "just" an abelian group, hence a map between the two of them would not be special at all.The point of returning an abstract new object is to limit the number of special groups, ie. suppose the class_group would not be GrpAbFinGen, but GrpCls (bad names, both) then I'd need to implement all abelian group functionality again for the special group, plus whatever makes it special.
I can see canonical_map(Cl::GrpAbFinGen, F::parent(Div_T))
returning the map you want, retroactively. This would use information cached in Cl and F, but the name might be more intuitive than the current.
Also as part of the convention, the map returned is always(?) from the new object into the old one, ie. for the ideal class group, the map actually takes an abstract group element and returns an ideal. A mathematically bettwe mao would be the inverse, the projection from the ideals to the finite group, but for consistency we chose to do it the other way. As pseudo_inv
find the other one, there is no user harm here.
This question was brought up in https://github.com/oscar-system/Oscar.jl/pull/1056 and I believe it would be good to discuss this.
My current standing is that I would find it surprising to receive a pair of a group and a morphism when I ask
Oscar
forclass_group
. But there might be good reasons for this, which I am simply not (yet) aware of.Another aspect is a somewhat canonical map into the
class_group
of a toric variety. We currently support the following three maps:Of those, I would be leaning towards consider the first one the most canonical one. But is it "the" canonical map into the class group? I am uncertain.