×

Propositional Logic

It is a branch of logic which is also known as statement logic, sentential logic, zeroth-order logic, and many more. It works with the propositions and its logical connectivities. It deals with the propositions or statements whose values are true, false, or maybe unknown.

Syntax and Semantics of Propositional Logic

Syntax and semantics define a way to determine the truth value of the sentence.

Syntax: The statements given in a problem are represented via propositional symbols. Each sentence consists of a single propositional symbol. The propositional symbol begins with an uppercase letter and may be followed by some other subscripts or letters. We have two fixed propositional symbols, i.e., True and False.

To convert simple sentences into complex one, following connectives (a connective is used to combine two or more sentences) are used:

  • not(¬): It is known as the negation of a sentence. A literal can be a positive literal or a negative literal.
  • and(?): When a sentence is having (?) as the main connective. It is known as Conjunction, and its parts are known as Conjuncts. For example, (Y1 V Y2) ? (Y3 V Y4) ?…(Yn V Ym), such type of sentences are known as Conjunctive sentences.
  • or(V): When a sentence is having (V) as the main connective. It is known as Disjunction, and its parts are known as Disjuncts. For example, (Y1 ? Y2) V (Y3 ? Y4) V …(Yn ? Ym), such type of sentences are known as Disjunctive sentences.  
  • implies(=>): When (Y1 V Y2) => Y3 is given, it is known as the Implication of a sentence. It is like if->then clause, where if this implies then it will happen. Implication is sometimes referred to as Rules or if-then statement. It can also be denoted as (      ) or (       ).
  • if and only if (ó): It represents implication at both sides where the expression is (a1 V a2)?a3,. Such type of connective is called biconditional implication. It returns true if both sides satisfy one another, else returns false.This can also be denoted as (?).

Precedence Order of the Connectives

Below table shows the precedence order of the connectives in their decreasing order:

Name Symbol
Parenthesis/ Brackets ()
Negation/not ¬ or ~
Conjuction/and ?
Disjunction/or V
Implication ?
Biconditional/ if and only if ó

Semantics: It defines the rules to determine the truth of a sentence with respect to a specific model. A semantic should be able to compute the truth value of any given sentence.

There are following five rules regarding the semantics of the complex sentences P and Q in a given model m :

¬P: Its value will be false, iff it is true in the model m.

(P ? Q): Its value is true, iff both P and Q are true in m.

(P v Q): Its value is true, iff either P is true, or Q is true in m.

(P=> Q): Its value is true, iff the value of P is false, and that of Q is true in m.

(P ? Q): The value will be true, iff P and Q value is either true or false in the given model m.

Note: Here, iff means if and only if.                    

These five connectives can also be understood with the help of the below described truth table:

Examples of Propositional Logic

Example 1: Consider the given statement:

If it is humid, then it is raining.

Solution: Let, P and Q be two propositions.

P=It is humid.

Q=It is raining.

It is represented as (P?Q).

Example 2:  It is noon and Ram is sleeping.

Solution: A= It is noon.

B= Ram is sleeping.

It is represented as (A V B).

Example 3: If it is raining, then it is not sunny.

Solution: P= It is raining.

Q= It is sunny.

It is represented as P ? ( ~Q)

Example 4: Ram is a man or a boy.

Solution: X= Ram is a man.

Y= Ram is a boy.

It is represented as (X ? Y).

Example 5: I will go to Delhi if and only if it is not humid.

Solution: A= I will go to Delhi.

B= It is humid.

It is represented as (A ? B).

There can be many examples of Propositional logic.

Propositional Theorem Proving

Theorem proving means to apply rules of inference directly to the sentences.

There are following concepts which are used for theorem proving:

  • Logical Equivalence: If the value of P and Q is true in the same set of models, then they are said to be logically equivalence.
Rule Name Rule
Idempotency Law   (A ? A) = A(AV A) = A  
Commutative Law   (A ? B) = (B ? A)(AV B) = (B V A)      
De morgan’s Law   ~(A ? B) =( ~A V ~B)~(A V B) = (~A ? ~B)  
Associative Law   AV(B V C) = (A V B) V CA ?(B ? C) = (A ?B) ? C  
Distributive Law A ?(B V C) = (A ? B) V (A ? C)A V (B ? C) = (A V B) ? (A V C)  
Contrapositive Law    A   ? B = ~A    ?   ~B
~A  ?       ~B (Converse of Inverse)  
Implication Removal   A    ?   B = ~A V B
Biconditional Removal A ? B = (A ? B) ? (B  ? A)  
Absorption Law A ? (A V B) ? AAV (A ? B) ?A
Double-negation elimination ~(~A)=A

Table defining the rules used in Propositional logic where A, B, and C represents some arbitrary sentences.

  • Validity: If a sentence is valid in all set of models, then it is a valid sentence. Validity is also known as tautology, where it is necessary to have true value for each set of model.
  • Satisfiability: If a sentence is true atleast for some set of values, it is a satisfiable sentence.

Let’s understand validity and satisfiability with the help of examples:

