Algebraic classifications of regular tree languages 391
That each VRL corresponds to a unique VFC is a useful fact as many varieties of regular
languages are most naturally defined in terms of congruences of the monoids X
∗
.
We conclude this section by noting how finite automata can be defined as unary algebras.
This approach, already propounded by J. R. B¨uchi and J. B. Wright in the 1950s, provides
a natural passage to tree automata (cf. [8, 13, 16, 28, 79, 85], for example).
Each input letter x ∈ X defines in an X-automaton (A, X, δ) a unary operation
x
A
: A → A, a → δ(a, x),
and these operations determine δ completely. Hence (A, X, δ) can be redefined as a unary
algebra A =(A, X)whenweviewX as a set of unary operation symbols. If ε is a variable,
we may identify each word w ∈ X
∗
with an X-term t
w
over {ε} by setting t
e
= ε,and
t
w
= x(t
u
)forw = ux (u ∈ X
∗
,x ∈ X). For example, t
xxy
= y(x(x(ε))). By letting w
represent the term t
w
,theX{}-term algebra may be taken to be T
X
(ε)=(X
∗
,X), where
x
T
X
(ε)
(w)=wx for any w ∈ X
∗
and x ∈ X. The mapping δ
∗
(−,w):A → A, a → δ
∗
(a, w),
induced by an input word w ∈ X
∗
in (A, X, δ) now becomes the term function w
A
defined by
the term w (= t
w
) in the algebra A =(A, X). Furthermore, an X-recognizer can be defined
as a system A =(A,a
0
,F), where A =(A, X) is a finite X-algebra, a
0
∈ A is the initial
state, and F ⊆ A is the set of final states. The language recognized by A is then the term
set L(A)={w | w
A
(a
0
) ∈ F },andL ⊆ X
∗
is regular if and only if L = Fϕ
−1
for some finite
X-algebra A =(A, X), a homomorphism ϕ : T
X
(ε) →Aand a subset F ⊆ A.
Tree recognizers and regular tree languages are now obtained by allowing function symbols
of any finite arities. Let us note that the unary interpretation described above also suggests
an alternative theory of varieties of regular languages [83].
4 Trees and terms
In mathematics and computer science trees are defined in several different ways, often de-
pending on the applications in mind. The trees to be considered here are finite, their nodes
are labelled with symbols, and the branches leaving any given node have a specified order.
For example, derivations in context-free grammars can be represented by such trees. For the
algebraic approach to be adopted here it will be convenient to define our trees formally as
terms of the kind used in algebra and logic, for example.
A ranked alphabet is a finite set of operation symbols, but now these symbols will also be
used for labelling nodes of trees. In what follows, Σ is always a ranked alphabet. For each
m ≥ 0, the set of m-ary symbols in Σ is again denoted Σ
m
. If Ω is also a ranked alphabet,
Σ ⊆ ΩmeansthatΣ
m
⊆ Ω
m
for every m ≥ 0. The union Σ ∪ΩmaybeformedifΣ
m
∩Ω
n
= ∅
whenever m = n, and then (Σ ∪ Ω)
m
=Σ
m
∪ Ω
m
for every m ≥ 0. In examples we may
give a ranked alphabet in the form Σ = {f
1
/m
1
,...,f
k
/m
k
} indicating that Σ consists of the
symbols f
1
,...,f
m
with the respective ranks m
1
,...,m
k
.
In addition to ranked alphabets, ordinary finite alphabets, called leaf alphabets,areused
for labelling leaves of trees. These will usually be denoted by X or Y . When a leaf alphabet
is considered together with a ranked alphabet, the two sets are assumed to be disjoint.
Terms will be regarded as syntactic representations of trees, and Σ-terms with variables
in X are called also ΣX-trees.Anyt ∈ X ∪ Σ
0
represents a one-node tree in which the
only node is labelled with the symbol t. A composite term f(t
1
,...,t
m
) is interpreted as