Skip to content

Normalize products in reduce_fmm - #339

Merged
inducer merged 3 commits into
inducer:mainfrom
alexfikl:reduce-fmm-products
Dec 1, 2026
Merged

inducer merged 3 commits into
inducer:mainfrom
alexfikl:reduce-fmm-products

Conversation

@alexfikl

Copy link
Copy Markdown
Collaborator

Does a flatten + sort in CoefficientCollector.map_product so that products show in the same order. This makes IntGs with densities a * b and b * a match.

Comment thread pytential/symbolic/reduce_fmm.py Resolved
@alexfikl
alexfikl force-pushed the reduce-fmm-products branch from f57872a to acd6d64 Compare November 27, 2026 10:33
@alexfikl
alexfikl force-pushed the reduce-fmm-products branch from acd6d64 to 470824c Compare November 27, 2026 11:49
@inducer

inducer commented Nov 30, 2026

Copy link
Copy Markdown
Owner

Does a flatten + sort in CoefficientCollector.map_product so that products show in the same order. This makes IntGs with densities a * b and b * a match.

Thanks for making this. Does this actually influence anything below, given that all the important bits here take place in a polynomial ring later on?

@alexfikl

alexfikl commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks for making this. Does this actually influence anything below, given that all the important bits here take place in a polynomial ring later on?

Yeah, the number of {monomial: coefficient} pairs that this thing finds will go into the columns of the matrix M that we need to factorize. If that gets inflated by these fake a * b <=> b * a terms it could break it, i.e. it doesn't manage to factorize things that would otherwise be possible.

I'm not sure I have a concrete example at the moment, but I was reading through it and it seemed like an easy fix.

@inducer

inducer commented Dec 1, 2026

Copy link
Copy Markdown
Owner

Thanks!

@inducer
inducer merged commit 70e6468 into inducer:main Dec 1, 2026
8 checks passed
@inducer

inducer commented Dec 1, 2026

Copy link
Copy Markdown
Owner

(And thanks for explaining!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants