Cadabra
a field-theory motivated approach to computer algebra

cdb.core.trace

Manipulating Trace objects
This package defines functionality for manipulating nodes and expressions which define the Trace property

combine_traces(ex: Ex) -> Ex

Combine separate trace nodes into one sum.
This will only move nodes which it classifies as safe to do this on, checking that no objects which are non-scalar will be pulled inside the new trace node. If multiple nodes with different names, but the Trace property defined, are found then they will be combined separately.
Test 1 passed
Copyright © 2001-2024 Kasper Peeters
Questions? info@cadabra.science