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
Get assumptions by variables #13708
Comments
Attachment: trac_13708_get_assumption_by_variables.patch.gz |
comment:2
I added a patch which allows sage to do the things shown in the Description box. I hope this code makes sense. Please be easy on me, it's my first patch. ;) Best, |
Author: Noud Aldenhoven, Burcin Erocal |
Reviewer: Burcin Erocal |
This comment has been minimized.
This comment has been minimized.
comment:4
Attachment: trac_13708-eliminate_strings.patch.gz Thanks for the patch. Your changes look good to me. I attached a referee patch to fix some minor issues:
If you're OK with my changes, feel free to switch this ticket to positive_review. |
comment:6
Thank you, this seems very nice. I like it. However I would still like to do something like this:
That's why I added a 'integer' string in the assumption code, but I see that you removed this in the newer patch. I still do not know a nice solution for this (small) problem. |
comment:7
Replying to @sagetrac-noud:
I removed that code because treating only the integer case specially is not a good long term solution. The right way to handle this is via the
Unfortunately, our wrappers around Maxima assumptions don't know anything about these and these don't know about Maxima assumptions. I can't even find a bug to make the two work together. Would you be interested in helping out? In order to make assumptions set domains in Pynac, all we need to do is add a call to This should all be done on a separate ticket of course. |
Changed reviewer from Burcin Erocal to Burcin Erocal, Noud Aldenhoven |
comment:8
Replying to @burcin:
Certainly I would like to help! But I have no idea how to approach. To me it looks like if the function is_integer() should be modified. Could you explain to me a bit better how this works? I also don't get how this should work with SR.symbol. |
comment:10
You can ask Maxima to report what it assumptions it has recorded for a variable, via facts(x) where x is the variable of interest. Also, propvars(p) returns the variables for which property p has been declared, e.g. propvars('integer). I'm guessing that it might be preferable to get the report directly from Maxima since that's what actually affects results. Hope this helps. |
Merged: sage-5.6.beta1 |
Hi everyone,
I'm very exited to create my first ticket and add my first patch. It would be nice if the assumption function could return the assumptions of a variable explicitly. For example:
I'll upload a solution for this suggestion shortly.
Apply: attachment: trac_13708_get_assumption_by_variables.patch, attachment: trac_13708-eliminate_strings.patch
Component: symbolics
Keywords: symbolic, assumptions, variable
Author: Noud Aldenhoven, Burcin Erocal
Reviewer: Burcin Erocal, Noud Aldenhoven
Merged: sage-5.6.beta1
Issue created by migration from https://trac.sagemath.org/ticket/13708
The text was updated successfully, but these errors were encountered: