Formal languages
To begin with constructing a formal system, we need to first need to know what symbols our logic will be using, and how to connect them. These properties are given by a formal language.
Symbols, are individual elements used in a language. These symbols concatenate to form formulas (sometimes called words or sentences). The collection of all symbols and formulas in a language, is called an alphabet.
A formal language is often given a syntax, rules for how symbols can be combined. If a formula can be constructed using the syntax attributed to the language, it is called a well-formed formula, often abbreviated wff.
With these definitions, we define a
First order languages
For a more in-depth look at a formal language, lets take a dive into first-order language. I’ll use the slightly obscure notation used in [Ebbinghaus, Flum, Thomas], as I personally feel they take a very formal approach to developing a formal language.
The alphabet of a first-order language has the following symbols
Connectives - \land, \lor, \rightarrow, \leftrightarrow, \lnot
Quantifiers - \forall, \exists
Variables - v_1,v_2,v_3, \cdots, v_n
Equality - The equal sign ‘=’
Parentheses - Right ) and left (.
Operations - A first-order language can consist of any amount of countable operations (functions) f of any order.
Relations - A first-order language can consist of any amount of countable relations p of any order.
Constants - c_0, c_1, c_2 ect. A first-order language may consist of any countable amount of constants.
For readability sake, parenthesis occur in different sizes, or occasionally as brackets. Commas are also inserted to make formulas easier to read, but are not a formal symbol.
The first five groups listed are denoted \mathbb{A}, and S denotes the unique operations, relations, and constants in the language. The set S determines the unique first-order language. We denote the shared alphabet \mathbb{A}_S = \mathbb{A} \cup S.
Now we can begin constructing the syntax for first-order languages. We start by defining terms
The set of all S-terms is denoted T^S. Through repeated applications of the three rules above, we can create larger terms. For example
\begin{alignat*}{2} & c_1 & \quad &(T2)\\ & v_1 &\quad &(T1)\\ & gc_1v_1 &\quad &(T3) \text{ with $c_1$ and $v_1$ applied to $g$} \end{alignat*}So gc_1v_1 is an S-term. Most of the time this is wrote g(c_1,v_1), but to keep things formal we’ll use the objectively worse notation for now. We will however introduce shorthand later. Now that we have S-terms, we can start creating formulas.
S-formula formed from (F1) or (F2) are known as atomic formula as they don’t use any other formula in their language. Note that an S-formula is simply another word for a wff.
We can now introduce some new vocabulary
We denote the set of S-formulas with \mathcal{L}^S. This set is called the first-order language associated with the symbol set S. And just like that we’ve created a first-order lanaguage! Lot’s of rather tricky notation, but the overall concept is no different than our example in the beginning.
It is worht nothing that the collection of all first-order languages is denoted \mathcal{L}_1, and it will be a commonly used example.
Footnotes
This example was given by Noam Chomsky in his thesis The logical structure of linguistic theory↩︎