emendes

395 Reputation

6 Badges

9 years, 78 days

MaplePrimes Activity


These are replies submitted by emendes

@Carl Love Many thanks.  I need help to understand the last line.  specindex is barely touched in the help file (I am running 2017 and 2020).  And the op part as well. 

 

@acer Many many thanks.  I have thousands of lists like the one in the example.  That one is just to prepare the set of coefficients to be tested for the symmetry y->z in a full 3D quadratic model.  It is my plan to extend that to a higher degree and a higher dimension.  The problem will be now to build T1 and T2 programmatically for all cases.  

@Carl Love Many many thanks. I am carefully checking the line after varA. I know what is going on but I think I will never come up with a solution like that.  

 

@Carl I found the mistake.   It works flawlessly.  Would you have a shorter solution?   That is, no need to apply your solution four times. 

@Carl Love Many thanks.   It worked but please my answer to @Joe Riel.   I could not figure out how to change your solution to accommodate the remaining substitutions.  I have to confess that I did not completely understand it.  For the extra 3 steps I did:

1st step - Back to A.

T:= table([0=0,1=1,2=2,3=3,4=4,5=5,6=6,7=7,8=8,9=9]):
newA1:=subsindets(
    newA, 
    `?[]`~(B, `[]`~(anything, {indices(T,'nolist')})), 
    a-> A[op(1,a), T[op(2,a)]]
);

2nd step

T:= table([2= 3, 3= 2]):
newA2:=subsindets(
    newA1, 
    `?[]`~(A, `[]`~(anything, {indices(T,'nolist')})), 
    a-> B[T[op(1,a)], op(2,a)]
);

 almost gave me the right answer.  The first B terms were messed up.  

 

 

@Joe Riel Many thanks.  It seems that you guessed the next step but I need to apply two more substitutions so the final output is

{Subscript[A, 1, 0], Subscript[A, 1, 1], Subscript[A, 1, 3], \
Subscript[A, 1, 2], Subscript[A, 1, 4], Subscript[A, 1, 6], \
Subscript[A, 1, 5], Subscript[A, 1, 9], Subscript[A, 1, 8], \
Subscript[A, 1, 7], Subscript[A, 3, 0], Subscript[A, 3, 1], \
Subscript[A, 3, 3], Subscript[A, 3, 2], Subscript[A, 3, 4], \
Subscript[A, 3, 6], Subscript[A, 3, 5], Subscript[A, 3, 9], \
Subscript[A, 3, 8], Subscript[A, 3, 7], Subscript[A, 2, 0], \
Subscript[A, 2, 1], Subscript[A, 2, 3], Subscript[A, 2, 2], \
Subscript[A, 2, 4], Subscript[A, 2, 6], Subscript[A, 2, 5], \
Subscript[A, 2, 9], Subscript[A, 2, 8], Subscript[A, 2, 7]}

the extra 3 steps in Mathematica to get the result shown above are:

 

Subscript[B, m_, n_] -> Subscript[A, m, n] 
{Subscript[A, 2, m_] -> Subscript[B, 3, m],  Subscript[A, 3, m_] -> Subscript[B, 2, m]}
Subscript[B, m_, n_] -> Subscript[A, m, n]

With your solution, I do not need the first step.

I tried to modify the code to do the second step but it didn't work (that means that I did not understand what you did). 

 

@Carl Love  Many thanks.  For the example shown above the output should be

{Subscript[A, 1, 0], Subscript[A, 1, 1], Subscript[B, 1, 3], \
Subscript[B, 1, 2], Subscript[A, 1, 4], Subscript[B, 1, 6], \
Subscript[B, 1, 5], Subscript[B, 1, 9], Subscript[A, 1, 8], \
Subscript[B, 1, 7], Subscript[A, 2, 0], Subscript[A, 2, 1], \
Subscript[B, 2, 3], Subscript[B, 2, 2], Subscript[A, 2, 4], \
Subscript[B, 2, 6], Subscript[B, 2, 5], Subscript[B, 2, 9], \
Subscript[A, 2, 8], Subscript[B, 2, 7], Subscript[A, 3, 0], \
Subscript[A, 3, 1], Subscript[B, 3, 3], Subscript[B, 3, 2], \
Subscript[A, 3, 4], Subscript[B, 3, 6], Subscript[B, 3, 5], \
Subscript[B, 3, 9], Subscript[A, 3, 8], Subscript[B, 3, 7]}

if I change varA to {Subscript[A, 1, 9], Subscript[A, 2, 9], Subscript[A, 3, 9]}, the output is {Subscript[B, 1, 7], Subscript[B, 2, 7], Subscript[B, 3, 7]}

 

@Carl Love Many thanks.   I hope my days of sending silly questions will be over soon (I have been bothering you since 2016!).  

@acer Thank you.   Please don't apologize. The answer was spot on in the first post. 

@acer  Many thanks.  I didn't imagine that it would be that easy.  Many thanks.  Since you've mentioned the possibility of forming both in a single call, please show how it should be done.    

@Thomas Richard Many thanks.   It seems that the only improvement was from 2017 to 2018 and no change after that.

@Joe Riel Thanks.  

The output would be 

coef:=[c1 c2 c3 1 c4]

and if the order in L is changed to

L := [c2*x^2 + c3*x*y + z + c1*x, c4*z^2]:

the output is

coef:=[c2 c3 1 c1 c4];

Somehow I think Rootof messes up the order.  

@Joe Riel Thanks.   

Issuing the command 

map2(map2,coeff,model7,vars);

gives the following result

[[-RootOf(64*_Z^3+80*_Z^2+1104*_Z+561)-5/4, alpha[1, 2], 0], [z*alpha[2, 6], RootOf(64*_Z^3+80*_Z^2+1104*_Z+561), x*alpha[2, 6]], [-17*y/alpha[2, 6]+2*z, -17*x/alpha[2, 6], 2*x-1]]

which is clearly wrong.  

 

@acer I believe both will work. Many thanks.

 

@tomleslie Many thanks.   So simple and I could not come up with such a  solution.  I still have a long way ...

First 9 10 11 12 13 14 15 Last Page 11 of 19