feynlag.suggest.reynolds_project

feynlag.suggest.reynolds_project(expr, discrete_groups)[source]

Project expr onto the joint discrete-invariant subspace.

P(m) = (1/|G|) Σ_{g∈G} g·m for each declared discrete group, applied in turn (the composition of the per-group Reynolds operators projects onto the intersection of invariant subspaces when the group actions commute, which holds for independently-declared symmetries; the caller’s oracle check re-verifies invariance regardless). Returns the (possibly zero) invariant combination.

For a Z_N-charged monomial this reduces automatically to the usual “total charge ≡ 0 (mod N)” filter — the average is either m itself (neutral) or 0 (charged). For S3 it produces the genuine invariant linear combinations that no single monomial realizes alone.