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
338 stars 120 forks source link

Toric Varieties: Should class_group return a group and a morphism? #1095

Open HereAround opened 2 years ago

HereAround commented 2 years ago

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 for class_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:

  1. Div_T -> Cl
  2. CDiv_T -> Cl
  3. Pic -> Cl

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.

fieker commented 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

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.