ecterrab

14540 Reputation

24 Badges

20 years, 21 days

MaplePrimes Activity


These are replies submitted by ecterrab

@Andriy 

Regarding your question 1): The workaround you suggest is not really a workaround: the step from (17) to (18) from the worksheet attached in my first reply won't work anymore, as you noticed, because the i within nn_operands is now a local variable (you declared it that way in your workaround) while the in i = 1..2 in seq(nn_operands, i = 1..2) is a global variable. For the seq to proceed logically, these two i need to be the same.

Now, there are good reasons for not allowing assigning the summation dummy. Do you have a motivation for assigning it? Or is it only curiosity about how things work?

Regarding your question 2) on am2: enter, at the maple prompt, 

> am2;
                      am2

So, you see am2, not its contents. Now, am2 has not been declared as a quantum operator, then type(am2, Library:-PhysicsType:-ExtendedQuantumOperator); returns false. This is expected, the type doesn't scan the body of a procedure.

In connection you also quoted a sentence from the worksheet I posted: that sentence I wrote refers to am2 applied to arguments i, j, sigma, as in am2(i, j, sigma), and not to an unapplied am2 as you show.

Recalling: when the arguments passed, i, j, sigma, are numbers, the annihilation/creation operators are visible in the output of am2(i, j, sigma), and so the PhysicsType will recognized the construction as a quantum operator. If you do not apply am2, the annihilation/creation operators are not visible in the output of unapplied am2, so in order to have am2 recognized as an operator you need to set it as such using Setup. This same answer is the answer to your other question about N.

The logic of all this is understandable: a sum or product of quantum operators is a quantum operator. Enter the object at the Maple prompt, see what comes out: if the output shows quantum operators or a sum or product of them, PhysicsType will recognize the object as an operator. Otherwise, set the object as an operator using Setup (say as in Setup(op = {am, N, ..})) and that will suffice.

Regarding your question 3) to simplify N^k = N in these cases of fermionic occupation number operators, note that in my reply to you I used Simplify, from the Physics package (check ?Physics,Simplify), not simplify. Try Simplify - it works fine. Also, the simplification implemented  N^k = N applies to N = ap . am, and not to am^2 as you show - that would be another simplification to implement: am^2 = 0, likely: ap^2 = 0; I will see if we can have these other two in place as well in the next update this week.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

@Andriy 

The summation variable cannot be assigned and this is not related to the Physics package but to how Maple works. For example, in a fresh session, try 

> G := sum(g(i), i = 1 .. f);

> i := 7;

> G; 

Error, (in sum) summation variable previously assigned, second argument evaluates to 7 = 1 .. f 

And there is no way around. Note that this is true for sum, int, limit, series, etc.

Independent of that, in your original post you also asked about a simplification N^k = N, where k is a positive integer, N = ap . am is the occupation number operator and am and ap are respectively annihilation and creation operators of fermionic particles. That simplification was missing. It is implemented now and available in the update of the Physics package just posted (today Aug/5) in the Maple Physics: Research & Development updates page. So with the updated library you have

Physics:-Version()

(1)
Note that Physics loads by default with one anticommutative prefix already defined

with(Physics):

Setup(anticommutativeprefix)

[anticommutativeprefix = {_lambda}]

(2)
Set ap, am and N

ap := Creation(_lambda):

Take a power of N

N^4

Physics:-`^`(Physics:-`.`(`a+`, `a-`), 4)

(3)

Simplify(%)

Physics:-`.`(`a+`, `a-`)

 

This simplification then also works with the nn operators of your post when i, j and sigma are numbers so that the am and ap behind nn are visible.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

@Andriy 

The summation variable cannot be assigned and this is not related to the Physics package but to how Maple works. For example, in a fresh session, try 

> G := sum(g(i), i = 1 .. f);

> i := 7;

> G; 

Error, (in sum) summation variable previously assigned, second argument evaluates to 7 = 1 .. f 

And there is no way around. Note that this is true for sum, int, limit, series, etc.

Independent of that, in your original post you also asked about a simplification N^k = N, where k is a positive integer, N = ap . am is the occupation number operator and am and ap are respectively annihilation and creation operators of fermionic particles. That simplification was missing. It is implemented now and available in the update of the Physics package just posted (today Aug/5) in the Maple Physics: Research & Development updates page. So with the updated library you have

Physics:-Version()

(1)
Note that Physics loads by default with one anticommutative prefix already defined

with(Physics):

Setup(anticommutativeprefix)

[anticommutativeprefix = {_lambda}]

(2)
Set ap, am and N

ap := Creation(_lambda):

Take a power of N

N^4

Physics:-`^`(Physics:-`.`(`a+`, `a-`), 4)

(3)

Simplify(%)

Physics:-`.`(`a+`, `a-`)

 

This simplification then also works with the nn operators of your post when i, j and sigma are numbers so that the am and ap behind nn are visible.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

@itsme 

You are right - I made a mistake in the input. It is corrected now in the mw just updated.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

@Andriy 
This one got fixed June 19, that is after 17.01. The fix should appear in the next (dot or full) release.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

@Mac Dude 

4-vectors are tensors with 1 index. As with tensors in general, within the Physics package, you define them using the Define command (also Setup(tensors = {...}) works). So the place to look for this is ?Physics[Define].

Independent of that, a "SpaceTimeVector related to a coordinate system" is automatically set each time you define a coordinate system using the Coordinates command. So the details for this are found in ?Physics[Coordinates] and ?Physics[SpaceTimeVector]

You can see these things at work in the section for "Tensors in Special and General Relativity" of the ?Physics[examples] page. It is a short section that starts with spacetime 4-vectors and the basic manipulations in special relativity, followed by how you set a curved spacetime and work with the same 4-vectors and the general relativity tensors related to having non-zero Christoffel symbols and covariant derivatives. 

Some more for 4-vectors in flat and curved spacetimes is found in ?Physics[Geodesics].

If all this doesn't answer your question or the existing functionality is not sufficient for your purposes, if you could please tell what computations you have in mind we can help you in filling the gaps.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

 

Indeed the bug was in `simplify/sqrt/fraction`. It is fixed now in the version under development. The fix should appear in the next (dot or full) release. 

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Indeed the bug was in `simplify/sqrt/fraction`. It is fixed now in the version under development. The fix should appear in the next (dot or full) release. 

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Maybe you are using the old GUI (so called 'classic' maple interface)? If you could attach a worksheet where you illustrate the problem you are having that could help. Meantime this is what I see in the standard GUI:


with(Physics):

Example with the Schwarzschild metric in spherical coordinates: instead of using Setup (you can, but you do not need to), set the spacetime metric directly from the the metric command g_

g_[sc]

`Systems of spacetime Coordinates are: `*{X = (r, theta, phi, t)}

 

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (r, theta, phi, t)}

 

`The Schwarzschild metric in coordinates `[r, theta, phi, t]

 

`Parameters: `[m]

 

