Repository navigation
Conversation
Added regex_of_dfa' to avoid equiv with Fin n
…into IsRegularIffRegex
ctchou
requested changes
Oct 13, 2026
Collaborator
There was a problem hiding this comment.
The new code looks good. I just pushed a commit containing some additional golfing. Some general remarks:
- We prefer
liaovergrindoveromega - Please always put the proof on a new line, even if it is short.
- Instead of writing
(by lia : <some proposition>), writeshow <some proposition> by lia. - A lot of the proofs can probably be simplified using
grind, but I didn't attempt any of that.
ctchou
requested changes
Oct 21, 2026
ctchou
requested changes
Oct 21, 2026
Contributor
Author
|
I have two last questions for the structure of the code:
|
Collaborator
|
I've moved the reindexing stuff to |
Collaborator
|
@chiyunhsu I did some further golfing. I'm now satisfied with it. Do you have any more changes you want to do? |
- AllButFirstLast is Prop, so revert allButFirstLast back to AllButFirstLast - rename `bddLang_eq_language_nfa` as `bddLang_eq_nfa` - syntax change for NA.FinAcc.mk in nfa’ so that it is consistent with others
ctchou
approved these changes
Oct 22, 2026
ctchou
left a comment
Collaborator
There was a problem hiding this comment.
I'm satisfied with the code now.
Collaborator
|
CC @fmontesi |
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.
We introduce
IsRegular.iff_regex, a language is regular if and only if it matches a regular expression. It is a combination of the existingIsRegular.regex, a language matching a regular expression is regular and our new direction. The new direction is proven through Kleene’s algorithm.It is the result that was anticipated in PR#846 by @ctchou.
The pull request introduces a new file,
KleeneAlgorithm.lean. In it, we proved a language defined by a DFA onFin nwith one accepting state has a matching regular expression. The algorithm applies induction on a bound which restricts which interior states that a run may pass through.Implemented collaboratively by Brooke Gill and Chi-Yun Hsu