I am working on a paclet for very-well poised basic hypergeometric functions.
I have a function ReplacePlusMinus.
ReplacePlusMinus//ClearAll
ReplacePlusMinus::usage="ReplacePlusMinus[list] replaces cases of p,-p in a list with plus or minus p."
ReplacePlusMinus[l_?(Function[{x},ListQ[x],{}])]:=SequenceReplace[l, {x_, -x_} :> PlusMinus[x]]
ReplacePlusMinus[args___]:=
Null/;CheckArguments[ReplacePlusMinus[args],1];
I have an error that I'm not sure how to resolve. The ** is NonCommutativeMultiply.
Cases[W87[a, b, c, d, e, f, q, z] == Sum[(b**c**z/Sqrt[a**q])^n**((QPh[{a**q}, q, 2*n]*Sum[((b**c**d**z/a**q)^m**QPh[ReplacePlusMinus[{a**q^(1 + 2*n)}], q, 2*m]/QPh[ReplacePlusMinus[{a^2**q^(1 + 2*n)/b**c**d}], q, 2*m])**W65[a**q^(2*(m + n)), b**c**d/a**q, e**q^(m + n), f**q^(m + n), q, z], ReplacePlusMinus[{m, 0, Infinity}]])/QPh[{a^(3/2)**Sqrt[q]/b**c}, q, 2*n]), {n, 0, Infinity}], {Sum[summand:_ | _[___], ReplacePlusMinus[{variable_, lowerbound_, upperbound_}]] :> Sum[summand, {variable, lowerbound, upperbound}]}]
QPh is the Q Pochhammer symbol and W87 is a very well poised hypergeometric function.
I need some help resolving this error.
Sum::vexdep: The variable ReplacePlusMinus[{m,0,\[Infinity]}] has dependencies in the current session that cause it to evaluate to {m,0,\[Infinity]}, which cannot be used as a variable.
I think Sum effectively uses Block.
I think this might be the issue based on this quote: "Block therefore affects the evaluation stack, not just the literal occurrences of a symbol inside the code of its body. Its effects are much less local than those of lexical scoping constructs, which makes it much harder to debug programs which use Block extensively." Source:https://mathematica.stackexchange.com/questions/559/what-are-the-use-cases-for-different-scoping-constructs I think the solution might be to use Module instead.
My goal is to take
Hold[Sum[((b**c**d**z/a**q)^m**QPh[ReplacePlusMinus[{a**q^(1 + 2*n)}], q, 2*m]/QPh[ReplacePlusMinus[{a^2**q^(1 + 2*n)/b**c**d}], q, 2*m])**W65[a**q^(2*(m + n)), b**c**d/a**q, e**q^(m + n), f**q^(m + n), q, z], ReplacePlusMinus[{m, 0, Infinity}]]]
as input and return the expression with ReplacePlusMinus evaluated.
Are there any good ideas to make the function work?
ReplacePlusMinus will transform {m,n,p,-p,r} into {m,n,PlusMinus[p],r}.
I am trying to use Trace to figure out something that works.
I got it working.
For equation 3,
Activate[
AddPlusMinus[
PolynomializeFractionPower[
VeryWellPoisedHypergeometricToNumerator[
RearrangeExpression[
W87[a, b, c, d, e, f, q, z] ==
Sum[QPh[{Sqrt[q] a^(3/2)/(b c), Sqrt[q a]/b, Sqrt[q a]/c,
q a/(b c), d, e, f}, q, n]/
QPh[{q, Sqrt[q a], q a/b, q a/c, q a/d, q a/e, q a/f}, q,
n] QPh[{q a}, q, 2 n]/
QPh[{Sqrt[q] a^(3/2)/(b c)}, q, 2 n] (b c z/Sqrt[q a])^n Sum[
QPh[{(a^2 q^(1 + 2 n))/(b c d), (a q^(1 + n))/(b c),
Sqrt[a q]/d, (q^n (a q)^(3/2))/(b c d), e q^n, f q^n}, q,
m]/QPh[{q,
q^n Sqrt[
a q], (q^(2 n) (a q)^(3/2))/(b c), (a q^(1 + n))/
d, (a q^(1 + n))/e, (a q^(1 + n))/f}, q,
m] QPh[{a q^(1 + 2 n)}, q, 2 m]/
QPh[{(a^2 q^(1 + 2 n))/(b c d)}, q, 2 m] ((b c d z)/(a q))^
m W65[a q^(2 (m + n)), (b c d)/(a q), e q^(m + n),
f q^(m + n), q, z], {m, 0, Infinity}], {n, 0, Infinity}]
]]]], Sum]
returns
W87[a, b, c, d, e, f, q, z] == Sum[(b**c**z/Sqrt[a**q])^n**((QPh[{a**q}, q, 2*n]*QPh[{a^(3/2)**Sqrt[q]/b**c, Sqrt[a**q]/b, Sqrt[a**q]/c, a**q/b**c, d, e, f}, q, n]*Sum[((b**c**d**z/a**q)^m**QPh[{a**q^(1 + 2*n)}, q, 2*m]**QPh[{a^2**q^(1 + 2*n)/b**c**d, a**q^(1 + n)/b**c, Sqrt[a**q]/d, q^n**(a**q)^(3/2)/b**c**d, e**q^n, f**q^n}, q, m]/QPh[{a^2**q^(1 + 2*n)/b**c**d}, q, 2*m]**QPh[{q, q^n**Sqrt[a**q], q^(2*n)**(a**q)^(3/2)/b**c, a**q^(1 + n)/d, a**q^(1 + n)/e, a**q^(1 + n)/f}, q, m])**W65[a**q^(2*(m + n)), b**c**d/a**q, e**q^(m + n), f**q^(m + n), q, z], {m, 0, Infinity}])/QPh[{a^(3/2)**Sqrt[q]/b**c}, q, 2*n]**QPh[{q, Sqrt[a**q], a**q/b, a**q/c, a**q/d, a**q/e, a**q/f}, q, n]), {n, 0, Infinity}]
For equation 5,
Activate[
AddPlusMinus[
PolynomializeFractionPower[
VeryWellPoisedHypergeometricToNumerator[
RearrangeExpression[
W1211[a, b, c, d, e, f, g, h, i, j, q, z] ==
QHypergeometricPFQ[{a, q Sqrt[a], -q Sqrt[a], b, c, d, e, f, g,
h, i, j}, {Sqrt[a], -Sqrt[a], q a/b, q a/c, q a/d, q a/e,
q a/f, q a/g, q a/h, q a/i, q a/j}, q, z]
]]]], Sum]
returns
W1211[a, b, c, d, e, f, g, h, i, j, q, z] ==
QHypergeometricPFQ[{a, \[PlusMinus]Sqrt[a] ** q, b, c, d, e, f, g, h,
i, j}, {\[PlusMinus]Sqrt[a], a ** q/b, a ** q/c, a ** q/d, a ** q/
e, a ** q/f, a ** q/g, a ** q/h, a ** q/i, a ** q/j}, q, z]
I will attach the text file with the equations. I am working on translating them into LaTeX.
Attachments: