Definition (alphabet, terms, formulas, sentences in predicate logic)

Fix a signature $a: I \sqcup J \to \N$ and an infinite set $V$ of variables. ($I, J, V$ may not be countable.)

The function symbols are $Σ_0^a := \sb{s_i}{i\in I}$, the relation symbols are $Σ_1^a := \sb{r_j}{j\in J}$ and the logical symbols are $$ \begin{align*} L = \set{\wedge, \vee, \Rightarrow, \neg, \bot, \top, =, \exists, \forall, ), (}. \end{align*} $$ The alphabet of signature $a$ is $$ \begin{align*} Σ^a := Σ_0^a \cup Σ_1^a \cup V \cup L. \end{align*} $$

The set $\mathrm{Term}^a$ of $a$-terms is the smallest subset of $(Σ^a)^\ast$ containing $V$ such that $s_i t_0 t_1 \ldots t_{n-1}\in \mathrm{Term}^a$ for any $s_i\in Σ_0^a$ and $t_0, \ldots, t_{n-1} \in \mathrm{Term}^a$ with $n = a(i)$.

For $t\in \mathrm{Term}^a$, write $\op{occ}(t)$ for the set of variables occurring in $t$.

The set $\mathrm{Fml}^a$ of $a$-formulas is the smallest subset of $(Σ^a)^\ast$ containing

and such that, if $ϕ, ψ\in \mathrm{Fml}^a$, then so are the following:

Define a function $\op{free}$ on $\mathrm{Fml}^a$ recursively:

An $a$-formula $ϕ$ is an $a$-sentence if $\op{free}(ϕ) = \emptyset$.