If the sage preparser did something like,

__tmp__ = SR.var("x, y"); __tmp_g__ = lambda x, y:
symbolic_expression(x+y**Integer(2)).function(x,y); f = __tmp_g__(*__tmp__)

for

f(x, y)  = x + y ** 2

you wouldn't have this problem and it should be easy enough to change in
the preparsesr.

Isuru

On Tue, Mar 19, 2019 at 12:38 PM john_perry_usm <john.pe...@usm.edu> wrote:

> Apologies for the pedantry, but unless the indeterminates so generated are
> free of all bugs, then strictly speaking this is not immaculate conception;
> it is spontaneous generation, or perhaps virginal conception. ;-)
>
> john perry
>
> On Tuesday, March 19, 2019 at 6:52:19 AM UTC-5, Emmanuel Charpentier wrote:
>>
>> Defining a symbolic function seems to declare its arguments. Case
>> illustrated in this sagecell example
>> <https://sagecell.sagemath.org/?z=eJwrSi1OLdHQ5OXyTDG0BTGLM_LL4zNTUvNKMtMyU4uKNTSBkmn5-RoFOok6SZq2BXEaibqGmloahroFmnEaSUA2SLMRbs1ASQVdBaD5ACSeIG0=&lang=sage&interacts=eJyLjgUAARUAuQ==>
>>  :
>>
>> reset()
>> Id1=set(show_identifiers())
>> foo(p,a,b)=p^(a-1)*(1-p)^(b-1)
>> Id2=set(show_identifiers())
>> Id2 - Id1
>>
>> which happily prints :
>>
>> {'Id1', 'a', 'b', 'foo', 'p'}
>>
>>
>> Is this expected ?
>>
>>
>>
>> --
> 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 post to this group, send email to sage-support@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to