Only check for overlaps in pairs that we haven't already checked#13
Merged
james-d-mitchell merged 6 commits intoApr 17, 2026
Conversation
Author
|
Unfortunately, this doesn't really seem to have the speed-up we thought it would @james-d-mitchell |
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
0f22316
into
james-d-mitchell:improve-knuth-bendix-2-squash
51 of 60 checks passed
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.
This PR adds code that reduces the duplicated work the overlap iterator needs to do. The idea of the revised
KnuthBendixis as follows:3.1. Find and store all the critical pairs
3.2. Increment the generation.
3.2. Process the critical pairs and add any relevant rules.
In particular, this assumes that every pair of relevant critical pairs is found, processed, and added for each generation. If we stop the critical-pair-detection process halfway through a generation, process and add any new relations, and then try to find more critical pairs, we will miss some pairs. In this sense, we aren't quite able to do what we could with the cursors, but it's a step in the right direction.
I'm not at all set on the name
generationand, given the semigroup context, I'd actually be quite keen to change it but I couldn't think of a good one.