On this page

expand_mink_bis

symbolica.community.idenso Function

expand_mink_bis(self_: Expression) -> Expression

Expand products around factors carrying Minkowski or bispinor indices.

This combines the selection patterns of expand_mink() and expand_bis() in one coefficient pass. Other representation families remain in the coefficient sector.

Arguments

  • self_: a factorized Spenso-compatible expression.

Returns

The expression distributed around both selected representation families.

Examples

from symbolica.community.idenso import expand_mink_bis, initialize
from symbolica.community.spenso import Representation, TensorName
initialize()
minkowski, bispinor = Representation.mink(4), Representation.bis(4)
p_mu = TensorName("p")(minkowski("mu")).to_expression()
q_mu = TensorName("q")(minkowski("mu")).to_expression()
u_a = TensorName("u")(bispinor("a")).to_expression()
v_a = TensorName("v")(bispinor("a")).to_expression()
factorized = (p_mu + q_mu) * (u_a + v_a)
expected = p_mu * u_a + p_mu * v_a + q_mu * u_a + q_mu * v_a
expand_mink_bis(factorized) == expected