3
$\begingroup$

I'm new to mathematica and I'm trying to upgrade TamarA package, because it shows wierd things. To be more precise in case of formulas which should result into fraction of some elements the resulting fraction contains additional label TamarA` (yes with apostrophe as it was a context/namespace name) and the result is hence wrong.

Example: This notebook:

Needs["TamarA`"]
N1 = lg[vb[k1], 1 - gm[5], v[k2]]*lg[ub[p1], 1 - gm[5], u[p2]]
N1s = lg[vb[k1], gm[up[\[Alpha], \[Beta]]], 1 - gm[5], v[k2]]*
      lg[ub[p1], sl[a], gm[\[Alpha], \[Beta]], sl[b], 1 - gm[5], 
      u[p2]]
N2s = lg[vb[k1], gm[up[\[Alpha], \[Beta]]], 1 - gm[5], v[k2]]*
      lg[ub[p1], gm[\[Alpha], \[Beta]], 1 - gm[5], u[p2]]
N1*cj[N1s]
% // ReleaseHold
% // Expand // Together
% // Expand
R1 = %

evaluates in older version of mathematica into something starting like this:

enter image description here

but in mathematica 11 I see some additional output (looks like a context name) (i underlined the problematic part):

enter image description here Could anybody help me with this? I feel I'm missing something trivial here. Thanks.

I'm using Mathematica 11.3.0, student version, under 64bit Ubuntu Linux 16.04.

$\endgroup$
  • $\begingroup$ The TamarA package exports a bunch of lower case public symbols, e.g., g, m, sc, sg, sl, tr, up, dn, vec, v4, v3, d4, eps, gm, D4IndexQ, IndexQ, ToBasis, lg, OpenLg, delta, sc3, trs, vec3, s, ep3, D3IndexQ, d3, ToD3, ToD4, ToSBasis, ls, OpenLs, cj, u, ub, v, vb, VecNameQ,ExVecNameQ. This means that there is a shadowing problem between the TamarA` public symbols and your Global` symbols, which is why the TamarA` context gets added. $\endgroup$ – Carl Woll May 2 at 2:26
  • $\begingroup$ @Carl, that was my first guess as well, but I think it's actually something to do with how some MakeBoxes rules are defined in the package. $\endgroup$ – Brett Champion May 2 at 2:41
  • 2
    $\begingroup$ I’d imagine TamarA is effectively rendered obsolete by the more established FeynCalc, or the more recent Package-X. I could be wrong though. It may be worth looking into them. $\endgroup$ – QuantumDot May 2 at 2:46
5
$\begingroup$

The TamarA` goes away if I edit the MakeBoxes rules in the package from things like

m/: MakeBoxes[m[x_?Sym3Q],StandardForm]:=
 TagBox[
 SubscriptBox[m,MakeBoxes[x,StandardForm]],mass,Editable->False];

to

m/: MakeBoxes[m[x_?Sym3Q],StandardForm]:=
 TagBox[
 SubscriptBox[MakeBoxes[m, StandardForm],
    MakeBoxes[x,StandardForm]],mass,Editable->False];

It's possible the corresponding MakeExpressions rules also need updated, but I haven't looked at them.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.