Skip to content

Sympy minus infinity doesn't convert to Sage #12345

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

Closed
kcrisman opened this issue Jan 23, 2012 · 12 comments
Closed

Sympy minus infinity doesn't convert to Sage #12345

kcrisman opened this issue Jan 23, 2012 · 12 comments

Comments

@kcrisman
Copy link
Member

sage: a,b = oo, -oo
sage: a._sympy_()
oo
sage: b._sympy_()
--------------------------------------------
AttributeError                            Traceback (most recent call last)

/Users/.../sage-4.7.2/local/lib/python2.6/site-packages/sage/structure/element.so in sage.structure.element.Element.__getattr__ (sage/structure/element.c:2840)()

AttributeError: 'MinusInfinity' object has no attribute '_sympy_'

See this ask.sagemath.org question for background.

CC: @certik @rwst

Component: symbolics

Keywords: sd40.5

Author: Douglas McNeil

Branch/Commit: u/akhi/sympy_minus_infinity_doesn_t_convert_to_sage @ 52db42b

Reviewer: Karl-Dieter Crisman

Merged: sage-5.1.beta4

Issue created by migration from https://trac.sagemath.org/ticket/12345

@sagetrac-dsm
Copy link
Mannequin

sagetrac-dsm mannequin commented May 26, 2012

Changed keywords from none to sd40.5

@sagetrac-dsm
Copy link
Mannequin

sagetrac-dsm mannequin commented May 26, 2012

comment:1

Straightforward fix and test of the original case as an integral.

@sagetrac-dsm sagetrac-dsm mannequin added the s: needs review label May 26, 2012
@kcrisman
Copy link
Member Author

comment:2

Umm, even without this patch I get

sage: import sympy
sage: bool(SR(-oo) == -sympy.oo)
True
sage: bool(-oo == -sympy.oo)
True

Am I missing something? How is that an indirect doctest?

That said, the integral works fine now and the tests pass.

@kcrisman
Copy link
Member Author

Reviewer: Karl-Dieter Crisman

@kcrisman
Copy link
Member Author

Author: Douglas McNeil

@sagetrac-dsm
Copy link
Mannequin

sagetrac-dsm mannequin commented May 26, 2012

comment:3

Ah, those were merely mirroring the +oo cases. Really they were only testing whether the negation worked; it was the integral test which was really verifying the success. However, we can test it explicitly by adding.

    sage: bool((-oo)._sympy_() == -sympy.oo)
    True

which fails without the patch. Modified to incorporate this.

@kcrisman
Copy link
Member Author

comment:4

Positive review.

@jdemeyer
Copy link
Contributor

Attachment: trac_12345_minusinfinity_sympyfication.patch.gz

add _sympy_ method to MinusInfinity

@jdemeyer
Copy link
Contributor

Merged: sage-5.1.beta4

@sagetrac-akhi
Copy link
Mannequin

sagetrac-akhi mannequin commented Mar 18, 2015

@kcrisman
Copy link
Member Author

comment:7

I think this ticket is already fixed?

@kcrisman
Copy link
Member Author

Commit: 52db42b

vbraun pushed a commit that referenced this issue Mar 26, 2023
gh-35141: Revise the PR template
    
<!-- Please provide a concise, informative and self-explanatory title.
-->
<!-- Don't put issue numbers in the title. Put it in the Description
below. -->

### 📚 Description

Made small edits to the PR template, making it concise and tidy overall.

<!-- Describe your changes here in detail. -->
<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x
]`. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] 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

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

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: #35141
Reported by: Kwankyu Lee
Reviewer(s): Kwankyu Lee, Tobias Diez
vbraun pushed a commit that referenced this issue Apr 6, 2023
gh-35355: partial fix for E221 (to be continued)
    
<!-- Please provide a concise, informative and self-explanatory title.
-->
<!-- Don't put issue numbers in the title. Put it in the Description
below. -->
<!-- For example, instead of "Fixes #12345", use "Add a new method to
multiply two integers" -->

### 📚 Description

Partial fix for pycodestyle E221, done using autopep8.

E221 multiple spaces before operator

<!-- Describe your changes here in detail. -->
<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x
]`. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] 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

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

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: #35355
Reported by: Frédéric Chapoton
Reviewer(s): Matthias Köppe
vbraun pushed a commit that referenced this issue Apr 6, 2023
gh-35356: Fix documentation deployment
    
