I'm very fine with that (it might introduce unecessary nesting though). With global assumptions I meant the current behaviour to store the assumptions in the symbol/expression.
> If, on the other hand, we don't have global assumptions, I don't think > you need to use 'assume(x in R)' at every step. All you have to do is > to refine the final answer, e.g. one command. Mathematically the first step is to define the symbols (n in N etc.). Moving this to the last step seems counter-intuitive to me. Vinzent On 27 Jan., 12:23, Fabian Seoane <[email protected]> wrote: > On Tue, Jan 27, 2009 at 12:53 AM, Ondrej Certik <[email protected]> wrote: > > > On Mon, Jan 26, 2009 at 2:34 PM, nico <[email protected]> wrote: > > > >> I think that could be something like a global assumption. But it's > > >> true that I am still not convinced we need global assumptions. > > > > I agree with Vinzent about global assumptions. > > > Thanks for joining the discussion. > > > > If x refers to a real in a whole session, I think it would be really > > > fastidious to use 'assume(x in R)' or something like that in every > > > calculation. > > > That's right, but once we start to have anything global, it means that > > you can never be sure what happens if you write abs(x**2) anymore, > > becuase you simply don't know what global assumptions the user has. > > > If, on the other hand, we don't have global assumptions, I don't think > > you need to use 'assume(x in R)' at every step. All you have to do is > > to refine the final answer, e.g. one command. > > > Technically, I have nothing against global assumptions as long as they > > are made explicit, e.g. if you call > > I think fredrik's idea to use the with statement offers a nice alternative > to global assumptions: > > with Assume(x>0): > abs(x).refine() #although i preffer refine(abs(x)) > something > bla bla bla > > Actually there is no such thing as global assumptions, but this prevents you > from typing Assume(x>0) on every step > > > > > > > e.refine() > > > it would consult the global assumptions and refine the answer, but if > > you type abs(x**2), I think it can be quite dangerous --- but I know > > that a lot of other systems do that, so we might do that as well. In > > anycase, as a first step, we should implement local assumptions using > > refine() and when we get this working correctly, we may think if we > > want to do this globally and automagically. > > > Ondrej > > -- > Fabian,http://fseoane.net/blog/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sympy?hl=en -~----------~----~----~----~------~----~------~--~---
