Skip to content
Related Articles
Open in App
Not now

Related Articles

Mathematics | Introduction to Propositional Logic | Set 2

Improve Article
Save Article
  • Difficulty Level : Easy
  • Last Updated : 16 Feb, 2023
Improve Article
Save Article

Prerequisite : Introduction to Propositional Logic – Set 1 

Laws of Algebra of Propositions :

1. Indempotent Law:

     p ∨ p ≅ p                               p ∧ p ≅ p 

     Truth table of conjunction and disjunction of a proposition with itself will equal the proposition.

2. Associative Law:

    (p ∨ q) ∨ r ≅ p ∨ (q ∨ r)

    (p ∧ p) ∧ r ≅ p ∧ (q ∧ r)

    Associative Law states that propositions also follow associativity and can be written as mentioned above.

3. Distributive Law:

    p ∨ (q ∧  r) ≅ (p ∨ q) ∧ (p ∨ r)

     p ∧ (q ∨  r) ≅ (p ∧ q) ∨ (p ∧ r)


    Distributive Law states that propositions also follow the distribution and can be written as mentioned above.

4. Commutative Law:

     p ∨ q ≅ q ∨ p 

      p ∧ q ≅ q ∧ p

    It states that propositions follow commutative property i.e if a=b then b=a

5. Identity Law:

    p ∨ T ≅ T

    p ∨ F ≅ p

    p ∧ T ≅ p

    p ∧ F ≅ F

    where T is a Tautology, F is a Contradiction and p is a proposition.

6. De Morgan’s Law : In propositional logic and boolean algebra, De Morgan’s laws are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathematician. The rules allow the expression of conjunctions and disjunctions purely in terms of each other via negation. In formal language, the rules are written as –

  • \neg (p\wedge q) \equiv \neg p \vee \neg q
  • \neg (p\vee q) \equiv \neg p \wedge \neg q

Proof by Truth Table –

\begin{tabular}{ ||c||c||c||c||c||c||c||c||c||c|| }     \hline     p & q & \neg p & \neg q & p\wedge q & \neg p\vee \neg q & p\vee q & \neg p\wedge \neg q \\     \hline     T & T & F & F & T & F & T & F \\     \hline     T & F & F & T & F & T & T & F \\     \hline     F & T & T & F & F & T & T & F \\     \hline     F & F & T & T & F & T & F & T \\     \hline \end{tabular}

7. Involution Law:

     ~~p ≅ p

8. Complement Law:

     p ∨ ~p ≅ T 

     p ∧ ~p ≅ F

     ~T ≅ F

      ~F ≅ T

     where T is a Tautology, F is a Contradiction and p is a proposition.

Special Conditional Statements : As we know that we can form new propositions using existing propositions and logical connectives. New conditional statements can be formed starting with a conditional statement p\rightarrow q    . In particular, there are three related conditional statements that occur so often that they have special names.

  • Implication : p\rightarrow q
  • Converse : The converse of the proposition p\rightarrow q    is q\rightarrow p
  • Contrapositive : The contrapositive of the proposition p\rightarrow q    is \neg q\rightarrow \neg p
  • Inverse : The inverse of the proposition p\rightarrow q    is \neg p\rightarrow \neg q

To summarise,

\begin{tabular}{ ||c||c|| }      \hline     Statement & If p, then q\\     \hline     \hline     Converse & If q, then p \\     \hline     Contrapositive & If not q, then not p \\       \hline     Inverse & If not p, then not q\\     \hline \end{tabular}

Note : It is interesting to note that the truth value of the conditional statement p\rightarrow q    is the same as it’s contrapositive, and the truth value of the Converse of p\rightarrow q    is the same as the truth value of its Inverse. When two compound propositions always have the same truth value, they are said to be equivalent. Therefore,

  • p\rightarrow q \equiv \neg q\rightarrow \neg p
  • q\rightarrow p \equiv \neg p\rightarrow \neg q
