Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docstrings for ZZ, QQ, QQBar, algebraic_closure #1708

Merged
merged 2 commits into from
Apr 26, 2024

Conversation

fingolfin
Copy link
Member

Resolves #1680

Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.76%. Comparing base (22e3908) to head (098daa8).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1708      +/-   ##
==========================================
- Coverage   84.93%   84.76%   -0.18%     
==========================================
  Files          95       95              
  Lines       37235    37216      -19     
==========================================
- Hits        31627    31546      -81     
- Misses       5608     5670      +62     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

QQBarFieldElem <: FieldElem

The algebraic closure $\overline{\mathbb Q}$ of the rationals $\mathbb Q$ and its elements.
For convenience, we predefine the global variable `const QQBar = QQBarField()`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if this confuses users, as this global does not exist in Oscar. Maybe it's better to advertise algebraic_closure(QQ) or write Nemo.QQBar.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have algebraic_closure(QQ) in Nemo?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

algebraic_closure(::QQField) = QQBar

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I suggest we change the docstring as you suggested

@lgoettgens lgoettgens closed this Apr 9, 2024
@lgoettgens lgoettgens reopened this Apr 9, 2024
@fingolfin
Copy link
Member Author

OK to merge this now?

julia> sqrt(K(2))
Root 1.41421 of x^2 - 2

julia> QQBar(2//3)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this still mentiones the singleton QQBar in this example (and three rows below). x-ref #1715

Comment on lines +71 to +74
julia> K = algebraic_closure(QQ)
Field of algebraic numbers

julia> sqrt(K(2))
Copy link
Collaborator

@lgoettgens lgoettgens Apr 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
julia> K = algebraic_closure(QQ)
Field of algebraic numbers
julia> sqrt(K(2))
julia> QQBar = algebraic_closure(QQ)
Field of algebraic numbers
julia> sqrt(QQBar(2))

this would be one workaround to not use the global object QQBar in docstrings. https://github.com/Nemocas/Nemo.jl/pull/1708/files#r1568401981 then becomes obsolete

Comment on lines +1542 to +1545
julia> K = algebraic_closure(QQ)
Field of algebraic numbers

julia> sqrt(K(2))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
julia> K = algebraic_closure(QQ)
Field of algebraic numbers
julia> sqrt(K(2))
julia> QQBar = algebraic_closure(QQ)
Field of algebraic numbers
julia> sqrt(QQBar(2))

maybe change here as well for consistency

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't like using QQBar like this, I wouldn't use it like that myself -- I'd rather use a "realistic" example, with a name like K. (besides, wouldn't that break CI if I did it now, while Nemo still provides and exports QQBar).

@fingolfin
Copy link
Member Author

I am merging this as is now: the QQBar removal is a separate thing, this PR on its own adds some value and I want to get it out of my hair.

@fingolfin fingolfin merged commit e273779 into Nemocas:master Apr 26, 2024
24 of 26 checks passed
@fingolfin fingolfin deleted the mh/docstrings branch April 26, 2024 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add docstrings for ZZ, QQ, QQBar, algebraic_closure
3 participants