How to prove forall (p q:Prop), ~p->~((p ->q) ->p). using coq

后端 未结 1 1308
小鲜肉
小鲜肉 2021-01-28 10:36

I am completely new to coq programming and unable to prove below theorem. I need help on steps how to solve below construct?

Theorem PeirceContra: forall (p q:Prop), ~p

相关标签:
1条回答
  • 2021-01-28 11:08

    This lemma can be proved constructively. If you think about what can be done at each step to make progress the lemma proves itself:

    Lemma PeirceContra :
      forall P Q, ~P -> ~((P -> Q) -> P).
    Proof.
      intros P Q np.
      unfold "~".
      intros pq_p.
      apply np.     (* this is pretty much the only thing we can do at this point *)
      apply pq_p.   (* this is almost inevitable too *)
    
      (* the rest should be easy *)
    (* Qed. *)
    
    0 讨论(0)
提交回复
热议问题