×

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

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.

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.

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.

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.

Quantifying Uncertainty

The concept of quantifying uncertainty relies on how an agent can keep away uncertainty with a degree of belief. The term uncertainty refers to that situation or information which is either unknown or...

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

Artificial Intelligence vs. Machine learning

Artificial Intelligence This word is trending in the world of technology. Artificial means something which was not present naturally, and it is built by humans, and intelligence means the ability to...

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

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Problem-solving in Artificial Intelligence

The reflex agents are known as the simplest agents because they directly map states into actions. Unfortunately, these agents fail to operate in an environment where the mapping is too large to...

7 minutes read.

The Wumpus World

The Wumpus world is a game playing which provides an environment to the knowledge-based agent to showcase its stored knowledge. It was developed by Gregory Yob in 1973. About the game:  It...

3 minutes read.