Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbolic products are currently broken. #22914

Closed
EmmanuelCharpentier mannequin opened this issue Apr 30, 2017 · 6 comments
Closed

Symbolic products are currently broken. #22914

EmmanuelCharpentier mannequin opened this issue Apr 30, 2017 · 6 comments

Comments

@EmmanuelCharpentier
Copy link
Mannequin

EmmanuelCharpentier mannequin commented Apr 30, 2017

The symbolic product is currently broken in Sage :

  • It cannot be created in Sage :
sage: var("j,p", domain="integer")
sage: X,Y=function("X,Y")
sage: prod(X(j),j,1,p)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-5-85e69544cbe9> in <module>()
----> 1 prod(X(j),j,Integer(1),p)

/usr/local/sage-8/src/sage/misc/misc_c.pyx in sage.misc.misc_c.prod (/usr/local/sage-8/src/build/cythonized/sage/misc/misc_c.c:1596)()
     69 
     70 
---> 71 def prod(x, z=None, Py_ssize_t recursion_cutoff=5):
     72     """
     73     Return the product of the elements in the list x.

TypeError: prod() takes at most 3 positional arguments (4 given)
sage: product(X(j),j,1,p)
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-6-4d04d74c7489> in <module>()
----> 1 product(X(j),j,Integer(1),p)

NameError: name 'product' is not defined
  • Creatnig it it by casting a Maxima expression via the library interface gives nonsense :
sage: X(j).maxima_methods().prod(j,1,p)
X(j)^p
sage: X(j).maxima_methods().product(j,1,p)
X(j)^p

(Note : similar nonsense also happens with sums :

sage: X(j).maxima_methods().sum(j,1,p)
p*X(j)

)

  • But something (what ?) can be created via the Maxima pexpect interface :
sage: maxima("prod(X(j),j,1,p)").sage().log().log_expand()
sum(log(X(j)), j, 1, p)

The part of the problem bound to the Maxima library interface is the object of #22920. The present ticket aims at creating a Sage function/method correctly creating a symbolic product object.

CC: @rwst

Component: symbolics

Keywords: symbolics

Issue created by migration from https://trac.sagemath.org/ticket/22914

@EmmanuelCharpentier EmmanuelCharpentier mannequin added this to the sage-8.0 milestone Apr 30, 2017
@EmmanuelCharpentier

This comment has been minimized.

@rwst
Copy link
Contributor

rwst commented May 2, 2017

comment:2

Duplicate of #17505.

@rwst rwst removed this from the sage-8.0 milestone May 2, 2017
@EmmanuelCharpentier
Copy link
Mannequin Author

EmmanuelCharpentier mannequin commented May 2, 2017

comment:3

Replying to @rwst:

Duplicate of #17505.

Wups ! You're right. I oversaw it (and #17502 and #20179) when consulting the symbolics page.

Curiosity : why setting the status to neeeds_review ?

@rwst
Copy link
Contributor

rwst commented May 2, 2017

comment:4

Replying to @EmmanuelCharpentier:

Curiosity : why setting the status to neeeds_review ?

I want you as the ticket reporter to agree. Could you please add your ticket description to #17505?

@EmmanuelCharpentier
Copy link
Mannequin Author

EmmanuelCharpentier mannequin commented May 2, 2017

comment:5

Description pasted on #17505.

@embray
Copy link
Contributor

embray commented Jul 13, 2017

comment:6

Closing tickets in the sage-duplicate/invalid/wontfix module with positive_review (i.e. someone has confirmed they should be closed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants