MaplePrimes Questions

In a recent question/conversation, I had discussed integrating dsolve/numeric-based codes with NLPsolve at 
https://www.mapleprimes.com/questions/236494-Inconsistent-Behavior-With-Dsolvenumeric-And-NLPSolve-sqp

@acer was able to help resolve the issue by calling NLPSolve with higher optimality tolerance.

I am starting a new question/post to show the need for evalhf as the previous post takes too long to load.
Code is attached for the same.
 

restart:

currentdir();

"C:\Users\Venkat\OneDrive - The University of Texas at Austin\Documents\trial\Learnningsqpoptim"

Test code written by Dr. Venkat Subramanian at UT Austin, 05/31/2023 and has been updated multiple times. This code uses CVP approach (piecwise constant) to perform optimal control. NLPSolve combination with RK2 approach to integrate ODEs (constant step size) works well for this problem. But dsolve numeric based codes work (with optimality tolerance fix from acer), but cannot handle large values of nvar (optimization variables).

Digits:=15;

15

 

eqodes:=[diff(ca(t),t)=-(u+u^2/2)*1.0*ca(t),diff(cb(t),t)=1.0*u*ca(t)-0.1*cb(t)];

[diff(ca(t), t) = -1.0*(u+(1/2)*u^2)*ca(t), diff(cb(t), t) = 1.0*u*ca(t)-.1*cb(t)]

soln:=dsolve({op(eqodes),ca(0)=alpha,cb(0)=beta},type=numeric,'parameters'=[alpha,beta,u],savebinary=true):

 

 

Note that Vector or Array form can be used for RK2h to implement the procedure for any number of variables/ODEs. But the challenge will be when implicit methods are used to integrate ODEs/DAEs and running them in evalhf form (this can be done with Gauss elimination type linear solver, but this will be limited to small number of ODEs/DAEs say 200 or so).

RK2h:=proc(NN,u,dt,y0::Vector(datatype=float[8]))#this procedure can be made efficient in vector form
local j,c1mid,c2mid,c10,c20,c1,c2;
option hfloat;
c10:=y0[1];c20:=y0[2];
for j from 1 to NN do
  c1mid:=c10+dt/NN*(-(u+u^2/2)*c10):
  c2mid:=c20+dt/NN*(u*c10)-0.1*dt/NN*c20:
  c1:=c10/2+c1mid/2+dt/NN/2*(-(u+u^2/2)*c1mid):
  c2:=c20/2+c2mid/2+dt/NN/2*(u*c1mid)-0.1*dt/NN/2*c2mid:
  c10:=c1:c20:=c2:
  od:
y0[1]:=c10:y0[2]:=c20:
end proc:

 

soln('parameters'=[1,0,0.1]);soln(0.1);

[alpha = 1., beta = 0., u = .1]

[t = .1, ca(t) = HFloat(0.9895549324188543), cb(t) = HFloat(0.009898024276129616)]

 

 

ssdsolve:=proc(x)
interface(warnlevel=0):

#if  type(x,Vector)#if type is not needed for this problem, might be needed for other problems
#then


local z1,n1,i,c10,c20,dt,u;
global soln,nvar;
dt:=evalf(1.0/nvar):
c10:=1.0:c20:=0.0:
for i from 1 to nvar do
u:=x[i]:
soln('parameters'=[c10,c20,u]):
z1:=soln(dt):
c10:=subs(z1,ca(t)):c20:=subs(z1,cb(t)):
od:
-c20;
 #else 'procname'(args):

#end if:

end proc:

 

 

ssRK2:=proc(x)#based on RK2
#interface(warnlevel=0):
option hfloat;
#if  type(x,Vector)
#then

local z1,n1,i,c10,c20,dt,u,NN,y0;
global nvar,RK2h;
y0:=Array(1..2,[1.0,0.0],datatype=float[8]):
#y0[1]:=1.0:y0[2]:=0.0:
dt:=evalf(1.0/nvar):
NN:=256*2/nvar;#NN is hardcode based on the assumption that nvar will be a multiple of 2 <=256


for i from 1 to nvar do
u:=x[i]:
evalhf(RK2h(NN,u,dt,y0)):
od:
-y0[2];
 #else 'procname'(args):

#end if:

end proc:

nvar:=2;

2

ic0:=Vector(nvar,[seq(0.1,i=1..nvar)],datatype=float):

bl := Vector(nvar,[seq(0.,i=1..nvar)],datatype=float):bu := Vector(nvar,[seq(5.,i=1..nvar)],datatype=float):

infolevel[Optimization]:=15;

15

CodeTools:-Usage(Optimization:-NLPSolve(nvar,evalhf(ssRK2),[],initialpoint=ic0,[bl,bu],optimalitytolerance=1e-6)):

NLPSolve: calling NLP solver

NLPSolve: using method=sqp

NLPSolve: number of problem variables 2

NLPSolve: number of nonlinear inequality constraints 0

NLPSolve: number of nonlinear equality constraints 0

NLPSolve: number of general linear constraints 0

NLPSolve: feasibility tolerance set to 0.1053671213e-7

NLPSolve: optimality tolerance set to 0.1e-5

NLPSolve: iteration limit set to 50

NLPSolve: infinite bound set to 0.10e21

NLPSolve: trying evalhf mode

NLPSolve: trying evalf mode

attemptsolution: number of major iterations taken 11

memory used=0.96MiB, alloc change=0 bytes, cpu time=16.00ms, real time=121.00ms, gc time=0ns

 

Calling the procedures based on RK2 with NLPSolve uses evalf for numerical gradient (fdiff). Providing a procedure for gradient solves this issue.

gradRK2 := proc (x,g)
option hfloat;
local base, i, xnew, del;
global nvar,ssRK2;
xnew:=Array(1..nvar,datatype=float[8]):
base := ssRK2(x);
for i to nvar do
xnew[i] := x[i]; end do;
for i to nvar do
del := max(1e-5,.1e-6*x[i]);
xnew[i] := xnew[i]+del;
g[i] := (ssRK2(xnew)-base)/del;
xnew[i] := xnew[i]-del;
end do;
end proc:

CodeTools:-Usage(Optimization:-NLPSolve(nvar,evalhf(ssRK2),[],initialpoint=ic0,[bl,bu],objectivegradient=gradRK2,optimalitytolerance=1e-6)):

NLPSolve: calling NLP solver

NLPSolve: using method=sqp

NLPSolve: number of problem variables 2

NLPSolve: number of nonlinear inequality constraints 0

NLPSolve: number of nonlinear equality constraints 0

NLPSolve: number of general linear constraints 0

NLPSolve: feasibility tolerance set to 0.1053671213e-7

NLPSolve: optimality tolerance set to 0.1e-5

NLPSolve: iteration limit set to 50

NLPSolve: infinite bound set to 0.10e21

NLPSolve: trying evalhf mode

attemptsolution: number of major iterations taken 11

memory used=184.77KiB, alloc change=0 bytes, cpu time=31.00ms, real time=110.00ms, gc time=0ns

Significant saving in memory used is seen. CPU time is also less, which is more apparent at larger valeus of nvar.

 

dsolvenumeric based codes work for optimization, but evalf is invoked possibly for both the objective and gradient

CodeTools:-Usage(Optimization:-NLPSolve(nvar,(ssdsolve),[],initialpoint=ic0,[bl,bu],optimalitytolerance=1e-6)):

NLPSolve: calling NLP solver

NLPSolve: using method=sqp

NLPSolve: number of problem variables 2

NLPSolve: number of nonlinear inequality constraints 0

NLPSolve: number of nonlinear equality constraints 0

NLPSolve: number of general linear constraints 0

NLPSolve: feasibility tolerance set to 0.1053671213e-7

NLPSolve: optimality tolerance set to 0.1e-5

NLPSolve: iteration limit set to 50

NLPSolve: infinite bound set to 0.10e21

NLPSolve: trying evalhf mode

NLPSolve: trying evalf mode

attemptsolution: number of major iterations taken 11

memory used=14.61MiB, alloc change=37.00MiB, cpu time=94.00ms, real time=213.00ms, gc time=46.88ms

 

Providing gradient procedure doesn't help with evalhf computaiton for dsolve/numeric based procedures.

graddsolve := proc (x,g)
local base, i, xnew, del;
global nvar,ssdsolve;
#xnew:=Vector(nvar,datatype=float[8]):
xnew:=Array(1..nvar,datatype=float[8]):
base := ssdsolve(x);
for i to nvar do
xnew[i] := x[i]; end do;
for i to nvar do
del := max(1e-5,.1e-6*x[i]);
xnew[i] := xnew[i]+del;
g[i] := (ssdsolve(xnew)-base)/del;
xnew[i] := xnew[i]-del;
end do;
end proc:

CodeTools:-Usage(Optimization:-NLPSolve(nvar,(ssdsolve),[],initialpoint=ic0,[bl,bu],objectivegradient=graddsolve,optimalitytolerance=1e-6)):

NLPSolve: calling NLP solver

NLPSolve: using method=sqp

NLPSolve: number of problem variables 2

NLPSolve: number of nonlinear inequality constraints 0

NLPSolve: number of nonlinear equality constraints 0

NLPSolve: number of general linear constraints 0

NLPSolve: feasibility tolerance set to 0.1053671213e-7

NLPSolve: optimality tolerance set to 0.1e-5

NLPSolve: iteration limit set to 50

NLPSolve: infinite bound set to 0.10e21

NLPSolve: trying evalhf mode

NLPSolve: trying evalf mode

attemptsolution: number of major iterations taken 11

memory used=3.82MiB, alloc change=0 bytes, cpu time=31.00ms, real time=129.00ms, gc time=0ns

 

Calling both RK2 and dsolve based procedures again to check the values and computation meterics

s1RK2:=CodeTools:-Usage(Optimization:-NLPSolve(nvar,evalhf(ssRK2),[],initialpoint=ic0,[bl,bu],objectivegradient=gradRK2,optimalitytolerance=1e-6)):

NLPSolve: calling NLP solver

NLPSolve: using method=sqp

NLPSolve: number of problem variables 2

NLPSolve: number of nonlinear inequality constraints 0

NLPSolve: number of nonlinear equality constraints 0

NLPSolve: number of general linear constraints 0

NLPSolve: feasibility tolerance set to 0.1053671213e-7

NLPSolve: optimality tolerance set to 0.1e-5

NLPSolve: iteration limit set to 50

NLPSolve: infinite bound set to 0.10e21

NLPSolve: trying evalhf mode

attemptsolution: number of major iterations taken 11

memory used=185.09KiB, alloc change=0 bytes, cpu time=16.00ms, real time=95.00ms, gc time=0ns

s1dsolve:=CodeTools:-Usage(Optimization:-NLPSolve(nvar,ssdsolve,[],initialpoint=ic0,[bl,bu],objectivegradient=graddsolve,optimalitytolerance=1e-6)):

NLPSolve: calling NLP solver

NLPSolve: using method=sqp

NLPSolve: number of problem variables 2

NLPSolve: number of nonlinear inequality constraints 0

NLPSolve: number of nonlinear equality constraints 0

NLPSolve: number of general linear constraints 0

NLPSolve: feasibility tolerance set to 0.1053671213e-7

NLPSolve: optimality tolerance set to 0.1e-5

NLPSolve: iteration limit set to 50

NLPSolve: infinite bound set to 0.10e21

NLPSolve: trying evalhf mode

NLPSolve: trying evalf mode

attemptsolution: number of major iterations taken 11

memory used=3.82MiB, alloc change=0 bytes, cpu time=31.00ms, real time=122.00ms, gc time=0ns

s1RK2[1];s1dsolve[1];

-.523900304316377463

-.523901163953022553

 

Next, a for loop is written to optimize for increasing values of nvar. One can see that evalhf is important for larger values of nvar. While dsolve/numeric is a superior code, not being able to use it in evalhf format is a significant weakness and should be addressed. Note that dsolve numeric evalutes procedures that are evaluated in evalhf or compiled form, so hopefully this is an easy fix.

infolevel[Optimization]:=0:

for j from 1 to 9 do
nvar:=2^(j-1):
ic0:=Vector(nvar,[seq(0.1,i=1..nvar)],datatype=float):
bl := Vector(nvar,[seq(0.,i=1..nvar)],datatype=float):bu := Vector(nvar,[seq(5.,i=1..nvar)],datatype=float):
soptRK[j]:=CodeTools:-Usage(Optimization:-NLPSolve(nvar,evalhf(ssRK2),[],initialpoint=ic0,[bl,bu],objectivegradient=gradRK2,optimalitytolerance=1e-6)):
print(2^(j-1),soptRK[j][1]);

od:

memory used=88.40KiB, alloc change=0 bytes, cpu time=0ns, real time=10.00ms, gc time=0ns

1, HFloat(-0.5008626988793192)

memory used=155.66KiB, alloc change=0 bytes, cpu time=16.00ms, real time=30.00ms, gc time=0ns

2, -.523900304316377463

memory used=175.36KiB, alloc change=0 bytes, cpu time=62.00ms, real time=80.00ms, gc time=0ns

4, -.535152497919956782

memory used=243.69KiB, alloc change=0 bytes, cpu time=156.00ms, real time=239.00ms, gc time=0ns

8, -.540546896131004706

memory used=260.09KiB, alloc change=0 bytes, cpu time=141.00ms, real time=260.00ms, gc time=0ns

16, -.542695734426874465

memory used=385.84KiB, alloc change=0 bytes, cpu time=313.00ms, real time=545.00ms, gc time=0ns

32, -.542932877726400531

memory used=0.65MiB, alloc change=0 bytes, cpu time=734.00ms, real time=1.18s, gc time=0ns

64, -.543011976841572652

memory used=1.24MiB, alloc change=0 bytes, cpu time=1.55s, real time=2.40s, gc time=0ns

128, -.543035276649319276

memory used=2.99MiB, alloc change=0 bytes, cpu time=3.45s, real time=5.92s, gc time=0ns

256, -.543041496228812814

for j from 1 to 6 do
nvar:=2^(j-1):
ic0:=Vector(nvar,[seq(0.1,i=1..nvar)],datatype=float):
bl := Vector(nvar,[seq(0.,i=1..nvar)],datatype=float):bu := Vector(nvar,[seq(5.,i=1..nvar)],datatype=float):
soptdsolve[j]:=CodeTools:-Usage(Optimization:-NLPSolve(nvar,evalf(ssdsolve),[],initialpoint=ic0,[bl,bu],objectivegradient=graddsolve,optimalitytolerance=1e-6)):
print(2^(j-1),soptdsolve[j][1]);

od:

memory used=0.66MiB, alloc change=0 bytes, cpu time=16.00ms, real time=11.00ms, gc time=0ns

1, HFloat(-0.5008631947224957)

memory used=3.79MiB, alloc change=0 bytes, cpu time=15.00ms, real time=52.00ms, gc time=0ns

2, -.523901163953022553

memory used=21.28MiB, alloc change=0 bytes, cpu time=78.00ms, real time=236.00ms, gc time=0ns

4, -.535153942647626391

memory used=144.82MiB, alloc change=-4.00MiB, cpu time=469.00ms, real time=1.60s, gc time=46.88ms

8, -.540549407239521607

memory used=347.30MiB, alloc change=16.00MiB, cpu time=1.27s, real time=3.45s, gc time=140.62ms

16, -.542699055038344258

memory used=1.33GiB, alloc change=-8.00MiB, cpu time=7.66s, real time=15.92s, gc time=750.00ms

32, -.542936165630524603

 

SS:=[seq(soptRK[j][1],j=1..9)];

[HFloat(-0.5008626988793192), -.523900304316377463, -.535152497919956782, -.540546896131004706, -.542695734426874465, -.542932877726400531, -.543011976841572652, -.543035276649319276, -.543041496228812814]

 

E1:=[seq(SS[i]-SS[i+1],i=1..nops(SS)-1)];

[HFloat(0.02303760543705824), 0.11252193603580e-1, 0.5394398211048e-2, 0.2148838295869e-2, 0.237143299527e-3, 0.79099115172e-4, 0.23299807746e-4, 0.6219579494e-5]

To get 6 Digits accuracy we need nvar = 256 which may not be attainable with dsolve/numeric approach unless we are able to call it evalhf format.

 

 


 

Download ImportanceofevalhfNLPSolve.mw

Eval(`&varphi;`(t), t = 0) = `&varphi;__0`, Eval(diff(`&varphi;`(t), t), t = 0) = 0

Eval(varphi(t), t = 0) = varphi__0, Eval(diff(varphi(t), t), t = 0) = 0

(1)

`~`[value](convert({Eval(diff(varphi(t), t), t = 0) = 0, Eval(varphi(t), t = 0) = varphi__0}, D))

{eval((D(varphi))(t), t = 0) = 0, varphi(0) = varphi__0}

(2)

map(value, convert({Eval(diff(varphi(t), t), t = 0) = 0, Eval(varphi(t), t = 0) = varphi__0}, D))

{eval((D(varphi))(t), t = 0) = 0, varphi(0) = varphi__0}

(3)

convert({Eval(diff(varphi(t), t), t = 0) = 0, Eval(varphi(t), t = 0) = varphi__0}, D); `~`[value](%)

