digerdiga

390 Reputation

8 Badges

11 years, 283 days

MaplePrimes Activity


These are replies submitted by digerdiga

@Pascal4QM I updated my question.

Whatever the problem before, Defining it as

Define(X,P)

seems to work, while I'm curious why Coordinates does not work!?!?

 

 

 

@Pascal4QM Commutator_Algebra_with_L2.mw
 

restart; with(Physics); Setup(dimension = 3, metric = Euclidean, spacetimeindices = lowercaselatin); Coordinates(X, P); g_[]; L2 := Physics:-`*`(Physics:-`^`(X[i], 2), Physics:-`^`(P[j], 2))-Physics:-`*`(Physics:-`*`(Physics:-`*`(X[i], X[j]), P[i]), P[j]); Setup(quantumop = {P, X}, algebrarules = {%Commutator(P[i], P[j]) = 0, %Commutator(X[i], X[j]) = 0, %Commutator(X[j], P[k]) = Physics:-`*`(I, g_[j, k])}); L2X := Simplify(Commutator(L2, X[k])); Simplify(Commutator(L2, L2X))

`The dimension and signature of the tensor space are set to `[3, `- - +`]

 

`The Euclidean metric in cartesian coordinates`

 

`Changing the signature of the tensor spacetime to: `*`+ + +`

 

[dimension = 3, metric = {(1, 1) = 1, (2, 2) = 1, (3, 3) = 1}, spacetimeindices = lowercaselatin]

 

`Default differentiation variables for d_, D_ and dAlembertian are:`*{X = (x1, x2, x3)}

 

`Systems of spacetime coordinates are:`*{P = (p1, p2, p3), X = (x1, x2, x3)}

 

{P, X}

 

Physics:-g_[a, b] = Matrix(%id = 18446746397848441190)

 

Physics:-SpaceTimeVector[i](X)^2*Physics:-SpaceTimeVector[j](P)^2-Physics:-SpaceTimeVector[i](X)*Physics:-SpaceTimeVector[j](X)*Physics:-SpaceTimeVector[i](P)*Physics:-SpaceTimeVector[j](P)

 

`* Partial match of  '`*quantumop*`' against keyword '`*quantumoperators*`' `

 

_______________________________________________________

 

[algebrarules = {%Commutator(Physics:-SpaceTimeVector[i](P), Physics:-SpaceTimeVector[j](P)) = 0, %Commutator(Physics:-SpaceTimeVector[i](X), Physics:-SpaceTimeVector[j](X)) = 0, %Commutator(Physics:-SpaceTimeVector[j](X), Physics:-SpaceTimeVector[k](P)) = I*Physics:-g_[j, k]}, quantumoperators = {p1, p2, p3, x1, x2, x3}]

 

-(2*I)*Physics:-`*`(Physics:-`^`(Physics:-SpaceTimeVector[a](X), 2), Physics:-SpaceTimeVector[k](P))+(2*I)*Physics:-`*`(Physics:-SpaceTimeVector[b](X), Physics:-SpaceTimeVector[k](X), Physics:-SpaceTimeVector[b](P))

 