g[mu, nu] = (Matrix(4, 4, {(1, 1) = r/(-r+2*m), (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = -r^2, (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -r^2*sin(theta)^2, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = (r-2*m)/r}))

(1)

The Kretschmann scalar is given by

K := Riemann[alpha, beta, gamma, delta]^2

Physics:-Riemann[alpha, beta, delta, gamma]*Physics:-Riemann[`~alpha`, `~beta`, `~delta`, `~gamma`]

(2)

Simplify(K);

48*m^2/r^6

(3)

Alternatively you can use . to perform multiplication and simplification in one go, as in

K := Typesetting:-delayDotProduct(Riemann[alpha, beta, gamma, delta], Riemann[alpha, beta, gamma, delta])

48*m^2/r^6

(4)

In the above you can also enter the indices of one of the Riemann tensors as contravariant, prefixing them with ~, but you do not need to.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Download KretschmannScalar.mw

Maybe you are using the old GUI (so called 'classic' maple interface)? If you could attach a worksheet where you illustrate the problem you are having that could help. Meantime this is what I see in the standard GUI:


with(Physics):

Example with the Schwarzschild metric in spherical coordinates: instead of using Setup (you can, but you do not need to), set the spacetime metric directly from the the metric command g_

g_[sc]

`Systems of spacetime Coordinates are: `*{X = (r, theta, phi, t)}

 

`Default differentiation variables for d_, D_ and dAlembertian are: `*{X = (r, theta, phi, t)}

 

`The Schwarzschild metric in coordinates `[r, theta, phi, t]

 

`Parameters: `[m]

 

g[mu, nu] = (Matrix(4, 4, {(1, 1) = r/(-r+2*m), (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (2, 1) = 0, (2, 2) = -r^2, (2, 3) = 0, (2, 4) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = -r^2*sin(theta)^2, (3, 4) = 0, (4, 1) = 0, (4, 2) = 0, (4, 3) = 0, (4, 4) = (r-2*m)/r}))

(1)

The Kretschmann scalar is given by

K := Riemann[alpha, beta, gamma, delta]^2

Physics:-Riemann[alpha, beta, delta, gamma]*Physics:-Riemann[`~alpha`, `~beta`, `~delta`, `~gamma`]

(2)

Simplify(K);

48*m^2/r^6

(3)

Alternatively you can use . to perform multiplication and simplification in one go, as in

K := Typesetting:-delayDotProduct(Riemann[alpha, beta, gamma, delta], Riemann[alpha, beta, gamma, delta])

48*m^2/r^6

(4)

In the above you can also enter the indices of one of the Riemann tensors as contravariant, prefixing them with ~, but you do not need to.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Download KretschmannScalar.mw

@serper 

The information you provide is not sufficient for me to understand what is what you are trying to do/compute nor what could be the problem you are trying to point at. Perhaps you could attach a worksheet where you illustrate what is what you are trying to do?

Edgardo S. Cheb-Terrab
Physics, Maplesoft

@serper 

The information you provide is not sufficient for me to understand what is what you are trying to do/compute nor what could be the problem you are trying to point at. Perhaps you could attach a worksheet where you illustrate what is what you are trying to do?

Edgardo S. Cheb-Terrab
Physics, Maplesoft

@J F Ogilvie 

Thanks for your links, John, they will help in an ongoing revision of the SC package, which also includes a mechanism to keep up-to-date the package's databse using the information provided yearly or so by these official/standard sources.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

Hi
The Physics package has achieved a good level of development, that is really good. The list of additional things we would like to see in place is however long and I would be happy to incorporate your feedback where possible. Also, the last leg of development for the next release is starting now - so I'd like to share a bit of the plans and hear opinions if any, or your further suggestions. Among the *candidate* improvements over the working table for the next release are:

1) Conversions between Vector and Tensor notation for 3D vectors. That would also allow us to take advantage of the existing tensor simplification routine to simplify vector expressions (convert to tensor -> simplify -> convert back to vector).

2) Vector integration in 3D Euclidean spaces using the Physics:-Vectors package vector notation and vectorial (Nabla) differential operators, as presented typically in Vector Analysis textbooks - line and surface integrals, work (circulation), flux (through curves and surfaces), etc.

3) Further improvements in the simplification of tensorial expressions.

4) Implement steps in the use of the Riemann invariants to resolve equivalences for solutions to Einstein's equations together with enlarging the database of solutions based on the book by Stephani et al.

5) Introduce a new kind of rule (say operatorrule, or dotrule) indicating the action of a quantum operator over a quantum state (ket) (as in operatorrule = {A . |psi> = something}), allowing us to carry on information about a phase, that cannot be carried on when setting a bracketrule.

6) Implement tensorial simplification of products of Dirac and Pauli matrices taking into account the algebras they satisfy.

7) Complete the support for spinor algebra and gauge fields using tensor notation.

8) Introduce Funint for Functional integration, complementing the existing Fundiff for Functional differentiation.

9) A revamped version of FeynmanDiagrams that: a) removes the current restrictions of no more than 3 vertices, 3 loops and 9 external legs; b) plots the diagrams themselves, besides returning the expansion of the scattering matrix S (represented by the diagrams)

10) The actual computation of the Feynman integrals behind the expansion of the Scattering matrix, including dimensional regularization.

And I don't think this can all be done in one single release, so as said your opinions/suggestions are welcome, either as comments here or writing to me directly at physics@maplesoft.com - thanks.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

PS: a new update to the Physics package got posted yesterday Aug/7, available for download at http://www.maplesoft.com/products/maple/features/physicsresearch.aspx.

@Alejandro

Although - as said - without "assuming real" you do not obtain a simpler solution (perhaps a problem in Maple simplifiers .. doesn't look like that though), I also think this diagonalizing before solving that you suggest, Alejandro, elaborating on Preben's linear combination, is a good idea/step not present in the old matrixDE Maple approach used before 1997. I'll see to implement this diagonalization step in a revised version of those old routines and make the prototype available in some way so that we can play around and improve/continue from there.

Edgardo S. Cheb-Terrab
Physics, Maplesoft

First 55 56 57 58 59 60 61 Page 57 of 64