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

Chu-Vandermonde simplification fails #31299

Closed
fchapoton opened this issue Jan 28, 2021 · 19 comments
Closed

Chu-Vandermonde simplification fails #31299

fchapoton opened this issue Jan 28, 2021 · 19 comments

Comments

@fchapoton
Copy link
Contributor

Simplification fails as follows:

sage: a, b, n = SR.var('a, b, n')
sage: A = hypergeometric([-n, a], [b], 1)
sage: assume(n, 'integer')
sage: assume(n > 0)
sage: A.simplify_hypergeometric()
    n
(-1) ⋅RisingFactorial(a - b - n + 1, n)
───────────────────────────────────────
	    pochhammer(b, n)

Note that Sage neither has RisingFactorial
or pochhammer as symbolic functions.
It does have a function "rising_factorial".

There is a sub-problem:

sage: jacobi_P(n, b, a, 1)
RisingFactorial(b + 1, n)
─────────────────────────
	    n!

CC: @slel @tscrim

Component: symbolics

Keywords: hypergeometric

Author: Frédéric Chapoton

Branch/Commit: e201391

Reviewer: Travis Scrimshaw

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

@fchapoton fchapoton added this to the sage-9.3 milestone Jan 28, 2021
@slel

This comment has been minimized.

@mkoeppe
Copy link
Member

mkoeppe commented May 10, 2021

comment:2

Moving to 9.4, as 9.3 has been released.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 May 10, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.4, sage-9.5 Aug 22, 2021
@fchapoton
Copy link
Contributor Author

comment:4

We need to register something somewhere...

sage: from sage.symbolic.expression import register_symbol
sage: register_symbol(rising_factorial, {'maxima': 'pochhammer'})
sage: d=maxima('pochhammer(x,y)')
sage: SR(d)
gamma(x + y)/gamma(x)

And then one stumbles on the fact that rising_factorial is not a symbolic function:

sage: var('n')
sage: assume(n, 'integer')
sage: assume(n > 0)
sage: rising_factorial(6,n)
BOOM

Maybe this should not test a.is_integer() but a in ZZ ?

@fchapoton
Copy link
Contributor Author

Commit: 8f3f953

@fchapoton
Copy link
Contributor Author

comment:5

here is a tentative, seems to work a little bit, but not completely


New commits:

8f3f953tentative to convert pochhammer symbols from maxima

@fchapoton
Copy link
Contributor Author

Branch: u/chapoton/31299

@slel
Copy link
Member

slel commented Dec 6, 2021

comment:6

See also #19461.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 6, 2021

Branch pushed to git repo; I updated commit sha1. New commits:

f3fcdf2pochhammer for dummies

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 6, 2021

Changed commit from 8f3f953 to f3fcdf2

@fchapoton
Copy link
Contributor Author

comment:8

un peu mieux

@fchapoton
Copy link
Contributor Author

comment:9

maybe it's a good start ?

@fchapoton
Copy link
Contributor Author

Author: Frédéric Chapoton

@tscrim
Copy link
Collaborator

tscrim commented Dec 31, 2021

comment:12

I feel like it would be better to represent it as a ratio of Gamma functions considering how they appear in hypergeometric functions. Granted, it is a bit more computationally intensive for real x and integer n, but it allows the most general input. Plus it is consistent with Maxima in comment:4.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 5, 2022

Changed commit from f3fcdf2 to e201391

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jan 5, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

12b458bMerge branch 'u/chapoton/31299' in 9.5.b9
e201391using gamma quotients to stand for pochhammer

@fchapoton
Copy link
Contributor Author

comment:14

now with gamma

@tscrim
Copy link
Collaborator

tscrim commented Jan 7, 2022

Reviewer: Travis Scrimshaw

@tscrim
Copy link
Collaborator

tscrim commented Jan 7, 2022

comment:15

Thank you. LGTM.

@vbraun
Copy link
Member

vbraun commented Jan 31, 2022

Changed branch from u/chapoton/31299 to e201391

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

5 participants