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
366 stars 129 forks source link

documentation of QQbar #3416

Open micjoswig opened 9 months ago

micjoswig commented 9 months ago

The Calcium implementation of QQbar becomes increasingly important for OSCAR. So it needs to be properly documented.

Searching for "QQbar" kind of works but only leads to the Nemo docs.

As I think, QQbar should also be mentioned here.

QQbar is used, e.g., for polyhedral computations in real number fields (with fixed embeddings). This works nicely, but the overall behavior could be surprising for some users. Crucially, QQbar implements a comparison function, which is only defined for real numbers. The implementation is correct as it dies with an error if the user tries to compare complex numbers with nonzero imaginary parts. Yet, this "feature" allows QQbar as a type parameter, e.g., for the Polyhedron class. And this is unexpected, because the algebraic closure of the rationals is not an ordered field.

Again, there is nothing wrong with the implementation. But the docs need to explain this carefully.

micjoswig commented 9 months ago

@fieker FYI

lgoettgens commented 9 months ago

As a first step, one can add https://github.com/Nemocas/Nemo.jl/blob/master/docs/src/algebraic.md to the navigation bar under "Fields" (similarly as e.g. Padics). Everything else should be adapted in this Nemo doc page.

micjoswig commented 9 months ago

As a first step, one can add https://github.com/Nemocas/Nemo.jl/blob/master/docs/src/algebraic.md to the navigation bar under "Fields" (similarly as e.g. Padics).

That is certainly a good idea.

However, it is not quite enough. The reason is that Nemo has a focus on number theory, which makes the focus on reals less important. The whole thing is relevant for polyhedral geometry; and there we need an additional paragraph in the docs somewhere.

But should the polyhedral docs contain a page/paragraph dedicated to QQbar, or should this be written elsewhere (in the OSCAR docs, outside Nemo)?

@tbrysiewicz @lkastner @benlorenz

thofma commented 9 months ago

Can you clarify if this is about QQbar or embedded number fields (e.g. things like $\mathbf{Q}(\sqrt{2})$?

micjoswig commented 9 months ago

Can you clarify if this is about QQbar or embedded number fields (e.g. things like Q(2)?

If in doubt: both. But QQbar is more important.

lgoettgens commented 9 months ago

I created https://github.com/oscar-system/Oscar.jl/pull/3423 to tackle https://github.com/oscar-system/Oscar.jl/issues/3416#issuecomment-1961083741. And I removed the backport label here since an issue cannot really be backported (instead, used a milestone).

fingolfin commented 7 months ago

Actually a global const QQBar which is equal to algebraic_closure(QQ) is documented on https://docs.oscar-system.org/dev/Nemo/algebraic/ but it only exists in Nemo, not in Oscar.

We just talked about this, @fieker proposes to remove it from the Nemo docs and perhaps we should just remove this global on Nemo, and tell people to use algebraic_closure(QQ) instead.

fingolfin commented 6 months ago

In https://github.com/Nemocas/Nemo.jl/pull/1715 @lgoettgens started to prepare Nemo for the removal of QQBar as a global object. We should complete that PR and then do the removal of QQBar...