Skip to content

Conversation

@ctchou
Copy link
Contributor

@ctchou ctchou commented Jan 14, 2026

This PR defines the notion of a "right congruence", which is an equivalence relation between finite words that is preserved by concatenation on the right, and proves its basic properties:

  • There is a natural deterministic automaton corresponding to each right congruence whose states are the equivalence classes of the congruence and whose transitions correspond to concatenation on the right of the input symbols.
  • If a right congruence is of finite index, then each of its equivalence classes is a regular language.

We will eventually prove the closure of omega-regular languages under complementation by constructing a right congruence of finite index with certain special properties.

Right congruences are also intimately related to the Myhill-Nerode theorem, but currently we do not plan to pursue that direction.

@ctchou
Copy link
Contributor Author

ctchou commented Jan 15, 2026

Rebase on upstream/main.

Copy link
Collaborator

@chenson2018 chenson2018 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks reasonable to me, but would you mind posting in the "Is There Code for X?" channel to see if anyone has thoughts about RightCongruence/RightCongruence.QuotType/RightCongruence.eqvCls?

@ctchou
Copy link
Contributor Author

ctchou commented Jan 17, 2026

@ctchou
Copy link
Contributor Author

ctchou commented Jan 18, 2026

I'm not sure the CovariantClass that Eric Wieser pointed out in the Zulip thread is appropriate here. The comments at the beginning of Mathlib.Algebra.Order.Monoid.Unbundled.Defs indicate that the underlying binary relation is intended to be an order, but in our application that relation is an equivalence relation.

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