feynlag.suggest

Invariant-term suggestion: enumerate the Lagrangian a model can have.

Given the declared fields and symmetries, this module enumerates every gauge- and discrete-invariant term up to mass dimension 4 — turning the model-building stage from “hand-derive every invariant, then hope check_invariance catches your mistakes” into “declare fields, review the suggested operator basis, attach couplings”.

The engine is feynlag’s own, already-tested invariance machinery used as an oracle (feynlag.invariance): candidate terms are constructed from gauge-invariant building blocks, filtered for U(1) neutrality, projected onto the discrete-invariant subspace by group averaging (the Reynolds operator), reduced to a linearly independent basis, and then every emitted term is re-verified against the full check_* battery.

Public surface:

Functions

build_lagrangian(suggestions[, ...])

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

reynolds_project(expr, discrete_groups)

Project expr onto the joint discrete-invariant subspace.

suggest_kinetic(fields[, flavor_index])

Kinetic/gauge scaffolding — no enumeration, just the canonical terms.

suggest_potential(scalars, gauge_groups[, ...])

Enumerate scalar-potential invariants up to max_dim.

suggest_yukawa(fermions, scalars, gauge_groups)

Enumerate Yukawa / bare-mass / Weinberg invariants over fermion pairs.

Classes

SuggestedTerm(expr, dim, label[, sector, ...])

One invariant Lagrangian term, coupling-free, with metadata.