forked from leanprover-community/batteries
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: improve kernel reduction of
List.sublists
(leanprover-communi…
- Loading branch information
1 parent
727fa6a
commit 0b07a6e
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import Std.Data.List.Basic | ||
|
||
-- this times out with `sublistsFast` | ||
set_option maxRecDepth 561 in | ||
example : [1, 2, 3].sublists.sublists.length = 256 := rfl | ||
|
||
-- TODO(std4#307): until we have the `csimp` lemma in std, this is a sanity check that these two | ||
-- are equal. | ||
example : ([] : List Nat).sublists = [].sublistsFast := rfl | ||
example : [1, 2, 3].sublists = [1, 2, 3].sublistsFast := rfl |