Logic6 - Predicate Logic
Predicate Logic
Introduction
- Predicate logic is an extension of propositional logic that allows for richer structures and quantifications.
- Example: Instead of just having propositional variables, we can talk about properties of elements (unary predicates) or relations between objects (binary predicates).
- Concrete objects can be represented by constants, and variables allow for quantification over unspecified objects.
- Predicate logic combines atomic formulas with connectives (conjunction, disjunction, negation) and quantifiers (universal and existential).
- Universal quantification: A formula holds for all elements in a set.
- Existential quantification: There exists an element in the set for which the formula holds.
Syntax of Predicate Logic
- Predicate logic allows us to express statements about individuals and their properties, which is not possible in propositional logic.
- Example: Consider the statement "All human beings are mortal. Socrates is a human being. Therefore, Socrates is mortal."
- In propositional logic, we would need three propositional variables (p, q, r) for each statement, losing the structure of the argument.
- Predicate logic allows us to express this with predicates like (x is a human being) and (x is mortal), and a constant for Socrates.
- The argument can then be expressed as: .
- This semantic entailment is valid in predicate logic.
Atomic Formulas
- Atomic formulas are the basic building blocks of predicate logic, constructed from predicates, constants, and variables.
- Examples:
- : Jane is clever (unary predicate C, constant j).
- : Anton knows Betty (binary predicate K, constants a and b).
- : Points x, y, and z are on the same line (ternary predicate Line).
Connectives and Quantifiers
- Atomic formulas are combined using connectives (negation, conjunction, disjunction, implication, bi-implication).
- Examples:
- : Jane is clever and Anton knows Betty.
- : Anton does not know himself.
- : Anton knows Betty, but Betty does not know Anton.
- Quantifiers are added to express statements about all or some elements.
- : Somebody is clever (existential quantifier).
- : Everybody is clever (universal quantifier).
- Semantic Equivalence Example: . Not everybody is clever is the same as saying someone is not clever.
- Another Equivalence Example: . Nobody knows himself is the same as saying there does not exist someone that knows himself.
Summary of Syntax
- Predicate logic extends propositional logic by:
- Enriching propositional variables into structured elements.
- Enabling quantification over variables.
Priority Levels and Scope
- Quantifiers ( and ) bind as strongly as negation.
- The scope of a quantifier is as small as possible.
- Example: . The brackets around can be dropped.
- If the scope should extend over the entire formula, brackets are needed:
- .
- Redundant Brackets: Negation and universal quantification:
- . The brackets are redundant.
Terminology: Bound and Free Variables
- A variable is bound if it is within the scope of a quantifier.
- Otherwise, it is free.
- Example: . Both occurrences of are bound if brackets are in place. If there are no brackets, only x in C(x) is bound.
- Another Example: . The two quantifiers bind different occurrences of .
Practice Question
- Formula: .
- Is the x inside C and D free or bound? If bound, by which quantifier?
- The inside is bound by the existential quantifier.
- The inside is bound by the universal quantifier.
Historical Note
- Predicate logic was developed by Gottlob Frege in the late 19th century.
- Frege's notation was based on flow diagrams.
- Bertrand Russell discovered a paradox related to Frege's work which led to the framework being rebuilt by distinguishing sets and classes.
- Russell's Paradox: Consider the set R containing elements x that are not in x. Is R in itself or not?
Semantics of Predicate Logic
- Meaning is given to predicate logic formulas through models.
Building Models
- A model consists of a non-empty set of elements and an interpretation of constants and predicates.
- Example: Binary relation (love), constants (Robert) and (Jane).
- expresses that Robert loves Jane.
- A model can be built where holds (blue arrow from Robert to Jane).
- Another model can be built where does not hold (blue arrow from Jane to Robert).
- The meaning of a formula varies depending on the model.
Defining Models
- In addition to the set of elements A, we need an interpretation of constants and predicates over A.
- For all holds in model if holds for every interpretation of x in A.
- For exists holds in model if holds for at least one interpretation of x in A.
Interpreting Formulas
- Example: Interpret , , and
- Model consists of all human beings on this planet.
- Constant interpreted as Jane.
- constant interpreted as Robert.
- is the cleverness relation - all human beings are clever.
- is a relation that holds if x loves y.
Smaller Models
- Model : Robot loves Jane.
- Jane is clever.
- . Jane is clever.
- . Robot loves Jane.
- Model : Everybody is clever.
- All elements are inside the pink circle, indicating they are clever.
- . Robot does not love Jane.
- . Jane is clever and Jane loves robot.
- Harder question: . There is a couple that loves each other.
- This holds in the model as there is a pair loving each other.
Interpreting More Formulas
- Given model with elements , , and . Constants and are interpreted as and , respectively.
- Blue arrows represent the knowing relation , and pink circles represent the clever relation .
- Is ? Yes, because there is a blue arrow from to .
- Is ? No, because there is no blue arrow from to . So, .
- Does b know himself? Yes, because the blue arrow exists from p3 to p3.
- Is a clever? Yes.
- Is b clever? No. .
Quantifiers - Formulas
- . Not everyone is clever. True because p3 is not clever, so this model holds.
- . There exists an x such that c x holds, which is true.
- . Yes, because p3
- . If you're clever, then you know somebody - False, because p2 doesn't know anybody.
- . Everyone is clever or knows himself - True.
- . There is someone who knows everybody - False, because nobody knows everybody.
- - True, Because all three elements satisfy the condition.
Terminology: Tautologies, Contradictions, Contingent
- A tautology is true in all models.
- A contradiction is false in all models.
- A contingent formula is true in some models and false in others.
- A satisfiable formula is true in some model.
- is contingent.
- is also contingent.
Semantic Entailment in Predicate Logic
- In propositional logic, semantic entailment means for all valuations, if to are true, then is also true.
- In predicate logic, semantic entailment means for all models, if to hold, then holds.
- A counterexample consists of a specific model.
- Consider .
- In any model , if and are true, then so is .
- Because the interpretation of s in model m is an element where H holds.
- and the elements where H holds, is included in the set of elements where the predicate M holds in model M.
- This semantic entailment holds.
- Is "All fish are mortal. I am mortal. Therefore, I am a fish" logically true?
- Counterexample of Socrates is not a fish:
- Let model consist of Socrates who is not a fish.
- holds because there are no fish.
- also holds. Socrates is mortal.
- But , Socrates is not a fish.
- Counterexample of Socrates is not a fish:
Semantic Equivalences
- Semantic Equivalence: A famous scene from Alice in wonderland shows semantic equivalence.
- Alice : I mean what I say, is the same as I say what I mean.
- Mad Hatter : Not the same thing at all! Why, you might just as well say that “I see what I eat” is the same thing as “I eat what I see!”
- The same principles apply to predicate logic.
- DeMorgan's Rule in Predicate Logic Example:
- Let P(x) mean