Logic, which was originally just the study of what distinguishes sound argument from unsound argument, has now developed into a powerful and rigorous system whereby true statements can be discovered, given other statements that are already known to be true.
This logic deals with predicates, which are propositions containing variables.
A predicate is an expression of one or more variables defined on some specific domain. A predicate with variables can be made a proposition by either assigning a value to the variable or by quantifying the variable.
Following are a few examples of predicates −
A proposition is a collection of declarative statements that have either a truth value "true” or a truth value "false". A propositional consists of propositional variables and connectives. The propositional variables are dented by capital letters (A, B, etc). The connectives connect the propositional variables.
A few examples of Propositions are given below −
The following is not a Proposition −
"A is less than 2" − It is because unless we give a specific value of A, we cannot say whether the statement is true or false.
In propositional logic, we use the following five connectives −
The OR operation of two propositions A and B (written as A∨BA∨B) is true if at least any of the propositional variable A or B is true.
The truth table is as follows −
A | B | A ∨ B |
---|---|---|
True | True | True |
True | False | True |
False | True | True |
False | False | False |
The AND operation of two propositions A and B (written as A∧BA∧B) is true if both the propositional variable A and B is true.
The truth table is as follows −
A | B | A ∧ B |
---|---|---|
True | True | True |
True | False | False |
False | True | False |
False | False | False |
The negation of a proposition A (written as ¬A¬A) is false when A is true and is true when A is false.
The truth table is as follows −
A | ¬A |
---|---|
True | False |
False | True |
An implication A→BA→B is the proposition “if A, then B”. It is false if A is true and B is false. The rest cases are true.
The truth table is as follows −
A | B | A→B |
---|---|---|
True | True | True |
True | False | False |
False | True | True |
False | False | True |
A⇔BA⇔B is a bi-conditional logical connective which is true when p and q are same, i.e., both are false or both are true.
The truth table is as follows −
A | B | A⇔B |
---|---|---|
True | True | True |
True | False | False |
False | True | False |
False | False | True |
Well Formed Formula
Well Formed Formula (wff) is a predicate holding one of the following −
The variable of predicates is quantified by quantifiers. There are two types of quantifier in predicate logic −
Universal quantifier states that the statements within its scope are true for every value of the specific variable. It is denoted by the symbol ∀.
∀xP(x) is read as for every value of x, P(x) is true.
Example − "Man is mortal" can be transformed into the propositional form ∀xP(x). Here, P(x) is the predicate which denotes that x is mortal and the universe of discourse is all men.
Existential quantifier states that the statements within its scope are true for some values of the specific variable. It is denoted by the symbol ∃.
∃xP(x) for some values of x is read as, P(x) is true.
Example − "Some people are dishonest" can be transformed into the propositional form ∃x P(x) where P(x) is the predicate which denotes x is dishonest and the universe of discourse is some people.
If we use a quantifier that appears within the scope of another quantifier, it is called a nested quantifier.
Example
Note − ∀a∃bP(x,y) ≠ ∃a∀bP(x,y)