Repository navigation
Separate complex root enclosures across square-free factors - #440
Draft
Aurantium-47 wants to merge 1 commit into
Draft
Aurantium-47 wants to merge 1 commit into
Aurantium-47 wants to merge 1 commit into
Conversation
Collaborator
|
Firstly are you a human or are you a bot? Secondly if you are a human can you write the pull request description like a human. Don't just dump LLM output and expect others to read this. Write all messages as a human or I will not talk to you. Thirdly the code change is overengineered and not something that we would usually do in python-flint. There will be some simpler/better approach to fixing the problem if someone thinks about it rather than having an LLM spew out code. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Address the overlapping-enclosure example in #62 for
fmpz_poly.complex_roots, also inherited byfmpq_poly.complex_rootsthrough its integer numerator.At the default precision, the current implementation returns overlapping balls for distinct roots with different multiplicities:
The assertion fails on the released baseline and passes with this change. Multiplicities remain 1 and 2, and
ctx.precstays 53.Approach
Keep FLINT's certified isolation of each exact square-free factor. Check the resulting enclosures against every other factor group, and double the working precision only for groups participating in an overlap. Repeat until the complete root set is pairwise disjoint.
Exact factorization supplies multiplicities; no numerical multiplicity classification is needed. Within-factor isolation plus the exhaustive cross-factor check certifies global separation. Coprime factors have distinct roots with positive separation, so increasing the precision eventually separates their certified enclosures, subject to available resources. Precision overflow is guarded and allocated root/factor objects are cleared on exit.
The existing factor grouping and already-separated outputs are preserved. This avoids multiplying all factors into a radical and solving the larger root problem. The cross-factor check adds pairwise comparisons; this is a correctness change, not a general speedup claim.
This addresses the cross-factor isolation problem, not the broader root-method API and
real_rootsproposals in #62.Validation
Native Linux development build with Python 3.12 and FLINT 3.6.0:
python -m pytest --pyargs flint -qagainst the local Meson build: 1,099 passed, including doctests; independently rerun with the same result.cython-lint src/andgit diff --check: passed.No sanitizer or cross-platform run is claimed.
AI assistance was used for investigation, implementation, tests and review. The cross-factor problem and earlier radical-based proposal were identified in the linked maintainer discussion; this change uses adaptive factorwise refinement.