簡體   English   中英

在Coq /直覺邏輯中,這種關系是否可以證明?

[英]Is this relationship between forall and exists provable in Coq/intuitionistic logic?

以下定理在Coq中可證明嗎? 如果沒有,有沒有辦法證明它不可證明?

Theorem not_for_all_is_exists:
    forall (X : Set) (P : X -> Prop), ~(forall x : X, ~ P x) -> (exists x: X, P x).

我知道這種相關關系是真的:

Theorem forall_is_not_exists : (forall (X : Set) (P : X -> Prop), (forall x, ~(P x)) -> ~(exists x, P x)).
Proof.
  (* This could probably be shortened, but I'm just starting out. *)
  intros X P.
  intros forall_x_not_Px.
  unfold not.
  intros exists_x_Px.
  destruct exists_x_Px as [ witness proof_of_Pwitness].
  pose (not_Pwitness := forall_x_not_Px witness).
  unfold not in not_Pwitness.
  pose (proof_of_False := not_Pwitness proof_of_Pwitness).
  case proof_of_False.
Qed.

但我不確定如果沒有雙重否定消除可以幫助我。 我也用不同的方法來證明有問題的定理,但無濟於事。 我只是在學習Coq,所以我可能只是遺漏了一些明顯的東西。

NB我很清楚在經典邏輯中這是正確的,所以我不是在尋找一個能夠為底層系統增加額外公理的證明。

這是不可證明的,因為它相當於雙重否定消除(和其他經典公理)。

我的Coq技能目前非常生疏,但我可以很快地說明為什么你的定理意味着雙重否定消除。

在你的定理中,將X實例化為unit ,將P實例化為fun _ => X以獲得任意X : Prop 現在我們有~(unit -> ~ X) -> exists (u : unit), X 但由於瑣碎的unit ,這相當於~ ~ X -> X

向后的含義可以通過直接應用雙重否定消除來證明~ ~ (exists x, P x)

我的Agda要好得多,所以我至少可以在那里顯示證據(不知道這是否有用,但它可能會稍微支持我的說法):

open import Relation.Nullary
open import Data.Product
open import Data.Unit
open import Data.Empty
open import Function

∀∃ : Set _
∀∃ = (A : Set)(P : A → Set) → ¬ (∀ x → ¬ P x) → ∃ P

Dneg : Set _
Dneg = (A : Set) → ¬ ¬ A → A

to : ∀∃ → Dneg
to ∀∃ A ¬¬A = proj₂ (∀∃ ⊤ (const A) (λ f → ¬¬A (f tt)))

fro : Dneg → ∀∃
fro dneg A P f = dneg (∃ P) (f ∘ curry)

你的not_for_all_is_exists命題在Coq中是不可證明的。 我建議閱讀Dirk Van Dalen的“邏輯與結構”第5章的開頭部分,以獲得更深入的解釋。

在直覺邏輯(以及諸如Coq的系統)中,為了證明exists x, P x你必須提供一種方法(或算法)來構造實際的x ,使得P x成立。

假設not (forall x, not (P x))大致有解釋“如果我假設P不適用於所有x,那么我會得到一個矛盾”,但這比你想要的結論弱,建立一個模型將揭示該假設不包含足夠的信息來挑選P的證人。

但是,必須說這個原則在Coq中適用於PX受限類,一個特定的例子是當P是可判定謂詞而X是有限類型時。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM