forked from mit-plv/fiat-crypto
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report equiv errors modulo commutativity
Should give a better error message for mit-plv#1123 (comment)
- Loading branch information
1 parent
77731c4
commit 4a818f1
Showing
3 changed files
with
35 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
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,15 @@ | ||
Require Import Coq.Lists.List. | ||
Import ListNotations. | ||
Local Open Scope list_scope. | ||
|
||
Module List. | ||
Section __. | ||
Context {A} (f : A -> bool). | ||
Fixpoint filtern (l : list A) (n : nat) : list A | ||
:= match n, l with | ||
| O, _ => l | ||
| _, [] => [] | ||
| S n', x :: xs => if f x then filtern xs n' else x :: filtern xs n | ||
end. | ||
End __. | ||
End List. |