term algebra
In universal algebra and mathematical logic, a term algebra is a freely generated algebraic structure over a given signature.[src] For example, in a signature consisting of a single binary operation, the term algebra over a set X of variables is exactly the free magma generated by X.[src] Other synonyms for the notion include absolutely free algebra and anarchic algebra.[src] From a category theory perspective, a term algebra is the initial object for the category of all X-generated algebras of the same signature, and this object, unique up to isomorphism, is called an initial algebra; it generates by homomorphic projection all algebras in the category.[src] A similar notion is that of a Herbrand universe in logic, usually used under this name in logic programming, which is (absolutely freely) defined starting from the set of constants and function symbols in a set of clauses.[src] That is, the Herbrand universe consists of all ground terms: terms that have no variables in them.[src] An atomic formula or atom is commonly defined as a predicate applied to a tuple of terms; a ground atom is then a predicate in which only ground terms appear.[src] The Herbrand base is the set of all ground atoms that can be formed from predicate symbols in the original set of clauses and terms in its Herbrand universe.[src] These two concepts are named after Jacques Herbrand.…[src]
In universal algebra and mathematical logic, a term algebra is a freely generated algebraic structure over a given signature.[src] For example, in a signature consisting of a single binary operation, the term algebra over a set X of variables is exactly the free magma generated by X.[src] Other synonyms for the notion include absolutely free algebra and anarchic algebra.[src] From a category theory perspective, a term algebra is the initial object for the category of all X-generated algebras of the same signature, and this object, unique up to isomorphism, is called an initial algebra; it generates by homomorphic projection all algebras in the category.[src] A similar notion is that of a Herbrand universe in logic, usually used under this name in logic programming, which is (absolutely freely) defined starting from the set of constants and function symbols in a set of clauses.[src] That is, the Herbrand universe consists of all ground terms: terms that have no variables in them.[src] An atomic formula or atom is commonly defined as a predicate applied to a tuple of terms; a ground atom is then a predicate in which only ground terms appear.[src] The Herbrand base is the set of all ground atoms that can be formed from predicate symbols in the original set of clauses and terms in its Herbrand universe.[src] These two concepts are named after Jacques Herbrand.[src] Term algebras also play a role in the semantics of abstract data types, where an abstract data type declaration provides the signature of a multi-sorted algebraic structure and the term algebra is a concrete model of the abstract declaration.[src] ==Universal algebra== A type \tau is a set of function symbols, with each having an associated arity (i.e.[src] number of inputs).[src] For any non-negative integer n , let \tau_n denote the function symbols in \tau of arity n .[src] A constant is a function symbol of arity 0.[src] Let \tau be a type, and let X be a non-empty set of symbols, representing the variable symbols.[src] (For simplicity, assume X and \tau are disjoint.) Then the set of terms T(X) of type \tau over X is the set of all well-formed strings that can be constructed using the variable symbols of X and the constants and operations of \tau .[src] Formally, T(X) is the smallest set such that: X \cup \tau_0 \subseteq T(X) — each variable symbol from X is a term in T(X) , and so is each constant symbol from \tau_0 .[src] For all n \geq 1 and for all function symbols f \in \tau_n and terms t_1, ..., t_n \in T(X) , we have the string f(t_1, ..., t_n) \in T(X) — given n terms t_1, ..., t_n , the application of an n -ary function symbol f to them represents again a term.[src] The term algebra \mathcal{T}(X) of type \tau over X is, in summary, the algebra of type \tau that maps each expression to its string representation.[src] Formally, \mathcal{T}(X) is defined as follows: The domain of \mathcal{T}(X) is T(X) .[src] For each nullary function f in \tau_0 , f^{\mathcal{T}(X)}() is defined as the string f .[src] For all n \geq 1 and for each n-ary function f in \tau and elements t_1, ..., t_n in the domain, f^{\mathcal{T}(X)}(t_1, ..., t_n) is defined as the string f(t_1, ..., t_n) .[src] A term algebra is called absolutely free because for any algebra \mathcal{A} of type \tau , and for any function g : X \to \mathcal{A} , g extends to a unique homomorphism g^\ast : \mathcal{T}(X) \to \mathcal{A} , which simply evaluates each term t \in \mathcal{T}(X) to its corresponding value g^\ast(t) \in \mathcal{A} .[src] Formally, for each t \in \mathcal{T}(X) : If t \in X , then g^\ast(t) = g(t) .[src] If t = f \in \tau_0 , then g^\ast(t) = f^\mathcal{A}() .[src] If t = f(t_1, ..., t_n) where f \in \tau_n and n \geq 1 , then g^\ast(t) = f^\mathcal{A}(g^\ast(t_1), ..., g^\ast(t_n)) .[src] ==Example== An example type inspired by integer arithmetic can be defined by \tau_0 = \{ 0,1 \} , \tau_1=\{\} , \tau_2=\{ +,* \} , and \tau_i=\{\} for each i > 2 .[src] The best-known algebra of type \tau has the natural numbers as its domain and interprets 0 , 1 , + , and * in the usual way; we refer to it as \mathcal{A}_{nat} .[src] For the example variable set X = \{ x,y \} , we are going to investigate the term algebra \mathcal{T}(X) of type \tau over X .[src] First, the set T(X) of terms of type \tau over X is considered.[src] We use to flag its members, which otherwise may be hard to recognize due to their uncommon syntactic form.[src] We have e.g.[src] {\color{red}x} \in T(X) , since x \in X is a variable symbol; {\color{red}1} \in T(X) , since 1 \in \tau_0 is a constant symbol; hence {\color{red}+x1} \in T(X) , since + is a 2-ary function symbol; hence, in turn, {\color{red}*+x1x} \in T(X) since * is a 2-ary function symbol.[src] More generally, each string in T(X) corresponds to a mathematical expression built from the admitted symbols and written in Polish prefix notation; for example, the term {\color{red}*+x1x} corresponds to the expression (x+1)*x in usual infix notation.[src] No parentheses are needed to avoid ambiguities in Polish notation; e.g.[src] the infix expression x+(1*x) corresponds to the term {\color{red}+x*1x} .[src] To give some counter-examples, we have e.g.[src] {\color{red}z} \not\in T(X) , since z is neither an admitted variable symbol nor an admitted constant symbol; {\color{red}3} \not\in T(X) , for the same reason, {\color{red}+1} \not\in T(X) , since + is a 2-ary function symbol, but is used here with only one argument term (viz.[src] {\color{red}1} ).[src] Now that the term set T(X) is established, we consider the term algebra \mathcal{T}(X) of type \tau over X .[src] This algebra uses T(X) as its domain, on which addition and multiplication need to be defined.[src] The addition function +^{\mathcal{T}(X)} takes two terms p and q and returns the term {\color{red}+}pq ; similarly, the multiplication function *^{\mathcal{T}(X)} maps given terms p and q to the term {\color{red}*}pq .[src] For example, *^{\mathcal{T}(X)}( {\color{red}+x1} , {\color{red}x} ) evaluates to the term {\color{red}*+x1x} .[src] Informally, the operations +^{\mathcal{T}(X)} and *^{\mathcal{T}(X)} are both "sluggards" in that they just record what computation should be done, rather than doing it.[src] As an example for unique extendability of a homomorphism consider g: X \to \mathcal{A}_{nat} defined by g(x) = 7 and g(y) = 3 .[src] Informally, g defines an assignment of values to variable symbols, and once this is done, every term from T(X) can be evaluated in a unique way in \mathcal{A}_{nat} .[src] For example, \begin{array}{lll} & g^*({\color{red}+x1}) \\ = & g^*({\color{red}x}) + g^*({\color{red}1}) & \text{ since } g^* \text{ is a homomorphism } \\ = & g({\color{red}x}) + g^*({\color{red}1}) & \text{ since } g^* \text{ coincides on } X \text{ with } g \\ = & 7 + g^*({\color{red}1}) & \text{ by definition of } g \\ = & 7 + 1 & \text{ since } g^* \text{ is a homomorphism } \\ = & 8 & \text{ according to the well-known arithmetical rules in } \mathcal{A}_{nat} \\ \end{array} In a similar way, one obtains g^*({\color{red}*+x1x}) = ...[src] = 8 * g({\color{red}x}) = ...[src] = 56 .[src] ==Herbrand base== The signature σ of a language is a triple consisting of the alphabet of constants O, function symbols F, and predicates P.[src] The Herbrand base of a signature σ consists of all ground atoms of σ: formulas of the form R(t 1 , ..., t n ), where t 1 , ..., t n are terms containing no variables (i.e.[src] elements of the Herbrand universe) and R is an n-ary relation symbol (i.e.[src] predicate).[src] In the case of logic with equality, it also contains all equations of the form t 1  = t 2 , where t 1 and t 2 contain no variables.[src] ==Decidability== The first-order theory of any term algebra can be shown to be decidable using quantifier elimination.[src] The complexity of the decision problem is in NONELEMENTARY because binary constructors are injective and thus pairing functions.[src] ==See also== Answer-set programming Clone (algebra) Domain of discourse / Universe (mathematics) Rabin's tree theorem (the monadic theory of the infinite complete binary tree is decidable) Initial algebra Abstract data type Term rewriting system ==References== ==Further reading== Joel Berman (2005).[src] "The structure of free algebras".[src] In Structural Theory of Automata, Semigroups, and Universal Algebra.[src] Springer.[src] pp. 47–76.[src] .[src] ==External links==[src]
72 sentences · 72 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"term algebra." encyclopegia.org, 2025, https://encyclopegia.org/wiki/term-algebra. Accessed 30 November 2026.
Chicago
"term algebra." encyclopegia.org. Accessed November 30, 2026. https://encyclopegia.org/wiki/term-algebra.
APA
encyclopegia.org. (2025). term algebra. Retrieved November 30, 2026, from https://encyclopegia.org/wiki/term-algebra
Accessed November 30, 2026 · CC BY-SA 4.0 · citation page · JSON