Opened 8 years ago

Closed 6 years ago

# can't forget some assumptions

Reported by: Owned by: burcin burcin major sage-4.7.1 symbolics maxima, assume kcrisman, robert.marik sage-4.7.1.alpha1 Burcin Erocal Karl-Dieter Crisman N/A

### 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
```

```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.
```

### comment:1 follow-up: ↓ 2 Changed 8 years ago by 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.

### comment:2 in reply to: ↑ 1 Changed 8 years ago by kcrisman

• Report Upstream set to N/A

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.

### comment:3 Changed 6 years ago by burcin

• Authors set to Burcin Erocal
• 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 kcrisman

• 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 kcrisman

• Status changed from needs_review to positive_review

Nice catch to close this; tests pass.

### comment:6 Changed 6 years ago by jdemeyer

• Merged in set to sage-4.7.1.alpha1
• Resolution set to fixed
• Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.