I am wondering how the simpl
tactic works in COQ.
Assume the following Lemma:
Parameter n:nat.
Lemma test: S n + 0 = S (n+0).
Now, the simpl.
tactic produces
S (n + 0) = S (n + 0)
My understanding is that simpl
performs a sequence of
cbv beta, delta, iota
conversions.
I tried that, but could not manage to get the same result as simpl
. The basic problem is that after a cbv delta
expansion, the plus
term keeps expanded. How can I de-expand it, i.e. re-substitute the plus
name for the expanded definition?
Or, can anyone show me how I can get the effect of simpl
by manually performing more elementary tactics?
I do not believe it possible to emulate the simpl
tactic using only cbv
, because indeed cbv delta
does not let you choose which occurences to replace, while simpl
only performs delta-reduction when it leads to a iota step. (cf. https://coq.inria.fr/distrib/current/refman/proof-engine/tactics.html#coq:tacn.simpl)
So, even if informally we can say that simpl
performs such a sequence of calls, it seems like it has access to a lower-level way of performing those reductions than what the cbv
tactic exposes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With