**Predicate logic** is a logical system that uses quantified variables over non-logical objects. A **predicate** is a sentence with some number of free variables. A predicate with free variables "plugged in" is a [[prop-logic|proposition]].
{Predicate} logic is also known as {first}-order logic.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715897257076-->
END%%
%%ANKI
Basic
What is a predicate?
Back: A sentence with some number of free variables.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1715897257082-->
END%%
%%ANKI
Basic
What distinguishes a predicate from a proposition?
Back: A proposition does not contain free variables.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1708199272110-->
END%%
%%ANKI
Basic
How are propositions defined in terms of predicates?
Back: A proposition is a predicate with $0$ free variables.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1708199272115-->
END%%
%%ANKI
Basic
Why is "$3 + x = 12$" *not* a proposition?
Back: Because $x$ is a variable.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
A **quantifier** refers to an operator that specifies how many members of a set satisfy some formula. The most common quantifiers are $\exists$ and $\forall$, though others (such as the counting quantifier) are also used.
%%ANKI
Basic
What are the most common first-order logic quantifiers?
Back: $\exists$ and $\forall$
Reference: Gries, David.*The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1707674796763-->
END%%
%%ANKI
Basic
What term refers to operators like $\exists$ and $\forall$?
Back: Quantifiers.
Reference: Gries, David.*The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
Reference: Gries, David.*The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1707494819968-->
END%%
%%ANKI
Basic
What term refers to $S$ in $\exists x : S, P(x)$?
Back: The domain of discourse.
Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
<!--ID: 1708199272194-->
END%%
%%ANKI
Basic
What is the identity element of $\lor$?
Back: $F$
Reference: Gries, David.*The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
We can also denote existence and uniqueness using $\exists!$. For example, $\exists! x, P(x)$ indicates there exists a unique $x$ satisfying $P(x)$, i.e. there is exactly one $x$ such that $P(x)$ holds: $$(\exists! x, P(x)) = (\exists x, P(x)) \land (\forall x, \forall y, (P(x) \land P(y)) \Rightarrow (x = y)))$$
The first conjunct denotes existence while the second denotes uniqueness.
Identifiers are said to be **bound** if they are parameters to a quantifier. Identifiers that are not bound are said to be **free**. A first-order logic formula is said to be in **prenex normal form** (PNF) if written in two parts: the first consisting of quantifiers and bound variables (the **prefix**), and the second consisting of no quantifiers (the **matrix**).
%%ANKI
Basic
Prenex normal form consists of what two parts?
Back: The prefix and the matrix.
Reference: Gries, David.*The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1707674796773-->
END%%
%%ANKI
Basic
How is the prefix of a formula in PNF formatted?
Back: As only quantifiers and bound variables.
Reference: Gries, David.*The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1707674796775-->
END%%
%%ANKI
Basic
How is the matrix of a formula in PNF formatted?
Back: Without quantifiers.
Reference: Gries, David.*The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1707674796776-->
END%%
%%ANKI
Basic
Which identifiers in the following are bound? $\exists x, P(x) \land P(y)$
Back: Just $x$.
Reference: Gries, David.*The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1707674796777-->
END%%
%%ANKI
Basic
Which identifiers in the following are free? $\exists x, P(x) \land P(y)$
Back: Just $y$.
Reference: Gries, David.*The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1707674796779-->
END%%
%%ANKI
Basic
How is the following rewritten in PNF? $(\exists x, P(x)) \land (\exists y, Q(y))$
Back: $\exists x \;y, P(x) \land Q(y)$
Reference: Gries, David.*The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1707675399517-->
END%%
%%ANKI
Basic
How is the following rewritten in PNF? $(\exists x, P(x)) \land (\forall y, Q(y))$
Back: N/A.
Reference: Gries, David.*The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
* Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
* Patrick Keef and David Guichard, “An Introduction to Higher Mathematics,” n.d.