Skip to content
Merged

28 #290

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
10 changes: 7 additions & 3 deletions HumanEvalLean/HumanEval28.lean
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
module

def concatenate : Unit :=
()
def concatenate (strings : List String) : String :=
String.join strings

theorem toList_concatenate {strings : List String} :
(concatenate strings).toList = strings.flatMap String.toList := by
simp [concatenate]

/-!
## Prompt
Expand Down Expand Up @@ -41,4 +45,4 @@ def check(candidate):
assert candidate(['x', 'y', 'z']) == 'xyz'
assert candidate(['x', 'y', 'z', 'w', 'k']) == 'xyzwk'
```
-/
-/
Loading