FeynCalc / feyncalc

Mathematica package for algebraic calculations in elementary particle physics.
https://feyncalc.github.io
GNU General Public License v3.0
309 stars 87 forks source link

Output Includes a Four-Vector Separated from its Superscript by a Parenthesis #81

Closed Ferrylodge closed 3 years ago

Ferrylodge commented 3 years ago

Mathematica Version 12.1.1 for Microsoft Windows (64-bit) (June 19, 2020)

FeynCalc version 9.3.1

Did you try to reinstall FeynCalc (stable version) using the automatic installer to make sure that you have the latest bugfixes? Yes

Does your Mathematica initialization file contain statements that might influence the behavior of FeynCalc? Sometimes external packages may modify init.m in unusual ways, causing troubles for other codes. Check the output of Import[FileNameJoin[{$UserBaseDirectory, "Kernel", "init.m"}], "String"]

The output is "( User Mathematica initialization file )".

Please provide a minimal working example that illustrates the problem and works on a fresh kernel. Please explain the difference between the current behavior and the expected behavior.

I am getting output like the following, the final command having been a "Collect2" operation (see attached pdf file):

X^mu+v^mu-(X+v)^mu

The output should be zero. "X" and "v" are four-vectors, and it looks peculiar to see them separated from their superscript by a parenthesis. Should I be using some command in addition to "Collect2"? I tried an "Expand" command and a "Simplify" command but still did not get the proper result which is zero.

Ferrylodge Feyncalc Attachment.pdf

vsht commented 3 years ago
  1. I think you need ExpandScalarProduct.
  2. Mma code from PDFs cannot be directly copy-pasted into the front-end (you can try it yourself) and I don't really have time to fix wrong brackets, slashes and weird symbols by hand. For the future, please attach .nb files directly.
  3. The issues section is actually for obvious bugs, not usage questions. For the latter please use the forum: https://github.com/FeynCalc/feyncalc/discussions
Ferrylodge commented 3 years ago

Thanks for your reply vsht.

  1. My initial post in this thread was a vector equation rather than a scalar equation, so I don't understand how to apply a scalar command to it (i.e. "ExpandScalarProduct").

  2. I initially tried to attach the .nb file directly, but this web page did not accept .nb files, so I attached .pdf instead. I will now attach a .txt file as well. Here is the error message when I tried to attach a .nb file: "We don’t support that file type. Try again with a GIF, JPEG, JPG, PNG, DOCX, GZ, LOG, PDF, PPTX, TXT, XLSX or ZIP."

Ferrylodge Attachment.txt

  1. I will go to "discussions" instead of "issues" next time with usage questions, unless I should start over again there now.

AH

vsht commented 3 years ago

The "trick" to outsmart GitHub with its limitations on attachments would be to create a zip file with the nb file inside. Sorry, perhaps it was not so obvious. Anyway, the text file is also fine with me.

Despite of it's name ExpandScalarProduct also works on sums of vectors. You were asking about vectors "separated from their superscript by a parenthesis" This would be something like FV[a + b + c + d, mu]. It's just a way to typeset such intermediate expressions.

By employing ExpandScalarProduct you can rewrite it as a sum of vectors

FV[a + b + c + d, mu]
% // ExpandScalarProduct
% // FCE // StandardForm

Anyhow, this doesn't seem to help in your case. Upon applying

Collect2[H11[mu] // ExpandScalarProduct, Epsilon]

the output still contains terms that go like 1/Epsilon^3, 1/Epsilon^2 and 1/Epsilon.

From looking at your input I cannot recognize any obvious syntax errors. I guess you should try to break your calculation into smaller steps and try to figure out at which stage things go wrong. At least this is how I would proceed.

Ferrylodge commented 3 years ago

Okay, thanks vsht, later today I will try to break my code into smaller steps.

Incidentally, I am not very concerned by 1/Epsilon^3, 1/Epsilon^2 or 1/Epsilon terms in the output. What most concerns me is that the output still contains terms in the intermediate form FV[a + b + c + d, mu] along with terms in the final form like FV[a, mu], FV[b, mu], FV[ c, mu], and FV[d, mu]. The end result should only have terms in the final form, not the intermediate form.

vsht commented 3 years ago

In that case you just need to apply ExpandScalarProduct to your intermediate result and all FV[a + b + c + d, mu] and alike will be converted to sums of FV[a, mu], FV[b, mu], FV[ c, mu], and FV[d, mu] etc. I guess this shouldn't really be an issue.

Ferrylodge commented 3 years ago

Alles klar. :-)

Of course, I am working on a program that is much much larger than the bits I have copied for you. I have now inserted "ExpandScalarProduct" twenty-one (21) times into this code. And voila, there are no more terms like FV[a + b + c + d, mu] in the final results. Danke, merci, et cetera. Your replies and comments are making Feyncalc much more user-friendly for me. Please feel free to go ahead and close this thread, vsht.

vsht commented 3 years ago

I'm attaching the most recent version of the FeynCalc tutorial (which is also part of the documentation, but perhaps not so convenient to dig out). FeynCalc-Tutorial.zip Perhaps going through sections related to FCE/FCI as well as indices and contractions would help to better understand the logic behind FeynCalc.