Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(testing/slim_check): teach slim_check about
finsupp
s (#10916)
We add some instances so that `slim_check` can generate `finsupp`s and hence try to provide counterexamples for them. As the way the original slim_check for functions works is to generate a finite list of random values and pick a default for the rest of the values these `total_functions` are quite close to finsupps already, we just have to map the default value to zero, and prove various things about the support. There might be conceptually nicer ways of building this instance but this seems functional enough. Seeing as many finsupp defs are classical (and noncomputable) this isn't quite as useful for generating counterexamples as I originally hoped. See the test at `test/slim_check.lean` for a basic example of usage I wrote this while working on flt-regular but it is hopefully useful outside of that Co-authored-by: Rob Lewis <Rob.y.lewis@gmail.com>
- Loading branch information
1 parent
7d42ded
commit 68d2d21
Showing
2 changed files
with
99 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