Introduction
Doing mathematics requires the use of language for writing down formulas and expressions. However, the languages we use to communicate on a daily basis are not really suitable for this purpose because they are overly complex and inconsistent due to the large number of rules and exceptions they have.
This is why mathematicians have devised languages, known as formal languages, which are simple and without exceptions.
Formal Languages
Definition: Alphabets and Symbols
An alphabet is a non-empty set whose elements we call symbols or letters.
NOTATION
Alphabets are commonly denoted by the uppercase Greek letter sigma ().
Example
As per the definition, any non-empty set can be an alphabet. This includes the uppercase English alphabet , the lowercase Greek alphabet , the natural numbers , the set and so on.
Definition: Expression
Let be an alphabet.
An expression (or string or word) over is any -tuple whose elements are symbols from .
NOTATION
Expressions are usually written by listing their symbols directly, instead of placing them between parentheses in a comma-separated list, as is usually the case with tuples. For example, the expression is written as .
Notation: Kleene Star
The set of all finite-length expressions over a given alphabet is denoted by .
Example: Expressions
If , then some expressions over are , , , , , etc.
Definition: Formal Language
A formal language over an alphabet is any subset of the set of all finite-length expressions over .
Notation
Formal languages are commonly denoted by .