Skip to content

Commit b90b43f

Browse files
add attribution
1 parent e40339d commit b90b43f

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Katydid/Regex/Calculus.lean

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
-- Originally based on https://github.com/conal/paper-2021-language-derivatives/blob/main/Calculus.lagda
2+
13
import Katydid.Regex.Language
24

35
namespace Calculus
@@ -35,10 +37,14 @@ def derives_strings (f: List α -> Prop) (u v: List α): derives f (u ++ v) = de
3537
def null_derives (f: List α -> Prop) (u: List α): (null ∘ derives f) u = f u := by
3638
simp
3739

38-
def derives_foldl (f: List α -> Prop) (u: List α): (derives f) u = (List.foldl derive f) u :=
39-
match u with
40-
| [] => rfl
41-
| (a :: as) => by sorry
40+
def derives_foldl (f: List α -> Prop) (u: List α): (derives f) u = (List.foldl derive f) u := by
41+
induction u with
42+
| nil =>
43+
simp
44+
unfold derives
45+
simp
46+
| cons x xs ih =>
47+
sorry
4248

4349
def null_emptyset {α: Type}:
4450
@null α emptyset = False :=

0 commit comments

Comments
 (0)