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

Implemented Mobius Function in residue_ntheory module #7271

Merged
merged 2 commits into from Apr 20, 2014
Merged

Implemented Mobius Function in residue_ntheory module #7271

merged 2 commits into from Apr 20, 2014

Conversation

skirpichev
Copy link
Contributor

rebase of stalled pr #2825.

@asmeurer
Copy link
Member

It would be better if these new functions were implemented as subclasses of Function (even if no symbolic behavior is implemented yet).

@skirpichev
Copy link
Contributor Author

@asmeurer, do you suggest to move this code from ntheory to functions module?

@asmeurer
Copy link
Member

asmeurer commented Apr 8, 2014

Ideally all the functions in ntheory would be subclasses of Function (all the actual mathematical functions that is, isprime and factorint don't need to be).

@skirpichev
Copy link
Contributor Author

Ok, done.

@skirpichev
Copy link
Contributor Author

@asmeurer, any comments? I'm going to merge this in 24hr.

asmeurer added a commit that referenced this pull request Apr 20, 2014
Implemented Mobius Function in residue_ntheory module
@asmeurer asmeurer merged commit 1ca8cbc into sympy:master Apr 20, 2014
@asmeurer
Copy link
Member

I'm not so sure about the assumptions type checking, although there is some precedent to it in other places. It can be annoying though, and especially so if the assumptions aren't smart enough to compute if an expression is a positive integer.

@skirpichev
Copy link
Contributor Author

Should we do return None instead?

@skirpichev skirpichev deleted the issmob-dhruvesh branch April 20, 2014 09:41
@asmeurer
Copy link
Member

asmeurer commented May 3, 2014

I think a good practice is to not fail when the assumptions give None, only when they give False (i.e., you know they are wrong). Isn't this what the relationals do. You can do x > y unless it knows that x is not real (in this case it might just be when it is explicitly not real, but the basic idea is the same I think).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants