Andriy

260 Reputation

13 Badges

9 years, 300 days

MaplePrimes Activity


These are replies submitted by Andriy

@Carl Love
Thanks a lot for several tips used in your answer. I didn't know about them. The only comment, if one needs just a parity then a command

group[parity](convert([seq(pos[y], y= L2)], disjcyc))

should be placed instead of your command within the procedure.

@Kitonum 
Number of your transpositions and number of transpositions of neighboring elements has the same parity. So, in my case it doesn't matter what particular transpositions to consider.

@ecterrab 
Thank you for answer and comments.

@Alejandro Jakubi 

now the problem is formulated as:

restart; 
with(Physics);
with(Library);
Setup(mathematicalnotation = true);
Setup(op = A);

type(A^5, Physics:-`^`(PhysicsType:-ExtendedQuantumOperator, posint));
type(A^5, PhysicsType:-ExtendedQuantumOperator^posint);

the result is

false
false

Unfortunately, I don't know how to construct a correct type for A^n where n is some particular positive integer.

Reminder
If Physics package is loaded then `*` is overloaded. Hence, distinguish `*` (overloaded) and ':-`*`' (original).

restart;
with(Physics);
z := a*b*c;
type(z, '`*`'(name));
type(z, ':-`*`'(name));
false
true

@Alejandro Jakubi 
What exactly editor do you use?

@acer 
and exhaustingly

@Carl Love 

What is the difference between this function

f:=k->k^2;

and this one

f:=k->fsolve(x^2+k*x-1=0,x)[1];

???

A reference to the documentation would be ok.

@Preben Alsholm 
@Markiyan Hirnyk
Thank you.

@Preben Alsholm
What does it mean "k is just a name"?

@Carl Love 
May be.
PS
f:= `+`:
looks really nice.

@Markiyan Hirnyk 

thank you!

@acer, @Preben Alsholm

Thank you for clarification! However, I don't understand the sens of such design of set. But it is a rhetorical question. So I accept it as is.

@Preben Alsholm 

However it is still actual. So, now it can be formulated as

restart; 
A := {a, b, c};
b := a;
A;
print("++++++++++++++++++");
for i to numelems(A) do
   print(sprintf("A[%a]=%a", i, A[i]))
end do;

print("++++++++++++++++++");

for i to numelems(A)+1 do
   print(sprintf("A[%a]=%a", i, A[i]))
end do

The result:
                        A := {a, b, c}
                             b := a
                             {a, c}
                      "++++++++++++++++++"
                            "A[1]=a"
                            "A[2]=a"
                      "++++++++++++++++++"
                            "A[1]=a"
                            "A[2]=a"
                            "A[3]=c"

What is going on with the set A?

@Carl Love 
Thank you! Tests will show the benefits of Grid using.

@Christopher2222 

I have

a:=[chris,jack,john,jason,fred,alex]:
seq(assign(i, 0), i = a);

Now I want to get back [chris,jack,john,jason,fred,alex]. I try the command

seq(assign(i, 'i'), i = a);

however it doesn't give the expected result.

1 2 3 4 5 6 7 Last Page 2 of 10