-
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
Integrate Comments to Equations Tutorial Basics #19
Conversation
@MevenBertrand can you elaborate on:
Also the behaviour of funelim should change soon, c.f. this comment #1 (comment) |
Refactored 1.2 to adapt to the comments |
|
@MevenBertrand Could you check section 1.2 and tell me if you are satisfied by the modifications ? |
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 nice addition of the examples for nested pattern-matching. Some more typo catches, but otherwise, lgtm :)
Merging now, thanks for the insight @MevenBertrand ! |
Integrate Comments to Equations Tutorial Basics
Also, at that point you pretend that this is about computation, but
autorewrite
is propositional reasoning. That is, you would be able to add the newderived equation to the
nth_option
hintbase:And now the first
autorewrite
goes through.I'm not sure it is something you want to flash here, or even later, but it might confuse learners that you talk about computation…
map
is filled, but not the other two? (It would make sense to me that you want to give at least one example, but force people to look for themselves in the other too, until we get a better set-up for exercises)Arguments
is probably not precise enough to be able to say what one would want to say ("simplify exactly when the list of arguments matches one of the patterns of the definition"), but your proposed version is very aggressive. Usually, forapp
I'd rather doArguments app !_ /.
(which means "unfoldapp
when it is applied to at least one argument and that argument is a constructor). There's also thesimpl nomatch
invocation, which I've never used but seems relevant…Also, this is misleading: by using
cbn [f1 … fn]
one can obtain a similar behaviour. So it's maybe best not to mention this point at all.induction l in n |- *
(although I know in the end you want to say "functional induction is better" anyway).Maybe make it clear that this is not about Equations per se, but simply using the
general rewriting hint mechanism of Coq?
confluent and terminating?
after simplification we get a lot of uninteresting cases, that we would like to
deal with in an automatic but controlled way."
"a particular instance" is rather vague, do you mean it uses
try typeclasses eauto with …
using a given set of hints? Then you should say so, mention what the databases are and what they do.(Good examples, especially
app_nth2
, I would never have thought about doingfunelim (nth_option n l)
despitenth_option n l
appearing nowhere in my goal!)lia
instead, which gets rid of these arithmetic goals without needing to find the right lemma.simp in H
andsimp in *
to also simplify in the hypotheses? This is useful in these exercises…half
example above. Maybe it would be useful to have something like this to show the power offunelim
?About rev_acc_elim.
at this point so that we get to see what its type is?exact …
->1: exact …
(I'm picky about goal selectors :p) (and below)simp in
without having introduced it before!