Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Proposition
2.1.
Propositional Variables
3.
Compound Statements
3.1.
Connectives
4.
FAQs
4.1.
Define Proposition.
4.2.
What are Propositional Variables?
4.3.
Define Compound Statements.
5.
Conclusion
Last Updated: Mar 27, 2024
Easy

Propositions And Compound Statements

Author Rajat Agrawal
0 upvote
Master Python: Predicting weather forecasts
Speaker
Ashwin Goyal
Product Manager @

Introduction

Mathematical logic principles define how to reason about mathematical statements. Aristotle, a Greek philosopher, is credited with inventing logical reasoning.  It has numerous applications in computer science, including the design of computing devices, artificial intelligence, and the construction of data structures for programming languages, among others.

Propositional logic concerns statements that can be assigned the truth values true and false. The goal is to evaluate these statements individually and as a group.

Let’s learn about these propositions and compound statements in-depth.

Proposition

A proposition is a set of declarative statements with the truth value true or false attached to them. Propositional variables and connectives make up a propositional.

Examples of propositions are given below:-

Examples:

1.) If x is an integer, then its square is positive.

2.) 12 + 9 = 8 + 13, it will return true.

3.) 25*10 = 5*100, it will return false.

Examples that are not propositions are given below:-

Examples:

1.) What is your name?

2.) X is less than 5. 

The above two examples are not propositions because we cannot prove that they are true or false.

Propositional Variables

Variables used to represent propositions are known as Propositional Variables.

Usually, the propositions are represented by lower case letters beginning with p.

Examples:

p: Delhi is the capital of India.

q: 5 + 5 = 10 

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Compound Statements

Compound statements comprise multiple statements or propositional variables connected by logical connectives (operators).

Example:

p: India is a Country.

q: India is in Asia.

We can combine both p and q to form a compound statement like the below:-

r: India is a Country and it is in Asia.

Connectives

In propositional logic generally, we use five connectives:-

Let’s get familiar with these connectives one by one.

OR: The OR operation of two propositions p and q (written as q∨q) is true if at least any of the propositional variables p or q is true.

The truth table is given below-

AND: The AND operation of two propositions p and q (written as p∧q) is true if both the propositional variables p and q are true.

The truth table is given below-

NOT: The negation of a proposition p (written as ¬p) is false when p is true and is true when p is false.

The truth table is given below-

Implication / If-then: An implication p→q is the proposition “if p, then q”. It is false if p is true and q is false. The rest cases are true.

The truth table is given below-

If and only if: p⇔q is bi-conditional logical connective which is true when p and q are the same, i.e., both are false, or both are true.

The truth table is given below-

FAQs

Define Proposition.

A proposition is a set of declarative statements with the truth value true or false attached to them.

What are Propositional Variables?

Variables used to represent propositions are known as Propositional Variables.

Define Compound Statements.

Compound statements comprise multiple statements or propositional variables connected by logical connectives (operators).

Conclusion

In this article, we have extensively discussed Propositions and Compound Statements, how they are connected, and the different connectives that help them to connect. If you want to learn more, check out our articles on the Linear Differential EquationsPartial Differential Equations, and System of Linear Equations.

Do upvote our blog to help other ninjas grow.

Happy Coding!

Next article
Basic Logical Operations
Live masterclass