\begin{tabular}{ ||c||c||c||c||c||c||c||c|| }     \hline     p & q & \neg p & \neg q & p\rightarrow q & \neg q\rightarrow \neg p & q\rightarrow p & \neg p\rightarrow \neg q \\     \hline     T & T & F & F & T & T & T & T \\     \hline     T & F & F & T & F & F & T & T \\     \hline     F & T & T & F & T & T & F & F \\     \hline     F & F & T & T & T & T & T & T \\     \hline \end{tabular}

Example : Implication : If today is Friday, then it is raining. The given proposition is of the form p\rightarrow q    , where p    is “Today is Friday” and q    is “It is raining today”. Contrapositive, Converse, and Inverse of the given proposition respectively are-

  • Converse : If it is raining, then today is Friday


                              if q -> p is converse of p-> q

  • Contrapositive :If it is not raining, then today is not Friday


                              if ~q -> ~p is contrapositive of p-> q

  • Inverse : If today is not Friday, then it is not raining


                              if ~p -> ~q is inverse of p-> q

Implicit use of Biconditionals: The last article, part one of this topic, ended with a discussion of bi-conditionals, what it is, and their truth table. In Natural Language bi-conditionals are not always explicit. In particular, the if construction (if and only if) is rarely used in the common language. Instead, bi-conditionals are often expressed using “if, then” or an “only if” construction. The other part of the “if and only if” is implicit, i.e. the converse is implied but not stated. For example consider the following statement, “If you complete your homework, then you can go out and play”. What is really meant is “You can go out and play if and only if you complete your homework”. This statement is logically equivalent to two statements, “If you complete your homework, then you can go out and play” and “You can go out and play only if you complete your homework”. Because of this imprecision in Natural Language, an assumption needs to be made whether a conditional statement in natural language includes its converse or not. 

Precedence order of Logical Connectives: Logical connectives are used to construct compound propositions by joining existing propositions. Although parenthesis can be used to specify the order in which the logical operators in the compound proposition need to be applied, there exists a precedence order in Logical Operators. The precedence Order is-

\begin{tabular}{ ||c||c|| }     \hline     Operator & Precedence \\     \hline     \hline     \neg & 1 \\     \hline         \wedge & 2 \\     \vee & 3 \\     \hline     \rightarrow & 4 \\     \leftrightarrow & 5 \\     \hline \end{tabular}

Here, higher the number lower the precedence. 

Translating English Sentences : As mentioned above in this article, Natural Languages such as English are ambiguous i.e. a statement may have multiple interpretations. Therefore it is important to convert these sentences into mathematical expressions involving propositional variables and logical connectives. The above process of conversion may take certain reasonable assumptions about the intended meaning of the sentence. Once the sentences are translated into logical expressions they can be analyzed further to determine their truth values. Rules of Inference can then further be used to reason about the expressions.

Example : “You can access the Internet from campus only if you are a computer science major or you are not a freshman.” The above statement could be considered as a single proposition but it would be more useful to break it down into simpler propositions. That would make it easier to analyze its meaning and to reason with it. The above sentence could be broken down into three propositions,

p - "You can access the Internet from campus."q - "You are a computer science major."r - "You are a freshman."

Using logical connectives we can join the above-mentioned propositions to get a logical expression of the given statement. “only if” is one way to express a conditional statement, (as discussed in Part 1 of this topic in the previous Article), Therefore the logical expression would be –

p\rightarrow (q\vee \neg r)

GATE CS Corner Questions Practicing the following questions will help you test your knowledge. All questions have been asked in GATE in previous years or in GATE Mock Tests. It is highly recommended that you practice them. 1. GATE CS 2009, Question 24 2. GATE CS 2014 Set-1, Question 63 3. GATE CS 2006, Question 28 4. GATE CS 2002, Question 8 5. GATE CS 2000, Question 30 6. GATE CS 2015 Set-1, Question 24 References – Propositional Logic – Wikipedia Discrete Mathematics and its Applications, by Kenneth H Rosen 

This article is contributed by Chirag Manwani. If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks. Please write comments if you find anything incorrect, or if you want to share more information about the topic discussed above.

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!