Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proved a few emptystr simplification rules #127

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 20 additions & 8 deletions Katydid/Regex/Language.lean
Original file line number Diff line number Diff line change
Expand Up @@ -665,15 +665,21 @@ theorem simp_and_not_null_l_emptystr_is_emptyset
(r: Lang α)
(notnullr: Not (null r)):
and r emptystr = emptyset := by
-- TODO
sorry
funext xs
simp at *
intro hr hxs
rw [hxs] at hr
contradiction

theorem simp_and_emptystr_not_null_r_is_emptyset
(r: Lang α)
(notnullr: Not (null r)):
and emptystr r = emptyset := by
-- TODO
sorry
funext xs
simp at *
intro hxs
rw [hxs]
exact notnullr

theorem simp_and_idemp (r: Lang α):
and r r = r := by
Expand Down Expand Up @@ -759,15 +765,21 @@ theorem simp_and_not_emptystr_l_not_null_r_is_r
(r: Lang α)
(notnullr: Not (null r)):
and (not emptystr) r = r := by
-- TODO
sorry
funext xs
simp [not, emptystr] at *
intro hr hxs
rw [hxs] at hr
contradiction

theorem simp_and_not_null_l_not_emptystr_r_is_l
(r: Lang α)
(notnullr: Not (null r)):
and r (not emptystr) = r := by
-- TODO
sorry
funext xs
simp [not, emptystr] at *
intro hr hxs
rw [hxs] at hr
contradiction

theorem simp_one_r_implies_star_r (r: Lang α) (xs: List α):
r xs -> star r xs := by
Expand Down
Loading