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

sage.rings.number_field: Modularization fixes, doctest cosmetics, # needs #36044

Merged
merged 11 commits into from
Aug 13, 2023

Conversation

mkoeppe
Copy link
Contributor

@mkoeppe mkoeppe commented Aug 7, 2023

  • Avoiding going through symbolic square roots in .S_unit_solver
  • # needs sage.symbolic, # needs sage.libs.*, # needs sage.rings.finite_rings etc.
  • Reformatting doctests to fit on the screen
  • Codestyle fixes in doctests
  • Block tags for # optional - magma
  • Handle import errors in NumberField._pushout_

This is

📝 Checklist

  • The title is concise, informative, and self-explanatory.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation accordingly.

⌛ Dependencies

@@ -1880,17 +1887,17 @@ def _convert_non_number_field_element(self, x):
will convert to the number field, e.g., this one in
characteristic 7::

sage: f = GF(7)['y']([1,2,3]); f # optional - sage.rings.finite_rings
sage: f = GF(7)['y']([1,2,3]); f # needs sage.rings.finite_rings
3*y^2 + 2*y + 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is not needed anymore for prime finite fields?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, for small enough prime finite fields

Copy link
Collaborator

@kwankyu kwankyu left a comment

Choose a reason for hiding this comment

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

LGTM.

@@ -7343,7 +7368,7 @@ def S_unit_group(self, proof=None, S=None):

INPUT:

- ``proof`` (bool, default True) flag passed to ``pari``.
- ``proof`` (bool, default True) flag passed to PARI.
Copy link
Contributor

Choose a reason for hiding this comment

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

-        - ``proof``  (bool, default True) flag passed to PARI.
+        - ``proof`` -- bool (default: ``True``); flag passed to PARI

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 69d6265

81
sage: zeta105^3, CC(a)^81 # optional - sage.symbolic
sage: zeta105^3, CC(a)^81
(0.983929588598630 + 0.178556894798637*I,
0.983929588598631 + 0.178556894798635*I)

sage: K.<a> = CyclotomicField(5, embedding=None)
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we add # needs sage.symbolic here ? it's not the same bloc due to blank line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Above needed sage.symbolic because of exp, pi, i. This one here doesn't

@mkoeppe mkoeppe force-pushed the sage_rings_numberfield_modularization branch from 76d1d75 to f9e0342 Compare August 8, 2023 17:49
Copy link
Contributor

@dcoudert dcoudert left a comment

Choose a reason for hiding this comment

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

LGTM.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Aug 8, 2023

Thanks both!

@github-actions
Copy link

github-actions bot commented Aug 8, 2023

Documentation preview for this PR (built with commit f9e0342; changes) is ready! 🎉

vbraun pushed a commit to vbraun/sage that referenced this pull request Aug 11, 2023
…ctest cosmetics, `# needs`

    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->
- Avoiding going through symbolic square roots in `.S_unit_solver`
- `# needs sage.symbolic`, `# needs sage.libs.*`, `# needs
sage.rings.finite_rings` etc.
- Reformatting doctests to fit on the screen
- Codestyle fixes in doctests
- Block tags for `# optional - magma`
- Handle import errors in `NumberField._pushout_`

<!-- Why is this change required? What problem does it solve? -->
This is
- Part of: sagemath#29705
- Cherry-picked from: sagemath#35095
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [x] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#36044
Reported by: Matthias Köppe
Reviewer(s): David Coudert, Kwankyu Lee, Matthias Köppe
@vbraun vbraun merged commit a38d129 into sagemath:develop Aug 13, 2023
10 of 12 checks passed
@mkoeppe mkoeppe added this to the sage-10.1 milestone Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants