×

Theory of First-order Logic

Theory of First-order Logic

First-order logic is also called Predicate logic and First-order predicate calculus (FOPL). It is a formal representation of logic in the form of quantifiers. In predicate logic, the input is taken as an entity, and the output it gives is either true or false.

Syntax and Semantics of FOPL

Syntax: It defines the way of representing the given predicates. As these predicates are represented via quantifiers, there are different types of quantifiers used:

  • Universal Quantifier(For all/every): When the predicate is indicating about all/everything, we use for all quantifier. It is denoted as " ? "
  • Existential Quantifier(For some): When the predicate is indicating about some quantity, we use for some quantifier. It is denoted as “?”
  • Nested Quantifiers: It is the nesting of the same type of quantifier. One predicate is nested under the other predicate.
  • Atomic Sentences: These sentences are formed via predicate symbols may or may not be followed by a list of terms.

 Example: Parents(Ram, Sita) where Ram and Sita are the parents.

  • Complex Sentences: These sentences make use of logical connectives to construct more complex sentences.
  • Equality: We use the equality symbol to express that two terms refer to the same object. For example, Eleveenth_President(India)= Dr. APJ Abdul Kalam. Here, both LHS is equal to RHS. It means that both terms refer to the same entity/ person.

Elements and their symbols in Predicate Logic

The elements for which different symbols are defined are:

  • Objects: It refers to an entity that exists in the real world. For example, Ram, John, etc. are referred to as Objects.
  • Functions: Any function performed by the object/on the object. For example, LeftLeg, writes, eats, etc. are some of the functions.
  • Relations: The relation of an object with the other object defines its relation. For example, brother, mother, king, etc. are some types of relations which exist in the real world.

Now, let’s discuss the symbols used to represent these elements. They are as follows:

  • Constant Symbols: These symbols are used to represent the objects.
  • Predicate Symbols: These symbols are used to represent relations.
  • Function Symbols: These symbols are used to represent the functions performed by the object.

Semantics: It defines the sense of the given predicate. It allows to make more logical expression by devising its semantics. Semantics allow us to understand the sentence meaning.

Let’s understand Predicate logic with the help of below examples:

Example 1: Lipton is a tea.

Solution: Here, the object is Lipton.

It will be represented as Tea(Lipton).

Note: In this example, there is no requirement of quantifiers because the quantity  is not specified in the given predicate. Let’s see more.

Example 2: Every man is mortal.

 Solution: Here, the quantifier is the universal identifier, and the object is man.

Let x be the man.

Thus, it will be represented as x: man(x)  ? mortal(x).

Example 3: All girls are beautiful.

Solution: Here, we are talking about all girls. It means universal quantifier will be used. The object is girls. Let, y be the girls.

Therefore, it will be represented as girls(y)  ? beautiful(y).

Example 4: All that glitters is not gold.

Solution: Here, we will represent gold as x.

Therefore, it will be represented as glitters(x)  ? ¬gold(x).

Example 5: Some boys are obedient.

Solution: Here, boys are objects. The quantifier used will be existential quantifier. Let x be the boys. Thus, it will be represented as

?x: boys(x) ? obedient(x).

Example 6: Some cows are black and some cows are white.

Solution: Let, x be the cows. Therefore, it will be represented as:

?x: cows(x) ? black(x) ? white(x).

Note: There can be several examples of Predicate logic.

Knowledge Engineering in FOPL

Knowledge engineering is the process where a knowledge engineer investigates a specific domain, learn the important concepts regarding that domain, and creates the formal representation of the objects and relations in that domain.

Knowledge Engineering Process

An engineering term is used when we are talking about any project. Therefore, knowledge engineering over a project involves the below described steps:

Knowledge Engineering in FOPL
  • Identify the task: A knowledge engineer should be able to identify the task by asking a few questions like:
  • Do the knowledge base will support?
  • What kinds of facts will be available for each specific problem?

