feynlag.suggest.build_lagrangian

feynlag.suggest.build_lagrangian(suggestions, coupling_prefix='c', start=1)[source]

Attach a fresh coupling to each suggestion and fill a Lagrangian.

Parameters:
  • suggestions – iterable of SuggestedTerm.

  • coupling_prefix – base name for the generated couplings.

  • start – first coupling index.

Returns:

(Lagrangian, [ExternalParameter, ...]) — potential/Yukawa terms enter as −c·expr (feynlag stores L ⊃ −V); kinetic-scaffold terms enter coupling-free. The generated parameters carry unit_dim = 4 − dim.