Skip to content

Commit d5b6375

Browse files
keeganperry7awalterschulze
authored andcommitted
proved a few emptystr simplification rules
1 parent b7b8dea commit d5b6375

File tree

1 file changed

+20
-8
lines changed

1 file changed

+20
-8
lines changed

Katydid/Regex/Language.lean

+20-8
Original file line numberDiff line numberDiff line change
@@ -662,15 +662,21 @@ theorem simp_and_not_null_l_emptystr_is_emptyset
662662
(r: Lang α)
663663
(notnullr: Not (null r)):
664664
and r emptystr = emptyset := by
665-
-- TODO
666-
sorry
665+
funext xs
666+
simp at *
667+
intro hr hxs
668+
rw [hxs] at hr
669+
contradiction
667670

668671
theorem simp_and_emptystr_not_null_r_is_emptyset
669672
(r: Lang α)
670673
(notnullr: Not (null r)):
671674
and emptystr r = emptyset := by
672-
-- TODO
673-
sorry
675+
funext xs
676+
simp at *
677+
intro hxs
678+
rw [hxs]
679+
exact notnullr
674680

675681
theorem simp_and_idemp (r: Lang α):
676682
and r r = r := by
@@ -756,15 +762,21 @@ theorem simp_and_not_emptystr_l_not_null_r_is_r
756762
(r: Lang α)
757763
(notnullr: Not (null r)):
758764
and (not emptystr) r = r := by
759-
-- TODO
760-
sorry
765+
funext xs
766+
simp [not, emptystr] at *
767+
intro hr hxs
768+
rw [hxs] at hr
769+
contradiction
761770

762771
theorem simp_and_not_null_l_not_emptystr_r_is_l
763772
(r: Lang α)
764773
(notnullr: Not (null r)):
765774
and r (not emptystr) = r := by
766-
-- TODO
767-
sorry
775+
funext xs
776+
simp [not, emptystr] at *
777+
intro hr hxs
778+
rw [hxs] at hr
779+
contradiction
768780

769781
theorem simp_one_r_implies_star_r (r: Lang α) (xs: List α):
770782
r xs -> star r xs := by

0 commit comments

Comments
 (0)