Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Proof automation

Assuming having a list of sub-goals by applying tactic T:

______________________________________(1/10)
A
______________________________________(2/10)
A'
______________________________________(3/10)
A''

And assuming we know that Lemma L can be used to prove A and A'' but not A'.

My question is can we sequencing T with application result of L, which left me with just one sub-goal A'?

I tried T;apply L. without success, since sequencing seems require all branches/sub-goals proved.

I also tried controlled automation by using by T;apply L. from SSReflect, which suggested by this post. Unfortunately, Coq also get stuck, and report Ltac calls to ... last call failed.

like image 395
Zheng Cheng Avatar asked Sep 13 '26 14:09

Zheng Cheng


2 Answers

You can use the try tactical, like this:

T; try by apply L.

This does the following. First, it applies T. Then, on each sub goal, it applies the tactic by apply L. If the tactic succeeds, good. Otherwise, if it fails, try does nothing.

like image 107
Arthur Azevedo De Amorim Avatar answered Sep 15 '26 02:09

Arthur Azevedo De Amorim


I would recommend the T; try by apply L. from Arthur. But if you need more control, you can use

T; [ (* first goal *) now apply L 
   | (* second goal *) now apply L 
   | (* last goal *) idtac ].
like image 27
Vinz Avatar answered Sep 15 '26 04:09

Vinz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!