I am trying to load the package HypExp by using the instructions given on the site. The package throws an error

SetDelayed::write: Tag HypergeometricPFQ in HypergeometricPFQ[mm1:{___,SeriesData[\[Epsilon]_,0,_,m:0|1,n_,1],___},mm2___List,x_] is Protected.

SetDelayed::write: Tag HypergeometricPFQ in HypergeometricPFQ[mm1___List,mm2:{___,SeriesData[\[Epsilon]_,0,_,m:0|1,n_,1],___},x_] is Protected.


when I try to load it. My expressions are not coming properly. Could someone help me with what is happening?

I can't post screen shot in comments (do not know how). WIll delete this once you read it.

First, you can try sending bug report to the email at bottom of the link you showed. It is old package, so do not know if owner is still there.

The problem is here

TestParamPFQ[A_List,
B_List, ϵ_] := (Module[{α, β, a, b, ii, J},
J = Length[A];
If[Length[B] != J - 1, Return[False]];
If[Length[B] == 0, Return[False]];
α =
Table[Coefficient[Expand[A[[ii]]], ϵ], {ii, 1, J}];
a = Table[Coefficient[A[[ii]]  ϵ, ϵ], {ii, 1, J}];
β =
Table[Coefficient[Expand[B[[ii]]], ϵ], {ii, 1, J - 1}];
b = Table[
Coefficient[B[[ii]]  ϵ, ϵ], {ii, 1, J - 1}];
(*testing the input parameters*)
For[ii = 1, ii <= J, ii++,
For[ii = 1, ii <= J - 1, ii++,
Return[True];])

TestParamPFQHalf[A_List,
B_List, ϵ_] := (Module[{α, β, a, b, ii, J},
J = Length[A];
If[Length[B] != J - 1, Return[False]];
If[Length[B] == 0, Return[False]];
α =
Table[Coefficient[Expand[A[[ii]]], ϵ], {ii, 1, J}];
a = Table[Coefficient[A[[ii]]  ϵ, ϵ], {ii, 1, J}];
β =
Table[Coefficient[Expand[B[[ii]]], ϵ], {ii, 1, J - 1}];
b = Table[
Coefficient[B[[ii]]  ϵ, ϵ], {ii, 1, J - 1}];
(*testing the input parameters*)
For[ii = 1, ii <= J, ii++,
If[! (MatchQ[a[[ii]], _Integer | Rational[_, 2]]), Return[False]]];
For[ii = 1, ii <= J - 1, ii++,
If[! (MatchQ[a[[ii]], _Integer | Rational[_, 2]]), Return[False]]];
Return[True];])

Unprotect[HypergeometricPFQ];
Unprotect[HypergeometricPFQ];
HypergeometricPFQ[
mm1 : ({___,
SeriesData[ϵ_, 0, _, m : (0 | 1), n_, 1], ___}),
mm2___List, x_] :=
Series[HypergeometricPFQ[Normal /@ mm1, Normal /@ mm2,
x], {ϵ, 0, n - 1}] /;
TestParamPFQ[Normal[mm1], Normal[mm2], ϵ] ||
TestParamPFQHalf[Normal[mm1], Normal[mm2], ϵ]

HypergeometricPFQ[mm1___List,
mm2 : ({___,
SeriesData[ϵ_, 0, _, m : (0 | 1), n_, 1], ___}), x_] :=
Series[HypergeometricPFQ[Normal /@ mm1, Normal /@ mm2,
x], {ϵ, 0, n - 1}] /;
TestParamPFQ[Normal[mm1], Normal[mm2], ϵ] ||
TestParamPFQHalf[Normal[mm1], Normal[mm2], ϵ]
Protect[HypergeometricPFQ];


It is looks like wrong usage of SeriesData which is the main cause. May be SeriesData signature has changed since this package was written in 2011. HypExp 2.0 (19-APR-2011)

V 14 on windows 10

• Thanks for commenting. I found out that running Mathematica for a while and then loading the package does not cause this error. Mar 26 at 15:01