3

I do not understand why the output of the two commands:

metric[-c, -d] (CD[d][RicciScalar[CD][]]) (CD[c][RicciScalar[CD][]]) // Simplify,

(CD[-c][RicciScalar[CD][]]) (CD[c][RicciScalar[CD][]]) // Simplify,

is different. The first one outputs a scalar function, as expected, whereas the second gives an expression

enter image description here

that I do not know how to contract.

Michael Seifert
  • 15,208
  • 31
  • 68
  • 1
    Can you provide a minimal version of your code that reproduces the error when run on a "clean" kernel? It may help in tracking down the problem. – Michael Seifert Oct 08 '21 at 19:47

1 Answers1

3

You have a product of a Basis[-c, {1, B}], for some basis B, and a CTensor[comps, {B}][c] object.

You can use ContractBasis to force the contraction of a Basis[...] object with anything.

Or you can use FromBasisExpand to convert a Basis[...] object into a CTensor object, and the two CTensor objects will then be automatically contracted.

jose
  • 6,328
  • 1
  • 14
  • 24
  • 1
    Oh wow, this is the guy that made the package :o I'm wondering if you've answered my questions in the past :D – akozi Jan 13 '23 at 17:58