Skip to content

Commit 28eb8cb

Browse files
cleanup
1 parent bd0fde7 commit 28eb8cb

File tree

5 files changed

+16
-19
lines changed

5 files changed

+16
-19
lines changed

Katydid/Regex/IndexedRegex.lean

+3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def iso'' {P Q: Language.Lang α} (ifflang: ∀ {xs: List α}, P xs <-> Q xs) (r
4343

4444
-- | scalar {s: Type u}: (Decidability.Dec s) -> Lang P -> Lang (Language.scalar s P)
4545
def onlyif {cond: Prop} (dcond: Decidable cond) (r: Regex α l): Regex α (Language.onlyif cond l) :=
46+
-- TODO
4647
sorry
4748

4849
def derive (r: Regex α l) (a: α): Regex α (Language.derive l a) :=
@@ -51,11 +52,13 @@ def derive (r: Regex α l) (a: α): Regex α (Language.derive l a) :=
5152
| Regex.emptystr =>
5253
iso Language.derive_emptystr Regex.emptyset
5354
| Regex.pred p =>
55+
-- TODO
5456
-- iso Language.derive_pred (onlyif p Regex.emptystr)
5557
sorry
5658
| Regex.or x y =>
5759
iso Language.derive_or (Regex.or (derive x a) (derive y a))
5860
| Regex.concat x y =>
61+
-- TODO
5962
-- iso Language.derive_concat
6063
-- (Regex.or
6164
-- (onlyif (null x) (derive y a))

Katydid/Regex/Language.lean

+6
Original file line numberDiff line numberDiff line change
@@ -651,24 +651,28 @@ theorem simp_and_null_l_emptystr_is_l
651651
| And.intro hr hxs =>
652652
exact hr
653653
case mpr =>
654+
-- TODO
654655
sorry
655656

656657
theorem simp_and_emptystr_null_r_is_r
657658
(r: Lang α)
658659
(nullr: null r):
659660
and emptystr r = r := by
661+
-- TODO
660662
sorry
661663

662664
theorem simp_and_not_null_l_emptystr_is_emptyset
663665
(r: Lang α)
664666
(notnullr: Not (null r)):
665667
and r emptystr = emptyset := by
668+
-- TODO
666669
sorry
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
675+
-- TODO
672676
sorry
673677

674678
theorem simp_and_idemp (r: Lang α):
@@ -755,12 +759,14 @@ theorem simp_and_not_emptystr_l_not_null_r_is_r
755759
(r: Lang α)
756760
(notnullr: Not (null r)):
757761
and (not emptystr) r = r := by
762+
-- TODO
758763
sorry
759764

760765
theorem simp_and_not_null_l_not_emptystr_r_is_l
761766
(r: Lang α)
762767
(notnullr: Not (null r)):
763768
and r (not emptystr) = r := by
769+
-- TODO
764770
sorry
765771

766772
theorem simp_one_r_implies_star_r (r: Lang α) (xs: List α):

Katydid/Regex/SmartRegex.lean

+3
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ theorem orToList_is_orFromList (x: Regex α):
323323
orFromList (orToList x) = x := by
324324
induction x <;> (try simp [orToList, orFromList])
325325
· case or x1 x2 ih1 ih2 =>
326+
-- TODO
326327
sorry
327328

328329
-- 1. If x or y is emptyset then return the other (Language.simp_or_emptyset_r_is_l and Language.simp_or_emptyset_l_is_r)
@@ -352,6 +353,7 @@ def smartOr (x y: Regex α): Regex α :=
352353

353354
theorem smartOr_is_or (x y: Regex α):
354355
denote (Regex.or x y) = denote (smartOr x y) := by
356+
-- TODO
355357
sorry
356358

357359
def derive (r: Regex α) (a: α): Regex α :=
@@ -370,6 +372,7 @@ def derive (r: Regex α) (a: α): Regex α :=
370372

371373
theorem derive_commutes {α: Type} (r: Regex α) (x: α):
372374
denote (derive r x) = Language.derive (denote r) x := by
375+
-- TODO
373376
sorry
374377

375378
def derives (r: Regex α) (xs: List α): Regex α :=

Katydid/Std/Lists.lean

+3-19
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
-- Lean Tactics
2-
-- https://leanprover.github.io/theorem_proving_in_lean4/tactics.html
3-
-- Lean List Proofs
4-
-- https://github.com/leanprover/std4/blob/main/Std/Data/List/Lemmas.lean
5-
-- Coq List Proofs
1+
-- This file is based on List Proofs originally done in Coq:
62
-- https://github.com/katydid/proofs/blob/old-coq/src/CoqStock/List.v
7-
-- List of Lean Tactics
8-
-- https://github.com/leanprover/lean4/blob/master/src/Init/Tactics.lean
3+
-- Other Lean List Proofs can be found in:
4+
-- https://github.com/leanprover/std4/blob/main/Std/Data/List/Lemmas.lean
95

106
import Mathlib.Tactic.Linarith
117
import Mathlib.Tactic.SplitIfs
@@ -1005,15 +1001,3 @@ theorem list_notin_cons (y: α) (x: α) (xs: List α):
10051001
apply h
10061002
apply Mem.tail
10071003
exact yinxs
1008-
1009-
theorem list_eraseReps_idemp {α: Type} [BEq α] (x: α) (xs: List α):
1010-
List.eraseReps (List.eraseReps xs) = List.eraseReps xs := by
1011-
sorry
1012-
1013-
theorem list_eraseReps_erases_first_rep {α: Type} [BEq α] (x: α) (xs: List α):
1014-
List.eraseReps (x::(x::xs)) = List.eraseReps (x::xs) := by
1015-
sorry
1016-
1017-
theorem list_eraseReps_does_not_erase_head (α: Type) [BEq α] [LawfulBEq α] (x: α) (xs: List α):
1018-
∃ (xs': List α), (x::xs') = List.eraseReps (x::xs) := by
1019-
sorry

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Optionally the following will also be helpful, but this is not required:
7070
+ [Coq Lean Tactic Cheat Sheet](https://github.com/katydid/coq-lean-cheatsheet/)
7171
+ [Lean Standard Libary Documentation](https://leanprover-community.github.io/mathlib4_docs/Std/Data/HashMap/Basic.html#Std.HashMap)
7272
+ [Lean4 Meta Programming Book](https://github.com/arthurpaulino/lean4-metaprogramming-book)
73+
+ [Tactic List](https://github.com/haruhisa-enomoto/mathlib4-all-tactics/blob/main/all-tactics.md)
7374

7475
Questions about Lean4 can be asked on [proofassistants.stackexchange](https://proofassistants.stackexchange.com/) by tagging questions with `lean` and `lean4` or in the [Zulip Chat](https://leanprover.zulipchat.com/).
7576

0 commit comments

Comments
 (0)