A fundamental notation for representing and reasoning with logical statements. It extends propositional calculus by introducing the quantifiers, and by allowing predicates and functions of any number of variables. The syntax involves terms, atoms, and formulas. An atom (or atomic formula) has the form P(t1,…,tk), where P is a predicate symbol and t1,…,tk are terms. Formulas may be built from these atoms in the following ways:
∀x. G(x,c) ↔ ∀y. G(f(x,y),y)
Predicate calculus can claim to be a fundamental logical language since all the more complicated logics can, in some sense, be reduced to it. A simple but practically important extension is many-sorted predicate calculus. Here there are several sorts of variables, and the operations and relations come from a many-sorted signature.
Another possible extension is second-order logic, which allows predicate and function variables, such as P in the following: ∀P. [P(a) ∧ ∀k. P(k) ⇒ P(s(k)] ⇒ ∀ . P(n) (∧ and ⇒ signify conjunction and conditional.) This example, given the appropriate interpretation of a and s, expresses a principle of induction: if P is true for zero, and true for k+1 whenever it is true for k, then it is true for all n. Again this sentence holds for natural numbers but not integers.
∀P. [P(a) ∧ ∀k. P(k) ⇒ P(s(k)]
⇒ ∀ . P(n)
Applications of predicate calculus in computer science are commonplace and include formal specification, program correctness, logic programming, and databases. See also modal logic.