gap-packages / qpa

GAP package for quivers and path algebras
https://folk.ntnu.no/oyvinso/QPA/
GNU General Public License v2.0
30 stars 13 forks source link

`PositiveInfinity` and `NegativeInfinity` versus `infinity` and `-infinity` #77

Closed fingolfin closed 1 year ago

fingolfin commented 1 year ago

I was wondering why QPA has PositiveInfinity and NegativeInfinity instead of using GAP's infinity and -infinity. One explanation I can think of is history: the git log indicates the former were added to QPA at the latest on 2012-01-19, possibly earlier. While the latter were first added to GAP 2012-01-04 (it's actually kinda somewhat uncanny how close together these events are :-). So I am guessing this is a case of parallel evolution?

If so, perhaps there'd be interest in unifying this? In my mind that would possibly simplify things for uses?

To do it, I would suggest to change the qpa code to use infinity and -infinity; and for backwards compatibility keep something like BindGlobal("PositiveInfinity", infinity); BindGlobal("NegativeInfinity", -infinity);. I'd be happy to supply a PR doing that, provided there is interest.

Or perhaps you prefer to keep them separate, which is of course also fine.

oysteins commented 1 year ago

Yes, I remember that I defined PositiveInfinity and NegativeInfinity because we needed them and they weren't in GAP. I think the GAP version I was using then did have infinity, but not -infinity. But maybe I remember wrong. In any case, I agree that they should be replaced by infinity and -infinity.