(2*I)*Physics:-`*`(Physics:-SpaceTimeVector[a](X), Physics:-SpaceTimeVector[a](P), Physics:-SpaceTimeVector[k](X))+4*Physics:-`*`(Physics:-SpaceTimeVector[a](X), Physics:-SpaceTimeVector[a](P), Physics:-`^`(Physics:-SpaceTimeVector[f](X), 2), Physics:-SpaceTimeVector[k](P))-6*Physics:-`*`(Physics:-`^`(Physics:-SpaceTimeVector[a](X), 2), Physics:-SpaceTimeVector[f](P), Physics:-SpaceTimeVector[f](X), Physics:-SpaceTimeVector[k](P))+8*Physics:-`*`(Physics:-`^`(Physics:-SpaceTimeVector[a](X), 2), Physics:-SpaceTimeVector[k](X), Physics:-`^`(Physics:-SpaceTimeVector[r](P), 2))+(8*I)*Physics:-`*`(Physics:-SpaceTimeVector[c](X), Physics:-SpaceTimeVector[k](X), Physics:-SpaceTimeVector[c](P))+(2*I)*Physics:-`*`(Physics:-SpaceTimeVector[d](X), Physics:-SpaceTimeVector[k](X), Physics:-SpaceTimeVector[d](P))-(14*I)*Physics:-`*`(Physics:-`^`(Physics:-SpaceTimeVector[a](X), 2), Physics:-SpaceTimeVector[k](P))-4*Physics:-`*`(Physics:-`^`(Physics:-SpaceTimeVector[a](X), 2), Physics:-`^`(Physics:-SpaceTimeVector[f](P), 2), Physics:-SpaceTimeVector[k](X))+2*Physics:-`*`(Physics:-SpaceTimeVector[c](X), Physics:-SpaceTimeVector[m](X), Physics:-SpaceTimeVector[c](P), Physics:-SpaceTimeVector[m](P), Physics:-SpaceTimeVector[k](X))-2*Physics:-`*`(Physics:-`^`(Physics:-SpaceTimeVector[a](X), 2), Physics:-SpaceTimeVector[s3](X), Physics:-SpaceTimeVector[k](P), Physics:-SpaceTimeVector[s3](P))-6*Physics:-`*`(Physics:-SpaceTimeVector[k](X), Physics:-SpaceTimeVector[s3](X), Physics:-SpaceTimeVector[s6](X), Physics:-SpaceTimeVector[s3](P), Physics:-SpaceTimeVector[s6](P))-2*Physics:-`*`(Physics:-SpaceTimeVector[c](X), Physics:-SpaceTimeVector[k](X), Physics:-SpaceTimeVector[c](P), Physics:-SpaceTimeVector[r](X), Physics:-SpaceTimeVector[r](P))+4*Physics:-`*`(Physics:-`^`(Physics:-SpaceTimeVector[a](X), 2), Physics:-SpaceTimeVector[f](X), Physics:-SpaceTimeVector[f](P), Physics:-SpaceTimeVector[k](P))+2*Physics:-`*`(Physics:-SpaceTimeVector[a](X), Physics:-SpaceTimeVector[a](P), Physics:-SpaceTimeVector[f](X), Physics:-SpaceTimeVector[f](P), Physics:-SpaceTimeVector[k](X))

(1)

``


 

Download Commutator_Algebra_with_L2.mw

 

 

 

See above, what version do you use?

Why didn't it work with Define(X,P) but only with Coordinates?

Second still does not work.

@Pascal4QM I was talking about the macro:

macro(KroneckerDelta = g_)

but anyway.

Why does the Commutator not work, when I predefine an expression as in

L2 := X[k]^2*P[j]^2 - X[k]*X[j]*P[k]*P[j];

Commutator(L2,X[j]);
 

He is not shuffling the P all to the right, so it doesn't work. Do I need to define L2 as something?

It is just a definition after all?!

@Pascal4QM Hey, thanks. I made some edits in particular concerning the free indices mentioning in the help. As such they state the macro should work as well, but it does not.

@acer Is it more clear now?

@acer Thanks. With that you also deleted my answers, which were meant for further explanation...

@Carl Love

In a module the structure is somewhat different compared to a procedure. Just to get it right:

1. local 'variables'

is the same as in a procedure, but the following to lines I just asked about are not directly run when calling Rand(), or?

I mean in order for the procedure ModuleApply to run it needs the seed, but this seed is only given later in the export section. So when calling Rand() does the module read everything till the end and then afterwards calls the ModuleApply?

2. Do you have an example of how ModuleLoad could be read from a Library? Not sure I understand you right.

@Carl Love Very illuminating! Thank you very much.

The Float() are just the rational numbers n/101 where n=0...100 or? I guess that's what happens also with other generators?

Why do you call the procedures

ModuleApply:=...

ModuleLoad:=...

? Do these names serve any purpose?

@mmcdara So, but I do need to call randomize() before rand(0.0..1.0) in order for rand to give different random numbers, or? Are the numbers by randomize pseudo-random or true random numbers?

Do you mind explaining what is happening here?

 

restart;
Seed := randomize();
rfloat := rand(0. .. 1.0);
rfloat();

 

what is the randomize thing doing to rand?

@acer What purpose does "evala" serve here?

@acer I do know that combining your mentioned commands sometimes effectively improves the outcome, but that the difference is so huge as in this example were simplify completely fails surprises me. Do you have more examples?

@acer At least it means that polylog was "touched". I don't really want to fight about it, but it is probably a bug, that will be fixed in a future update?

@acer https://www.mapleprimes.com/questions/226254-Polylog-Vs-Dilog

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