This lesson builds an understanding of how predicate logic sentences are written (syntax) and how their meaning is resolved (semantics).

Elements of syntax

Predicate logic imports almost all syntactic ideas from propositional logic, e.g., it retains the idea of symbolically representing terms instead of relying on whole words and sentences. This symbolism helps logicians focus on forms instead of the content of the argument. Predicate logic also retains all the logical connectives that compound sentences. On top of that, it adds new elements to its syntax, such as predicate functions and quantifiers.

Symbols and logical connectives

One major point of departure is that, while in propositional logic, the fundamental unit for a symbol is a simple proposition“It is raining” gets replaced by the “r” symbol., and in predicate logic, it’s the predicate function. We will expand on this shortly.

To add complexity to the sentence structures of predicate logic, there’s an allowance for using all the logical operators of propositional logic. Predicate logic includes the following connectives:

  • ¬¬ (negation, which represents the logical NOT)

  • (disjunction, which represents the logical OR)

  • (conjunction, which represents the logical AND)

  • (implication, which represents the logical IF-THEN)

  • (biconditional, which represents the logical IF AND ONLY IF)

Note: Because the fundamental unit of expression in predicate logic is a predicate function and not a proposition, all the abovementioned logical connectives compound predicate functions, e.g., predicate_function_1 AND predicate_function_2.

Predicate functions

In linguistic terms, a predicate often refers to the part of a sentence that provides information about the subject, describing what the subject is doing or what qualities it possesses. In the context of predicate logic, a predicate function is like a mathematical function that takes subjects as its input and returns a truth value (either true or false) based on whether the subject meets the criteria asserted in the predicate.

Here’s a simple way to identify a predicate function in a sentence: we look for words or phrases that express qualities, actions, or connections between subjects. These are often verbs or adjectives placed around one or more nouns or pronouns. For example, in “Samantha is happy,” the word “happy” is the predicate function because it describes Samantha’s emotional state. Here,happyhappybecomes a function that takes one subject as its input. That input, in this case, is a constant,samanthasamantha.

In syntax, “Samantha is happy” is translated in predicate logic as happy(samantha)happy(samantha). Firstly, this predicate function, happy(samantha)happy(samantha), can only be true or false, depending on Samantha’s emotional state. Secondly, if we had to translate “Samantha is not happy,” we would not create a whole new set of symbols; we would simply use a logical negation, such as ¬happy(samantha)\neg happy(samantha). Thirdly, if happy(samantha)happy(samantha) is true, then ¬happy(samantha)\neg happy(samantha) is logically false.

Note: Lastly, notice a convention that Samantha is written without an uppercase “s.” That’s because it’s a constant.

Constants and variables

Just like our mathematical functions can take constants and variables as input and map them to an output, so do our predicate functions in logic. For instance, here’s a simple mathematical function that takes a number as its input and returns its double:

f(X)=X2f(X) = X^2

This function is defined using a variable XX, which becomes its input. So we know that f(2)=4f(2) = 4, which means that for a constant 22 as input, our function returns the value of 44. In short, both constants and variables are used as inputs to mathematical functions.

Similarly, in predicate logic, our predicate functions can take constants as input, as we saw in happy(samantha)happy(samantha) because Samantha is a particular individual subject. So every time we make a claim about specific individuals or subjects, we use constants, which, by conventionAs far as this course is concerned, begin with a small letter. What about variables in predicate logic?

Quantifiers

Sometimes, we know the particular subject that we’re making claims for, but at other times, we make more general predictions, for which we don’t necessarily have one particular subject in mind, but the statement could still be true. There are two such scenarios where we will need to use a variable instead of a constant.

Universal quantifier

On a rainy October 5, Samantha casually tells you, “It rains every day in London.” Because you think logically, you think in terms of predicate functions that can be true or false, as follows:

rainy(october5,london).rainy(october5, london).

Get hands-on with 1400+ tech skills courses.