{varphi(0) = varphi__0, (D(varphi))(0) = 0}

(4)

NULL

I have expected elementwise and map to be effective. Why aren't they for this example?

(Evaluation at a point (see help(D)): In output (3) it is the first time that I see a composition of the D operator with the Eval function (vertical bar). Is that an undocumented feature or part of an answer that I could not figure out myself?)

Download Convert_inert_IC_to_D_notation.mw

I am aware of https://www.maplesoft.com/products/system_requirements.aspx which shows requirements for the concurrent version (the old page https://www.maplesoft.com/products/roadmap.aspx does no longer exist)

Does anybody know a list or URL telling which Maple version (supposedly) needs what Windows version and which combinations will not work?

I am asking because I switch to a new NB and consider to setup a virtual machine for old programs.

Hi,

Here is the code I would like to complete:

with(plots):
theta:= s -> -2*Pi*n*s/ell;
v:=s->piecewise(And(0<=s,s<=ell/2), c*s, ell/2<s, c*(ell-s));
ell:=1;
c:=1;
n:=2;
spacecurve([cos(theta(s)),v(s),sin(theta(s))],s=0..ell,colorscheme = ["valuesplit",???????]);

What to put in place of the question marks so that the color of the curve is, for example, red if s is between 0 and ell/2, and green if s is between ell/2 and ell?

Thanks.

Dear all

I have a code that compute the elements of the sigma algebra generated by C in the domain X 
If X is a discrete set and C is also a discrete set 

I get a good results 

But in change X to be an interval and C will be set of three elements

No result obtained 

sigma_algebra.mw

Thank you

Where do you think label="dontexpand" is coming from in the following? I never seen this before. Is this a bug?

When using PDEtools:-Solve no such error shows up. Worksheet below

998948

interface(version);

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

Physics:-Version();

`The "Physics Updates" version in the MapleCloud is 1462 and is the same as the version installed in this computer, created 2023, June 10, 2:26 hours Pacific Time.`

restart;

998948

sol:=sum((-2*_R^2+1)/(6*_R^2+4*_R-1)*ln(y(x)/x-_R),_R = RootOf(2*_Z^3+2*_Z^2-_Z+1))-ln(x)-c[1] = 0;
solve(sol,y(x))

sum((-2*_R^2+1)*ln(y(x)/x-_R)/(6*_R^2+4*_R-1), _R = RootOf(2*_Z^3+2*_Z^2-_Z+1))-ln(x)-c[1] = 0

Error, (in solve) cannot solve expressions with sum((-2*_R^2+1)/(6*_R^2+4*_R-1)*ln(y(x)/x-_R),_R = RootOf(2*_Z^3+2*_Z^2-_Z+1,label = "dontexpand")) for y(x)

PDEtools:-Solve(sol,y(x))

y(x) = exp(-c[1])+_R*x

 

Download dontexpand_june_10_2023.mw

Maple has a myriad of kernel functions for doing different kinds of symbolic replacements to whole expressions: subs, eval, algsubs, applyrule, `simplify/siderels`, `simpl/eval`,  Physics:-Substitute, MTM:-subs, MmaTranslator:-Mma:-ReplaceRepeated, PDEtools:-dsubs, liesymm:-wsubs, student:-powsubs, etc. But if I need to apply transformation rules over and over again until the result no longer changes within  iterations in a singular clean built-in command (so, without explicit while / until / MmaTranslator:-Mma:-FixedPoint) elegantly, only four can be called: eval['recurse']algsubs, applyrule, MmaTranslator['Mma']['ReplaceRepeated']. The difference between applyrule and algsubs has been elucidated in this help page:

applyrule … does not do mathematical transformations as algsubs does.

However, I cannot find any explanation for the potential distinctions between eval['recurse'] and MmaTranslator['Mma']['ReplaceRepeated'] in their documentation. Does anyone know?

Besides, is it possible to use an "operator" form (like ) instead of a "functional" form (like ) to perform (single or repeated) substitutions in Maple?

 Why is the (solve or dsolve command) not executed?

Sam.mw

How to solve ordinary differemtial equation system with initial conditions and boundary conditions. Here, some initial conditions are unknown variables. So how to find these  values of parameters.

eq1 := diff(f(x), x, x, x)+(1/2)*cos(alpha)*x*(diff(f(x), x, x))+(1/2)*sin(alpha)*f(x)*(diff(f(x), x, x)) = 0;

