feynlag.verify.checks.round_trip_reconstruct¶
- feynlag.verify.checks.round_trip_reconstruct(lagrangian, fields)[source]¶
Round-trip validation of the vertex extractor.
Extracts interaction coefficients from
lagrangian, reconstructs the Lagrangian from the coefficient dict, and returns the residualexpand(original − reconstructed)(zero on success), together with a boolean verdict.- Returns:
(ok: bool, residual)—okis True when the residual vanishes or contains no field symbols (pure-parameter constant terms are not interactions and may legitimately differ).