Rys DSGT Lect4
Rys DSGT Lect4
Puzzle
Real use
• An important type of programming language is designed to reason
using the rules of predicate logic. Prolog (from Programming in
Logic), developed in the 1970s by computer scientists working in
the area of artificial intelligence, is an example of such a
language. Prolog programs include a set of declarations consisting
of two types of statements, Prolog facts and Prolog rules.
• Prolog facts define predicates by specifying the elements that
satisfy these predicates.
• Prolog rules are used to define new predicates using those already
defined by Prolog facts.
Quantifiers as Conjunctions/Disjunctions
or
2. “Every real number expect zero has a multiplicative
inverse” (A multiplicative index of a real number x
is a real number y such that xy=1.)
Solution:
We can rewrite as, “For every real number x expect 0, x has a
multiplicative inverse.”
“For every real number x, if x ≠ 0”, then there exists a real
number y such that xy=1”
Valid, Satisfiable and unsatisfiable
• If P(x1,x2,… xn) is true for all values C1,C2,… Cn from
the universe U, then P(x1,x2,… xn) is valid in U.
• If P(x1,x2,… xn) is true for some values of C1,C2,… Cn
from the universe U, then P(x1,x2,… xn) is
Satisfiable in U.
• If P(x1,x2,… xn) is not true for any values of C1,C2,…
Cn from the universe U, then P(x1,x2,… xn) is
Unsatisfiable in U.
Nested Quantifiers