-
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 Equations: Indexed Inductive Types #9
base: main
Are you sure you want to change the base?
Conversation
@MevenBertrand at last CUDW we discuss how to finish this tutorial but I lost the notes. Could you check it out, and give some thought on how to complete it ? I think mostly the ideas was discussed derive / signature / no confusion and depelim which are currently not discussed |
Isn't there a problem? The file called But yeah, I believe the points you mentioned were the main ones. There is also the subterm relation, which one can derive and subsequently use for well-founded proofs. And maybe saying something about forced patterns as well? Here's the example from the manual:
And finally might it make sense to mention how Equations can use UIP to make its life easier with indexed inductive types when the index type is an hSet? |
@MevenBertrand I have fixed the file (if you want to look at it, it is currently rather short) |
I gave it a quick look, a few remarks:
Otherwise, it's going in the right direction, although it's still quite raw :) I can do a proper detailed review for small things, typos etc. when you've finished a first draft. |
I have fixed the code.
I'll do a more careful reading to clean tomorrow. |
About About signature, not sure what to say, maybe it's mostly a technical aspect that does not need to go into the manual. About the difference between |
To summarize my criticism of this tutorial as discussed in in the Zulip chat:
It's also a bit surprising to me that the tutorial focuses on functions on vectors, even though using vectors is consistently recommended against for Coq beginners (Stdlib even has a warning these days). I agree with Matthieu's suggestions here on the order to present concepts/examples. |
@palmskog my understanding is that vectors are not recommended because without Equations to help you it is very painful to reason about them ? Which makes it a good example to me as it is also simple. But more importantly, what other example would you use ? |
(** Though, the [NonConfusionHom] property is derivable for most index inductive types, | ||
it is not the case that is is derivable for all index inductive types. | ||
It only is when equality of constructors can be reduced to equality of forced | ||
argument, that is ??? |
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.
@mattam82 could you please suggest sth here ?
You may also want to point out the relation between depelim and dependent induction. |
Regarding part 2.2, I think it is easier and more useful to mostly introduce the lemmas Equations derive from the pov of where they are needed.
|
A tutorial explaining how to use Equations to define functions on indexed inductive types and the particularities of reasoning about them
To do :