# What is the difference between a function and a relation in first-order logic?

Consider this definition of first-order (or Herbrand) logic syntax. Here is the vocabulary:

Definition (Vocabulary): A vocabulary V consists of:

• A set of relation constants {r1, ..., rn}, each with an associated arity.
• A set of function constants {f1, ..., fm}, each with an associated arity.
• A non-empty set of object constants {c1, ..., ck}.
• A set of variables {x1,x2,...}.

Here is the definition for 'term':

Definition (Term): A term in V:

• A variable.
• An object constant.
• A function constant with arity n applied to n terms.
• Only expressions produced by the above rules are terms.

Here is the definition for 'sentence':

Definition (Sentence): A sentence in V:

• A relation constant with arity n applied to n terms.
• (¬ φ) where φ is a sentence.
• (φ ∨ ψ), where φ and ψ are sentences.
• (φ ∧ ψ), where φ and ψ are sentences.
• (φ ⇐ ψ), where φ and ψ are sentences.
• (φ ⇒ ψ), where φ and ψ are sentences.
• (φ ⇔ ψ), where φ and ψ are sentences.
• (∀x.φ), where φ is a sentence.
• (∃x.φ), where φ is a sentence.
• Only expressions produced by the above rules are sentences.

I noticed that a function is a term, but a relation is a sentence. At first I thought that was because of the quantifiers associated with a relation, but sentences using quantifiers are also defined. Also the definition of relation does not involve quantifiers.

This makes me wonder what is the difference between functions and relations in first-order logic that one would be considered a term and the other a sentence.

Francois Bry, Mike Genesereth, Tim Hinrichs, Nat Love. Herbrand Logic. Retrieved on September 28, 2019 at https://www.cs.uic.edu/~hinrichs/herbrand/html/herbrandlogic.html

• Incidentally, you may find this old answer of mine useful as supplementary information. Sep 28, 2019 at 20:25
• @NoahSchweber Thanks. It is good to know one doesn't need functions. From the article I used for the question it seems that Herbrand semantics relies on them. Sep 28, 2019 at 21:27
• There are a lot of situations where they are very good things to have. It's just worth noting that technically we can get rid of them, if we're willing to deal with enough tedious nonsense. Sep 28, 2019 at 22:02