many-sorted language
A many-sorted language is a variation of the classical first-order language. Whereas structures of a first-order language consist of a single universe, structures of a many-sorted language may contain many “universes”, where each universe is “named” by a symbol called “sort”, hence the name “many-sorted”.
To formalize the notion of a many-sorted language, we start with a non-empty set whose elements we call sorts. Let be the set of all (finite) non-empty words over . Elements of are called sort types and are written as tuples. So instead of writing , it is written .
The next item to be defined is the underlying signature of a many-sorted language. A signature consists of
-
•
a non-empty set of sorts,
-
•
a set of function symbols, and
-
•
a set of (non-logical) relation symbols,
such that each element in corresponds to a sort type. In other words, there is a function , and for every , is its sort type. An element such that is called a constant symbol (of sort ).
In addition to the signature , we introduce additional symbols:
-
•
the set of variables, such that each sort corresponds to a countably infinite subset of variables. In other words, there is a function , such that for each , is countably infinite. For each variable , its sort is defined to be .
-
•
logical predicates:
-
•
the equality relation symbol: , and
-
•
the left and right parentheses:
Using and the additional symbols above, we can build terms inductively as follows:
-
•
each variable is a term of sort
-
•
if is a function symbol of sort type , and for each , is a term of sort , then is a term of sort .
-
•
all the terms are built this way.
Finally, from the terms, we inductively define formulas:
-
•
if and are terms of the same sort, then is a formula
-
•
if is a relation symbol of sort type , and for each , is a term of sort , then is a formula
-
•
if is a formula, then so is
-
•
if are formulas, then so is
-
•
if is a formula and is a variable, then so is
-
•
all the formulas are formed this way.
The signature , additional symbols, and terms and formulas subsequently defined constitute what is known as the many-sorted language on .
As in first order language, the outer most parentheses may be eliminated without causing much harm, so that becomes . In addition, we may introduce other familiar logical symbols , and in terms of , and . The specifics of how this is done can be found in the entry on first order language.
From this definition, we see at once that the classical first order language is a one-sorted language (). Sort types are identified with their lengths. Thus, the sort type of a function or a relation symbol is its arity.
Remark. It is not hard to show that a many-sorted language is not much different from a first-order language. Provided that is countably infinite, a many-sorted language can be “converted” into a first-ordered language . Basically, all the function and relation symbols in are in , as well as the additional symbols such as variables and logical symbols. For each sort , we introduce a new unary relation symbol in . For any formula that contains a subformula of the form , we replace each occurrence of such a subformula by a formula of the form , where is a variable of sort and is some formula in which occurs as a free variable. The result is that becomes a one-sorted language.
Title | many-sorted language |
Canonical name | ManysortedLanguage |
Date of creation | 2013-03-22 17:44:40 |
Last modified on | 2013-03-22 17:44:40 |
Owner | CWoo (3771) |
Last modified by | CWoo (3771) |
Numerical id | 12 |
Author | CWoo (3771) |
Entry type | Definition |
Classification | msc 03B70 |
Classification | msc 03C07 |
Classification | msc 03B10 |
Synonym | many sorted language |
Synonym | many-sorted logic |
Defines | sort |
Defines | sort type |