eq2 := diff(g(x), x, x)+diff(g(x), x)+(diff(g(x), x))*(diff(h(x), x))+cos(alpha)*x*(diff(g(x), x))+sin(alpha)*f(x)*g(x) = 0;

eq3 := diff(g(x), x, x)+diff(h(x), x, x)+1/2*(cos(alpha)*x+sin(alpha)*f(x)) = 0

ics:=f(0)=0, f'(0)=1, f''(0)=a[1], g(0)=1, g'(0)=a[2], h(0)=1, h'(0)=a[3];

bcs:=f(x) , g(x), h(x) tends to 0 ad x tends to infinity

How can one set their own symbols for DynamicSystems continuoustimevar?  If I try to use DynamicSystems:-SystemOptions('continuoustimevar'=x): or DynamicSystems:-SystemOptions('continuoustimevar'=y): Maple complains that these letters are already assigned. Why can not one have their own choice of which letters to use?  Is there a workaround?


 

858904

interface(version);

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

restart;

858904

DynamicSystems:-SystemOptions('continuoustimevar'=t):

restart;

858904

DynamicSystems:-SystemOptions('continuoustimevar'=x):

Error, (in DynamicSystems:-SystemOptions) cannot assign x to continuoustimevar, already assigned to statevariable

restart;

858904

DynamicSystems:-SystemOptions('continuoustimevar'=y):

Error, (in DynamicSystems:-SystemOptions) cannot assign y to continuoustimevar, already assigned to outputvariable

restart;

858904

DynamicSystems:-SystemOptions('continuoustimevar'=XXXXXX):

 


 

Download dynamics_june_9_2023.mw

 

Dear all 

I have a simple equation that can be solved by hand. But, can Maple solve this equation 

cos(x)> a,   with a :  real number.

Can we get all possible solution with different values of a, 

Equation.mw

thank you for your help  

Can one evaluate dirac spinor products using the Standard Model package? How far can I take the evaluation in the package? See maplesheet with commentary.

Evaluating_spinor_products_with_the_standard_model_package.mw

When adding singsol=all to this ode in the first example, dsolve returns nothing. But it should have returned the general solution if it can not find singular solution. This is what it does always as can be seen from the second example given below.

Why did dsolve return nothing in the first example? Is this a bug?

319824

interface(version);

`Standard Worksheet Interface, Maple 2023.0, Windows 10, March 6 2023 Build ID 1689885`

restart;

319824

ode:=y(x)=x*diff(y(x),x)+ a*diff(y(x),x)/(sqrt(1+diff(y(x),x)^2));
sol_1:=dsolve(ode,y(x));
sol_2:=dsolve(ode,y(x),singsol=all);

y(x) = x*(diff(y(x), x))+a*(diff(y(x), x))/(1+(diff(y(x), x))^2)^(1/2)

y(x) = x*c__1+a*c__1/(c__1^2+1)^(1/2)

"sol_2 := "

ode:=diff(y(x),x)^2-(1+2*x*y(x))*diff(y(x),x)+2*x*y(x) = 0;
sol_1:=dsolve(ode,y(x));
sol_2:=dsolve(ode,y(x), singsol=all)

(diff(y(x), x))^2-(1+2*y(x)*x)*(diff(y(x), x))+2*y(x)*x = 0

y(x) = c__1*exp(x^2), y(x) = x+c__1

y(x) = c__1*exp(x^2), y(x) = x+c__1

 

Download missing_sol.mw

I have a question regarding the combstruct package, to be more precise, the specification of a combinatorial species as it is described here:

https://www.maplesoft.com/support/help/maple/view.aspx?path=combstruct%2fspecification

Is there any available constructor to generate the functorial composition of two species? For example, a simple graph can be seen as a subset of the set of all 2-element subsets of a given node set. This is nothing else than the functorial composition of E*E with E_2*E, where E denotes the species of sets and E_2 the species of 2-element sets. Thus, the species of subsets can be expressed as E*E and the one of 2-element subsets as E_2*E. Written in the Magma syntax, it should be the functorial composition of Prod(Set(Z),Set(Z)) with Prod(Set(Z,card=2),Set(Z)). Applying the count-function, it should produce the series https://oeis.org/A000088.

How can I achieve that?

How to find series values.I got this error.Please Help.

Maple code for the problem is

TFBE.mw

First 191 192 193 194 195 196 197 Last Page 193 of 2427