fricas
(1) -> <spad>
fricas
)abbrev package HYPGEOM HyperGeometric
HyperGeometric(): Exports == Implementation where
R ==> Fraction Integer -- better than Integer for this purpose
X ==> Expression R
NNI ==> NonNegativeInteger
SMP ==> SparseMultivariatePolynomial(R, Kernel X) -- if R has IntegralDomain
SUP ==> SparseUnivariatePolynomial SMP
EFSP ==> ElementaryFunctionStructurePackage(R,X)
FACSUP ==> Factored SUP
FACREC ==> Record(factor:SUP, exponent:NNI)
HYPER ==> Record(ap:List X, bq:List X, fac:X)
PARAM ==> Record(ab:List SUP, const:List SUP)
Exports == with
factoredForm : (X->X) -> Fraction(FACSUP)
getParameters : FACSUP -> PARAM
convert : SUP -> X
isPoly? :(X->X) -> Boolean
isQuoRat? :(X->X) -> Boolean
pFq : (X->X) -> HYPER
pFq0 : (X->X) -> HYPER
construct: (HYPER,Symbol) -> X
display : HYPER -> OutputForm
hyperLookup : HYPER -> X
Implementation == add
factoredForm(f:X->X):Fraction(FACSUP) ==
ns:X:=new()$Symbol::X
q:=f(ns+1)/f(ns)
nq:=normalize(q)$EFSP
dnq:=denom nq
nnq:=numer nq
unnq:=univariate(nnq,first tower(ns))
udnq:=univariate(dnq,first tower(ns))
funnq:=factor unnq
fudnq:=factor udnq
funnq/fudnq
getParameters x ==
qm:=create()$SingletonAsOrderedSet
r:List FACREC:=factors x
l1:List SUP:=[]
l2:List SUP:=[]
for s in r repeat
p:SUP:=s.factor
if variables p = [qm]
then
q1:=p-qm::SUP
for i in 1..s.exponent repeat
l1:=cons(q1,l1)
else
q2:=p
for i in 1..s.exponent repeat
l2:=cons(q2,l2)
return [l1,l2]$PARAM
convert(x:SUP):X ==
k:Kernel(X):=first tower('_%::X)
y:SMP:=multivariate(x,k)$SMP
coerce(y)$X
pFq(f:X->X):HYPER ==
ff:=factoredForm(f)
gpn:=getParameters(numer ff).ab
gpd:=getParameters(denom ff).ab
[[convert t for t in gpn],[convert t for t in gpd],1$X]$HYPER
-- 1 in bq => remove it otherwise add 1 to aq
-- coeff and f(0) todo
-- pFq(k+->cos(k)) , pre-filter f(n+1)/f(n) rational?
isPoly?(f:X->X):Boolean ==
nsym:Symbol:=new()$Symbol
ns:X:=nsym::X
q:=f(ns)
D(q,nsym)$X=0 => true
nq:=normalize(q)$EFSP
dnq:=denom nq
nnq:=numer nq
unnq:=univariate(nnq,first tower(ns))
udnq:=univariate(dnq,first tower(ns))
empty?(variables unnq) => false
not empty?(variables udnq) => false
true
isQuoRat?(f:X->X):Boolean ==
isPoly?(f) => true -- accelerates e.g. k^1234567
nsym:Symbol:=new()$Symbol
ns:X:=nsym::X
q:=f(ns+1)/f(ns)
D(q,nsym)$X=0 => true
nq:=normalize(q)$EFSP
dnq:=denom nq
nnq:=numer nq
unnq:=univariate(nnq,first tower(ns))
udnq:=univariate(dnq,first tower(ns))
empty?(variables unnq) and empty?(variables udnq) => false
true
buildConst(x:List SUP):X ==
empty?(x) => 1$X
p:SUP:=reduce(_*,x)
convert p
pFq0(f:X->X):HYPER ==
ff:=factoredForm(f)
gpn:=getParameters(numer ff)
gpd:=getParameters(denom ff)
a:=[convert t for t in gpn.ab]
b:=[convert t for t in gpd.ab]
if member?(1$X,b) then
b:=delete(b,position(1$X,b))
else
a:=cons(1$X,a)
c:=convert unit(numer ff)
ca:=buildConst(gpn.const)
cb:=buildConst(gpd.const)
[a,b,c*ca*cb]$HYPER
construct(x,s) ==
v:=s::X
a:=x.ap
b:=x.bq
c:=x.fac
av:=[paren(v+t) for t in a]
bv:=[paren(v+t) for t in b]
num:=1$X
den:=1$X
if not empty? av then
num:=reduce(_*,av)
if not empty? bv then
den:=reduce(_*,bv)
c*num/den/(v+1$X)
display(x:HYPER):OutputForm ==
OF ==> OutputForm
a:=[s::OF for s in x.ap]
b:=[s::OF for s in x.bq]
c:=(x.fac)::OF
p:=(#a)::OF
q:=(#b)::OF
A:=sub(presub('F::OF,p),q)
if #a < #b then
a:=append(a,['*::OF for i in 1..#b- #a])
else
b:=append(b,['*::OF for i in 1..#a- #b])
--B:=binomial(blankSeparate a, blankSeparate b)
B:=blankSeparate [A,matrix [a,b],bracket c]
--hconcat(A,B)
hyperLookup(x:HYPER):X ==
a:=x.ap
b:=x.bq
c:=x.fac
p:= #a
q:= #b
if p=1 then
if q=0 then
return (1-c)^(-a.1)
0$X</spad>
fricas
Compiling FriCAS source code from file
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/5800620949499819823-25px001.spad
using old system compiler.
HYPGEOM abbreviates package HyperGeometric
------------------------------------------------------------------------
initializing NRLIB HYPGEOM for HyperGeometric
compiling into NRLIB HYPGEOM
compiling exported factoredForm : Expression Fraction Integer -> Expression Fraction Integer -> Fraction Factored SparseUnivariatePolynomial SparseMultivariatePolynomial(Fraction Integer,Kernel Expression Fraction Integer)
Time: 0.13 SEC.
compiling exported getParameters : Factored SparseUnivariatePolynomial SparseMultivariatePolynomial(Fraction Integer,Kernel Expression Fraction Integer) -> Record(ab: List SparseUnivariatePolynomial SparseMultivariatePolynomial(Fraction Integer,Kernel Expression Fraction Integer),const: List SparseUnivariatePolynomial SparseMultivariatePolynomial(Fraction Integer,Kernel Expression Fraction Integer))
Time: 0.03 SEC.
compiling exported convert : SparseUnivariatePolynomial SparseMultivariatePolynomial(Fraction Integer,Kernel Expression Fraction Integer) -> Expression Fraction Integer
Time: 0.02 SEC.
compiling exported pFq : Expression Fraction Integer -> Expression Fraction Integer -> Record(ap: List Expression Fraction Integer,bq: List Expression Fraction Integer,fac: Expression Fraction Integer)
Time: 0 SEC.
compiling exported isPoly? : Expression Fraction Integer -> Expression Fraction Integer -> Boolean
Time: 0.01 SEC.
compiling exported isQuoRat? : Expression Fraction Integer -> Expression Fraction Integer -> Boolean
Time: 0.04 SEC.
compiling local buildConst : List SparseUnivariatePolynomial SparseMultivariatePolynomial(Fraction Integer,Kernel Expression Fraction Integer) -> Expression Fraction Integer
Time: 0.01 SEC.
compiling exported pFq0 : Expression Fraction Integer -> Expression Fraction Integer -> Record(ap: List Expression Fraction Integer,bq: List Expression Fraction Integer,fac: Expression Fraction Integer)
Time: 0.06 SEC.
compiling exported construct : (Record(ap: List Expression Fraction Integer,bq: List Expression Fraction Integer,fac: Expression Fraction Integer),Symbol) -> Expression Fraction Integer
Time: 0.02 SEC.
compiling exported display : Record(ap: List Expression Fraction Integer,bq: List Expression Fraction Integer,fac: Expression Fraction Integer) -> OutputForm
processing macro definition OF ==> OutputForm
Time: 0.02 SEC.
compiling exported hyperLookup : Record(ap: List Expression Fraction Integer,bq: List Expression Fraction Integer,fac: Expression Fraction Integer) -> Expression Fraction Integer
Time: 0.01 SEC.
(time taken in buildFunctor: 0)
;;; *** |HyperGeometric| REDEFINED
;;; *** |HyperGeometric| REDEFINED
Time: 0.01 SEC.
Warnings:
[1] factoredForm: not known that (AlgebraicallyClosedField) is of mode (CATEGORY domain (IF (has (Fraction (Integer)) (IntegralDomain)) (PROGN (ATTRIBUTE (AlgebraicallyClosedFunctionSpace (Fraction (Integer)))) (ATTRIBUTE (TranscendentalFunctionCategory)) (ATTRIBUTE (CombinatorialOpsCategory)) (ATTRIBUTE (LiouvillianFunctionCategory)) (ATTRIBUTE (SpecialFunctionCategory)) (SIGNATURE reduce ($ $)) (SIGNATURE number? ((Boolean) $)) (IF (has (Fraction (Integer)) (PolynomialFactorizationExplicit)) (ATTRIBUTE (PolynomialFactorizationExplicit)) noBranch) (SIGNATURE setSimplifyDenomsFlag ((Boolean) (Boolean))) (SIGNATURE getSimplifyDenomsFlag ((Boolean)))) noBranch))
[2] factoredForm: not known that (TranscendentalFunctionCategory) is of mode (CATEGORY domain (IF (has (Fraction (Integer)) (IntegralDomain)) (PROGN (ATTRIBUTE (AlgebraicallyClosedFunctionSpace (Fraction (Integer)))) (ATTRIBUTE (TranscendentalFunctionCategory)) (ATTRIBUTE (CombinatorialOpsCategory)) (ATTRIBUTE (LiouvillianFunctionCategory)) (ATTRIBUTE (SpecialFunctionCategory)) (SIGNATURE reduce ($ $)) (SIGNATURE number? ((Boolean) $)) (IF (has (Fraction (Integer)) (PolynomialFactorizationExplicit)) (ATTRIBUTE (PolynomialFactorizationExplicit)) noBranch) (SIGNATURE setSimplifyDenomsFlag ((Boolean) (Boolean))) (SIGNATURE getSimplifyDenomsFlag ((Boolean)))) noBranch))
[3] getParameters: exponent has no value
[4] getParameters: l1 has no value
[5] getParameters: l2 has no value
[6] pFq0: ab has no value
[7] pFq0: const has no value
[8] construct: ap has no value
[9] construct: bq has no value
[10] construct: fac has no value
[11] display: ap has no value
[12] display: bq has no value
[13] display: fac has no value
[14] hyperLookup: ap has no value
[15] hyperLookup: bq has no value
[16] hyperLookup: fac has no value
Cumulative Statistics for Constructor HyperGeometric
Time: 0.36 seconds
finalizing NRLIB HYPGEOM
Processing HyperGeometric for Browser database:
--->-->HyperGeometric(constructor): Not documented!!!!
--->-->HyperGeometric((factoredForm ((Fraction (Factored (SparseUnivariatePolynomial (SparseMultivariatePolynomial (Fraction (Integer)) (Kernel (Expression (Fraction (Integer)))))))) (Mapping (Expression (Fraction (Integer))) (Expression (Fraction (Integer))))))): Not documented!!!!
--->-->HyperGeometric((getParameters ((Record (: ab (List (SparseUnivariatePolynomial (SparseMultivariatePolynomial (Fraction (Integer)) (Kernel (Expression (Fraction (Integer)))))))) (: const (List (SparseUnivariatePolynomial (SparseMultivariatePolynomial (Fraction (Integer)) (Kernel (Expression (Fraction (Integer))))))))) (Factored (SparseUnivariatePolynomial (SparseMultivariatePolynomial (Fraction (Integer)) (Kernel (Expression (Fraction (Integer)))))))))): Not documented!!!!
--->-->HyperGeometric((convert ((Expression (Fraction (Integer))) (SparseUnivariatePolynomial (SparseMultivariatePolynomial (Fraction (Integer)) (Kernel (Expression (Fraction (Integer))))))))): Not documented!!!!
--->-->HyperGeometric((isPoly? ((Boolean) (Mapping (Expression (Fraction (Integer))) (Expression (Fraction (Integer))))))): Not documented!!!!
--->-->HyperGeometric((isQuoRat? ((Boolean) (Mapping (Expression (Fraction (Integer))) (Expression (Fraction (Integer))))))): Not documented!!!!
--->-->HyperGeometric((pFq ((Record (: ap (List (Expression (Fraction (Integer))))) (: bq (List (Expression (Fraction (Integer))))) (: fac (Expression (Fraction (Integer))))) (Mapping (Expression (Fraction (Integer))) (Expression (Fraction (Integer))))))): Not documented!!!!
--->-->HyperGeometric((pFq0 ((Record (: ap (List (Expression (Fraction (Integer))))) (: bq (List (Expression (Fraction (Integer))))) (: fac (Expression (Fraction (Integer))))) (Mapping (Expression (Fraction (Integer))) (Expression (Fraction (Integer))))))): Not documented!!!!
--->-->HyperGeometric((construct ((Expression (Fraction (Integer))) (Record (: ap (List (Expression (Fraction (Integer))))) (: bq (List (Expression (Fraction (Integer))))) (: fac (Expression (Fraction (Integer))))) (Symbol)))): Not documented!!!!
--->-->HyperGeometric((display ((OutputForm) (Record (: ap (List (Expression (Fraction (Integer))))) (: bq (List (Expression (Fraction (Integer))))) (: fac (Expression (Fraction (Integer)))))))): Not documented!!!!
--->-->HyperGeometric((hyperLookup ((Expression (Fraction (Integer))) (Record (: ap (List (Expression (Fraction (Integer))))) (: bq (List (Expression (Fraction (Integer))))) (: fac (Expression (Fraction (Integer)))))))): Not documented!!!!
--->-->HyperGeometric(): Missing Description
; compiling file "/var/aw/var/LatexWiki/HYPGEOM.NRLIB/HYPGEOM.lsp" (written 14 SEP 2022 08:05:57 PM):
; /var/aw/var/LatexWiki/HYPGEOM.NRLIB/HYPGEOM.fasl written
; compilation finished in 0:00:00.118
------------------------------------------------------------------------
HyperGeometric is now explicitly exposed in frame initial
HyperGeometric will be automatically loaded when needed from
/var/aw/var/LatexWiki/HYPGEOM.NRLIB/HYPGEOM
fricas
)set output algebra on
R ==> Fraction Integer -- better than Integer for this purpose
Type: Void
fricas
X ==> Expression R
Type: Void
fricas
NNI ==> NonNegativeInteger
Type: Void
fricas
SMP ==> SparseMultivariatePolynomial(R, Kernel X) -- if R has IntegralDomain
Type: Void
fricas
SUP ==> SparseUnivariatePolynomial SMP
Type: Void
fricas
EFSP ==> ElementaryFunctionStructurePackage(R,X)
Type: Void
fricas
FACSUP ==> Factored SUP
Type: Void
fricas
FACREC ==> Record(factor:SUP, exponent:NNI)
Type: Void
fricas
HYPER ==> Record(ap:List X, bq:List X, fac:X)
Type: Void
fricas
T1(n) == 1/(2*n-1)/factorial(2*n+1)
Type: Void
fricas
T2(k) == binomial(n,k)*(-1)^k/factorial(k)
Type: Void
fricas
T3(k) == (-1)^k*(x/2)^(2*k+p)/factorial(k)/factorial(k+p)
Type: Void
fricas
T4(k) == binomial(n,k)^2*binomial(n+k,k)^2
Type: Void
fricas
T5(n) == binomial(n,k)^2*binomial(n+k,k)^2
Type: Void
fricas
T6(k) == n^k
Type: Void
fricas
T7(k) == factorial(k)
Type: Void
fricas
T8(k) == factorial(2*k+7)/factorial(k-3)
Type: Void
fricas
T9(k) == (k^2-1)*factorial(3*k+1)/(2*k+7)/factorial(k+3)
Type: Void
fricas
T10(k) == z^k/factorial(k)
Type: Void
fricas
T11(k) == 2^k/factorial(k)^2
Type: Void
fricas
T12(k) == binomial(n,k)
Type: Void
fricas
ff1:=factoredForm(T1)$HYPGEOM
fricas
Compiling function T1 with type Expression(Fraction(Integer)) ->
Expression(Fraction(Integer))
1 1
- (? - -)
4 2
(22) ---------------------
1 3
(? + -)(? + 1)(? + -)
2 2
Type: Fraction(Factored(SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer)))))))
fricas
ff2:=factoredForm(T2)$HYPGEOM
fricas
Compiling function T2 with type Expression(Fraction(Integer)) ->
Expression(Fraction(Integer))
? - n
(23) --------
2
(? + 1)
Type: Fraction(Factored(SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer)))))))
fricas
ff3:=factoredForm(T3)$HYPGEOM
fricas
Compiling function T3 with type Expression(Fraction(Integer)) ->
Expression(Fraction(Integer))
1 2
- x
4
(24) - ------------------
(? + 1)(? + p + 1)
Type: Fraction(Factored(SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer)))))))
fricas
ff4:=factoredForm(T4)$HYPGEOM
fricas
Compiling function T4 with type Expression(Fraction(Integer)) ->
Expression(Fraction(Integer))
2 2
(? - n) (? + n + 1)
(25) --------------------
4
(? + 1)
Type: Fraction(Factored(SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer)))))))
fricas
ff5:=factoredForm(T5)$HYPGEOM
fricas
Compiling function T5 with type Expression(Fraction(Integer)) ->
Expression(Fraction(Integer))
2
(? + k + 1)
(26) ------------
2
(? - k + 1)
Type: Fraction(Factored(SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer)))))))
fricas
ff6:=factoredForm(T6)$HYPGEOM
fricas
Compiling function T6 with type Expression(Fraction(Integer)) ->
Expression(Fraction(Integer))
(27) n
Type: Fraction(Factored(SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer)))))))
fricas
ff7:=factoredForm(T7)$HYPGEOM
fricas
Compiling function T7 with type Expression(Fraction(Integer)) ->
Expression(Fraction(Integer))
(28) ? + 1
Type: Fraction(Factored(SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer)))))))
fricas
ff8:=factoredForm(T8)$HYPGEOM
fricas
Compiling function T8 with type Expression(Fraction(Integer)) ->
Expression(Fraction(Integer))
9
4 (? + 4)(? + -)
2
(29) ----------------
? - 2
Type: Fraction(Factored(SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer)))))))
fricas
ff9:=factoredForm(T9)$HYPGEOM
fricas
Compiling function T9 with type Expression(Fraction(Integer)) ->
Expression(Fraction(Integer))
2 4 7
27 ?(? + -)(? + -)(? + 2)(? + -)
3 3 2
(30) --------------------------------
9
(? - 1)(? + 4)(? + -)
2
Type: Fraction(Factored(SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer)))))))
fricas
ff10:=factoredForm(T10)$HYPGEOM
fricas
Compiling function T10 with type Expression(Fraction(Integer)) ->
Expression(Fraction(Integer))
z
(31) -----
? + 1
Type: Fraction(Factored(SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer)))))))
fricas
ff11:=factoredForm(T11)$HYPGEOM
fricas
Compiling function T11 with type Expression(Fraction(Integer)) ->
Expression(Fraction(Integer))
2
(32) --------
2
(? + 1)
Type: Fraction(Factored(SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer)))))))
fricas
ff12:=factoredForm(T12)$HYPGEOM
fricas
Compiling function T12 with type Expression(Fraction(Integer)) ->
Expression(Fraction(Integer))
? - n
(33) - -----
? + 1
Type: Fraction(Factored(SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer)))))))
fricas
for v in [ff1,ff2,ff3,ff4,ff5,ff6,ff7,ff8,ff9,ff10,ff11,ff12] repeat
output getParameters(numer v)
output getParameters(denom v)
1
[ab = [- -], const = []]
2
3 1
[ab = [-, 1, -], const = []]
2 2
[ab = [- n], const = []]
[ab = [1, 1], const = []]
[ab = [], const = [x, x]]
[ab = [p + 1, 1], const = []]
[ab = [n + 1, n + 1, - n, - n], const = []]
[ab = [1, 1, 1, 1], const = []]
[ab = [k + 1, k + 1], const = []]
[ab = [- k + 1, - k + 1], const = []]
[ab = [], const = [n]]
[ab = [], const = []]
[ab = [1], const = []]
[ab = [], const = []]
9
[ab = [-, 4], const = []]
2
[ab = [- 2], const = []]
7 4 2
[ab = [-, 2, -, -, 0], const = []]
2 3 3
9
[ab = [-, 4, - 1], const = []]
2
[ab = [], const = [z]]
[ab = [1], const = []]
[ab = [], const = []]
[ab = [1, 1], const = []]
[ab = [- n], const = []]
[ab = [1], const = []]
Type: Void
fricas
gp2:=getParameters(numer ff2).ab
(35) [- n]
Type: List(SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer))))))
fricas
gp3:=getParameters(denom ff3).ab
(36) [p + 1, 1]
Type: List(SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer))))))
fricas
----
mp3:=multivariate(gp3.1,tower(new()$Symbol).1)$SMP::X
(37) p + 1
Type: Expression(Fraction(Integer))
fricas
mp2:=multivariate(gp2.1,tower(new()$Symbol).1)$SMP::X
(38) - n
Type: Expression(Fraction(Integer))
fricas
--- List(Expression(Fraction(Integer)))
[convert(v) for v in gp3]
(39) [p + 1, 1]
Type: List(Expression(Fraction(Integer)))
fricas
[convert(v) for v in gp2]
(40) [- n]
Type: List(Expression(Fraction(Integer)))
fricas
-- near the goal ;)
pFq(T1)
1 3 1
(41) [ap = [- -], bq = [-, 1, -], fac = 1]
2 2 2
Type: Record(ap: List(Expression(Fraction(Integer))),bq: List(Expression(Fraction(Integer))),fac: Expression(Fraction(Integer)))
fricas
pFq(T2)
(42) [ap = [- n], bq = [1, 1], fac = 1]
Type: Record(ap: List(Expression(Fraction(Integer))),bq: List(Expression(Fraction(Integer))),fac: Expression(Fraction(Integer)))
fricas
pFq(T3)
(43) [ap = [], bq = [p + 1, 1], fac = 1]
Type: Record(ap: List(Expression(Fraction(Integer))),bq: List(Expression(Fraction(Integer))),fac: Expression(Fraction(Integer)))
fricas
pFq(T4)
(44) [ap = [n + 1, n + 1, - n, - n], bq = [1, 1, 1, 1], fac = 1]
Type: Record(ap: List(Expression(Fraction(Integer))),bq: List(Expression(Fraction(Integer))),fac: Expression(Fraction(Integer)))
fricas
pFq(T5)
(45) [ap = [k + 1, k + 1], bq = [- k + 1, - k + 1], fac = 1]
Type: Record(ap: List(Expression(Fraction(Integer))),bq: List(Expression(Fraction(Integer))),fac: Expression(Fraction(Integer)))
fricas
pFq(T6)
(46) [ap = [], bq = [], fac = 1]
Type: Record(ap: List(Expression(Fraction(Integer))),bq: List(Expression(Fraction(Integer))),fac: Expression(Fraction(Integer)))
fricas
pFq(T7)
(47) [ap = [1], bq = [], fac = 1]
Type: Record(ap: List(Expression(Fraction(Integer))),bq: List(Expression(Fraction(Integer))),fac: Expression(Fraction(Integer)))
fricas
pFq(T8)
9
(48) [ap = [-, 4], bq = [- 2], fac = 1]
2
Type: Record(ap: List(Expression(Fraction(Integer))),bq: List(Expression(Fraction(Integer))),fac: Expression(Fraction(Integer)))
fricas
pFq(T9)
7 4 2 9
(49) [ap = [-, 2, -, -, 0], bq = [-, 4, - 1], fac = 1]
2 3 3 2
Type: Record(ap: List(Expression(Fraction(Integer))),bq: List(Expression(Fraction(Integer))),fac: Expression(Fraction(Integer)))
fricas
pFq(k+->sin(k))
(50) [ap = [], bq = [], fac = 1]
Type: Record(ap: List(Expression(Fraction(Integer))),bq: List(Expression(Fraction(Integer))),fac: Expression(Fraction(Integer)))
fricas
--------------
-- simple test
isQuoRat?(k+->sin k)
(51) false
Type: Boolean
fricas
isQuoRat?(k+->sin asin k^4)
(52) true
Type: Boolean
fricas
isQuoRat?(k+->log exp k^4)
(53) true
Type: Boolean
fricas
isQuoRat?(k+->exp k^4)
(54) true
Type: Boolean
fricas
isQuoRat?(k+->x^k)
(55) true
Type: Boolean
fricas
un:=unit numer ff1
1
(56) -
4
Type: SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer)))))
fricas
ud:=unit denom ff1
(57) 1
Type: SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer)))))
fricas
unud:=un/ud
1
(58) -
4
Type: Fraction(SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer))))))
fricas
pFq0(T6)
(59) [ap = [1], bq = [], fac = n]
Type: Record(ap: List(Expression(Fraction(Integer))),bq: List(Expression(Fraction(Integer))),fac: Expression(Fraction(Integer)))
fricas
T3(k)
fricas
Compiling function T3 with type Variable(k) -> Expression(Integer)
k x p + 2 k
(- 1) (-)
2
(60) ----------------
k!(p + k)!
Type: Expression(Integer)
fricas
T3C:=(k+x)^2/((k+p+1)*(k+1))
2 2
x + 2 k x + k
(61) -----------------------
2
(k + 1)p + k + 2 k + 1
Type: Fraction(Polynomial(Integer))
fricas
pFq0(T3)
1 2
(62) [ap = [], bq = [p + 1], fac = - - x ]
4
Type: Record(ap: List(Expression(Fraction(Integer))),bq: List(Expression(Fraction(Integer))),fac: Expression(Fraction(Integer)))
fricas
ff3
1 2
- x
4
(63) - ------------------
(? + 1)(? + p + 1)
Type: Fraction(Factored(SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer)))))))
fricas
--
pFq0(T10)
(64) [ap = [], bq = [], fac = z]
Type: Record(ap: List(Expression(Fraction(Integer))),bq: List(Expression(Fraction(Integer))),fac: Expression(Fraction(Integer)))
fricas
pFq0(T11)
(65) [ap = [], bq = [1], fac = 2]
Type: Record(ap: List(Expression(Fraction(Integer))),bq: List(Expression(Fraction(Integer))),fac: Expression(Fraction(Integer)))
fricas
hy:=pFq0(T3)
1 2
(66) [ap = [], bq = [p + 1], fac = - - x ]
4
Type: Record(ap: List(Expression(Fraction(Integer))),bq: List(Expression(Fraction(Integer))),fac: Expression(Fraction(Integer)))
fricas
hyc:=construct(hy,z)$HYPGEOM
1 2
- x
4
(67) - ------------------
(z + 1)(z + p + 1)
Type: Expression(Fraction(Integer))
fricas
ff3
1 2
- x
4
(68) - ------------------
(? + 1)(? + p + 1)
Type: Fraction(Factored(SparseUnivariatePolynomial
?(SparseMultivariatePolynomial
?(Fraction(Integer),
Kernel(Expression(Fraction(Integer)))))))
fricas
display(hy)$HYPGEOM
+ * + 1 2
(69) F | | [- - x ]
0 1 +p + 1+ 4
fricas
display(pFq0(T1))$HYPGEOM
+ 1 +
|- - *|
| 2 | 1
(70) F | | [-]
1 2 | 3 1| 4
| - -|
+ 2 2+
fricas
display(pFq0(T2))$HYPGEOM
+- n+
(71) F | | [1]
1 1 + 1 +
fricas
display(pFq0(T3))$HYPGEOM
+ * + 1 2
(72) F | | [- - x ]
0 1 +p + 1+ 4
fricas
display(pFq0(T4))$HYPGEOM
+n + 1 n + 1 - n - n+
(73) F | | [1]
4 3 + 1 1 1 * +
fricas
hyperLookup(pFq0 T12)
n
(74) 2
Type: Expression(Fraction(Integer))
fricas
Q:=construct(pFq0(T1),Z)$HYPGEOM
1 1
- (Z - -)
4 2
(75) ---------------------
1 3
(Z + 1)(Z + -)(Z + -)
2 2
Type: Expression(Fraction(Integer))
fricas
T1(Z+1)/T1(Z)- distribute Q
fricas
Compiling function T1 with type Polynomial(Integer) -> Expression(
Integer)
fricas
Compiling function T1 with type Variable(Z) -> Expression(Integer)
1 1 3 2 1 3
(- - Z + -)(2 Z + 3)! + (Z + 2 Z + - Z - -)(2 Z + 1)!
4 8 4 4
(76) -------------------------------------------------------
3 2 11 3
(Z + 3 Z + -- Z + -)(2 Z + 3)!
4 4
Type: Expression(Fraction(Integer))
fricas
normalize $
Line 105: normalize $
..........A
Error A: syntax error at top level
Error A: Improper syntax.
2 error(s) parsing