feynlag.vertices.bilinear.expand_bilinear¶
- feynlag.vertices.bilinear.expand_bilinear(expr)[source]¶
Distribute
BilinearandMajoranaBilinearoverAdd-valued legs.Both atoms are linear in their two field slots (not in
gamma) but are opaque customFunctions, sosp.expand()alone won’t distribute them — the same “teach SymPy about a custom operator’s linearity” need asD_linear()forPartialMu, here applied to two slots instead of one.This is what makes fermion mass-basis rotations work: a
RotationwithIndexedold fields leavescosθ·ψ₁[i] + sinθ·ψ₂[i]sums trapped inside bilinear slots afterxreplace; without distributing them, extraction would group by the un-split composite key. Bothextract_fermion_vertices()andfermion_mass_matrix()/majorana_mass_matrix()apply it first.