A confusion with ToCanonical in 1d

53 views
Skip to first unread message

Nicola Arepo

unread,
Mar 18, 2025, 7:01:57 AM3/18/25
to xAct Tensor Computer Algebra
Hi everyone, 

I have tried to do a 3+1 decomposition to find the Hamiltonian from a Lagrangian. But I have encountered a strange behavior with canonization. There's clearly something I'm missing. A minimal example is the following: 

DefManifold[R3, 3, {a, b, c, d}];
DefManifold[R1, 1, {O1, O2, O3, O4}];
DefManifold[M, {Rd, R1}, {A, B, C, D}]; 

DefMetric[1, G[-a, -b], PD, FlatMetric -> True];
DefMetric[1, g[-O1, -O2], PD,  FlatMetric -> True];
DefProductMetric[metric[-A, -B], {{TangentR3, 1}, {TangentR1, 1}}, Cd];

DefTensor[h[-A, -B], M, Symmetric[{A,  B}]]; 
DefTensor[T[-A, -B], M]

Now, the follwoing happens:

In: F[a, O2] h[O1, b] // ToCanonical  
Out: F[a, b]   h[O1, O2]

but 

In: F[a, O2] h[O1, A] // ToCanonical  
Out: F[a, O1]   h[O2, A]

The first instance should not occur, right? Why are the indices switched?

I could assume that the dimension of the manifold is not one, or switch off the additional symmetries of dim 1 manifolds as suggested here, but I have many other expressions that need to be simplified (and for which ToCanonical works well). It seems that the problem is in the fact that h is symmetric, but I need to keep it like that.

Thanks in advance, and many thanks to the developers for their amazing work!


Nicola Arepo

unread,
Mar 18, 2025, 10:57:05 AM3/18/25
to xAct Tensor Computer Algebra
*T instead of F, sorry. 
Reply all
Reply to author
Forward
0 new messages