propositional logic - substitutions and normal forms

71
Outline Propositional Logic - Substitutions and Normal Forms K. Subramani 1 1 Lane Department of Computer Science and Electrical Engineering West Virginia University 23 January Subramani Propositonal Logic

Upload: others

Post on 25-Feb-2022

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Propositional Logic - Substitutions and Normal Forms

Outline

Propositional Logic - Substitutions and Normal Forms

K. Subramani1

1Lane Department of Computer Science and Electrical EngineeringWest Virginia University

23 January

Subramani Propositonal Logic

Page 2: Propositional Logic - Substitutions and Normal Forms

Outline

Outline

1 Review

2 Substitution

3 Normal Forms

Subramani Propositonal Logic

Page 3: Propositional Logic - Substitutions and Normal Forms

Outline

Outline

1 Review

2 Substitution

3 Normal Forms

Subramani Propositonal Logic

Page 4: Propositional Logic - Substitutions and Normal Forms

Outline

Outline

1 Review

2 Substitution

3 Normal Forms

Subramani Propositonal Logic

Page 5: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Review

Main Issues

1 Propositions and Connectives.2 Semantics and interpretation.3 Satisfiability and Validity.4 Proof techniques.

Subramani Propositonal Logic

Page 6: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Review

Main Issues

1 Propositions and Connectives.

2 Semantics and interpretation.3 Satisfiability and Validity.4 Proof techniques.

Subramani Propositonal Logic

Page 7: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Review

Main Issues

1 Propositions and Connectives.2 Semantics and interpretation.

3 Satisfiability and Validity.4 Proof techniques.

Subramani Propositonal Logic

Page 8: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Review

Main Issues

1 Propositions and Connectives.2 Semantics and interpretation.3 Satisfiability and Validity.

4 Proof techniques.

Subramani Propositonal Logic

Page 9: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Review

Main Issues

1 Propositions and Connectives.2 Semantics and interpretation.3 Satisfiability and Validity.4 Proof techniques.

Subramani Propositonal Logic

Page 10: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Substitution

Definition

A substitution is a mapping

σ : {F1 7→ G1, . . . ,Fn 7→ Gn}.

where, domain(σ) = {F1, . . . ,Fn} and range(σ) = {G1, . . . ,Gn}.

Application

Substitution is a syntactic operation on formulae, which allows us to prove the validityof entire sets of formulae via formula templates.

Note

All substitutions must be performed simultaneously.

Subramani Propositonal Logic

Page 11: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Substitution

Definition

A substitution is a mapping

σ : {F1 7→ G1, . . . ,Fn 7→ Gn}.

where, domain(σ) = {F1, . . . ,Fn} and range(σ) = {G1, . . . ,Gn}.

Application

Substitution is a syntactic operation on formulae, which allows us to prove the validityof entire sets of formulae via formula templates.

Note

All substitutions must be performed simultaneously.

Subramani Propositonal Logic

Page 12: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Substitution

Definition

A substitution is a mapping

σ : {F1 7→ G1, . . . ,Fn 7→ Gn}.

where,

domain(σ) = {F1, . . . ,Fn} and range(σ) = {G1, . . . ,Gn}.

Application

Substitution is a syntactic operation on formulae, which allows us to prove the validityof entire sets of formulae via formula templates.

Note

All substitutions must be performed simultaneously.

Subramani Propositonal Logic

Page 13: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Substitution

Definition

A substitution is a mapping

σ : {F1 7→ G1, . . . ,Fn 7→ Gn}.

where, domain(σ) = {F1, . . . ,Fn} and range(σ) = {G1, . . . ,Gn}.

Application

Substitution is a syntactic operation on formulae, which allows us to prove the validityof entire sets of formulae via formula templates.

Note

All substitutions must be performed simultaneously.

Subramani Propositonal Logic

Page 14: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Substitution

Definition

A substitution is a mapping

σ : {F1 7→ G1, . . . ,Fn 7→ Gn}.

where, domain(σ) = {F1, . . . ,Fn} and range(σ) = {G1, . . . ,Gn}.

Application

Substitution is a syntactic operation on formulae, which allows us to prove the validityof entire sets of formulae via formula templates.

Note

All substitutions must be performed simultaneously.

Subramani Propositonal Logic

Page 15: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Substitution

Definition

A substitution is a mapping

σ : {F1 7→ G1, . . . ,Fn 7→ Gn}.

where, domain(σ) = {F1, . . . ,Fn} and range(σ) = {G1, . . . ,Gn}.

Application

Substitution is a syntactic operation on formulae, which allows us to prove the validityof entire sets of formulae via formula templates.

Note

All substitutions must be performed simultaneously.

Subramani Propositonal Logic

Page 16: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Substitution

Definition

A substitution is a mapping

σ : {F1 7→ G1, . . . ,Fn 7→ Gn}.

