Skip to content

Conversation

@ctchou
Copy link
Contributor

@ctchou ctchou commented Oct 31, 2025

This patch proves the closure properties of regular languages under boolean operations. We first prove that Language.IsRegular, which is defined in mathlib, can also be characterized using cslib's DFA and NFA. We then prove those closure properties using Cslib.DFA. The key idea is a product construction for DA, which allows us to prove that regular languages are closed under both union and intersection (called add and inf in Language). The definition of DFA.mtr is moved to DA.mtr, so that it can be applied to DA in general. Some miscellaneous properties about Language are also proved.

The closure properties under concatenation and Kleene star will be proved later. They require some nontrivial work.

This PR depends on #135.

@ctchou
Copy link
Contributor Author

ctchou commented Oct 31, 2025

@chenson2018: Looks like some linters have failed. How do I run them locally on my machine?

@chenson2018
Copy link
Collaborator

@chenson2018: Looks like some linters have failed. How do I run them locally on my machine?

These are from lake test

@ctchou
Copy link
Contributor Author

ctchou commented Oct 31, 2025

Thanks for the info. The linter failures should be fixed now.

@fmontesi
Copy link
Collaborator

fmontesi commented Nov 1, 2025

Looks good to me now, minus the merge conflicts.

@ctchou
Copy link
Contributor Author

ctchou commented Nov 1, 2025

Rebase on top of the current main to fix merge conflicts.

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.

4 participants