Question: Unprotect/protect a tensor

The local command is really horribly treated in the manual. Very difficult to figure out heads from tails.

What follows is Maple code to unprotect the metric tensor g_[], and alter the components. that part I figured out by trial and error where the manual fails to clearly describe how.

But, the problem I now have, is that the unprotected metric does not show the tensor "visual matrix" form anymore if I execute  g_[] . So it makes it all unusable.

How do I enter the unprotected and altered g_[] back into maple so it can be used to calculate the Ricci tensor, Einstein tensor and such ? I guess it will have to be protected again etc. ?

Here is the code


restart;
with(Physics);
g_[sc];
g_[];
_local(g_[]);
g_[1, 2] := 1;
g_[3, 3];
Physics:-g_[1, 1];
g_[1, 2];
Physics:-g_[1, 1];
g_[];
for x to 4 do
    for y to 4 do g_[x, y] := Physics:-g_[x, y]; end do;
end do;
g_[];


So the question is. How do you reverse a localalized metric back to being protected after you altered the metric ?

Please Wait...