Skip to content

Improve knuth bendix 2 squash#15

Merged
james-d-mitchell merged 2 commits into
james-d-mitchell:improve-knuth-bendix-2-squashfrom
Joseph-Edwards:improve-knuth-bendix-2-squash
May 1, 2026
Merged

Improve knuth bendix 2 squash#15
james-d-mitchell merged 2 commits into
james-d-mitchell:improve-knuth-bendix-2-squashfrom
Joseph-Edwards:improve-knuth-bendix-2-squash

Conversation

@Joseph-Edwards
Copy link
Copy Markdown

This PR makes sort_pending_rules a function template that accepts arbitrary orderings. When the pending rules are sorted with respect to the reduction order of the rewriting system, bad test case [932] now completes in about 20 seconds on my machine. Further changes that prevent the use of a new rule trie speed this up even further, but I didn't want to commit those changes.

It is worth noting that, presently, this makes some of the other tests fail. The failures seem to be related to active rules having their letters permuted. Some of the quick tests are also slower with this change. As a result, I'm not sure whether this PR should actually be merged, but it's good for experimentation.

@james-d-mitchell
Copy link
Copy Markdown
Owner

This PR makes sort_pending_rules a function template that accepts arbitrary orderings. When the pending rules are sorted with respect to the reduction order of the rewriting system, bad test case [932] now completes in about 20 seconds on my machine. Further changes that prevent the use of a new rule trie speed this up even further, but I didn't want to commit those changes.

It is worth noting that, presently, this makes some of the other tests fail. The failures seem to be related to active rules having their letters permuted. Some of the quick tests are also slower with this change. As a result, I'm not sure whether this PR should actually be merged, but it's good for experimentation.

When you say "letters permuted" do you mean "rules permuted" o/w this ought not to be possible.

@james-d-mitchell james-d-mitchell merged commit 608e5af into james-d-mitchell:improve-knuth-bendix-2-squash May 1, 2026
9 of 60 checks passed
@Joseph-Edwards
Copy link
Copy Markdown
Author

When you say "letters permuted" do you mean "rules permuted" o/w this ought not to be possible.
Things like this:

  { {  }, { 1 }, { 1, 0 }, { 0 }, { 0, 1 } }
  ==
  { {  }, { 0 }, { 0, 1 }, { 1 }, { 1, 0 } }

I suppose that's also rules permuted.

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