where, domain(σ) = {F1, . . . ,Fn} and range(σ) = {G1, . . . ,Gn}.

Application

Substitution is a syntactic operation on formulae, which allows us to prove the validityof entire sets of formulae via formula templates.

Note

All substitutions must be performed simultaneously.

Subramani Propositonal Logic

Page 17: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Usage

Example

Let F : P ∧ Q → P ∨ ¬Q and σ : {P 7→ R, P ∧ Q 7→ (P → Q)}.Fσ : = {(P → Q) → (R ∨ ¬Q).

Definition

A variable substitution is a substitution in which the domain consists only ofpropositional variables.

Proposition

Consider the substitution:

σ : {F1 7→ G1, . . . ,Fn 7→ Gn}.

where each Fi ⇔ Gi . Then F ⇔ Fσ.

Subramani Propositonal Logic

Page 18: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Usage

Example

Let F : P ∧ Q → P ∨ ¬Q and σ : {P 7→ R, P ∧ Q 7→ (P → Q)}.

Fσ : = {(P → Q) → (R ∨ ¬Q).

Definition

A variable substitution is a substitution in which the domain consists only ofpropositional variables.

Proposition

Consider the substitution:

σ : {F1 7→ G1, . . . ,Fn 7→ Gn}.

where each Fi ⇔ Gi . Then F ⇔ Fσ.

Subramani Propositonal Logic

Page 19: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Usage

Example

Let F : P ∧ Q → P ∨ ¬Q and σ : {P 7→ R, P ∧ Q 7→ (P → Q)}.Fσ :

= {(P → Q) → (R ∨ ¬Q).

Definition

A variable substitution is a substitution in which the domain consists only ofpropositional variables.

Proposition

Consider the substitution:

σ : {F1 7→ G1, . . . ,Fn 7→ Gn}.

where each Fi ⇔ Gi . Then F ⇔ Fσ.

Subramani Propositonal Logic

Page 20: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Usage

Example

Let F : P ∧ Q → P ∨ ¬Q and σ : {P 7→ R, P ∧ Q 7→ (P → Q)}.Fσ : = {(P → Q) → (R ∨ ¬Q).

Definition

A variable substitution is a substitution in which the domain consists only ofpropositional variables.

Proposition

Consider the substitution:

σ : {F1 7→ G1, . . . ,Fn 7→ Gn}.

where each Fi ⇔ Gi . Then F ⇔ Fσ.

Subramani Propositonal Logic

Page 21: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Usage

Example

Let F : P ∧ Q → P ∨ ¬Q and σ : {P 7→ R, P ∧ Q 7→ (P → Q)}.Fσ : = {(P → Q) → (R ∨ ¬Q).

Definition

A variable substitution is a substitution in which the domain consists only ofpropositional variables.

Proposition

Consider the substitution:

σ : {F1 7→ G1, . . . ,Fn 7→ Gn}.

where each Fi ⇔ Gi . Then F ⇔ Fσ.

Subramani Propositonal Logic

Page 22: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Usage

Example

Let F : P ∧ Q → P ∨ ¬Q and σ : {P 7→ R, P ∧ Q 7→ (P → Q)}.Fσ : = {(P → Q) → (R ∨ ¬Q).

Definition

A variable substitution is a substitution in which the domain consists only ofpropositional variables.

Proposition

Consider the substitution:

σ : {F1 7→ G1, . . . ,Fn 7→ Gn}.

where each Fi ⇔ Gi .

Then F ⇔ Fσ.

Subramani Propositonal Logic

Page 23: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Usage

Example

Let F : P ∧ Q → P ∨ ¬Q and σ : {P 7→ R, P ∧ Q 7→ (P → Q)}.Fσ : = {(P → Q) → (R ∨ ¬Q).

Definition

A variable substitution is a substitution in which the domain consists only ofpropositional variables.

Proposition

Consider the substitution:

σ : {F1 7→ G1, . . . ,Fn 7→ Gn}.

where each Fi ⇔ Gi . Then F ⇔ Fσ.

Subramani Propositonal Logic

Page 24: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Applications

Proposition

If F is valid and G = Fσ, for some variable substitution σ, then G is valid.

Composition of substitutions

Given substitutions σ1 and σ2, we compute the substitution σ1σ2 as follows:

1 Apply σ2 to each formula of the range of σ1, and add the results to σ.2 if Fi of Fi 7→ Gi appears in the domain of σ2, but not in the domain of σ1, then add

Fi 7→ Gi to σ.

Example

Let σ1 : {P 7→ R,P ∧ Q 7→ (P → Q)} and σ2 : {P 7→ S,S 7→ Q}. Compute σ1σ2.

Subramani Propositonal Logic

Page 25: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Applications

Proposition

If F is valid and G = Fσ, for some variable substitution σ, then G is valid.

Composition of substitutions

Given substitutions σ1 and σ2, we compute the substitution σ1σ2 as follows:

1 Apply σ2 to each formula of the range of σ1, and add the results to σ.2 if Fi of Fi 7→ Gi appears in the domain of σ2, but not in the domain of σ1, then add

Fi 7→ Gi to σ.

Example

Let σ1 : {P 7→ R,P ∧ Q 7→ (P → Q)} and σ2 : {P 7→ S,S 7→ Q}. Compute σ1σ2.

Subramani Propositonal Logic

Page 26: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Applications

Proposition

If F is valid and G = Fσ, for some variable substitution σ, then G is valid.

Composition of substitutions

Given substitutions σ1 and σ2, we compute the substitution σ1σ2 as follows:

1 Apply σ2 to each formula of the range of σ1, and add the results to σ.2 if Fi of Fi 7→ Gi appears in the domain of σ2, but not in the domain of σ1, then add

Fi 7→ Gi to σ.

Example

Let σ1 : {P 7→ R,P ∧ Q 7→ (P → Q)} and σ2 : {P 7→ S,S 7→ Q}. Compute σ1σ2.

Subramani Propositonal Logic

Page 27: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Applications

Proposition

If F is valid and G = Fσ, for some variable substitution σ, then G is valid.

Composition of substitutions

Given substitutions σ1 and σ2, we compute the substitution σ1σ2 as follows:

1 Apply σ2 to each formula of the range of σ1, and add the results to σ.

2 if Fi of Fi 7→ Gi appears in the domain of σ2, but not in the domain of σ1, then addFi 7→ Gi to σ.

Example

Let σ1 : {P 7→ R,P ∧ Q 7→ (P → Q)} and σ2 : {P 7→ S,S 7→ Q}. Compute σ1σ2.

Subramani Propositonal Logic

Page 28: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Applications

Proposition

If F is valid and G = Fσ, for some variable substitution σ, then G is valid.

Composition of substitutions

Given substitutions σ1 and σ2, we compute the substitution σ1σ2 as follows:

1 Apply σ2 to each formula of the range of σ1, and add the results to σ.2 if Fi of Fi 7→ Gi appears in the domain of σ2, but not in the domain of σ1, then add

Fi 7→ Gi to σ.

Example

Let σ1 : {P 7→ R,P ∧ Q 7→ (P → Q)} and σ2 : {P 7→ S,S 7→ Q}. Compute σ1σ2.

Subramani Propositonal Logic

Page 29: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Applications

Proposition

If F is valid and G = Fσ, for some variable substitution σ, then G is valid.

Composition of substitutions

Given substitutions σ1 and σ2, we compute the substitution σ1σ2 as follows:

1 Apply σ2 to each formula of the range of σ1, and add the results to σ.2 if Fi of Fi 7→ Gi appears in the domain of σ2, but not in the domain of σ1, then add

Fi 7→ Gi to σ.

Example

Let σ1 : {P 7→ R,P ∧ Q 7→ (P → Q)} and σ2 : {P 7→ S,S 7→ Q}.

Compute σ1σ2.

Subramani Propositonal Logic

Page 30: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Applications

Proposition

If F is valid and G = Fσ, for some variable substitution σ, then G is valid.

Composition of substitutions

Given substitutions σ1 and σ2, we compute the substitution σ1σ2 as follows:

1 Apply σ2 to each formula of the range of σ1, and add the results to σ.2 if Fi of Fi 7→ Gi appears in the domain of σ2, but not in the domain of σ1, then add

Fi 7→ Gi to σ.

Example

Let σ1 : {P 7→ R,P ∧ Q 7→ (P → Q)} and σ2 : {P 7→ S,S 7→ Q}. Compute σ1σ2.

Subramani Propositonal Logic

Page 31: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Normal Forms

Concept

A normal form of formulae is a syntactic restriction such that for every formula of logic,there is an equivalent formula in the restricted form.

Types

In propositional logic, there are three important normal forms, viz.,

(i) Negation Normal Form (NNF).

(ii) Disjunctive Normal Form (DNF).

(iii) Conjunctive Normal Form (CNF).

Subramani Propositonal Logic

Page 32: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Normal Forms

Concept

A normal form of formulae is a syntactic restriction such that for every formula of logic,there is an equivalent formula in the restricted form.

Types

In propositional logic, there are three important normal forms, viz.,

(i) Negation Normal Form (NNF).

(ii) Disjunctive Normal Form (DNF).

(iii) Conjunctive Normal Form (CNF).

Subramani Propositonal Logic

Page 33: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Normal Forms

Concept

A normal form of formulae is a syntactic restriction such that for every formula of logic,there is an equivalent formula in the restricted form.

Types

In propositional logic, there are three important normal forms, viz.,

(i) Negation Normal Form (NNF).

(ii) Disjunctive Normal Form (DNF).

(iii) Conjunctive Normal Form (CNF).

Subramani Propositonal Logic

Page 34: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Normal Forms

Concept

A normal form of formulae is a syntactic restriction such that for every formula of logic,there is an equivalent formula in the restricted form.

Types

In propositional logic, there are three important normal forms, viz.,

(i) Negation Normal Form (NNF).

(ii) Disjunctive Normal Form (DNF).

(iii) Conjunctive Normal Form (CNF).

Subramani Propositonal Logic

Page 35: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Normal Forms

Concept

A normal form of formulae is a syntactic restriction such that for every formula of logic,there is an equivalent formula in the restricted form.

Types

In propositional logic, there are three important normal forms, viz.,

(i) Negation Normal Form (NNF).

(ii) Disjunctive Normal Form (DNF).

(iii) Conjunctive Normal Form (CNF).

Subramani Propositonal Logic

Page 36: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Normal Forms

Concept

A normal form of formulae is a syntactic restriction such that for every formula of logic,there is an equivalent formula in the restricted form.

Types

In propositional logic, there are three important normal forms, viz.,

(i) Negation Normal Form (NNF).

(ii) Disjunctive Normal Form (DNF).

(iii) Conjunctive Normal Form (CNF).

Subramani Propositonal Logic

Page 37: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Negation Normal Form

Main concept

Each formula must use only ¬, ∨, and ∧. Furthermore, the negations appear only inliterals.

Methodology

Use Equivalence rules and De Morgan’s laws to push the negation till it abuts a literal.

Example

Convert F : ¬(P → ¬(P ∧ Q)) into NNF.

Subramani Propositonal Logic

Page 38: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Negation Normal Form

Main concept

Each formula must use only ¬, ∨, and ∧.

Furthermore, the negations appear only inliterals.

Methodology

Use Equivalence rules and De Morgan’s laws to push the negation till it abuts a literal.

Example

Convert F : ¬(P → ¬(P ∧ Q)) into NNF.

Subramani Propositonal Logic

Page 39: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Negation Normal Form

Main concept

Each formula must use only ¬, ∨, and ∧. Furthermore, the negations appear only inliterals.

Methodology

Use Equivalence rules and De Morgan’s laws to push the negation till it abuts a literal.

Example

Convert F : ¬(P → ¬(P ∧ Q)) into NNF.

Subramani Propositonal Logic

Page 40: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Negation Normal Form

Main concept

Each formula must use only ¬, ∨, and ∧. Furthermore, the negations appear only inliterals.

Methodology

Use Equivalence rules and De Morgan’s laws to push the negation till it abuts a literal.

Example

Convert F : ¬(P → ¬(P ∧ Q)) into NNF.

Subramani Propositonal Logic

Page 41: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Negation Normal Form

Main concept

Each formula must use only ¬, ∨, and ∧. Furthermore, the negations appear only inliterals.

Methodology

Use Equivalence rules and De Morgan’s laws to push the negation till it abuts a literal.

Example

Convert F : ¬(P → ¬(P ∧ Q)) into NNF.

Subramani Propositonal Logic

Page 42: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Disjunctive Normal Form

Concept

A formula is in disjunctive normal form (DNF), if it is a disjunction of a conjunctions ofliterals,

i.e., ∨i ∧j lij , for literals li,j . For instance, the formula

(¬x1 ∧ x3 ∧ x5) ∨ (x1 ∧ x5)

is in DNF. Each block of conjuncts is called an implicant.

Methodology

First convert the formula into NNF. Then, use the following two template equivalences:

(i) (F1 ∨ F2) ∧ F3 ⇔ (F1 ∧ F3) ∨ (F2 ∧ F3).

(ii) F1 ∧ (F2 ∨ F3) ⇔ (F1 ∧ F2) ∨ (F1 ∧ F3).

Subramani Propositonal Logic

Page 43: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Disjunctive Normal Form

Concept

A formula is in disjunctive normal form (DNF), if it is a disjunction of a conjunctions ofliterals, i.e., ∨i ∧j lij , for literals li,j .

For instance, the formula

(¬x1 ∧ x3 ∧ x5) ∨ (x1 ∧ x5)

is in DNF. Each block of conjuncts is called an implicant.

Methodology

First convert the formula into NNF. Then, use the following two template equivalences:

(i) (F1 ∨ F2) ∧ F3 ⇔ (F1 ∧ F3) ∨ (F2 ∧ F3).

(ii) F1 ∧ (F2 ∨ F3) ⇔ (F1 ∧ F2) ∨ (F1 ∧ F3).

Subramani Propositonal Logic

Page 44: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Disjunctive Normal Form

Concept

A formula is in disjunctive normal form (DNF), if it is a disjunction of a conjunctions ofliterals, i.e., ∨i ∧j lij , for literals li,j . For instance, the formula

(¬x1 ∧ x3 ∧ x5) ∨ (x1 ∧ x5)

is in DNF.

Each block of conjuncts is called an implicant.

Methodology

First convert the formula into NNF. Then, use the following two template equivalences:

(i) (F1 ∨ F2) ∧ F3 ⇔ (F1 ∧ F3) ∨ (F2 ∧ F3).

(ii) F1 ∧ (F2 ∨ F3) ⇔ (F1 ∧ F2) ∨ (F1 ∧ F3).

Subramani Propositonal Logic

Page 45: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Disjunctive Normal Form

Concept

A formula is in disjunctive normal form (DNF), if it is a disjunction of a conjunctions ofliterals, i.e., ∨i ∧j lij , for literals li,j . For instance, the formula

(¬x1 ∧ x3 ∧ x5) ∨ (x1 ∧ x5)

is in DNF. Each block of conjuncts is called an implicant.

Methodology

First convert the formula into NNF. Then, use the following two template equivalences:

(i) (F1 ∨ F2) ∧ F3 ⇔ (F1 ∧ F3) ∨ (F2 ∧ F3).

(ii) F1 ∧ (F2 ∨ F3) ⇔ (F1 ∧ F2) ∨ (F1 ∧ F3).

Subramani Propositonal Logic

Page 46: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Disjunctive Normal Form

Concept

A formula is in disjunctive normal form (DNF), if it is a disjunction of a conjunctions ofliterals, i.e., ∨i ∧j lij , for literals li,j . For instance, the formula

(¬x1 ∧ x3 ∧ x5) ∨ (x1 ∧ x5)

is in DNF. Each block of conjuncts is called an implicant.

Methodology

First convert the formula into NNF. Then, use the following two template equivalences:

(i) (F1 ∨ F2) ∧ F3 ⇔ (F1 ∧ F3) ∨ (F2 ∧ F3).

(ii) F1 ∧ (F2 ∨ F3) ⇔ (F1 ∧ F2) ∨ (F1 ∧ F3).

Subramani Propositonal Logic

Page 47: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Disjunctive Normal Form

Concept

A formula is in disjunctive normal form (DNF), if it is a disjunction of a conjunctions ofliterals, i.e., ∨i ∧j lij , for literals li,j . For instance, the formula

(¬x1 ∧ x3 ∧ x5) ∨ (x1 ∧ x5)

is in DNF. Each block of conjuncts is called an implicant.

Methodology

First convert the formula into NNF.

Then, use the following two template equivalences:

(i) (F1 ∨ F2) ∧ F3 ⇔ (F1 ∧ F3) ∨ (F2 ∧ F3).

(ii) F1 ∧ (F2 ∨ F3) ⇔ (F1 ∧ F2) ∨ (F1 ∧ F3).

Subramani Propositonal Logic

Page 48: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Disjunctive Normal Form

Concept

A formula is in disjunctive normal form (DNF), if it is a disjunction of a conjunctions ofliterals, i.e., ∨i ∧j lij , for literals li,j . For instance, the formula

(¬x1 ∧ x3 ∧ x5) ∨ (x1 ∧ x5)

is in DNF. Each block of conjuncts is called an implicant.

Methodology

First convert the formula into NNF. Then, use the following two template equivalences:

(i) (F1 ∨ F2) ∧ F3 ⇔ (F1 ∧ F3) ∨ (F2 ∧ F3).

(ii) F1 ∧ (F2 ∨ F3) ⇔ (F1 ∧ F2) ∨ (F1 ∧ F3).

Subramani Propositonal Logic

Page 49: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Disjunctive Normal Form

Concept

A formula is in disjunctive normal form (DNF), if it is a disjunction of a conjunctions ofliterals, i.e., ∨i ∧j lij , for literals li,j . For instance, the formula

(¬x1 ∧ x3 ∧ x5) ∨ (x1 ∧ x5)

is in DNF. Each block of conjuncts is called an implicant.

Methodology

First convert the formula into NNF. Then, use the following two template equivalences:

(i) (F1 ∨ F2) ∧ F3 ⇔ (F1 ∧ F3) ∨ (F2 ∧ F3).

(ii) F1 ∧ (F2 ∨ F3) ⇔ (F1 ∧ F2) ∨ (F1 ∧ F3).

Subramani Propositonal Logic

Page 50: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Disjunctive Normal Form

Concept

A formula is in disjunctive normal form (DNF), if it is a disjunction of a conjunctions ofliterals, i.e., ∨i ∧j lij , for literals li,j . For instance, the formula

(¬x1 ∧ x3 ∧ x5) ∨ (x1 ∧ x5)

is in DNF. Each block of conjuncts is called an implicant.

Methodology

First convert the formula into NNF. Then, use the following two template equivalences:

(i) (F1 ∨ F2) ∧ F3 ⇔ (F1 ∧ F3) ∨ (F2 ∧ F3).

(ii) F1 ∧ (F2 ∨ F3) ⇔ (F1 ∧ F2) ∨ (F1 ∧ F3).

Subramani Propositonal Logic

Page 51: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Example

Example

Convert F : (Q1 ∨ ¬¬Q2) ∧ (¬R1 → R2) into DNF.

Subramani Propositonal Logic

Page 52: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Example

Example

Convert F : (Q1 ∨ ¬¬Q2) ∧ (¬R1 → R2) into DNF.

Subramani Propositonal Logic

Page 53: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Conjunctive Normal Form

Concept

A formula is in conjunctive normal form (CNF), if it is a conjunction of disjunctions ofliterals, i.e., ∧i ∨j li,j . For instance, the formula

(x1 ∨ ¬x2 ∨ x3) ∧ (x1, x3)

is in CNF. Each disjunctive block is called a clause.

Methodology I

First convert the formula into NNF. Then, use the following two template equivalences:

(i) (F1 ∧ F2) ∨ F3 ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

(ii) F1 ∨ (F2 ∧ F3) ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

Example

Convert the formula F : (Q1 ∧ ¬¬Q2) ∨ (¬R1 → R2) into CNF.

Subramani Propositonal Logic

Page 54: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Conjunctive Normal Form

Concept

A formula is in conjunctive normal form (CNF), if it is a conjunction of disjunctions ofliterals,

i.e., ∧i ∨j li,j . For instance, the formula

(x1 ∨ ¬x2 ∨ x3) ∧ (x1, x3)

is in CNF. Each disjunctive block is called a clause.

Methodology I

First convert the formula into NNF. Then, use the following two template equivalences:

(i) (F1 ∧ F2) ∨ F3 ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

(ii) F1 ∨ (F2 ∧ F3) ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

Example

Convert the formula F : (Q1 ∧ ¬¬Q2) ∨ (¬R1 → R2) into CNF.

Subramani Propositonal Logic

Page 55: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Conjunctive Normal Form

Concept

A formula is in conjunctive normal form (CNF), if it is a conjunction of disjunctions ofliterals, i.e., ∧i ∨j li,j . For instance, the formula

(x1 ∨ ¬x2 ∨ x3) ∧ (x1, x3)

is in CNF.

Each disjunctive block is called a clause.

Methodology I

First convert the formula into NNF. Then, use the following two template equivalences:

(i) (F1 ∧ F2) ∨ F3 ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

(ii) F1 ∨ (F2 ∧ F3) ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

Example

Convert the formula F : (Q1 ∧ ¬¬Q2) ∨ (¬R1 → R2) into CNF.

Subramani Propositonal Logic

Page 56: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Conjunctive Normal Form

Concept

A formula is in conjunctive normal form (CNF), if it is a conjunction of disjunctions ofliterals, i.e., ∧i ∨j li,j . For instance, the formula

(x1 ∨ ¬x2 ∨ x3) ∧ (x1, x3)

is in CNF. Each disjunctive block is called a clause.

Methodology I

First convert the formula into NNF. Then, use the following two template equivalences:

(i) (F1 ∧ F2) ∨ F3 ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

(ii) F1 ∨ (F2 ∧ F3) ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

Example

Convert the formula F : (Q1 ∧ ¬¬Q2) ∨ (¬R1 → R2) into CNF.

Subramani Propositonal Logic

Page 57: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Conjunctive Normal Form

Concept

A formula is in conjunctive normal form (CNF), if it is a conjunction of disjunctions ofliterals, i.e., ∧i ∨j li,j . For instance, the formula

(x1 ∨ ¬x2 ∨ x3) ∧ (x1, x3)

is in CNF. Each disjunctive block is called a clause.

Methodology I

First convert the formula into NNF. Then, use the following two template equivalences:

(i) (F1 ∧ F2) ∨ F3 ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

(ii) F1 ∨ (F2 ∧ F3) ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

Example

Convert the formula F : (Q1 ∧ ¬¬Q2) ∨ (¬R1 → R2) into CNF.

Subramani Propositonal Logic

Page 58: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Conjunctive Normal Form

Concept

A formula is in conjunctive normal form (CNF), if it is a conjunction of disjunctions ofliterals, i.e., ∧i ∨j li,j . For instance, the formula

(x1 ∨ ¬x2 ∨ x3) ∧ (x1, x3)

is in CNF. Each disjunctive block is called a clause.

Methodology I

First convert the formula into NNF.

Then, use the following two template equivalences:

(i) (F1 ∧ F2) ∨ F3 ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

(ii) F1 ∨ (F2 ∧ F3) ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

Example

Convert the formula F : (Q1 ∧ ¬¬Q2) ∨ (¬R1 → R2) into CNF.

Subramani Propositonal Logic

Page 59: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Conjunctive Normal Form

Concept

A formula is in conjunctive normal form (CNF), if it is a conjunction of disjunctions ofliterals, i.e., ∧i ∨j li,j . For instance, the formula

(x1 ∨ ¬x2 ∨ x3) ∧ (x1, x3)

is in CNF. Each disjunctive block is called a clause.

Methodology I

First convert the formula into NNF. Then, use the following two template equivalences:

(i) (F1 ∧ F2) ∨ F3 ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

(ii) F1 ∨ (F2 ∧ F3) ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

Example

Convert the formula F : (Q1 ∧ ¬¬Q2) ∨ (¬R1 → R2) into CNF.

Subramani Propositonal Logic

Page 60: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Conjunctive Normal Form

Concept

A formula is in conjunctive normal form (CNF), if it is a conjunction of disjunctions ofliterals, i.e., ∧i ∨j li,j . For instance, the formula

(x1 ∨ ¬x2 ∨ x3) ∧ (x1, x3)

is in CNF. Each disjunctive block is called a clause.

Methodology I

First convert the formula into NNF. Then, use the following two template equivalences:

(i) (F1 ∧ F2) ∨ F3 ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

(ii) F1 ∨ (F2 ∧ F3) ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

Example

Convert the formula F : (Q1 ∧ ¬¬Q2) ∨ (¬R1 → R2) into CNF.

Subramani Propositonal Logic

Page 61: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Conjunctive Normal Form

Concept

A formula is in conjunctive normal form (CNF), if it is a conjunction of disjunctions ofliterals, i.e., ∧i ∨j li,j . For instance, the formula

(x1 ∨ ¬x2 ∨ x3) ∧ (x1, x3)

is in CNF. Each disjunctive block is called a clause.

Methodology I

First convert the formula into NNF. Then, use the following two template equivalences:

(i) (F1 ∧ F2) ∨ F3 ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

(ii) F1 ∨ (F2 ∧ F3) ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

Example

Convert the formula F : (Q1 ∧ ¬¬Q2) ∨ (¬R1 → R2) into CNF.

Subramani Propositonal Logic

Page 62: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Conjunctive Normal Form

Concept

A formula is in conjunctive normal form (CNF), if it is a conjunction of disjunctions ofliterals, i.e., ∧i ∨j li,j . For instance, the formula

(x1 ∨ ¬x2 ∨ x3) ∧ (x1, x3)

is in CNF. Each disjunctive block is called a clause.

Methodology I

First convert the formula into NNF. Then, use the following two template equivalences:

(i) (F1 ∧ F2) ∨ F3 ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

(ii) F1 ∨ (F2 ∧ F3) ⇔ (F1 ∨ F2) ∧ (F1 ∨ F3).

Example

Convert the formula F : (Q1 ∧ ¬¬Q2) ∨ (¬R1 → R2) into CNF.

Subramani Propositonal Logic

Page 63: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Converting to CNF - The Equisatisfiable formula approach

Main issue

The method discussed above is horribly expensive, and will result in an exponentialblowup. For instance, convert the following formula into CNF:

(B1 ∧ B2 ∧ B3) ∨ (C1 ∧ C2 ∧ C3).

More efficient approach

A more efficient methodology known as the equisatisfiable formula approach wasproposed by Tsetsin. The main idea is to use new variables. For instance, the formulaabove can be rewritten as:

(Z → (B1 ∧ B2 ∧ B3)) ∧ (¬Z → (C1 ∧ C2 ∧ C3))

(¬Z ∨ (B1 ∧ B2 ∧ B3)) ∧ (Z ∨ (C1 ∧ C2 ∧ C3))

Clearly, only six more clauses are created, as opposed to the 9 created by using thefirst method.

Subramani Propositonal Logic

Page 64: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Converting to CNF - The Equisatisfiable formula approach

Main issue

The method discussed above is horribly expensive, and will result in an exponentialblowup.

For instance, convert the following formula into CNF:

(B1 ∧ B2 ∧ B3) ∨ (C1 ∧ C2 ∧ C3).

More efficient approach

A more efficient methodology known as the equisatisfiable formula approach wasproposed by Tsetsin. The main idea is to use new variables. For instance, the formulaabove can be rewritten as:

(Z → (B1 ∧ B2 ∧ B3)) ∧ (¬Z → (C1 ∧ C2 ∧ C3))

(¬Z ∨ (B1 ∧ B2 ∧ B3)) ∧ (Z ∨ (C1 ∧ C2 ∧ C3))

Clearly, only six more clauses are created, as opposed to the 9 created by using thefirst method.

Subramani Propositonal Logic

Page 65: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Converting to CNF - The Equisatisfiable formula approach

Main issue

The method discussed above is horribly expensive, and will result in an exponentialblowup. For instance, convert the following formula into CNF:

(B1 ∧ B2 ∧ B3) ∨ (C1 ∧ C2 ∧ C3).

More efficient approach

A more efficient methodology known as the equisatisfiable formula approach wasproposed by Tsetsin. The main idea is to use new variables. For instance, the formulaabove can be rewritten as:

(Z → (B1 ∧ B2 ∧ B3)) ∧ (¬Z → (C1 ∧ C2 ∧ C3))

(¬Z ∨ (B1 ∧ B2 ∧ B3)) ∧ (Z ∨ (C1 ∧ C2 ∧ C3))

Clearly, only six more clauses are created, as opposed to the 9 created by using thefirst method.

Subramani Propositonal Logic

Page 66: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Converting to CNF - The Equisatisfiable formula approach

Main issue

The method discussed above is horribly expensive, and will result in an exponentialblowup. For instance, convert the following formula into CNF:

(B1 ∧ B2 ∧ B3) ∨ (C1 ∧ C2 ∧ C3).

More efficient approach

A more efficient methodology known as the equisatisfiable formula approach wasproposed by Tsetsin.

The main idea is to use new variables. For instance, the formulaabove can be rewritten as:

(Z → (B1 ∧ B2 ∧ B3)) ∧ (¬Z → (C1 ∧ C2 ∧ C3))

(¬Z ∨ (B1 ∧ B2 ∧ B3)) ∧ (Z ∨ (C1 ∧ C2 ∧ C3))

Clearly, only six more clauses are created, as opposed to the 9 created by using thefirst method.

Subramani Propositonal Logic

Page 67: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Converting to CNF - The Equisatisfiable formula approach

Main issue

The method discussed above is horribly expensive, and will result in an exponentialblowup. For instance, convert the following formula into CNF:

(B1 ∧ B2 ∧ B3) ∨ (C1 ∧ C2 ∧ C3).

More efficient approach

A more efficient methodology known as the equisatisfiable formula approach wasproposed by Tsetsin. The main idea is to use new variables. For instance, the formulaabove can be rewritten as:

(Z → (B1 ∧ B2 ∧ B3)) ∧ (¬Z → (C1 ∧ C2 ∧ C3))

(¬Z ∨ (B1 ∧ B2 ∧ B3)) ∧ (Z ∨ (C1 ∧ C2 ∧ C3))

Clearly, only six more clauses are created, as opposed to the 9 created by using thefirst method.

Subramani Propositonal Logic

Page 68: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Converting to CNF - The Equisatisfiable formula approach

Main issue

The method discussed above is horribly expensive, and will result in an exponentialblowup. For instance, convert the following formula into CNF:

(B1 ∧ B2 ∧ B3) ∨ (C1 ∧ C2 ∧ C3).

More efficient approach

A more efficient methodology known as the equisatisfiable formula approach wasproposed by Tsetsin. The main idea is to use new variables. For instance, the formulaabove can be rewritten as:

(Z → (B1 ∧ B2 ∧ B3)) ∧ (¬Z → (C1 ∧ C2 ∧ C3))

(¬Z ∨ (B1 ∧ B2 ∧ B3)) ∧ (Z ∨ (C1 ∧ C2 ∧ C3))

Clearly, only six more clauses are created, as opposed to the 9 created by using thefirst method.

Subramani Propositonal Logic

Page 69: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

Converting to CNF - The Equisatisfiable formula approach

Main issue

The method discussed above is horribly expensive, and will result in an exponentialblowup. For instance, convert the following formula into CNF:

(B1 ∧ B2 ∧ B3) ∨ (C1 ∧ C2 ∧ C3).

More efficient approach

A more efficient methodology known as the equisatisfiable formula approach wasproposed by Tsetsin. The main idea is to use new variables. For instance, the formulaabove can be rewritten as:

(Z → (B1 ∧ B2 ∧ B3)) ∧ (¬Z → (C1 ∧ C2 ∧ C3))

(¬Z ∨ (B1 ∧ B2 ∧ B3)) ∧ (Z ∨ (C1 ∧ C2 ∧ C3))

Clearly, only six more clauses are created, as opposed to the 9 created by using thefirst method.

Subramani Propositonal Logic

Page 70: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

More equisatisfiability

Example

Convert the following formula to CNF:

(A1 ∧ A2) ∨ ((B1 ∧ B2) ∨ (C1 ∧ C2))

Subramani Propositonal Logic

Page 71: Propositional Logic - Substitutions and Normal Forms

ReviewSubstitution

Normal Forms

More equisatisfiability

Example

Convert the following formula to CNF:

(A1 ∧ A2) ∨ ((B1 ∧ B2) ∨ (C1 ∧ C2))

Subramani Propositonal Logic