Commit b90b43f 1 parent e40339d commit b90b43f Copy full SHA for b90b43f
File tree 1 file changed +10
-4
lines changed
1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change
1
+ -- Originally based on https://github.com/conal/paper-2021-language-derivatives/blob/main/Calculus.lagda
2
+
1
3
import Katydid.Regex.Language
2
4
3
5
namespace Calculus
@@ -35,10 +37,14 @@ def derives_strings (f: List α -> Prop) (u v: List α): derives f (u ++ v) = de
35
37
def null_derives (f: List α -> Prop ) (u: List α): (null ∘ derives f) u = f u := by
36
38
simp
37
39
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
42
48
43
49
def null_emptyset {α: Type }:
44
50
@null α emptyset = False :=
You can’t perform that action at this time.
0 commit comments