Example 1:

(P V Q)    ?   (P ? Q)

P Q P V Q P ? Q (P V Q)        (P ? Q)  
False False False False True
False True True False False
True False True False False
True True True True True

So, from the above truth table, it is clear that the given expression is satisfiable but not valid.

Example 2:

A B A ? B (A  ? B) ? A ((A ? B) ? A) ? B  
False False True False True
False True True False True
True False False False True
True True True True True

((A  ? B) ? A)  ? B

So, it is clear from the truth table that the given expression is valid as well as satisfiable.

Note: If the given expression is valid, it is by default satisfiable.


Related Topics

Alpha-beta Pruning | Artificial Intelligence

Alpha-beta pruning is an advance version of MINIMAX algorithm. The drawback of minimax strategy is that it explores each node in the tree deeply to provide the best path among all the...

3 minutes read.

Local Search Algorithms and Optimization Problem

The informed and uninformed search expands the nodes systematically in two ways: keeping different paths in the memory and selecting the best suitable path, Which leads to a solution state required to reach the goal...

2 minutes read.

Integration of Blockchain and Artificial Intelligence

A Blockchain is a shared database or ledger where pieces of data are stored in data structures known as blocks. So, we can say that Blockchain is the distribution storage...

6 minutes read.

Informed Search/ Heuristic Search in AI

An informed search is more efficient than an uninformed search because in informed search, along with the current state information,  some additional information is also present, which make it easy to reach the...

6 minutes read.

Gradient Descent

Gradient Descent When training a neural network, an algorithm is used to minimize the loss. This algorithm is called as Gradient Descent. And loss refers to the incorrect outputs given by...

6 minutes read.

Inference in First-order Logic

Inference in First-order Logic While defining inference, we mean to define effective procedures for answering questions in FOPL. FOPL offers the following inference rules: Inference rules for quantifiersUniversal Instantiation (UI): In this, we can infer any sentence by...

5 minutes read.

Hidden Markov Models

Hidden Markov Model is a partially observable model, where the agent partially observes the states. This model is based on the statistical Markov model, where a system being modeled follows the Markov process...

4 minutes read.

Unsupervised Learning in AI

Unsupervised Learning in AI Unsupervised LearningIntroductionClusteringComparison between Supervised, Unsupervised, and Reinforcement Learning. Unsupervised Learning This is the third major category of Machine Learning. Unsupervised learning happens when we have data without additional feedback,...

2 minutes read.

Information Retrieval

Information Retrieval: In order to analyze and categorize the text, we'd like to be able to figure out information about the text, some meaning about the text as well. And,...

14 minutes read.

Reinforcement Learning in AI

Reinforcement Learning in AI Reinforcement LearningMarkov’s Decision ProcessQ leaningGreedy Decision MakingNIM GameNIM Game Implementation with Python Reinforcement Learning Reinforcement Learning is about learning from experience, where agents are given a set of rewards...

15 minutes read.

Knowledge Representation in AI

In this section, we will understand how to represent the knowledge in the form which could be understood by the knowledge-based agents. The knowledge that is stored in the system is related to...

5 minutes read.

Top 7 Artificial Intelligence and Machine Learning trends for 2024

Artificial Intelligence is the ability of machines to perform the same function as human beings, like problem-solving, learning, reasoning and recognizing. Machine Learning is another branch of Computer Science and...

6 minutes read.

Probabilistic Reasoning

Probabilistic Reasoning Probabilistic Reasoning is the study of building network models which can reason under uncertainty, following the principles of probability theory. Bayesian Networks Bayesian network is a data structure which is used to represent the dependencies among variables....

7 minutes read.

Propositional Logic

It is a branch of logic which is also known as statement logic, sentential logic, zeroth-order logic, and many more. It works with the propositions and its logical connectivities. It deals with the...

5 minutes read.

Utility Functions in Artificial Intelligence

The agents use the utility theory for making decisions. It is the mapping from lotteries to the real numbers. An agent is supposed to have various preferences and can choose the one...

3 minutes read.

Classical Planning

Classical Planning is the planning where an agent takes advantage of the problem structure to construct complex plans of an action. The agent performs three tasks in classical planning: Planning: The agent plans after...

4 minutes read.

Inference Rules in Proposition Logic

Inference rules are those rules which are used to describe certain conclusions. The inferred conclusions lead to the desired goal state. In propositional logic, there are various inference rules which can be applied to...

3 minutes read.

Neural Networks

Neural Networks are one of the most popular techniques and tools in Machine learning. Neural Networks were inspired by the human brain as early as in the 1940s. Researchers studied the...

5 minutes read.

Backward Chaining in AI: Artificial Intelligence

Backward Chaining is a backward approach which works in the backward direction. It begins its journey from the back of the goal. Like, forward chaining, we have backward chaining for Propositional logic as...

6 minutes read.

Differences in Artificial Intelligence

Difference between Intelligence and Artificial Intelligence Intelligence Artificial Intelligence It is a natural process or quality given to human beings. ...

3 minutes read.