简体   繁体   中英

How to easily prove the following in Coq such as using only assumptions?

是否有一种简单的方法可以证明Coq中的以下内容,例如仅使用假设?

(P -> (Q /\ R)) -> (~Q) -> ~P

The question is a bit vague... Do you wonder if it is possible (yes), what the answer is (see Arthur's comment above), or how to think about solving these problems?

In the latter case, remember that the goal is to create a "lambda-term" with the specified type. You can either use "tactics" which are helping you construct the term "from the outside and inwards. It is good to do it by hand a couple of times to understand what is going on and what the tactics really do, which I think is why you are given this exercise.

If you look at your example,

(P -> (Q /\ R)) -> (~Q) -> ~P

you can see that it is a function of three (!) arguments. It is because the last type ~P really means P -> False , so the types of the arguments to the function that you need to create are

P -> (Q /\ R)
Q -> False
P

and the function should construct a term of type

False

You can create a term fun ABC => _ where A, B, C has the types above, (this is what the tactic intros does), and you need to come up with a term that should go into the hole _ by combining the terms A, B, C and the raw gallina constructions.

In this case, when you have managed to create a term of type Q /\\ R you will have to "destruct" it to get the term of type Q , (Hint: for that you will have to use the match construction).

Hope this helps without spoiling the fun!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM