-
Notifications
You must be signed in to change notification settings - Fork 295
Minimum Working Example (MWE)
A minimum working example is a code snippet that can be copied-and-pasted into an empty Lean file and still have the same features (working) and that does not include unnecessary details (minimum).
Here is the stackoverflow guide to making MWEs.
Please make sure that your code snippet has:
- correct imports; and
- all the relevant definitions / theorems.
It is fine for your example to throw compiler errors or warnings. In particular, it is fine for your code to contain the keyword sorry
. The point of MWE is that your code should throw the same errors in a blank file as it does for you, that way people can help you with exactly the error you are confused about.
You can test this by making a new Lean file, pasting your code snippet into it, and seeing if you get the expected behavior. This is exactly what people who try to help you will do!
What if I'm asking about the Natural Number Game?
If your example comes from the natural number game or any such browser-based lean demo, then you can add a link to the webpage instead of finding the correct imports. So for example it would be much more useful to say "I am on this level of the Natural Number Game and my proof script is blah", rather than "I am on Advanced Multiplication World Level 4 of the Natural Number Game and my proof script is blah".)
If you post a code snippet on Zulip, please make sure it is surrounded in triple backticks.
```
def my_nat : nat := 5
```