Propositional Logic and Proofs

propositional logic proof solver
propositional calculus pdf
propositional logic rules
propositional logic calculator
propositional logic tutorial
logic proofs examples
semantic proof propositional logic
laws of propositional logic

I am trying to prove the below case for a homework assignment and have been working hours on it, still no luck.

Any suggestions or comments as to what I am doing wrong?


This is how you'd prove it in Coq:

Coq < Theorem curry : forall p q r, ((q /\ p) -> r) -> p -> q -> r.
1 subgoal

  ============================
   forall (p q : Prop) (r : Type), (q /\ p -> r) -> p -> q -> r

First, we name all the premises:

curry < intros p q r f x y.
1 subgoal

  p : Prop
  q : Prop
  r : Type
  f : q /\ p -> r
  x : p
  y : q
  ============================
   r

The only premise that produces the subgoal r is f:

curry < apply f.
1 subgoal

  p : Prop
  q : Prop
  r : Type
  f : q /\ p -> r
  x : p
  y : q
  ============================
   q /\ p

To apply f we first need to satisfy the subgoals q and p:

curry < split.
2 subgoals

  p : Prop
  q : Prop
  r : Type
  f : q /\ p -> r
  x : p
  y : q
  ============================
   q

subgoal 2 is:
 p

The premise y is a proof for subgoal q:

curry < exact y.
1 subgoal

  p : Prop
  q : Prop
  r : Type
  f : q /\ p -> r
  x : p
  y : q
  ============================
   p

The premise x is a proof of subgoal p:

curry < exact x.
No more subgoals.

We're done. Here's the full proof:

curry < Qed.
intros p q r f x y.
apply f.
split.
 exact y.

 exact x.

curry is defined

In function programming languages like Haskell you'd have:

curry :: ((q, p) -> r) -> p -> q -> r
curry f x y = f (y, x)

Everything works out due to the Curry-Howard correspondence.

Propositional proof system, Proofs in Proposition Logic and Predicate Logic. Propositions and Types. Since Prop is a type, it is easy to declare propositional variables, using Coq's  Proofs in Propositional Logic In this class, we introduce the reasoning techniques used in Coq, starting with a very reduced fragment of logic, propositional intuitonistic logic. We shall present : The logical formulas and the statements we want to prove, How to build proofs interactively. Proofs in Propositional Logic Propositions and Types The Type Prop


We have a Coq proof thanks to @Aadit, and it would only be fair ---ethical?--- to present an Agda proof.

An immediate and simple proof is

open import Data.Product

portation : {P Q R : Set} → (P × Q → R) → (P → Q → R)
portation P×Q→R = λ p q → P×Q→R (p , q)

Of course this may not at all be clear if the asker is not familiar with Agda and is seeking a formalisation. So let's throw in some detail!!

In constructive logic, propositions can be seen as the small types:

ℙrop = Set

Then pairing is the usual way to form conjugation,

data _∧_ (P Q : ℙrop) : Set where
 ∧I : P → Q → P ∧ Q

In constructive logic, implication is just function space: to say one thing implies another is tantamount to yielding a procedure that with input of the first kind returns output of the second kind.

_⇒_ : (P Q : ℙrop) → Set
_⇒_ = λ P Q → (P → Q)

Implication introduction is then just usual function-definition, and implication elimination is then nothing more than function application.

⇒I : ∀ {P Q} → (P → Q) → P ⇒ Q
⇒I P→Q = P→Q

⇒E : ∀ {P Q} → P ⇒ Q → P → Q
⇒E P→Q p = P→Q p

Now the asker is using natural-deduction style of proofs, so let us introduce some syntactic sugar to bridge the gap from the paper-and-pencil proof to the Agda formalisation.

syntax ⇒I {P} {Q} (λ p → q) = ⇒-I-assuming-proof p of P we-have Q proved-by q

Now the proof!

shunting : (P Q R : ℙrop) → (P ∧ Q) ⇒ R → P ⇒ (Q ⇒ R)
shunting P Q R P∧Q⇒R =
                    ⇒-I-assuming-proof p of P
                    we-have Q ⇒ R proved-by

                        ⇒-I-assuming-proof q of Q
                        we-have R proved-by

                            ⇒E P∧Q⇒R (∧I p q)

Which is not only quite readable, but also somewhat close to the asker's presentation!

Agda is such a joy!

[PDF] Proofs in Propositional Logic, The purpose of this lecture is to investigate the most basic of all logics: propositional logic, which is the logic of elementary logical connectives such as and/or etc  Propositional logic, also known as sentential logic and statement logic, is the branch of logic that studies ways of joining and/or modifying entire propositions, statements or sentences to form more complicated propositions, statements or sentences, as well as the logical relationships and properties that are derived from these methods of combining or altering statements.


This is a proof using Klement's Fitch-style natural deduction proof checker and the forallx textbook providing explanation. (The links are below.)

The main problem with the original attempt is that lines 8 and 9 did not discharge the assumptions. They appeared to stay in the same subproofs based on the indents and braces.

Otherwise the proof is the same as what I provided. On my line 6 I discharged the assumption I made of "Q" on line 3 by introducing the conditional (lines 3-5). On my line 7 I discharged the assumption "P" made on line 2 by introducing the conditional (lines 2-6).


Reference

Kevin Klement's JavaScript/PHP Fitch-style natural deduction proof editor and checker http://proofs.openlogicproject.org/

P. D. Magnus, Tim Button with additions by J. Robert Loftis remixed and revised by Aaron Thomas-Bolduc, Richard Zach, forallx Calgary Remix: An Introduction to Formal Logic, Winter 2018. http://forallx.openlogicproject.org/

[PDF] Proofs in Proposition Logic and Predicate Logic, The derivation may be interpreted as proof of the proposition represented by the theorem. When a formal  Propositional logic is also amenable to “deduction,” that is, the development of proofs by writing a series of lines, each of which either is given or is justified by some previous lines (Section 12.10).


[PDF] Lecture Notes on Propositional Logic and Proofs, Proof of the possibility of defining all truth functional operators in virtue of a single binary operator was first  A propositional proof system is called p-optimal if it p -simulates all other propositional proof systems, and it is optimal if it simulates all other pps. A propositional proof system P is polynomially bounded (also called super) if every tautology has a short (i.e., polynomial-size) P -proof.


Propositional calculus, Solutions to propositional logic proof exercises. October 6, 2016. 1 Exercises. 1. Prove. ((P → Q) ∧ (Q → R)) → (P → R) using the style given here. This should  Prepositional Logic – Definition. A proposition is a collection of declarative statements that has either a truth value "true” or a truth value "false". A propositional consists of propositional variables and connectives. We denote the propositional variables by capital letters (A, B, etc). The connectives connect the propositional variables.


Propositional Logic, used to construct more complex argument forms. Page 8. Rules of Inference for Propositional. Logic: Modus Ponens. Example:. Propositional calculus is a branch of logic. It is also called propositional logic, statement logic, sentential calculus, sentential logic, or sometimes zeroth-order logic. It deals with propositions (which can be true or false) and argument flow. Compound propositions are formed by connecting propositions by logical connectives. The propositions without logical connectives are called atomic propositions.