The task will identify the knowledge requirement needed to connect the problem instance with the answers.

  • Assemble the relevant knowledge: A knowledge engineer should be an expert in the domain. If not, he should work with the real experts to extract their knowledge. This concept is known as Knowledge Acquisition.

Note: Here, we do not represent the knowledge formally. But to understand the scope of the knowledge base and also to understand the working of the domain.

  • Decide on a vocabulary of constants, predicates, and functions: Translating important domain-level concepts into logical level concepts.

Here, the knowledge engineer asks questions like:

  • What are the elements which should be represented as objects?
  • What functions should be chosen?

After satisfying all the choices, the vocabulary is decided. It is known as the Ontology of the domain. Ontology determines the type of things that exists but does not determine their specific properties and interrelationships.

  • Encode general knowledge about the domain: In this step, the knowledge engineer pen down the axioms for all the chosen vocabulary terms.

Note: Here, misconceptions occur between the vocabulary terms.

  • Encode description of the specific problem instance: We write the simple atomic sentences for the selected vocabulary terms. We encode the chosen problem instances.
  • Raise queries to the inference procedure and get answers: It is the testing step. We apply the inference procedure on those axioms and problem-specific facts which we want to know.
  • Debug the knowledge base: It is the last step of the knowledge engineering process where the knowledge engineer debugs all the errors.

Related Topics

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.

What is Artificial Super Intelligence (ASI)

Before starting with Artificial Super Intelligence, first, we have to know what Artificial Intelligence is. Artificial Intelligence is a field which has a long history. Artificial intelligence is the ability...

3 minutes read.

Resolution Method in AI

Resolution Method in AI Resolution method is an inference rule which is used in both Propositional as well as First-order Predicate Logic in different ways. This method is basically used for proving the...

5 minutes read.

8 best topics for research and thesis in artificial intelligence

AI, abbreviated as Artificial Intelligence, is a field which has a long history. Artificial Intelligence is the ability of machines that perform the same function as human beings, like problem-solving,...

3 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.

Intelligent Agents | Agents in AI

What is an Agent? An agent can be viewed as anything that perceives its environment through sensors and acts upon that environment through actuators. For example, human being perceives their surroundings through...

8 minutes read.

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.

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.

Constraint Satisfaction Problems in Artificial Intelligence

Constraint Satisfaction Problems in Artificial Intelligence We have seen so many techniques like Local search, Adversarial search to solve different problems. The objective of every problem-solving technique is one, i.e., to find a solution to...

5 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.

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.

Uninformed Search Strategies - Artificial Intelligence

Breadth-first search (BFS) It is a simple search strategy where the root node is expanded first, then covering all other successors of the root node, further move to expand the next...

8 minutes read.

Theory of First-order Logic

Theory of First-order Logic First-order logic is also called Predicate logic and First-order predicate calculus (FOPL). It is a formal representation of logic in the form of quantifiers. In predicate logic, the input is taken...

4 minutes read.

Artificial Intelligence Tutorial | AI Tutorial

Today, Artificial Intelligence (AI) has become the norm of how humans communicate with and understand technology. Even though you've been hearing this buzzword now and then, do you know what...

6 minutes read.

Cryptarithmetic Problem in AI

Cryptarithmetic Problem Cryptarithmetic Problem is a type of constraint satisfaction problem where the game is about digits and its unique replacement either with alphabets or other symbols. In cryptarithmetic problem, 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.

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.

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.

Top 10 Artificial Intelligence Technologies in 2024

Artificial Intelligence Technologies in 2020 1. Augmented Reality This is one of the most fascinating technology nowadays. Augmented Reality is the use of text, graphics, audio, etc. in real time. In Simple...

4 minutes read.

Dynamic Bayesian Networks

DBN is a temporary network model that is used to relate variables to each other for adjacent time steps. Each part of a Dynamic Bayesian Network can have any number of Xivariables for...

3 minutes read.