In the topic of Propositional logic, we have seen that how to represent statements using propositional logic. But unfortunately, in propositional logic, we can only represent the facts, which are either true or false. PL is not sufficient to represent the complex sentences or natural language statements. The propositional logic has very limited expressive power. Consider the following sentence, which we cannot represent using PL logic.o “Some humans are intelligent”, oro “Sachin likes cricket.”To represent the above statements, PL logic is not sufficient, so we required some more powerful logic, such as first-order logic.First-Order logic:o First-order logic is another way of knowledge representation in artificial intelligence. It is an extension to propositional logic.o FOL is sufficiently expressive to represent the natural language statements in a concise way.o First-order logic is also known as Predicate logic or First-order predicate logic. First-order logic is a powerful language that develops information about the objects in a more easy way and can also express the relationship between those objects.o First-order logic (like natural language) does not only assume that the world contains facts like propositional logic but also assumes the following things in the world:o Objects: A, B, people, numbers, colors, wars, theories, squares, pits, wumpus, ……o Relations: It can be unary relation such as: red, round, is adjacent, or n-any relation such as: the sister of, brother of, has color, comes betweeno Function: Father of, best friend, third inning of, end of, ……o As a natural language, first-order logic also has two main parts:a. Syntaxb. SemanticsSyntax of First-Order logic:The syntax of FOL determines which collection of symbols is a logical expression in first-order logic. The basic syntactic elements of first-order logic are symbols. We write statements in short-hand notation in FOL.Basic Elements of First-order logic:Following are the basic elements of FOL syntax:Constant1, 2, A, John, Mumbai, cat,….Variablesx, y, z, a, b,….PredicatesBrother, Father, >,….Functionsqrt, LeftLegOf, ….Connectives∧, ∨, ¬, ⇒, ⇔Equality==Quantifier∀, ∃Atomic sentences:o Atomic sentences are the most basic sentences of first-order logic. These sentences are formed from a predicate symbol followed by a parenthesis with a sequence of terms.o We can represent atomic sentences as Predicate (term1, term2, ……, term n).Example: Ravi and Ajay are brothers: => Brothers(Ravi, Ajay). Chinky is a cat: => cat (Chinky).Complex Sentences:o Complex sentences are made by combining atomic sentences using connectives.First-order logic statements can be divided into two parts:o Subject: Subject is the main part of the statement.o Predicate: A predicate can be defined as a relation, which binds two atoms together in a statement.Consider the statement: “x is an integer.”, it consists of two parts, the first part x is the subject of the statement and second part “is an integer,” is known as a predicate. |