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

combinatorics: improved the FpGroups.index() method #26458

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ford2003
Copy link

@Ford2003 Ford2003 commented Apr 4, 2024

combinatorics: FpGroup.index() optimisiation

References to other Issues or PRs

Brief description of what is fixed or changed

Added the use of Lagrange's theorem to FpGroup.index() method so that it returns |G|/|H| when G has finite order, by using FpGroup.subgroup() and FpGroup.order() methods.

Other comments

I think there is an issue with this method, if the FpGroup has infinite order, but is not picked up by FpGroup._is_infinite() method. I can create this issue with an example.
Added myself to .mailmap as I'm new contributor.

Release Notes

  • combinatorics
    • Added a small optimisation to FpGroup.index() method to return |G|/|H| if G has finite order.

Added the use of Lagrange's theorem to FpGroup.index() method so that it
returns |G|/|H| when G has finite order, by using FpGroup.subgroup() method.
I think there is an issue with this method, if the FpGroup has infinite order,
but is not picked up by FpGroup._is_infinite() method.
Added myself to .mailmap as I'm new contributor.
@sympy-bot
Copy link

Hi, I am the SymPy bot. I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

Your release notes are in good order.

Here is what the release notes will look like:

  • combinatorics
    • Added a small optimisation to FpGroup.index() method to return |G|/|H| if G has finite order. (#26458 by @Ford2003)

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.13.

Click here to see the pull request description that was parsed.
<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->
combinatorics: FpGroup.index() optimisiation

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234" (see
https://tinyurl.com/auto-closing for more information). Also, please
write a comment on that issue linking back to this pull request once it is
open. -->


#### Brief description of what is fixed or changed
Added the use of Lagrange's theorem to FpGroup.index() method so that it returns |G|/|H| when G has finite order, by using FpGroup.subgroup() and FpGroup.order() methods. 

#### Other comments
I think there is an issue with this method, if the FpGroup has infinite order, but is not picked up by FpGroup._is_infinite() method. I can create this issue with an example.
Added myself to .mailmap as I'm new contributor.

#### Release Notes

<!-- Write the release notes for this release below between the BEGIN and END
statements. The basic format is a bulleted list with the name of the subpackage
and the release note for this PR. For example:

* solvers
  * Added a new solver for logarithmic equations.

* functions
  * Fixed a bug with log of integers. Formerly, `log(-x)` incorrectly gave `-log(x)`.

* physics.units
  * Corrected a semantical error in the conversion between volt and statvolt which
    reported the volt as being larger than the statvolt.

or if no release note(s) should be included use:

NO ENTRY

See https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more
information on how to write release notes. The bot will check your release
notes automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
* combinatorics
  * Added a small optimisation to FpGroup.index() method to return |G|/|H| if G has finite order.
<!-- END RELEASE NOTES -->

@sylee957
Copy link
Member

sylee957 commented Apr 5, 2024

Is order always terminating? I'm aware that some fpgroups algorithms may not terminate, or order can be fairly slow, so I'm not sure about this

@Ford2003
Copy link
Author

Ford2003 commented Apr 6, 2024

I think it doesn't always because an FpGroup can have infinite order, but isn't picked up by _is_infinite method. So perhaps this is something that is added once the _is_infinite method is improved?

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.

None yet

3 participants