formal theories, part two sie 550 lecture matt dube doctoral student - spatial
TRANSCRIPT
Formal Theories, Part Two
SIE 550 Lecture
Matt Dube
Doctoral Student - Spatial
Recap of Wednesday
• Formal Theory– Axioms– Association Rules– Theorems
• Boolean Operators
• Truth Tables
• Mathematical Laws
• Example Formal Theory
Wednesday Revisited
• Modus Barbara– “Barbarian” logic– P implies Q– Q implies R…– Therefore P implies R
• Example:– If I learn more then I know more.– If I know more, then I forget more.– If I forget more, then I know less.
• Therefore if I learn more, then I know less.
P implies Q
P implies not Q
Different Truth Tables when P is
true!
If we want their land, we must take it.
To take their land,
we must kill them.
We wanted their land, so we killed them.
Why is this such a problem? It seems
logical…
This is why the Romans called it Barbarian Logic!
P Q R PQ QRPQ and
QRPR
T T T T T T T
T T F T F F F
T F T F T F T
T F F F T F F
F T T T T T T
F T F T F F T
F F T T T T T
F F F T T T T
Modus Barbara
Picking our basis
• How fine do we need to be in defining our ground axioms?
• Example– Mother – composite of female and parent– Human – generic instance
• Benefits?
• Costs?
Today’s Lecture
• Example of a Formal Theory
• Proving Statements in the Formal Theory
• Clausal Form
• Horn Clauses
Example of a Formal Theory
• father(john,harry)• mother(linda,john)• father(horace,john)• mother(alice,harry)• father(john,doug)• grandpa(X,Y)::=father(X,Z) ( father(Z,Y) | mother(Z,Y) )• grandma(X,Y)::=mother(X,Z) ( father(Z,Y) | mother(Z,Y) )• sibling(X,A)::=( father(Z,X) | mother(Z,X) )( father(Z,A) | mother(Z,A) )
• wife(Z,X)::= mother(Z,Y) father(X,Y)
Ground Axioms
Logical Axioms
wife(linda,horace)?
• father(john,harry)• mother(linda,john)• father(horace,john)• mother(alice,harry)• father(john,doug)• grandpa(X,Y)::=father(X,Z) ( father(Z,Y) | mother(Z,Y) )• grandma(X,Y)::=mother(X,Z) ( father(Z,Y) | mother(Z,Y) )• sibling(X,A)::=( father(Z,X) | mother(Z,X) )( father(Z,A) | mother(Z,A) )
• wife(Z,X)::= mother(Z,Y) father(X,Y)
father(john,X)?
• father(john,harry)• mother(linda,john)• father(horace,john)• mother(alice,harry)• father(john,doug)• grandpa(X,Y)::=father(X,Z) ( father(Z,Y) | mother(Z,Y) )• grandma(X,Y)::=mother(X,Z) ( father(Z,Y) | mother(Z,Y) )• sibling(X,A)::=( father(Z,X) | mother(Z,X) )( father(Z,A) | mother(Z,A) )
• wife(Z,X)::= mother(Z,Y) father(X,Y)
X = harry
X = doug
Clausal Form
• Re-writing well formed formulas– Standardized format– Preserving meaning
• Each clause has:– A number of joint clauses– A number of alternative conclusions– Note: 0 is possible!
A1 and A2 and A3 and … IMPLIES B1 or B2 or B3 or …
A1 and A2 and A3 and … IMPLIES B1 or B2 or B3 or …
Since P implies Q, we can write:
Q if P
B1 or B2 or B3 or … IF A1 and A2 and A3 and …
Consequent side Antecedent side
Horn Clauses
B1 or B2 … or Bm A1 and A2 … and Anif
m=1 n=0fact
m=1 n>0rule
m=0 n>0negative fact
m=0 n=0empty clause
m>1 indefinite clause
at most one positive consequent clause