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

后端 未结 2 822
悲哀的现实
悲哀的现实 2021-01-12 15:35

Is the following theorem provable in Coq? And if not, is there a way to prove it isn\'t provable?

Theorem not_for_all_is_exists:
    forall (X : Set) (P : X          


        
2条回答
  •  北荒
    北荒 (楼主)
    2021-01-12 16:32

    It's not provable, because it's equivalent to double negation elimination (and the other classical axioms).

    My Coq skills are very rusty currently, but I can quickly illustrate why your theorem implies double negation elimination.

    In your theorem, instantiate X to unit and P to fun _ => X for an arbitrary X : Prop. Now we have ~(unit -> ~ X) -> exists (u : unit), X. But because of the triviality of unit this is equivalent to ~ ~ X -> X.

    The backwards implication can be proved with a straightforward application of double negation elimination on ~ ~ (exists x, P x).

    My Agda is much better, so I can at least show the proofs there (don't know if that's helpful, but it might back up my claims a bit):

    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)
    

提交回复
热议问题