Forms of Reasoning: Deduction, Abduction, Induction
Download
Report
Transcript Forms of Reasoning: Deduction, Abduction, Induction
Computational Logic
and Cognitive Science:
An Overview
Session 1: Logical Foundations
ICCL Summer School 2008
Technical University of Dresden
25th of August, 2008
Helmar Gust & Kai-Uwe Kühnberger
University of Osnabrück
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Who we are…
Helmar Gust
Kai-Uwe Kühnberger
Interests: Analogical
Reasoning, Logic
Programming, E-Learning
Systems, Neuro-Symbolic
Integration
Interests: Analogical
Reasoning, Ontologies,
Neuro-Symbolic
Integration
Where we work:
University of Osnabrück
Institute of Cognitive Science
Working Group: Artificial Intelligence
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Cognitive Science in Osnabrück
Institute of Cognitive Science
International Study Programs
Bachelor Program
Master Program
Joined degree with
Trento/Rovereto
PhD Program
Doctorate Program
“Cognitive Science”
Graduate School
“Adaptivity in Hybrid Cognitive Systems”
Web: www.cogsci.uos.de
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Who are You?
Prerequisites?
Logic?
Propositional logic, FOL, models?
Calculi, theorem proving?
Non-classical logics: many-valued logic, non-monotonicity,
modal logic?
Topics in Cognitive Science?
Rationality (bounded, unbounded, heuristics), human
reasoning?
Cognitive models / architectures (symbolic, neural, hybrid)?
Creativity?
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Overview of the Course
First Session (Monday)
Foundations: Forms of reasoning, propositional and FOL, properties of
logical systems, Boolean algebras, normal forms
Second Session (Tuesday)
Cognitive findings: Wason-selection task, theories of mind, creativity,
causality, types of reasoning, analogies
Third Session (Thursday morning)
Non-classical types of reasoning: many-valued logics, fuzzy logics,
modal logics, probabilistic reasoning
Fourth Session (Thursday afternoon)
Non-monotonicity
Fifth Session (Friday)
Analogies, neuro-symbolic approaches
Wrap-up
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Forms of Reasoning:
Deduction, Abduction,
Induction
Theorem Proving,
Sherlock Holmes,
and All Swans are White...
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Basic Types of Inferences:
Deduction
Deduction: Derive a conclusion from given axioms
(“knowledge”) and facts (“observations”).
Example:
All humans are mortal.
Socrates is a human.
(axiom)
(fact/ premise)
Therefore, it follows that Socrates is mortal.
(conclusion)
The conclusion can be derived by applying the modus ponens
inference rule (Aristotelian logic).
Theorem proving is based on deductive reasoning techniques.
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Basic Types of Inferences:
Induction
Induction: Derive a general rule (axiom) from background
knowledge and observations.
Example:
Socrates is a human
Socrates is mortal
(background knowledge)
(observation/ example)
Therefore, I hypothesize that all humans are mortal
(generalization)
Remarks:
Induction means to infer generalized knowledge from example
observations: Induction is the inference mechanism for
(machine) learning.
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Basic Types of Inferences:
Abduction
Abduction: From a known axiom (theory) and some
observation, derive a premise.
Example:
All humans are mortal
Socrates is mortal
(theory)
(observation)
Therefore, Socrates must have been a human (diagnosis)
Remarks:
Abduction is typical for diagnostic and expert systems.
If one has the flue, one has moderate fewer.
Patient X has moderate fewer.
Therefore, he has the flue.
Strong relation to causation
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Deduction
Deductive inferences are also called theorem proving or logical
inference.
Deduction is truth preserving: If the premises (axioms and
facts) are true, then the conclusion (theorem) is true.
To perform deductive inferences on a machine, a calculus is
needed:
A calculus is a set of syntactical rewriting rules defined for
some (formal) language. These rules must be sound and
should be complete.
We will focus on first-order logic (FOL).
Syntax of FOL.
Semantics of FOL.
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Propositional Logic
and First-Order Logic
Some rather Abstract Stuff…
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Propositional Logic
Formulas:
Given is a countable set of atomic propositions AtProp = {p,q,r,...}.
The set of well-formed formulas Form of propositional logic is the
smallest class such that it holds:
p AtProp: p Form
, Form: Form
, Form: Form
Form:
Form
Semantics:
A formula is valid if is true for all possible assignments of the
atomic propositions occurring in
A formula is satisfiable if is true for some assignment of the
atomic propositions occurring in
Models of propositional logic are specified by Boolean algebras
(A model is a distribution of truth-values over AtProp making true)
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Propositional Logic
Hilbert-style calculus
Axioms:
p (q p)
[p (q r)] [(p q) (p r)]
(p q) (q p)
pqp
and
(p q) q
(r p) ((r q) (r p q))
p (p q) and
q (p q)
(p r) ((q r) (p q r))
Rules:
Modus Ponens: If expressions and are provable then
is also provable.
Remark: There are other possible axiomatizations of propositional
logic.
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Propositional Logic
Other calculi:
Gentzen-type calculus
http://en.wikipedia.org/wiki/Sequent_calculus
Tableaux-calculus
http://en.wikipedia.org/wiki/Method_of_analytic_tableaux
Propositional logic is relatively weak: no temporal or
modal statements, no rules can be expressed
Therefore a stronger system is needed
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
First-Order Logic
Syntactically well-formed first-order formulas for a signature
= {c1,...,cn,f1,...,fm,R1,...,Rl} are inductively defined.
The set of Terms is the smallest class such that:
A variable x Var is a term, a constant ci {c1,...,cn} is a term.
Var is a countable set of variables.
If fi is a function symbol of arity r and t1,...,tr are terms, then fi(t1,...,tr) is a term.
The set of Formulas is the smallest class such that:
If Rj is a predicate symbol of arity r and t1,...,tr are terms, then Rj(t1,...,tr) is a
formula (atomic formula or literal).
For all formulas and : , , , , are formulas.
If x Var and is a formula, then x and x are formulas.
Notice that “term” and “formula” are rather different concepts.
Terms are used to define formulas and not vice versa.
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
First-order Logic
Semantics (meaning) of FOL formulas.
Expressions of FOL are interpreted using an interpretation function
I: ()
I(ci)
I(fi) : arity(fi)
I(Ri) : arity(Ri) {true, false}
is the called the universe or the domain
A pair = <,I> is called a structure.
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
First-order Logic
Semantics (meaning) of FOL formulas.
Recursive definition for interpreting terms and evaluating truth values
of formulas:
For c {c1,...,cn}: [[ci]] = I(ci)
[[fi(t1,...,tr)]] = I(fI)([[t1]],...,[[tr]])
[[R(t1,...,tr)]] = true
iff
[[ ]] = true
iff
[[ ]] = true
iff
[[]] = true
iff
[[x (x)]] = true
iff
[[x (x)]] = true
iff
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
<[[t1]],...,[[tr]]> I(R)
[[]] = true and [[]] = true
[[]] = true or [[]] = true
[[]] = false
for all d : [[(x)]]x=d = true
there exists d : [[(x)]]x=d = true
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
First-order Logic
Semantics
Model
If the interpretation of a formula with respect to a structure = <,I>
results in the truth value true, is called a model for (formal:
)
Validity
If every structure = <,I> is a model for we call valid ( )
Satisfiability
If there exists a model = <,I> for we call satisfiable
Example:
xy (R(x) R(y) R(x) R(y))
[valid]
„If x and y are rich then either x is rich or y is rich“
„If x and y are even then either x is even or y is even“
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
First-order Logic
Semantics
An example:
x (N(x) P(x,c))
[satisfiable]
„There is a natural number that is smaller than 17.“
„There exists someone who is a student and likes logic.“
Notice that there are models which make the statement false
Logical consequence
A formula is a logical consequence (or a logical entailment)
of A = {A1,...,An}, if each model for A is also a model for .
We write A
Notice: A can mean that A is a model for or that is a logical
consequence of A
Therefore people usually use different alphabets or fonts to make this
difference visible
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Theories
The theory Th(A) of a set of formulas A:
Th(A) := { | A }
Theories are closed under semantic entailment
The operator:
Th : A Th(A)
is a so called closure operator:
X Th(X)
X Y Th(X) Th(Y)
Th(Th(X)) = Th(X)
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
extensive / inductive
monotone
idempotent
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
First-order Logic
Semantic equivalences
Two formulas and are semantically equivalent (we write ) if for all
interpretations of and it holds: is a model for iff is a model for .
The following statements are equivalent (based on the deduction theorem):
A few examples:
( ) ( ) ( )
G is a logical consequence of {A1,...,An}
A1 ... An G is valid
Every structure is a model for this expression.
A1 ... An G is not satisfiable.
There is no structure making this expression true
This can be used in the resolution calculus: If an expression
A1 ... An G is not satisfiable, then false
can be derived syntactically.
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Repetition: Semantic
Equivalences
Here is a list of semantic equivalences
( ) ( ), ( ) ( )
( ) ( ), ( ) ( )
( ( )) , ( ( ))
( ( )) ( ) ( )
( ( )) ( ) ( )
( ) ( ), ( ) ( )
( ) , ( )
( ) , ( )
(commutativity)
(associativity)
(absorption)
(distributivity)
(distributivity)
(double negation)
(deMorgan)
Here are some more semantic equivalences
( ) , ( )
x x, x x
(x ) x ( ), (x ) x ( )
x( ) (x x)
Etc.
(idempotency)
(tautology)
(contradiction)
(quantifiers)
ICCL Summer School 2008
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
Technical University of Dresden, August 25th – August 29th, 2008
Properties of Logical Systems
Soundness
A calculus is sound, if only such conclusions can be derived which
also hold in the model
In other words: Everything that can be derived is semantically true
Completeness
A calculus is complete, if all conclusions can be derived which hold
in the models
In other words: Everything that is semantically true can syntactically be derived
Decidability
A calculus is decidable if there is an algorithm that calculates
effectively for every formula whether such a formula is a theorem or
not
Usually people are interested in completeness results and decidability
results
We say a logic is sound/complete/decidable if there exists a calculus with
these properties
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Some Properties of Classical
Logic
Propositional Logic:
Sound and Complete, i.e. everything that can be proven is
valid and everything that is valid can be proven
Decidable, i.e. there is an algorithm that decides for every
input whether this input is a theorem or not
First-order logic:
Complete (Gödel 1930)
Undecidable, i.e. no algorithm exists that decides
for every input whether this input is a theorem or
not (Church 1936)
More
precisely FOL is semi-decidable
Models
The classical model for FOL are Boolean algebras
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Boolean Algebras
P [[P]]
if arity is 1 (or [[P]] ... if arity > 1)
x1,...,xn: P(x1,...,xn) Q(x1,...,xn) [[P]] [[Q]]
We can draw Venn diagrams:
P
Q
Regions (e.g. arbitrary subsets) of the n-dimensional real space
can be interpreted as a Boolean algebra
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Boolean Algebras
The power set () has the following properties:
It is a partially ordered set with order
A B is the largest set X with X A and X B
A B is the smallest set X with A X and B X
comp(A) is the largest set X with A X =
is the largest set in (), such that X for all X ()
is the smallest set in (), such that X for all X ()
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Boolean Algebras
The concept of a lattice
Definition: A partial order = <D,> is called a lattice if for each
two elements x,y D it holds: sup(x,y) exists and inf(x,y) exists
sup(x,y) is the least upper bound of elements x and y
inf(x,y) is the greatest lower bound of x and y
The concept of a Boolean Algebra
Definition: A Boolean algebra is a tuple = <D,,,,> (or
alternatively <D,,,,,>) such that
<D,> = <D,,> is a distributive lattice
is the top and the bottom element
is a complement operation
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Lindenbaum Algebras
The Linbebaum algebra for propositional logic with atomic propositions
p and q
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Normal Forms
If there are a lot of different representations of the same statement
Are there simple ones?
Are there “normal forms”?
Different normal forms for FOL
Negation normal form
Prenex normal form
Only conjunctions of disjunctions
Disjunctive normal form
No embedded Quantifiers
Conjunctive normal form
Only negations of atomic formulas
Only disjunctions of conjunctions
Gentzen normal form
Only implications where the condition is an atomic conjunction and the conclusion is
an atomic disjunction
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Normal Forms
If there are a lot of different representations of the same statement
Are there simple ones?
Are there “normal forms”?
Different normal forms for FOL
Negation normal form
p(cx) ¬q(cx,y)
Only conjunctions of disjunctions
Disjunctive normal form
xy:(p(x) :¬q(x,y))
No embedded Quantifiers
Conjunctive normal form
x:(p(x) y:¬q(x,y))
Only negations of atomic formulas
Prenex normal form
¬(x:(p(x) y:q(x,y)))
Only disjunctions of conjunctions
Gentzen normal form
Only implications where the condition is an atomic conjunction and the conclusion is
an atomic disjunction
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
q(cx,y) p(cx)
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Clause Form
Conjunctive normal form.
We know: Every formula of propositional logic can be rewritten
as a conjunction of disjunctions of atomic propositions.
Similarly every formula of predicate logic can be rewritten as a
conjunction of disjunctions of literals (modulo the quantifiers).
A formula is in clause form if it is rewritten as a set of
disjunctions of (possibly negative) literals.
Example: {{p(cx) },{¬q(cx,y)}}
Theorem: Every FOL formula F can be transformed into clause
form F’ such that
F is satisfiable iff F’ is satisfiable
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
What is the ‘meaning’ of these
Axioms?
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
x: C(x,x)
x,y: C(x,y) C(y,x)
x,y: P(x,y) z: (C(z,x) C(z,y))
x,y: O(x,y) z: (P(z,x) P(z,y))
x,y: DC(x,y) C(x,y)
x,y: EC(x,y) C(x,y) O(x,y)
x,y: PO(x,y) O(x,y) P(x,y) P(y,x)
x,y: EQ(x,y) P(x,y) P(y,x)
x,y: PP(x,y) P(x,y) P(y,x)
x,y: TPP(x,y) PP(x,y) z(EC(z,x) EC(z,y))
x,y: TPPI(x,y) PP(y,x) z(EC(z,y) EC(z,x))
x,y: NTPP(x,y) PP(x,y) z(EC(z,x) EC(z,y))
x,y: NTPPI(x,y) PP(y,x) z(EC(z,y) EC(z,x))
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Is This a Theorem?
x,y,z: NTPP(x,y) NTPP(y,z) NTPP(x,z)
Easy to see if we look at models!
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Relations of Regions of the
RCC-8
(a canonical model: n-dimensional closed discs)
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008
Thank you very much!!
Helmar Gust & Kai-Uwe Kühnberger
Universität Osnabrück
ICCL Summer School 2008
Technical University of Dresden, August 25th – August 29th, 2008