<!-- Please provide a concise, informative and self-explanatory title.
-->
<!-- Don't put issue numbers in the title. Put it in the Description
below. -->
<!-- For example, instead of "Fixes #12345", use "Add a new method to
multiply two integers" -->

### 📚 Description

The update #35184 broke the docs
upload. Hopefully this is fixed with this PR.

<!-- Describe your changes here in detail. -->
<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x
]`. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] 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

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

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: #35356
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik, Kwankyu Lee
vbraun pushed a commit that referenced this issue Apr 6, 2023
gh-35366: Many more namespace packages – follow up
    
<!-- Please provide a concise, informative and self-explanatory title.
-->
<!-- Don't put issue numbers in the title. Put it in the Description
below. -->
<!-- For example, instead of "Fixes #12345", use "Add a new method to
multiply two integers" -->

### 📚 Description

<!-- Describe your changes here in detail. -->
Follow-up from #35322.
<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x
]`. -->

- [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
- #12345: short description why this is a dependency
- #34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: #35366
Reported by: Matthias Köppe
Reviewer(s): Gonzalo Tornaría
vbraun pushed a commit that referenced this issue Apr 6, 2023
gh-35372: Replace more `.all` imports
    
<!-- Please provide a concise, informative and self-explanatory title.
-->
<!-- Don't put issue numbers in the title. Put it in the Description
below. -->
<!-- For example, instead of "Fixes #12345", use "Add a new method to
multiply two integers" -->

### 📚 Description

This is a follow-up on:
- #35110

As preparation for #35322, which is changing more packages to implicit
namespace packages, we remove `.all` imports from these packages
throughout the Sage library.

This is part of:
- #29705

<!-- Describe your changes here in detail. -->
<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x
]`. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] 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
- #12345: short description why this is a dependency
- #34567: ...
-->
- Depends on #35418
- Depends on #35358
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: #35372
Reported by: Matthias Köppe
Reviewer(s): Gonzalo Tornaría
vbraun pushed a commit that referenced this issue Apr 6, 2023
gh-35377: build/pkgs/openblas/spkg-configure.m4: Reject version 0.3.22
    
<!-- Please provide a concise, informative and self-explanatory title.
-->
<!-- Don't put issue numbers in the title. Put it in the Description
below. -->
<!-- For example, instead of "Fixes #12345", use "Add a new method to
multiply two integers" -->

### 📚 Description
openblas 0.3.22 is broken, see:
- #35371
- scipy/scipy#18208
- OpenMathLib/OpenBLAS#3976

We reject it.

<!-- Describe your changes here in detail. -->
<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x
]`. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] 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
- #12345: short description why this is a dependency
- #34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: #35377
Reported by: Matthias Köppe
Reviewer(s): John H. Palmieri
vbraun pushed a commit to vbraun/sage that referenced this issue May 9, 2025
sagemathgh-39929: Add and update some conda.txt files
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->



### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

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

cc @dimpase
    
URL: sagemath#39929
Reported by: Isuru Fernando
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this issue May 9, 2025
sagemathgh-39943: remove patch spkg
    
every system we support has a decent enough version of patch. So we just
purge it, like we did with tar a while ago.

This will fix sagemath#39941 and sagemath#30481

<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->



### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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.
- [x] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39943
Reported by: Dima Pasechnik
Reviewer(s): Tobias Diez
vbraun pushed a commit to vbraun/sage that referenced this issue May 9, 2025
sagemathgh-39948: fix enumeration of implicitly finite sets of partitions
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->



### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39948
Reported by: Martin Rubey
Reviewer(s): Martin Rubey, Travis Scrimshaw
vbraun pushed a commit to vbraun/sage that referenced this issue May 9, 2025
sagemathgh-39977: allow gcc-15 from the system
    
Fedora 42 comes with gcc-15 by default, so it should be allowed, as
asked on [sage-release](https://groups.google.com/g/sage-
release/c/iBMmwCCKJuM/m/h4EXk5nUDAAJ)


## 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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 and checked the documentation
preview.

### ⌛ Dependencies

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

- sagemath#39985 : linbox patches
- sagemath#39936 : givaro 4.2.1
    
URL: sagemath#39977
Reported by: Dima Pasechnik
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this issue May 9, 2025
sagemathgh-39978: Added a bandwidth feature
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

sagemath#13565
Added a bandwidth feature that gives the bandwidth of a matrix. The
bandwidth of a matrix measures how far from the main diagonal the
nonzero entries extend. Mostly used for storage efficiency / reordering
to speed up solvers etc. For now it is just a new feature to add.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

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

### ⌛ Dependencies

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

cc @tscrim
    
URL: sagemath#39978
Reported by: Henry Wu
Reviewer(s): David Coudert, Henry Wu, Travis Scrimshaw
vbraun pushed a commit to vbraun/sage that referenced this issue May 9, 2025
sagemathgh-39985: linbox patches for gcc-15 and Apple clang-17
    
Linbox needs patches for gcc-15 and Apple clang-17

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
- sagemath#39936: givaro update to 4.2.1
    
URL: sagemath#39985
Reported by: Dima Pasechnik
Reviewer(s): David Coudert
vbraun pushed a commit to vbraun/sage that referenced this issue May 9, 2025
sagemathgh-39986: fix: log as method gives symbolic output for non positive base
    
