Proposal for Enhancements to the Pow Class in SymPy

80 views
Skip to first unread message

Mariyala Rohith

unread,
Mar 2, 2024, 12:16:26 PM3/2/24
to sympy
Dear Sympy Mentors,

          I hope this message finds you well!
          I am writing to propose a couple of enhancements to the Pow class in SymPy that I believe could extend its functionality and usefulness.

1.  Roots of Unity:  I propose to add a method to the Pow class that checks if an expression represents a root of unity. This would involve checking if a complex number, when raised to some positive integer power, equals 1. This feature could be useful in various areas of mathematics, including numbers theory and algebra.

Adding this feature would extend the functionality of Sympy and make it more useful for the user working in the areas of algorithms in number theory and more

I am confident that these enhancements would be valuable to the SymPy, and I am excited about the possibility of contributing to this project. I have a solid understanding of Python and mathematics, and I am ready to start working on this feature.

Even I have come across some other features that were not provided to SymPy and I will try to share them.

I look forward to hearing your thoughts on these proposals. If you have any questions or need further information, please do not hesitate to ask.

Mariyala Rohith

Oscar Benjamin

unread,
Mar 2, 2024, 1:46:10 PM3/2/24
to sy...@googlegroups.com
On Sat, 2 Mar 2024 at 17:16, Mariyala Rohith <mariyala...@gmail.com> wrote:
>
> Dear Sympy Mentors,
>
> I hope this message finds you well!
> I am writing to propose a couple of enhancements to the Pow class in SymPy that I believe could extend its functionality and usefulness.
>
> 1. Roots of Unity: I propose to add a method to the Pow class that checks if an expression represents a root of unity. This would involve checking if a complex number, when raised to some positive integer power, equals 1. This feature could be useful in various areas of mathematics, including numbers theory and algebra.

There is already a way to do this in SymPy although it is perhaps not obvious:

In [52]: is_root_of_unity = lambda e: minpoly(e, polys=True).is_cyclotomic

In [53]: is_root_of_unity(-sqrt(5)/4 - S(1)/4 - I*sqrt(S(5)/8 - sqrt(5)/8))
Out[53]: True

In [54]: is_root_of_unity(sqrt(5))
Out[54]: False


Oscar

Mariyala Rohith

unread,
Mar 2, 2024, 11:40:08 PM3/2/24
to sympy

I am writing to express my interest in contributing to the SymPy project for the GSoC 2024.

I have been exploring SymPy and find its mission and projects align well with my skills and interests. I am particularly interested in contributing to the areas that could enhance the functionality and performance of SymPy.

Before I proceed with drafting my proposal, I would greatly appreciate it if you could provide some guidance on the areas where you are currently seeking contributions. Are there any specific features, enhancements, or areas of the codebase that you would like to see improved or expanded in the near future?

I am eager to contribute in a way that would be most beneficial to the SymPy community and your insights would be invaluable in helping me to align my contributions to the SymPy.

Mariyala Rohith   

Samith Kavishke

unread,
Mar 3, 2024, 12:49:59 AM3/3/24
to sympy
You can see some of the ideas that are already in sympy idea page in wiki.
Reply all
Reply to author
Forward
0 new messages