implication

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

梦想的初衷 提交于 2020-07-15 07:22:28
问题 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 -> Prop), ~(forall x : X, ~ P x) -> (exists x: X, P x). I know this related relationship is true: 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

How would one prove ((p ⇒ q) ⇒ p) ⇒ p, using the Fitch system

随声附和 提交于 2019-12-13 16:05:21
问题 FYI, the logic program I use cannot do contradiction introductions. This point is most likely irrelevant, for I highly doubt I would need to use any form of contradiction for this proof. In my attempt to solve this, I started off with assuming (p ⇒ q) ⇒ p) Is this correct? If so, what next? Forgive me if the solution seems so obvious. 回答1: (p ⇒ q) ⇒ p ((p ⇒ q) ⇒ p) ∨ (p ⇒ p) ; (X ⇒ X) and Or introduction ((p ⇒ q) ∨ p) ⇒ p ; (X ⇒ Z) ∨ (Y ⇒ Z) |- (X ∨ Y ⇒ Z) ((¬p ∨ q) ∨ p) ⇒ p ; (p ⇒ q) ⇔ (¬p ∨

Formal proof for ((p ⇒ q) ⇒ p) ⇒ p

五迷三道 提交于 2019-12-12 02:26:20
问题 I'm trying to construct a formal proof for ((p ⇒ q) ⇒ p) ⇒ p. in Fitch. I know this is true, but how do I prove it? I can only use And Intro, And Elim, Or Inro, Or Elim, Neg Intro, Neg Elim, Impl Intro, Impl Elim, Biconditional Intro, and Biconditional Elim. 回答1: The following proof uses Klement's Fitch-style proof checker. Description of the symbols and the rules are in forallx . Links to both are below. A slightly different version is on Philosophy Stack Exchange: https://philosophy

Prolog implying a negative predicate

这一生的挚爱 提交于 2019-12-04 08:07:53
问题 How can I write the following rule in PROLOG: if P then not Q I understand that you can easily write if P then Q the predicates like q(X) :- p(X) , but how can you negate the q/1 predicate? I don't want to define new predicates with other semantics like non_q/1 . 回答1: The clause "if P then not Q" is logically equivalent to the negative clause "not P OR not Q". As such it is a Horn clause without a positive literal, and as an application of the correspondence of SLD theorem proving and Horn

Prolog implying a negative predicate

旧时模样 提交于 2019-12-02 20:58:08
How can I write the following rule in PROLOG: if P then not Q I understand that you can easily write if P then Q the predicates like q(X) :- p(X) , but how can you negate the q/1 predicate? I don't want to define new predicates with other semantics like non_q/1 . hardmath The clause "if P then not Q" is logically equivalent to the negative clause "not P OR not Q". As such it is a Horn clause without a positive literal, and as an application of the correspondence of SLD theorem proving and Horn clauses, can be represented in Prolog programming as a goal clause or "query": ?- P, Q. Let's come