1

I am in the process of proving a Lemma in Coq.

One of my hypotheses is: H0: ~p -> False for some proposition p.

The only subgoal I have left is p

One would suppose there is a tactic that lets me prove p using H0 in one step. However I can't seem to find it.

Does such a tactic exist, and if so, which one is it?

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
  • 1
    Are you willing to accept the axiom of excluded middle? Otherwise your goal is not provable in general. In Coq's logic `~~ p` (which is your `H0`) does not imply `p`. – Anton Trunov Apr 23 '20 at 19:09
  • This is not provable in Coq. – Kamyar Mirzavaziri Apr 23 '20 at 19:15
  • 1
    @Anton Trunov Ah. You see, @jonrsharpe edited my post to remove some explanation of **why** I posted the question. I've been away from Coq for 8 years, though I've been back for a month. In my original post, I explained that while much knowledge is back, some gaps are bound to still exist, some of which quite basic. It seems the Very Basic Gap here was forgetting that Coq is Intuitionistic. Had I remembered this, I'd have added that the proposition `p` in question is `n = 0 \/ n = 1`, (`n : nat`). Now yes, I'm willing to accept LEM more generally, but I'd think it's not necessary in this case? – Ahsim Nreiziev Apr 23 '20 at 20:22
  • 1
    Then the `lia` tactic should finish the proof off. To use it you need to import it: `From Coq Require Import Lia.` – Anton Trunov Apr 23 '20 at 20:54
  • 1
    @Anton Trunov. Thank you for the help. I solved the proof another way in the mean time, but if it comes up again I'll certainly use Lia. By the way, because I presume -- I can't know for sure, as I am not all that familiar with the ins and outs of StackOverflow -- that this question still needs answering, I would fully and immediately accept "Coq is Intuitionistic. You can't resolve a double negative like you would in Classical logic", or something along similar lines and in whatever words you (or anyone else, I suppose) would wish to put it, as an answer to my question. – Ahsim Nreiziev Apr 24 '20 at 01:15
  • 1
    .....Or should I answer the question myself? – Ahsim Nreiziev Apr 24 '20 at 01:17
  • 2
    It's encourages/accepted to answer a question yourself on StackOverflow once you figured out the answer. It's always better to indicate to others that it is resolved, and to make the answer clearly visible. Unless Anton answers before you come back to it, I suggest you answer yourself yes. – Ptival Apr 24 '20 at 08:05

0 Answers0