First Order Logic
Consider the following argument:
All Philosophy majors at UMD are required to take a logic course. Ann is a Philosophy major at UMD. So, Ann is required to take a logic course.
This argument is valid. The conclusion ("Ann is required to take a logic course") follows from the two premises. However, the logical form of this argument cannot be captured using formulas in propositional logic: From the point of view of propositional logic, since there are no Boolean connectives in the statements making up the argument, each premise and the conclusion would be represented by a different atomic proposition. For example, suppose that means "All Philosophy majors at UMD are required to take a logic course.", means "Ann is a Philosophy major at UMD." and means "Ann is required to take a logic course.". Then then the above argument is represented as . But, of course, this is not a valid argument in propositional logic. There are two main problem with using atomic propositions to represent the statements in this argument:
- The second premise and the conclusion are represented by different atomic propositions; however both of these statement are about the same single individual ("Ann").
- The logical form of the first premise involve the quantifier "All".
In the remainder of this section, we introduce First Order Logic that can address these issues. First Order Logic is also known as Predicate Logic, Quantified Logic. For simplicity, in this section we only present a fragment of First Order Logic, known as Monadic Predicate Logic.
#
Objects and PredicatesIn First Order Logic, atomic statements are decomposed into two parts. The first part is the noun-like part representing the subject of a sentence. The second part is the verb-like part called the predicate, which may be a verb or several words. For example, in the sentence:
Ann is a Philosophy major at UMD.
the subject is "Ann" and the predicate is "is a Philosophy major at UMD". We will use capital letters to represent predicates and lower case letters to represent subjects. Let mean "Ann" and mean "is a Philosophy major at UMD", then we write for the statement "Ann is a Philosophy major at UMD".
Capital letters from the beginning and middle of the alphabet () will be used as predicates. Lower case letters from the beginning and middle of the alphabet () will be used as subjects and will be called constants. An atomic proposition in first order logic is a predicate followed by a constant in parentheses. For example, , , , are examples of atomic propositions.
Notation
Two comments about our notation:
- You might wonder why we write the subject after the predicate in our formalism. While there are some logical systems that have formulas in which the subject occurs before the predicate, for example, , we follow the convention used by many Logicians and use prefix notation, writing the predicate symbol then the subject in parentheses.
- We are using the same symbols, e.g. , both as a predicate in first order logic and as an atomic proposition in propositional logic. We trust that no confusion will arise since it will always be clear whether we are discussing propositional or first order logic.
#
QuantifiersReturning to the symbolization of the above argument, we need a way to represent the quantifier "All" in the first premise. We can paraphrase the statement "All Philosophy majors at UMD are required to take a logic course" as
For any thing, if that thing is a Philosophy major at UMD, then that thing is required to take a logic course.
It is important that the symbol that we use to represent the thing that is a Philosophy major at UMD is the same symbol used to represent the thing that is required to take a logic course. A first order variable will be represented by a lowercase letter from the end of the alphabet (), possibly with subscripts (e.g., , , ). We use first order variables to define quantifiers. In this course, we study two types of quantifiers.
A quantifier is a symbol (for all) or (exists) followed by a variable. Quantifiers , , , are called universal quantifiers, and , , , are called existential quantifiers.
If is a predicate, then we can create a quantified formula by writing a quantifier followed by the predicate where the variable from the quantifier is the subject of the predicate. For instace,
- means "Everything is an ".
- means "Something is an ".
#
Formulas of First Order LogicThe building blocks of formulas of first order logic include:
Terms: There are two types of terms:
- Constants: Lower case letters from the beginning of the alphabet , possibly with subscripts (e.g., ).
- Variables: Lower case letters from the end of the alphabet , possibly with subscripts (e.g., ).
Predicates: Capital letters from the beginning of the alphabet , possibly with subscripts (e.g., )
Quantifiers: Quantifier symbols followed by a variable
Boolean Connectives: The Boolean connectives from Propositional Logic: , and .
Parentheses: Parentheses "" and "" are used to make formulas readable.
Putting everything together, formulas of First Order Logic are constructed as follows:
- An atomic proposition of First Order Logic is a predicate applied to a term. For example, are atomic proposition of First Order Logic. Each atomic propositions of First Order Logic is a formula of First Order Logic.
- If is a formula for First Order Logic, then so is .
- If and are formulas of First Order Logic, then so are
- If is a formula of First Order Logic, then so is a quantifier appended to , i.e., and are formulas of First Order Logic.
- Nothing else is a formula.
Examples of formulas include:
- ,
- ,
- ,
- ,
- ,
- ,
- , and
- .
Formulas of First Order Logic are more complex than formula of Propositional Logic. It can be challenging to keep straight all the different components of a formula of First Order Logic. The following notes are important to keep in mind when using formulas of First Order Logic.
- The choice of variables in a quantified sentence does not matter: and are different formulas, but they mean the same thing.
- Quantifiers can be applied to formulas without variables: is a formula. The quantifier in this formula is said to be vacuous since does not occur in the scope of the quantifier . This means that means the same thing as .
- A formula that has a variable that is not bound to any quantifier is said to have a free variable. For example, is a formula containing a variable "" that is not associated with any quantifier. We can use a pronoun to interpret the variable: "He/she/they is a ".
- Make sure to use parentheses when applying a quantifier to a complex formula: and are different formulas that do not mean the same thing. The first formula means "There is something that is an and she/he/they is a ". The second formula means "There is something that is both an and a ".
#
TranslationsRecall the steps to translate English sentences into formulas of propositional logic. The same steps apply when translating into first order logic. Fix the following translation key:
- means "Ann"
- is the predicate "is a Philosophy major at UMD"
- is the predicate "is required to take a logic course"
Using this translation key, we translate the following sentences:
If Ann is a Philosophy major at UMD, then Ann is required to take a logic course.
Translation:Ann is a Philosophy major at UMD and is required to take a logic course.
Translation:All Philosophy majors at UMD are required to take a logic course.
Translation:
Notes: The logical form of "All s are s" is a universal quantifier applied to a conditional: . A common mistake is to translate "All s are s" as . This has a different meaning. The sentence means "Every thing is a Philosophy major at UMD and is required to take a logic course" which is not equivalent to the above setence.Some Philosophy majors at UMD are required to take a logic course.
Translation: Notes: The logical form of "Some s are s" is an existential quantifier applied to a conjunction: . A common mistake is to translate "Some s are s" as . This has a different meaning. The sentence means "There is something that either is not a Philosophy major at UMD or is required to take a logic course" which is not equivalent to the above setence.No Philosophy majors at UMD are required to take a logic course.
Translation:
Notes: There is an equivalent way to translate this sentence: .Not all Philosophy majors at UMD are required to take a logic course.
Translation:
Notes: There is an equivalent way to translate this sentence: .
The following table summarizes the translation of sentence with quantifiers. Let and be predicates:
Statement | Translation |
---|---|
All are | |
Every is | |
Some is | |
No is | or |
Some is not | |
Every is not | |
Not every is | or |
One thing to keep in mind when translating English sentences into first order logic is that, typically, universal claims are expressed without using the quantifier "all". For instance, consider the following three sentences:
- Birds fly.
- UMD students must by vaccinated.
- Philosophy students enjoy logic.
Each of these sentences can be paraphrased using the quantifier "all":
- All birds fly.
- All UMD students must by vaccinated.
- All philosophy students enjoy logic.
These statements are translated as follows:
- Birds fly.
For all things, if that thing is a bird, then that thing flies.
Let be the predicate "is a bird" and the predicate "flies". Then the translation is:
- UMD students must by vaccinated.
For all things, if that thing is a UMD student, then that thing must be vaccinated.
Let be the predicate "is a UMD student" and the predicate "must be vaccinated". Then the translation is:
- Philosophy students enjoy logic.
For all things, if that thing is a Philosophy student, then that thing enjoys logic.
Let be the predicate "is a Philosophy student" and the predicate "enjoys logic". Then the translation is:
#
Practice QuestionsI. Fix the following translation key:
- : "is a logician"
- : "is a mathematician"
Using this translation key, translate the following sentences.
- All logicians are mathematicians.
- Some logicians are mathematicians.
- No logician is a mathematician.
- Some logicians are not mathematicians.
- Every logician is not a mathematician.
- Not every logician is a mathematician.
II. Fix the following translation key:
- : "is an administrator"
- : "is a professor"
- : "is underpaid"
- : "is overworked"
- : "is a graduate student"
Using this translation key, translate the following sentences.
- Professors are underpaid and overworked.
- Some professor is a graduate student.
- Some professors are overworked and underpaid, and all graduate students are.
- If professors are overworked, then graduate students are underpaid.
- Some graduate students and some professors are underpaid, but no administrator is.
- If some professor is overworked, then all professors are.