Logic and Inferences
Logic
• Logic possessed of reason, intellectual, dialectical, argumentative is the systematic study of valid rules of inference,
i.e. the relations that lead to the acceptance of one proposition (the conclusion) on the basis of a set of other
propositions (premises). More broadly, logic is the analysis and appraisal of arguments
• , logic is “the study of correct reasoning, especially regarding making inferences.” Logic began as a philosophical
term and is now used in other disciplines like math and computer science. While the definition sounds simple
enough, understanding logic is a little more complex. Use logic examples to help you learn to use logic properly.
• Logic can include the act of reasoning by humans in order to form thoughts and opinions, as well as clssifications
and judgments. Some forms of logic can also be performed by computers and even animals.
• Logic is a process for making a conclusion and a tool you can use.
• The foundation of a logical argument is its proposition, or statement.
• The proposition is either accurate (true) or not accurate (false).
• Premises are the propositions used to build the argument.
• The argument is then built on premises.
• Then an inference is made from the premises.
• Finally, a conclusion is drawn.
• Informal logic
• "Informal logic designates that branch of logic whose task is to develop non-formal standards, criteria, procedures for the analysis,
interpretation, evaluation, critique and construction of argumentation in everyday discourse."
• informal logic as "a branch of logic whose task is to develop non-formal standards, criteria, procedures for the analysis, interpretation,
evaluation, criticism and construction of argumentation.“
• Informal logic is associated with (informal) fallacies, critical thinking, the thinking skills movement and the interdisciplinary inquiry
known as argumentation theory.
• Informal logic is what’s typically used in daily reasoning. This is the reasoning and arguments you make in your personal
exchanges with others.
• Premises: Nikki saw a black cat on her way to work. At work, Nikki got fired.
• Conclusion: Black cats are bad luck.
• Explanation: This is a big generalization and can’t be verified.
• Premises: There is no evidence that penicillin is bad for you. I use penicillin without any problems.
• Conclusion: Penicillin is safe for everyone.
• Explanation: The personal experience here or lack of knowledge isn’t verifiable.
• Premises: My mom is a celebrity. I live with my mom.
• Conclusion: I am a celebrity.
• Explanation: There is more to proving fame that assuming it will rub off.
• Formal logic
• Formal logic is the study of inference with purely formal content. An inference possesses a purely formal and explicit
content (i.e. it can be expressed as a particular application of a wholly abstract rule) such as, a rule that is not about any
particular thing or property. In many definitions of logic, logical consequence and inference with purely formal content
are the same.
• In formal logic, you use deductive reasoning and the premises must be true. You follow the premises to reach a formal
conclusion.
• Premises: Every person who lives in Quebec lives in Canada. Everyone in Canada lives in North America.
• Conclusion: Every person who lives in Quebec lives in North America.
• Explanation: Only true facts are presented here.
• Premises: All spiders have eight legs. Black Widows are a type of spider.
• Conclusion: Black Widows have eight legs.
• Explanation: This argument isn’t controversial.
• Premises: Bicycles have two wheels. Jan is riding a bicycle.
• Conclusion: Jan is riding on two wheels.
• Explanation: The premises are true and so is the conclusion.
• Symbolic Logic
• Symbolic logic deals with how symbols relate to each other. It assigns symbols to verbal reasoning in order to
be able to check the veracity of the statements through a mathematical process. You typically see this type of
logic used in calculus.
• Symbolic logic example:
• Propositions: If all mammals feed their babies milk from the mother (A). If all cats feed their babies mother’s
milk (B). All cats are mammals(C). The Ʌ means “and,” and the ⇒ symbol means “implies.”
• Conclusion: A Ʌ B ⇒ C
• Explanation: Proposition A and proposition B lead to the conclusion, C. If all mammals feed their babies milk
from the mother and all cats feed their babies mother’s milk, it implies all cats are mammals.
• Mathematical logic
• Mathematical logic is an extension of symbolic logic into other areas, in particular to the study of
model theory, proof theory, set theory, and computability theory.
• Mathematical logic, also called formal logic, is a subfield of mathematics exploring the formal applications of
logic to mathematics. It bears close connections to metamathematics, the foundations of mathematics,
philosophy, and theoretical computer science.[1] The unifying themes in mathematical logic include the study
of the expressive power of formal systems and the deductive power of formal proof systems.
• Mathematical logic is often divided into the fields of set theory, model theory, recursion theory, and
proof theory.
Formal logical systems
• mathematical logic deals with mathematical concepts expressed using formal logical systems. These systems,
though they differ in many details, share the common property of considering only expressions in a fixed
formal language.
• First-order logic
• First-order logic is a particular formal system of logic. Its syntax involves only finite expressions as
well-formed formulas, while its semantics are characterized by the limitation of all quantifiers to a fixed
domain of discourse.
Conceptual dependency theory
• Conceptual dependency theory is a model of natural language understanding used in artificial intelligence
systems.
• Roger Schank at Stanford University introduced the model in 1969, in the early days of artificial intelligence.
This model was extensively used by Schank's students at Yale University such as Robert Wilensky, Wendy
Lehnert, and Janet Kolodner.
• Schank developed the model to represent knowledge for natural language input into computers. Partly
influenced by the work of Sydney Lamb, his goal was to make the meaning independent of the words used in
the input, i.e. two sentences identical in meaning, would have a single representation. The system was also
intended to draw logical inferences.
Reasoning system
• In information technology a reasoning system is a software system that generates conclusions from available
knowledge using logical techniques such as deduction and induction. Reasoning systems play an important
role in the implementation of artificial intelligence and knowledge-based systems.
• The reasoning is the mental process of deriving logical conclusion and making predictions from available
knowledge, facts, and beliefs. Or we can say, "Reasoning is a way to infer facts from existing data." It is a
general process of thinking rationally, to find valid conclusions.
Types of Reasoning
• In artificial intelligence, reasoning can be divided into the following
categories:
• Deductive reasoning
• Inductive reasoning
• Abductive reasoning
• Common Sense Reasoning
• Monotonic Reasoning
• Non-monotonic Reasoning
• 1. Deductive reasoning:
• Deductive reasoning is deducing new information from logically related known information. It is the form of valid
reasoning, which means the argument's conclusion must be true when the premises are true.
• Deductive reasoning is a type of propositional logic in AI, and it requires various rules and facts. It is sometimes referred
to as top-down reasoning, and contradictory to inductive reasoning.
• In deductive reasoning, the truth of the premises guarantees the truth of the conclusion.
• Deductive reasoning mostly starts from the general premises to the specific conclusion, which can be explained as below
example.
• Example:
• Premise-1: All the human eats veggies
• Premise-2: Suresh is human.
• Conclusion: Suresh eats veggies.
• The general process of deductive reasoning is given below:
• 2. Inductive Reasoning:
• Inductive reasoning is a form of reasoning to arrive at a conclusion using limited sets of facts by the process of
generalization. It starts with the series of specific facts or data and reaches to a general statement or conclusion.
• Inductive reasoning is a type of propositional logic, which is also known as cause-effect reasoning or bottom-up reasoning.
• In inductive reasoning, we use historical data or various premises to generate a generic rule, for which premises support
the conclusion.
• In inductive reasoning, premises provide probable supports to the conclusion, so the truth of premises does not
guarantee the truth of the conclusion.
• Example:
• Premise: All of the pigeons we have seen in the zoo are white.
• Conclusion: Therefore, we can expect all the pigeons to be white.
• 3. Abductive reasoning:
• Abductive reasoning is a form of logical reasoning which starts with single or multiple observations then
seeks to find the most likely explanation or conclusion for the observation.
• Abductive reasoning is an extension of deductive reasoning, but in abductive reasoning, the premises do not
guarantee the conclusion.
• Example:
• Implication: Cricket ground is wet if it is raining
• Axiom: Cricket ground is wet.
• Conclusion It is raining.
• 4. Common Sense Reasoning
• Common sense reasoning is an informal form of reasoning, which can be gained through experiences.
• Common Sense reasoning simulates the human ability to make presumptions about events which occurs
on every day.
• It relies on good judgment rather than exact logic and operates on heuristic knowledge and heuristic rules.
• Example:
• One person can be at one place at a time.
• If I put my hand in a fire, then it will burn.
• The above two statements are the examples of common sense reasoning which a human mind can easily
understand and assume.
• 5. Monotonic Reasoning: • Example:
• In monotonic reasoning, once the conclusion is taken,• Earth revolves around the Sun.
then it will remain the same even if we add some• It is a true fact, and it cannot be changed even if we add
other information to existing information in our another sentence in knowledge base like, "The moon
knowledge base. In monotonic reasoning, adding revolves around the earth" Or "Earth is not round," etc.
knowledge does not decrease the set of prepositions• Advantages of Monotonic Reasoning:
that can be derived.
• In monotonic reasoning, each old proof will always remain
• To solve monotonic problems, we can derive the valid valid.
conclusion from the available facts only, and it will not• If we deduce some facts from available facts, then it will
be affected by new facts. remain valid for always.
• Monotonic reasoning is not useful for the real-time• Disadvantages of Monotonic Reasoning:
systems, as in real time, facts get changed, so we
• We cannot represent the real world scenarios using
cannot use monotonic reasoning. Monotonic reasoning.
• Monotonic reasoning is used in conventional• Hypothesis knowledge cannot be expressed with monotonic
reasoning systems, and a logic-based system is reasoning, which means facts should be true.
monotonic.
• Since we can only derive conclusions from the old proofs, so
• Any theorem proving is an example of monotonic new knowledge from the real world cannot be added.
reasoning.
• 6. Non-monotonic Reasoning
• In Non-monotonic reasoning, some conclusions may be invalidated if we add some more information to our knowledge base.
• Logic will be said as non-monotonic if some conclusions can be invalidated by adding more knowledge into our knowledge base.
• Non-monotonic reasoning deals with incomplete and uncertain models.
• "Human perceptions for various things in daily life, "is a general example of non-monotonic reasoning.
• Example: Let suppose the knowledge base contains the following knowledge:
• Birds can fly
• Penguins cannot fly
• Pitty is a bird
• So from the above sentences, we can conclude that Pitty can fly.
• However, if we add one another sentence into knowledge base "Pitty is a penguin", which concludes "Pitty cannot fly", so it
invalidates the above conclusion.
• Advantages of Non-monotonic reasoning:
• For real-world systems such as Robot navigation, we can use non-monotonic reasoning.
• In Non-monotonic reasoning, we can choose probabilistic facts or can make assumptions.
• Disadvantages of Non-monotonic Reasoning:
• In non-monotonic reasoning, the old facts may be invalidated by adding new sentences.
• It cannot be used for theorem proving.
Propositional Logic & Predicate logic
• Logical reasoning forms the basis for a huge domain truth value. They are ambiguous.
of computer science and mathematics. They help in • But the following statements :
establishing mathematical arguments, valid or invalid
• 1. Propositional Logic : (a+b)2 = a2 + 2ab + b2
A proposition is basically a declarative sentence that • If x is real, then x2 >= 0
has a truth value. Truth value can either be true or
false, but it needs to be assigned any of the two • If x is real, then x2 < 0
values and not be ambiguous. The purpose of using • The sun rises in the east.
propositional logic is to analyze a statement,
individually or compositely. • The sun rises in the west.
• For example : • Are all propositions because they have a specific
The following statements : truth value, true or false.
• If x is real, then x2 > 0 • The branch of logic that deals with proposition is
propositional logic.
• What is your name?
• (a+b)2 = 100
• This statement is false.
• This statement is true.
• Are not propositions because they do not have a
• 2. Predicate Logic :
Predicates are properties, additional information to better express the subject of the sentence. A quantified
predicate is a proposition , that is, when you assign values to a predicate with variables it can be made a
proposition.
• For example :
• In P(x) : x>5, x is the subject or the variable and ‘>5’ is the predicate.
• P(7) : 7>5 is a proposition where we are assigning values to the variable x, and it has a truth value, i.e. True.
• The set of values that the variables of the predicate can assume is called the Universe or Domain of Discourse
or Domain of Predicate.
Difference between Propositional Logic and Predicate Logic :
Predicate Logic Propositional Logic
Predicate logic is an expression consisting of variables with a
Propositional logic is the logic that deals with a collection of
specified domain. It consists of objects, relations and functions
declarative statements which have a truth value, true or false.
between the objects.
It is the basic and most widely used logic. Also known as It is an extension of propositional logic covering predicates and
Boolean logic. quantification.
A proposition has a specific truth value, either true or false. A predicate’s truth value depends on the variables’ value.
Predicate logic helps analyze the scope of the subject over the
predicate. There are three quantifiers : Universal Quantifier (∀)
Scope analysis is not done in propositional logic.
depicts for all, Existential Quantifier (∃) depicting there exists
some and Uniqueness Quantifier (∃!) depicting exactly one.
Propositions are combined with Logical Operators or Logical
Connectives like Negation(¬), Disjunction(∧), Conjunction(∨), Predicate Logic adds by introducing quantifiers to the existing
Exclusive OR(⊕), Implication(⇒), Bi-Conditional or Double proposition.
Implication(⇔).
It is a more generalized representation. It is a more specialized representation.
It cannot deal with sets of entities. It can deal with set of entities with the help of quantifiers.