-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tutorial about Intro patterns #73
Conversation
src/Tutorial_intro_patterns.v
Outdated
|
||
(** The second pattern is for inductive types that only have one constructor, | ||
like records. In this case, it is possible to write [(a, b, ..., d)] rather | ||
than [ [a b ... d]]. The interrest is that it enables to preserves [let-in] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inteRest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice tuto! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work indeed. As a small optimization, you do not need cbn
before reflexivity
, since reflexivity
unifies both sides of the equality, which reduces the terms as needed. I mostly checked for typos, should I also check the writing style?
Co-authored-by: Quentin VERMANDE <[email protected]>
@Tragicus Thanks for checking for typos. Most comes from refactoring. After staring at the code for so long you start not seeing them anymore and basic spell checker don't catch them. Concerning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work. I have some minor suggestions and a longer one (about nat).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good explanations which are easy to understand, and very pertinent examples. I frequently found myself asking for "hey, would we be able to combine this and that", only for an example of that to be given just afterward.
@Villetaneuse All is solved for one detail. In your suggestion you have introduced the |
That's indeed an issue. However, I was thinking that the reader was already familiar with these forms for the As I see it, we can go in two directions:
What do you think? Would you like that I extract from my course a tutorial about basic proofs of logical statements which could be a prerequisite, in order to have a clearer view? |
I think it is best to suppose people know destruct as and want to know about intro patterns, and to just add a comment.
@Villetaneuse Sth that is a bit urgent to do, would be a learning game for Coq, an adaptation of the natural number game or sth else so that people can try it out and learn the base. |
All right, I will add a remark and a list of tactics which allow
If you really want something which resembles the natural number game, it's very difficult at this point, I'm afraid. We would first need a stable javascript backend and, to some extent, frontend. |
also correct some whitespace issues and add a small remark after the first "destruct as".
Add other tactics with as
A completion of #32