























































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
























































Consider the compound proposition:
If Zeph is an octopus then Zeph has 8 limbs.
Q1: What are the atomic propositions and how
do they form this proposition.
Q2: Is the proposition true or false?
Q3: Why?
―Zeph has 8 limbs‖. The compound
A2: True!
Q: Why is this not satisfying?
Expressions such as the previous are built up from propositional functions – statements that have a variable or variables that represent various possible subjects. Then quantifiers are used to bind the variables and create a proposition with embedded semantics. For example: ―For all x, if x is an octopus then x has 8 limbs.‖ there are two atomic propositional functions P (x) = “ x is an octopus‖ Q (x) = ― x has 8 limbs‖ whose conditional P (x) Q (x) is formed and is bound by ―For all x ‖.
If logical propositions are to have meaning, they need to describe something. Up to now, propositions such as ―Johnny is tall‖, ―Debbie is 5 years old‖, and ―Andre is immature‖ had no intrinsic meaning. Either they are true or false, but no more.
In order to endow such propositions with
Q: What is the universe of discourse for the three propositions above?
subjects in the universe of discourse. The
Johnny is tall. The bridge is structurally sound. 17 is a prime number.
Java: predicates are boolean- valued method
calls- someLinkedList. isEmpty () isPrime (17)
By taking a variable subject denoted by symbols
results: x is tall. …e.g. plug in x = Johnny y is structurally sound. …e.g. plug in y = GWB n is a prime number. … e.g. plug in n = 111
Java: propositional functions are boolean
methods, rather than particular calls. boolean isEmpty(){…} //in LinkedList boolean isPrime(int n){…}
A: Again, many correct answers. The most obvious answers are: For ―Johnny is taller than Debbie‖ the universe of discourse of both variables is all people in the universe For ― 17 is greater than one of 12, 45‖ the universe of discourse of all three variables is Z (the set of integers) For ―Johnny is at least 5 inches taller than Debbie‖ the first and last variable have people as their universe of discourse, while the second variable has R (the set of real numbers).
The multivariable predicates, together with their
the following generalizations: x is taller than y a is greater than one of b, c x is at least n inches taller than y
In Java, a multivariable predicate is a boolean
method with several arguments: tallerByNumInches(Person x, double n, Person y) { … }
Like disjunctioning over entire universe
Consider a universe consisting of
Leo: a lion Jan: an octopus with all 8 tentacles Bill: an octopus with only 7 tentacles
And recall the propositional functions
Q: Is the proposition true or false?
Like conjunctioning over entire universe