我不是這方面的專家,但最近在Coq mailing-list上討論過。我將總結這個主題的結論。如果你想更徹底地理解這些問題,你應該看看double-negation translation。
該問題屬於直覺主義命題演算,因此可由tauto
決定。
Theorem excluded_middle_irrefutable: forall (P:Prop), ~~(P \/ ~ P).
tauto.
Qed.
該線程還提供了更詳細的證明。我會試着解釋我將如何提出這個證明。請注意,它通常是容易,我應對引理的編程語言解釋,所以這就是我會做:
Theorem excluded_middle_irrefutable: forall (P:Prop), ~~(P \/ ~ P).
unfold not.
intros P f.
我們被要求寫一個函數,該函數f
和生產類型的值False
。此時到達False
的唯一方法是調用函數f
。
apply f.
因此,我們被要求爲函數f
提供參數。我們有兩種選擇,通過P
或P -> False
。我沒有看到構建P
的方法,所以我選擇了第二個選項。
right.
intro p.
我們又回到原點,只是我們現在有一個p
一起工作! 所以我們應用f
,因爲這是我們唯一能做的事情。
apply f.
再次,我們被要求提供參數f
。但現在這很容易,因爲我們有一個p
來處理。
left.
apply p.
Qed.
該線程還提到了基於一些更簡單的引理的證明。第一個引理是~(P /\ ~P)
。
Lemma lma (P:Prop) : ~(P /\ ~P).
unfold not.
intros H.
destruct H as [p].
apply H.
apply p.
Qed.
第二引理是~(P \/ Q) -> ~P /\ ~Q
:
Lemma lma' (P Q:Prop) : ~(P \/ Q) -> ~P /\ ~Q.
unfold not.
intros H.
constructor.
- intro p.
apply H.
left.
apply p.
- intro q.
apply H.
right.
apply q.
Qed.
這些引理足以顯示:
Theorem excluded_middle_irrefutable: forall (P:Prop), ~~(P \/ ~ P).
intros P H.
apply lma' in H.
apply lma in H.
apply H.
Qed.
也許看證明一詞('tauto'和一些簡化創建),使某種意義:'檢查 fun(P:Prop)(H:〜(P \ /〜P))=> False_ind False(H(or_intror(fun H0 => H(or_introl H0))))。' – larsr