[sage-devel] Re: evaluation of polynomials in several variables

2011-03-16 Thread chris wuthrich
I opened a separate ticket #10946 for this issue. Hopefully someone with better knowledge of keywords, evaluations, polynomials, singulars and such will find a way to solve it. Thanks for the comments. Chris. -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscrib

[sage-devel] Re: evaluation of polynomials in several variables

2011-03-16 Thread Moritz Minzlaff
> Given f in R[x,y], I think f(x=a, y=b) should do exactly the same > thing as f(a,b). The parent should be the same as R.base_ring()(0) + a > + b. +1 > The difficult case is what to do for f(x=5). Should that be the same > as f(x=5, y=y) or a univariate polynomial? I would certainly read f(x=5) a

[sage-devel] Re: evaluation of polynomials in several variables

2011-03-16 Thread Moritz Minzlaff
> Given f in R[x,y], I think f(x=a, y=b) should do exactly the same > thing as f(a,b). The parent should be the same as R.base_ring()(0) + a > + b. +1 > The difficult case is what to do for f(x=5). Should that be the same > as f(x=5, y=y) or a univariate polynomial? I would certainly read f(x=5) a

[sage-devel] Re: evaluation of polynomials in several variables

2011-03-15 Thread chris wuthrich
> > No I am against changing this. For two reasons, when working with > > polynomials in variable names liks "k", "p". It is not always easy to > > remember which was the first and which was the second variable. Then > > it is very handy to pass keywords for evaluation - but still to expect > > a

[sage-devel] Re: evaluation of polynomials in several variables

2011-03-15 Thread Simon King
Hi Chris, On 14 Mrz., 23:31, chris wuthrich wrote: > I hope we agree that evaluation (meaning evaluation of all variables > by some elements in a ring) should yield an element of the ring. I > don't mind if subs should give back a polynomial in all cases. > > [Aside: Strangely this is not the cas

[sage-devel] Re: evaluation of polynomials in several variables

2011-03-15 Thread Simon King
Hi Robert, On 14 Mrz., 23:29, Robert Bradshaw wrote: > > Yes, but the fact that f(2,3) has a different parent than f(x=2,y=3) > > has a high probability of being troublesome. > > Given f in R[x,y], I think f(x=a, y=b) should do exactly the same > thing as f(a,b). The parent should be the same as

[sage-devel] Re: evaluation of polynomials in several variables

2011-03-14 Thread chris wuthrich
I hope we agree that evaluation (meaning evaluation of all variables by some elements in a ring) should yield an element of the ring. I don't mind if subs should give back a polynomial in all cases. [Aside: Strangely this is not the case for symbolic expressions. I am sure there must have been a

Re: [sage-devel] Re: evaluation of polynomials in several variables

2011-03-14 Thread Robert Bradshaw
On Fri, Mar 11, 2011 at 8:42 AM, Simon King wrote: > On 11 Mrz., 17:24, Volker Braun wrote: >> Substitution should always try to return the same type (i.e. same parent) if >> possible. Anything else will just be a constant source of bugs where your >> code works with generic polynomial input, but

[sage-devel] Re: evaluation of polynomials in several variables

2011-03-14 Thread chris wuthrich
I hope we agree that evaluation (meaning evaluation of all variables by some elements in a ring) should yield an element of the ring. I don't mind if subs should give back a polynomial in all cases. [Aside: Strangely this is not the case for symbolic expressions. I am sure there must have been a

[sage-devel] Re: evaluation of polynomials in several variables

2011-03-14 Thread chris wuthrich
I hope we agree that evaluation (meaning evaluation of all variables by some elements in a ring) should yield an element of the ring. I don't mind if subs should give back a polynomial in all cases. [Aside: Strangely this is not the case for symbolic expressions. I am sure there must have been a

[sage-devel] Re: evaluation of polynomials in several variables

2011-03-12 Thread Volker Braun
I agree that thats the only valid question here: is f(x=2,y=3) substitution or evaluation? The call syntax suggests evaluation, but keywords allow you to only substitute some variables. I'm tempted to say that since its not obvious we shouldn't have the function at all, that is, don't allow keyw

[sage-devel] Re: evaluation of polynomials in several variables

2011-03-11 Thread Simon King
On 11 Mrz., 17:24, Volker Braun wrote: > Substitution should always try to return the same type (i.e. same parent) if > possible. Anything else will just be a constant source of bugs where your > code works with generic polynomial input, but not for constants. Yes, but the fact that f(2,3) has a

[sage-devel] Re: evaluation of polynomials in several variables

2011-03-11 Thread Volker Braun
Substitution should always try to return the same type (i.e. same parent) if possible. Anything else will just be a constant source of bugs where your code works with generic polynomial input, but not for constants. -- To post to this group, send an email to sage-devel@googlegroups.com To unsub