Opened 8 years ago
Closed 6 years ago
#7507 closed defect (fixed)
can't forget some assumptions
Reported by: | burcin | Owned by: | burcin |
---|---|---|---|
Priority: | major | Milestone: | sage-4.7.1 |
Component: | symbolics | Keywords: | maxima, assume |
Cc: | kcrisman, robert.marik | Merged in: | sage-4.7.1.alpha1 |
Authors: | Burcin Erocal | Reviewers: | Karl-Dieter Crisman |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Reported by Mike Witt on sage-support:
---------------------------------------------------------------------- | Sage Version 4.2, Release Date: 2009-10-24 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: n=var('n') sage: assumptions() [] sage: foo=sin((-1)*n*pi) sage: foo.simplify() -sin(pi*n) sage: assume(n, 'odd') sage: assumptions() [n is odd] sage: foo=sin((-1)*n*pi) sage: foo.simplify() 0 sage: forget(n, 'odd') sage: assumptions() [] sage: foo=sin((-1)*n*pi) sage: foo.simplify() 0
Robert Dodier's comments:
I'm guessing that Sage punts to Maxima for this stuff. For better or worse (mostly worse) there are different ways to declare & undeclare stuff in Maxima. For the "odd" declaration, it's declare(n, odd) and remove(n, odd). I guess assume(n, 'odd') was translated to declare(n, odd) but forget(n, 'odd') was not translated to remove(n, odd). I don't know much about Sage so I could be way off here.
Here is the thread:
http://groups.google.com/group/sage-support/browse_thread/thread/9db67c2df781966b
Attachments (1)
Change History (7)
comment:1 follow-up: ↓ 2 Changed 8 years ago by
comment:2 in reply to: ↑ 1 Changed 8 years ago by
- Report Upstream set to N/A
Replying to kcrisman:
Okay, this is closed related to #1163 and #7315. Should not be hard to fix, and might help in making GenericDeclarations? better in any case.
Sorry, I meant closely related.
Changed 6 years ago by
comment:3 Changed 6 years ago by
- Milestone changed from sage-4.7 to sage-4.7.1
- Status changed from new to needs_review
This seems to be fixed in the meanwhile. attachment:trac_7507-forget_assumptions.patch adds a doctest.
comment:4 Changed 6 years ago by
- Reviewers set to Karl-Dieter Crisman
Yes, this was fixed as part of #1163, as it turns out.
for x in preprocess_assumptions(args): if isinstance(x, (tuple, list)): forget(*x)
used to have
for x in preprocess_assumptions(args): if isinstance(x, (tuple, list)): assume(*x)
before that patch.
comment:5 Changed 6 years ago by
- Status changed from needs_review to positive_review
Nice catch to close this; tests pass.
comment:6 Changed 6 years ago by
- Merged in set to sage-4.7.1.alpha1
- Resolution set to fixed
- Status changed from positive_review to closed
Okay, this is closed related to #1163 and #7315. Should not be hard to fix, and might help in making GenericDeclarations? better in any case.