Pochhammer Simplification

Assumption:: m and n are integers and greater than zero.

\$Assumptions = {Element[m, Integers] && m >= 0, Element[n, Integers] && n >= 0}



Consider the following,

Pochhammer[n + a_, m_] :>  Pochhammer[a, m + n]/Pochhammer[a, n]


This simplifies the Pochhammers with arguments (n+a+b,m).

in : Pochhammer[n + a + b, m]
out : Pochhammer[a + b, m + n]/Pochhammer[a + b, n]


I want to generalize it, so that it simlifies Pochhammer[3n + a + b, 2m] to Pochhammer[ a + b, 3n+2m]

I tried as follows,

Pochhammer[n_Integers + a_, m_Integers] :>  Pochhammer[a, m + n]/Pochhammer[a, n]


or

Pochhammer[n*x_Integers + a_, m*y_Integers] :>  Pochhammer[a, y*m + x*n]/Pochhammer[a, x*n]


None of them works. Can anyone tell what is wrong here, what the correct way?

• You cannot use Integers this way. The pattern n_Integers represents any expression (Blank[]), here called n that has Head Integers. But in Mathematica, Integers is not used as a Head, it's used as an assumption for Solveing, Simplifying etc. Commented May 7, 2020 at 8:05
• In your case, the inputs you are matching will either have Head equal to Symbol for your undefined variables, or if you input numbers, they will have one of several Heads used for numbers. In that case, the pattern should usually be n_?IntegerQ or n_?NumericQ. Commented May 7, 2020 at 8:07
• @marius, there’s also the head Integer (notice the lack of “s”), so n_Integer would work as well. That is what IntegerQ looks for, according to the documentation. Commented May 7, 2020 at 14:12
• At the beginning, I assume m and n are integers and greater than zero then tried these, Pochhammer[a_ + n_Integer, m_] :> Pochhammer[a, m + n]/ Pochhammer[a, n] on Pochhammer[a + n, m]. This does not work Commented May 8, 2020 at 6:36
• Pochhammer[a_ + n_?IntegerQ, m_] :> Pochhammer[a, m + n]/ Pochhammer[a, n] does not help too. Commented May 8, 2020 at 6:39

The answer that I was looking for is

sim = Pochhammer[ x_. (z_. n + a_), m___] :>  Pochhammer[  x a, m + x z n]/
Pochhammer[x a, x z n]


It does the following simplifications

in:= Pochhammer[2 n + a, m] //. sim
out:=Pochhammer[a, m + 2 n]/Pochhammer[a, 2 n]
in:=Pochhammer[n + 3 a, m] //. sim
out:=Pochhammer[3 a, m + n]/Pochhammer[3 a, n]
in:=Pochhammer[-5 n + 3 a, m] //. sim
out:=Pochhammer[3 a, m - 5 n]/Pochhammer[3 a, -5 n]
in:=Pochhammer[-5 n + 3 a + 2 b - d, m] //. sim
out:=Pochhammer[3 a + 2 b - d, m - 5 n]/Pochhammer[3 a + 2 b - d, -5 n]


But,

in:=Pochhammer[-5 n + 3/2 (a - n) + 2 b - d/2, m] //. sim
out:=Pochhammer[2 b - d/2 + (3 (a - n))/2, m - 5 n]/Pochhammer[
2 b - d/2 + (3 (a - n))/2, -5 n]


In order to avoid this problem,

in:=Together /@ Pochhammer[-5 n + 3/2 (a - n) + 2 b - d/2, m] //. sim
out:=Pochhammer[1/2 (3 a + 4 b - d), m - (13 n)/2]/Pochhammer[
1/2 (3 a + 4 b - d), -((13 n)/2)]