On Monday, July 27, 2020 at 2:36:32 PM UTC-4, Bert Henry wrote: > > I declared some variables with assume > > e. g. > > assume(r, 'real') > assume(k, 'integer') > assume(j >0) > > and so on. > > During my calculation I need (in one step) j=15 > > How can I delete the number 15 for j? I tried it with assume(r>0), but it > didn't work. > > > I am taking the simplest form of your question, I think. First, removing assumptions.
sage: var('j') j sage: assume(j>*0*) sage: bool(j>*0*) True sage: forget(j>*0*) sage: bool(j>*0*) False Note that the last line just means sage can't prove j>0, not that it can prove it is false that j>0. Then: sage: j = *15* sage: j 15 sage: bool(j>*0*) True sage: reset('j') sage: bool(j>*0*) --------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-17-d5dcd1fd41c6> in <module>() ----> 1 bool(j>Integer(0)) NameError: name 'j' is not defined Here note that j is now completely undefined, since at the beginning "j" was not defined. You may need to define it again. "restore" does the same thing, I believe. Good luck! -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/441f8e24-95eb-4bb9-ae3f-9d5506f13f73o%40googlegroups.com.