This pull request updates the behaviour of the `log` method in the
`Integer` class to handle cases where the base is non-positive to give
symbolic output and added tests for the same. This solves the issue
[sagemath#39959](sagemath#39959)
like this
```
sage: 8.log(-2)
3*log(2)/(I*pi + log(2))
```
 <!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->



### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

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

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39986
Reported by: Devansh Srivastava
Reviewer(s): roed314
vbraun pushed a commit to vbraun/sage that referenced this issue May 9, 2025
sagemathgh-39988: Adding an implementation of the Abreu-Nigro symmetric functions
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Following the definition given in (2.2) of
https://arxiv.org/abs/2504.09123, we implement the Abreu-Nigro symmetric
functions $g_{H,k}(x; q)$, where $H$ is a Hessenberg function. To do so,
we also implement their $\rho$ basis.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39988
Reported by: Travis Scrimshaw
Reviewer(s): Darij Grinberg, Frédéric Chapoton
vbraun pushed a commit to vbraun/sage that referenced this issue May 9, 2025
sagemathgh-39990: Remove ability to conditionalize parts of the documentation
    
The PR sagemath#36495 introduced the ability to disable building parts of the
documentation based on some features. This was meant to help the
modularization project, but was never actually used.

On the other hand, it checks for *every* of the around 200 document the
presence of *every* feature, leading to quite a considerable overhead
for building the documentation. Thus this feature is reverted for now
(until it's actually needed and perhaps can be re-implemented in a
better way).

<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->



### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39990
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this issue May 9, 2025
sagemathgh-40001: Remove giac as dependency, and add sagemath_giac as optional dependency
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Not sure if this change is completely right. It seems to me that there
is still a giac expect interface in use, so perhaps giac should now be a
runtime dependency instead of build dependency of sagelib? Or is that
interface obsolete and should/can be removed?

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40001
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this issue May 9, 2025
sagemathgh-40007: Fixed issue in CRT_vectors where moduli are not allowed to be coprime.
    
Fixes sagemath#39158. Fixed the issue by creating functionality for `CRT_basis`
if the moduli are not coprime. A more in depth explanation on how
`CRT_basis` was expanded can be found in
[Here](sagemath#39158).

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

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

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40007
Reported by: Noel-Roemmele
Reviewer(s): DaveWitteMorris, Noel-Roemmele
vbraun pushed a commit to vbraun/sage that referenced this issue May 9, 2025
sagemathgh-40014: set correct default algorithm for the diameter of (un)weighted graphs
    
Fixes sagemath#40013.

We now ensure that the default algorithm is `'DHV'` for weighted graphs
and `'iFUB'` for unweighted graphs.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

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

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40014
Reported by: David Coudert
Reviewer(s): Frédéric Chapoton
vbraun pushed a commit to vbraun/sage that referenced this issue May 9, 2025
sagemathgh-40038: Meson: build on recent Fedora
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

- Add devcontainer based on meson for fedora, and remove old outdated
ones
- Add CI for building with meson on fedora using system packages
- For this to work, rankwidth and ecl had to make optional since they
are currently not available
- The system package manager for fedora has been changed to use dnf
instead of yum
- And minor corrections to the package info

Currently encountering
- mesonbuild/meson#12970 when installing via
`meson install`
- mesonbuild/meson-python#598 when installing
via `pip`


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40038
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik, Tobias Diez, Vincent Macri
vbraun pushed a commit to vbraun/sage that referenced this issue May 9, 2025
sagemathgh-40044: Remove Pipfiles
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

A couple of Pipfile's were added by mistake in the branch of sagemath#39783.
They are removed here.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [X] The title is concise and informative.
- [X] 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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40044
Reported by: Enrique Manuel Artal Bartolo
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this issue May 9, 2025
sagemathgh-40059: add extra time tolerance to a doctest in `src/sage/doctest/util.py`
    
This should fix an issue that regularly makes some CI fail.
For instance https://github.com/sagemath/sage/actions/runs/14820026479/j
ob/41605704677?pr=39755#step:12:3011

```sage
sage -t --warn-long 5.0 --random-
seed=314994774945004744184521593085130720001 src/sage/doctest/util.py
**********************************************************************
Error: Failed example:: Got:
cysignals.signals.AlarmInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/runner/miniconda3/envs/sage-dev/lib/python3.12/site-
packages/sage/doctest/forker.py", line 730, in _run
    self.compile_and_execute(example, compiler, test.globs)
  File "/Users/runner/miniconda3/envs/sage-dev/lib/python3.12/site-
packages/sage/doctest/forker.py", line 1154, in compile_and_execute
    exec(compiled, globs)
  File "<doctest sage.doctest.util.inaccuracy_tolerance[4]>", line 1, in
<module>
    with ensure_interruptible_after(Integer(1)):  # not passing
max_wait_after_interrupt will raise an error
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/runner/miniconda3/envs/sage-
dev/lib/python3.12/contextlib.py", line 158, in __exit__
    self.gen.throw(value)
  File "/Users/runner/miniconda3/envs/sage-dev/lib/python3.12/site-
packages/sage/doctest/util.py", line 894, in ensure_interruptible_after
    raise RuntimeError(
RuntimeError: Function is not interruptible within 1.0000 seconds, only
after 1.6246 seconds

    with ensure_interruptible_after(1):  # not passing
max_wait_after_interrupt will raise an error
        check_interrupt_only_occasionally()
Expected:
    Traceback (most recent call last):
    ...
    RuntimeError: Function is not interruptible within 1.0000 seconds,
only after 1.60... seconds
Got:
    <BLANKLINE>
    cysignals.signals.AlarmInterrupt
    <BLANKLINE>
    During handling of the above exception, another exception occurred:
    <BLANKLINE>
    Traceback (most recent call last):
      File "/Users/runner/miniconda3/envs/sage-dev/lib/python3.12/site-
packages/sage/doctest/forker.py", line 730, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/runner/miniconda3/envs/sage-dev/lib/python3.12/site-
packages/sage/doctest/forker.py", line 1154, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.doctest.util.inaccuracy_tolerance[4]>", line
1, in <module>
        with ensure_interruptible_after(Integer(1)):  # not passing
max_wait_after_interrupt will raise an error
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/runner/miniconda3/envs/sage-
dev/lib/python3.12/contextlib.py", line 158, in __exit__
        self.gen.throw(value)
      File "/Users/runner/miniconda3/envs/sage-dev/lib/python3.12/site-
packages/sage/doctest/util.py", line 894, in ensure_interruptible_after
        raise RuntimeError(
    RuntimeError: Function is not interruptible within 1.0000 seconds,
only after 1.6246 seconds
```



### :memo: Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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 and checked the documentation
preview.

### :hourglass: Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40059
Reported by: David Coudert
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this issue May 11, 2025
sagemathgh-39583: Handle various extension degrees in pAdicGenericElement initialisation
    
I have looked into bug sagemath#28555. I have been able to reproduce it with
version 10.6.beta7.

It turns out the infinite loop can be reproduced with:
```
sage: A.<a> = Qq(5^2)
sage: A.base_ring()(a)
```
But the following also triggers the bug: `A.base_ring()(A(1))`. This is
bug sagemath#33527.

The culprit is in the file
`src/sage/rings/padics/padic_template_element.pxi`. Calling
`A.base_ring()(a)` will call `pAdicTemplateElement.__init__` which will
call `A.base_ring()(a)` again on line 140.

To fix it, I added a check for when the degree of the polynomial (over
the base ring $\mathbb Z_p$ or $\mathbb Q_p$) defining the element is
greater than one. If we were trying to convert to the base ring, I raise
a `TypeError` exception. Else, I raise a `NotImplementedError` exception
(this is the case when one tries to convert between two extensions, it
should be implemented later, but here I only fix the bug).

Finally, I change line 140 from `x = self.base_ring()(x)` to `x =
self.base_ring()(x.polynomial().constant_coefficient())` to avoid the
infinite loop.

NOTE: this is my "hello world" PR, I may have broken something with
this, please be kind. Please do not hesitate to tell me how to do
better.

Fixes sagemath#28555.
Fixes sagemath#33527.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

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

### ⌛ Dependencies

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

None
    
URL: sagemath#39583
Reported by: Rubén Muñoz--Bertrand
Reviewer(s): Julian Rüth, roed314, Rubén Muñoz--Bertrand
vbraun pushed a commit to vbraun/sage that referenced this issue May 11, 2025
sagemathgh-39974: Fix test failure in doctest of rank method
    
Failure seen in
https://github.com/sagemath/sage/pull/39725/files#annotation_33948370801
. It can be computed that the probability of failure is ≈ 1/16007, which
is tiny but still can happen if there is a sufficiently large number of
pull requests the code being ran on.



### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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.
- [x] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39974
Reported by: user202729
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this issue May 17, 2025
sagemathgh-38872: Native Windows build
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

The goal of this PR is to provide a native Windows build of Sage using
MSVC (using the new Meson build system).

Instructions on how to test are under the `Windows` tab at https://doc-
pr-38872--sagemath.netlify.app/html/en/installation/meson.
Afterwards, you should be able to import some sage modules in a normal
`python` install (but most modules actually don't properly import due to
various errors that will be fixed peu a peu in follow-up PRs)

## State of Windows support of dependencies

- m4rie: upstream (https://github.com/malb/m4rie) doesn't provide win
build
- ec: not sure if upstream (https://github.com/JohnCremona/eclib)
provide win build
- ecm: upstream (https://gitlab.inria.fr/zimmerma/ecm) doesn't provide
native win build (only Cygwin)
- ntl: upstream provides win build (kind of), but it's not yet available
on conda (conda-forge/ntl-feedstock#16)
- maxima/ecl: upstream provides win build, but it's not yet available on
conda (conda-forge/maxima-feedstock#38)
- GAP: only cygiwn build exists https://github.com/gap-
system/gap/issues/4157
- [pari](http://pari.math.u-bordeaux.fr/pub/pari): now available on
conda (conda-forge/pari-feedstock#45)
- cypari2: no windows support yet
sagemath/cypari2#19
- lrcalc
- pplpy
- primecountpy
- fpylll
- rw
- cliquer
- lcalc
- ecl
- braiding
- gc
- homfly
- iml
- brial_groebner

## Conda Issues:
- Meson cannot find libraries without pkg-config files.
     - Workaround: Check that `set LIB` includes the conda env (e.g.
`...\.conda\envs\sage-dev\Library\lib`). If not, run `conda deactivate`
followed by `conda activate sage-dev` and then check again.
     - Alternatively, `set LIB=%CONDA_PREFIX%\Library\lib;%LIB%`
     - Possible upstream improvement: the compilers conda package should
set `LIB`
- If you don't have the debug version of Python installed, you may get
"LINK : fatal error LNK1104: cannot open file 'python311_d.lib'"
     - Workaround: `meson setup builddir -Dbuildtype=release`
     - Alternatively, in `<path to conda>\sage-dev\include\pyconfig.h`
uncomment: `//#       define Py_DEBUG` and change `python311_d.lib` to
`python311.lib`
     - Possible upstream improvement: conda should either ship a debug
version of python or a correct `pyconfig.h`
- conda-forge/gsl-feedstock#63
     - Workaround: Fallback to find_library in meson and/or change the
`gsl.pc` to match:
       ```
       prefix=C:/Users/Tobia/.conda/envs/sage-dev/Library
       exec_prefix=C:/Users/Tobia/.conda/envs/sage-dev/Library
       libdir=C:/Users/Tobia/.conda/envs/sage-dev/Library/lib
       sharedlibdir=C:/Users/Tobia/.conda/envs/sage-dev/Library/lib
       includedir=C:/Users/Tobia/.conda/envs/sage-dev/Library/include
       GSL_CBLAS_LIB=-lgslcblas

       Name: GSL
       Description: GNU Scientific Library
       Version: 2.7
       Libs: -L${libdir} -lgsl ${GSL_CBLAS_LIB}
       Cflags: -I${includedir}
       ```
- conda-forge/compilers-feedstock#66
     - Workaround: Run everything in "VS x64 Native Tools Command
Prompt" (for 64bit) or "Developer Command Prompt for VS2022 (or 2019)"
(for 32bit)
- conda-forge/libgd-feedstock#55
     - Workaround: Fallback to find_library in meson
- conda-forge/m4ri-feedstock#15
    - Workaround: Don't try to use m4ri on windows
- conda-forge/libflint-feedstock#38
    - Workaround: Don't try to use flint on windows

## Upstream issues
Singular
- Singular/Singular#1245
- Singular/Singular#1246
- Singular/Singular#1247

Flint:
- flintlib/flint#2100
- mingw-w64/mingw-w64#65 (indirectly since
pthread is flint dependency). Would be fixed by
conda-forge/libflint-feedstock#38.
   -> Workaround: Change `typedef __int64 pid_t;` to `typedef int
pid_t;` in `.conda\envs\sage-dev\Library\include\pthread_compat.h`
- flintlib/flint#2101:
   -> Workaround: disable compilation of fraction_field_FpT for now

Cysignals:
- sagemath/cysignals#207
- sagemath/cysignals#206


### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#38872
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this issue May 17, 2025
sagemathgh-39010: Don't import cysignals.alarm on Windows
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

`cysignals.alarm` is not available on Windows, so we don't try to import
it. Probably more work needs to be done to actually fix the methods that
make use of these methods on Windows; but that's left for further PRs.

Also remove a `cysignals` import from an `all_xyz.py` file that was
duplicated in the main `all.py` file.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39010
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this issue May 17, 2025
sagemathgh-39262: Add script for checking for old deprecations
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

To find deprecations that can now safely removed.
Example:
```
python tools/check_deprecations.py src/sage/combinat
Found 9 deprecations.
100%|
Deprecations over one year ago:
File: src\sage\combinat\permutation.py, PR:
sagemath#26810, Closed Date: 2019-01-23
File: src\sage\combinat\permutation.py, PR:
sagemath#27467, Closed Date: 2019-06-12
File: src\sage\combinat\words\finite_word.py, PR:
sagemath#30187, Closed Date: 2020-09-15
File: src\sage\combinat\designs\difference_family.py, PR:
sagemath#35211, Closed Date: 2023-04-01
```

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39262
Reported by: Tobias Diez
Reviewer(s): Frédéric Chapoton, Tobias Diez
vbraun pushed a commit to vbraun/sage that referenced this issue May 17, 2025
sagemathgh-39532: move finite field methods
    
- **move is_field from Ring to Rings**
- **adapt doctest**
- **assert that a coercion cannot be registered after a conversion has
been discovered, disable check for zero ring in is_field**
- **move Ring.zeta and Ring.zeta_order**
- **adapt doctests**
- **move is_perfect, zeta, zeta_order**

<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->



### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39532
Reported by: Martin Rubey
Reviewer(s): Frédéric Chapoton
vbraun pushed a commit to vbraun/sage that referenced this issue May 17, 2025
sagemathgh-39548: Create PyPI source distribution of meson-based setup
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Instead of the old setup-tools based source distribution, the new meson-
based one is now uploaded to pypi.

Test run: https://github.com/sagemath/sage/actions/runs/14994046640/job/
42123955959?pr=39548
New sdist: https://github.com/sagemath/sage/actions/runs/14994046640/art
ifacts/3113658743

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [ ] The title is concise and informative.
- [ ] 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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39548
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
vbraun pushed a commit to vbraun/sage that referenced this issue May 17, 2025
sagemathgh-39583: Handle various extension degrees in pAdicGenericElement initialisation
    
I have looked into bug sagemath#28555. I have been able to reproduce it with
version 10.6.beta7.

It turns out the infinite loop can be reproduced with:
```
sage: A.<a> = Qq(5^2)
sage: A.base_ring()(a)
```
But the following also triggers the bug: `A.base_ring()(A(1))`. This is
bug sagemath#33527.

The culprit is in the file
`src/sage/rings/padics/padic_template_element.pxi`. Calling
`A.base_ring()(a)` will call `pAdicTemplateElement.__init__` which will
call `A.base_ring()(a)` again on line 140.

To fix it, I added a check for when the degree of the polynomial (over
the base ring $\mathbb Z_p$ or $\mathbb Q_p$) defining the element is
greater than one. If we were trying to convert to the base ring, I raise
a `TypeError` exception. Else, I raise a `NotImplementedError` exception
(this is the case when one tries to convert between two extensions, it
should be implemented later, but here I only fix the bug).

Finally, I change line 140 from `x = self.base_ring()(x)` to `x =
self.base_ring()(x.polynomial().constant_coefficient())` to avoid the
infinite loop.

NOTE: this is my "hello world" PR, I may have broken something with
this, please be kind. Please do not hesitate to tell me how to do
better.

Fixes sagemath#28555.
Fixes sagemath#33527.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

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

### ⌛ Dependencies

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

None
    
URL: sagemath#39583
Reported by: Rubén Muñoz--Bertrand
Reviewer(s): Julian Rüth, roed314, Rubén Muñoz--Bertrand
vbraun pushed a commit to vbraun/sage that referenced this issue May 17, 2025
sagemathgh-39721: Implement theYokonuma-Hecke algebras for other Weyl groups
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

We extend the implementation of the Yokonuma-Hecke algebra to do the
computations for other Weyl/Lie/Chevalley groups.

One reference would be https://arxiv.org/abs/1601.03191

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

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

### ⌛ Dependencies

- sagemath#39724: Needs the `cartesian_product` fix to put things in the correct
order.

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39721
Reported by: Travis Scrimshaw
Reviewer(s): Frédéric Chapoton
vbraun pushed a commit to vbraun/sage that referenced this issue May 17, 2025
sagemathgh-39763: Updated methods concerning addition of edges in a matching covered graph
    
<!-- ^ Please provide a concise and informative title. -->
The objective of this issue is to update the methods concerning addition
of edges in a matching covered graph.

<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
More specifically, this PR aims to updated the following methods:
- [x]  `add_edges()` | Add edges from an iterable container.

<!-- v Why is this change required? What problem does it solve? -->
Please note that earlier this method used to add only one multiple edge,
even though the container contains several of those.

<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->
Fixes sagemath#38216.
Note that this issue fixes a small part of the mentioned issue.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

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

### ⌛ Dependencies
Nothing as of now.

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

cc: @dcoudert.
    
URL: sagemath#39763
Reported by: Janmenjaya Panda
Reviewer(s): David Coudert, Janmenjaya Panda
vbraun pushed a commit to vbraun/sage that referenced this issue May 17, 2025
sagemathgh-39974: Fix test failure in doctest of rank method
    
Failure seen in
https://github.com/sagemath/sage/pull/39725/files#annotation_33948370801
. It can be computed that the probability of failure is ≈ 1/16007, which
is tiny but still can happen if there is a sufficiently large number of
pull requests the code being ran on.



### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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.
- [x] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#39974
Reported by: user202729
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this issue May 17, 2025
sagemathgh-40100: cypari 2.2.2
    
update to make it work with Cython 3.1

See sagemath/cypari2#177

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40100
Reported by: Dima Pasechnik
Reviewer(s): Tobias Diez
vbraun pushed a commit to vbraun/sage that referenced this issue May 18, 2025
sagemathgh-40019: Hash fraction_field_elements more appropriately
    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Equip various domains with a `canoncial_associate`, which finds unique
representatives in some rings modulo the action of the unit group. For
fields this is easy: there are only two orbits: 0 and the units (where 1
is a representative) and in ZZ we can just use "abs". For polynomial
rings we can extend representatives by normalizing the leading
coefficient to a canonical associate.

The normalization is important to find unique representatives of
fraction field elements (because multplying both numerator and
denominator by a unit doesn't change the represented class), which is
necessary for hashing them. The library uses hashes of fraction field
elements quite a bit, but luckily only in cases where we can actually
normalize denominators (in fact, "reduce" always seems to fail for such
rings, so the hash would already error out)

Fixes sagemath#35238

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation and checked the documentation
preview.
    
URL: sagemath#40019
Reported by: nbruin
Reviewer(s): Martin Rubey
vbraun pushed a commit to vbraun/sage that referenced this issue May 18, 2025
sagemathgh-40094: msolve tarball got ./configure - sha*s are changed
    
As reported by @mezzarobba on
sagemath#39738 (comment)

Upstream was quick to update the tarball



### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [x] 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 and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - sagemath#12345: short description why this is a dependency -->
<!-- - sagemath#34567: ... -->
    
URL: sagemath#40094
Reported by: Dima Pasechnik
Reviewer(s):
vbraun pushed a commit to vbraun/sage that referenced this issue May 18, 2025
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes sagemath#12345". -->

Add feature of enumerating weighted cycle in digraph. Specifically, I
added several arguments related to weight in
_all_cycles_iterator_vertex, all_cycles_iterator, all_simple_cycles
functions.

_all_cycles_iterator_vertex function enumerates cycles whose starting
point is specifed in increasing weight order by using PriorityQueue
instread of normal queue. By using this, all_cycls_iterator can
enumerate cycles in increasing weight order.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

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

### ⌛ Dependencies

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

URL: sagemath#40114
Reported by: Yuta Inoue
Reviewer(s): David Coudert, Yuta Inoue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants