feynlag.vertices.extract

Interaction-coefficient extraction from a Lagrangian.

Ported from bsm-calc/models/DLRSM1/symbolic_tools.py. The extractor treats fields as commuting SymPy Symbols — fermions never enter here; they are handled by the bilinear track (Phase 4).

The result is a nested dict:

{n_fields: {(field, field, ...): coefficient}}

where the inner key is the canonically sorted tuple of fields in the monomial and the coefficient is the monomial coefficient (symmetry factorials NOT yet multiplied out — see feynman_rule()).

Functions

extract_interaction_coefficients(L, fields)

Extract interaction coefficients from a Lagrangian.

feynman_rule(coefficient, field_tuple)

Feynman rule for one monomial: i × coefficient × ∏ (multiplicity)!.

vertex_multiplicity(field_tuple)

Product of k! over the multiplicities of identical fields.