Re: ctensor - components as a matrix

Daniel Volinski via Maxima-discuss <[email protected]>
Newsgroups gmane.comp.mathematics.maxima.general
Message-ID <[email protected]>
 Hi Viktor,
Thank you for your answer, nice example.
Of course, you can obtain the same result with:
mat_trace(diag_matrix(ρ,-p,-p,-p));

and you don't need "ctensor" for that.
Daniel Volinski.
    En martes, 7 de abril de 2026, 22:42:30 GMT+3, Viktor T. Toth <[email protected]> escribió:  
 
  
Dear Daniel,
 
On the face of it, the component-wise definition of a tensor is indeed fundamentally at odds, philosophically, with the abstract index formalism that itensor aims to represent.
 
Having said that, I could think of a few legitimate use cases, including, e.g., mixed-index rank-2 tensors in particular, which are unchanged under a change of coordinates. Having said that, it's not a construct I ever used much myself.
 
Still, here's a silly but valid example (trace of the perfect fluid stress-energy tensor):
 
load(itensor);
 imetric(g);
 components(T([m],[n]),diag_matrix(rho,-p,-p,-p));
 ishow(g([m,n],[])*T([],[m,n]))$
 ishow(contract(%))$
 sum(%,n,1,dim),eval;
 
 
 
Viktor
 

 
 

 
 On 2026-04-06 02:27, Daniel Volinski via Maxima-discuss wrote:
  
 
 Hi all, 
  In the package "ctensor" I can define the components of a tensor in 4 ways, The second is to define the components as a matrix, like this:   lg:-ident(4)$lg[1,1]:1$lg;
   components(g([i,j],[]),lg);
   ishow(g([i,j],[]))$
  I've never found a usage for that. Do you know of any usage of this construct? i.e. something that will be useful for further calculations. 
  Thank you, 
  Daniel Volinski 
   
  
  _______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss

_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.