This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

\publicationdetails

232021216890

The algebra of binary trees is affine complete

André Arnold\affiliationmark1    Patrick Cégielski\affiliationmark2    Serge Grigorieff\affiliationmark3    Irène Guessarian\affiliationmark3,4 Université de Bordeaux, France.
LACL, Université Paris XII – IUT de Sénart-Fontainebleau, France.
IRIF, CNRS & Université Paris-Diderot, France.
Emerita Sorbonne Université, Paris
(2020-11-10; 2021-03-08; 2021-05-11)
Abstract

A function on an algebra is congruence preserving if, for any congruence, it maps pairs of congruent elements onto pairs of congruent elements. We show that on the algebra of binary trees whose leaves are labeled by letters of an alphabet containing at least three letters, a function is congruence preserving if and only if it is a polynomial function, thus exhibiting the first example of a non commutative and non associative affine complete algebra.

keywords:
algebras, trees, congruences

Merci à Maurice pour nombre de discussions algébriques passionnantes

1 Introduction

A function on an algebra is congruence preserving if, for any congruence, it maps pairs of congruent elements onto pairs of congruent elements.

A polynomial function on an algebra is a function defined by a term of the algebra using variables, constants and the operations of the algebra. Obviously, every polynomial function is congruence preserving.

Algebras where all congruence preserving functions are polynomial functions are called affine complete in the terminology introduced by Werner (1971). They are extensively studied in the book by Kaarli and Pixley (2001).

In the commutative case, many algebras have been shown to be affine complete: Boolean algebras (Grätzer, 1962), pp-rings with unit (Iskander, 1972). For distributive lattices, Ploščica and Haviar (2008) described congruence preserving functions, and Grätzer (1964) determined which distributive lattices are affine complete. Affine completenes is an intrinsic property of an algebra, which fails to hold even for very simple algebras: e.g., in 𝒜=,+\mathcal{A}=\langle{\mathbb{Z}},+\rangle, the function f:f\colon{\mathbb{Z}}\to{\mathbb{Z}} defined by

f(x)=if x0 then Γ(1/2)2×4x×x!1et/2(t21)x𝑑t else f(x).f(x)=\texttt{if $x\geq 0$ then $\dfrac{\Gamma(1/2)}{2\times 4^{x}\times x!}\int_{1}^{\infty}e^{-t/2}(t^{2}-1)^{x}dt$ else $-f(-x)$.}

has been proved to be congruence preserving (Cégielski et al., 2015), but it is not a polynomial function because its power series is infinite. Hence 𝒜=,+\mathcal{A}=\langle{\mathbb{Z}},+\rangle is not affine complete.

In the non commutative case, very little is known about affine complete algebras. We proved in Arnold et al. (2020) that the free monoid Σ\Sigma^{*} is an associative non commutative affine complete algebra if Σ\Sigma has at least three letters, and we proved in Arnold et al. (2020) a partial result concerning a non commutative and non associative algebra: every unary congruence preserving function f:T(Σ)T(Σ)f\colon T(\Sigma)\to T(\Sigma) is a polynomial function, where T(Σ)T(\Sigma) is the algebra of full binary trees with leaves labelled by letters of an alphabet Σ\Sigma having at least three letters. We here generalize this result proving that a congruence preserving function f:𝒯(Σ)n𝒯(Σ)f\colon\mathcal{T}(\Sigma)^{n}\to\mathcal{T}(\Sigma) of any arity nn is a polynomial function, where 𝒯(Σ)\mathcal{T}(\Sigma) is the algebra of arbitrary (possibly non full) binary trees with labelled leaves. This generalization is twofold: (1) non full binary trees are allowed in 𝒯(Σ)\mathcal{T}(\Sigma), and (2) congruence preserving functions of arbitrary arity are allowed. This exhibits an example of a non commutative and non associative affine complete algebra. Non commutative and non associative algebras are of constant use in Computer Science, and congruences are also very often used, whence the potential usefulness of our result.

We first define binary trees and their congruences, we then study conditions which will enable us to prove that every congruence preserving function is a polynomial function, and to finally prove the affine completeness of T(Σ)T(\Sigma).

2 The algebra of binary trees

2.1 Trees, congruences

For an algebra 𝒜\mathcal{A} with domain AA, a congruence \sim on 𝒜\mathcal{A} is an equivalence relation on AA which is compatible with the operations of 𝒜\mathcal{A}. We state the characterization of congruences by kernels of homomorphisms.

Lemma 2.1.

Let 𝒜=A,\mathcal{A}=\langle A\,,\,\star\rangle be an algebra with a binary operation \star. An equivalence \sim on AA is a congruence iff there exists an algebra =B,\mathcal{B}=\langle B\,,\,*\rangle with a binary operation * and there exists θ:AB\theta\colon A\to B a homomorphism such that \sim coincides with the kernel congruence ker(θ)\ker(\theta) of θ\theta, defined by xθyx\sim_{\theta}y iff θ(x)=θ(y)\theta(x)=\theta(y).

Let Σ\Sigma be an alphabet not containing {0,1}\{0,1\}. We shall represent the algebra of binary trees over Σ\Sigma, i.e., trees with leaves labeled by letters of Σ\Sigma, as a set of words 𝒯(Σ)\mathcal{T}(\Sigma) on the alphabet Σ{0,1}\Sigma\cup\{0,1\}, together with the binary product operation \star.

Definition 2.2.

The algebra =𝒯(Σ),\mathcal{B}=\langle\mathcal{T}(\Sigma),\star\rangle of binary trees over Σ\Sigma is defined as follows.

  • A binary tree over Σ\Sigma is a finite set of words t{0,1}Σt\subseteq\{0,1\}^{*}\Sigma such that: For any ua,vbtua,vb\in t, if uavbua\neq vb then uu is not a prefix of vv and vv is not a prefix of uu. The carrier set 𝒯(Σ)\mathcal{T}(\Sigma) is the set of all binary trees. The empty set \emptyset is a binary tree denoted by 𝟎{\bf 0}.

  • The binary product operation \star is defined by: for t,t𝒯(Σ)t,\;t^{\prime}\in\mathcal{T}(\Sigma), tt=0.t1.tt\star t^{\prime}=0.t\cup 1.t^{\prime}. In particular, 𝟎𝟎=𝟎{\bf 0}\star{\bf 0}={\bf 0}.

bbaaccddbbccddbbccddaabbcc
Figure 1: From left to right, t={00b,1a}t=\{00b,1a\}, τ={0c,1d}\tau=\{0c,1d\}, t1=γaτ(t)={00b,01c,11d}t_{1}={{\gamma}_{a\rightarrow\tau}}(t)=\{00b,01c,11d\}, t2={00b,01c,11d}t_{2}=\{00b,01c,11d\}, t3={00a,10b,11c}t_{3}=\{00a,10b,11c\}. Trees t1,t2,t3t_{1},\ t_{2},\ t_{3} have the same size 6, trees t1t_{1} and t3t_{3} are similar (have the same skeleton.)

When the alphabet Σ\Sigma is clear, we will denote by 𝒯\mathcal{T} the set of all binary trees. Trees are generated by {𝟎}Σ\{{\bf 0}\}\cup\Sigma and the operation \star.

An essential property of this algebra \mathcal{B} is that its elements are uniquely decomposable.

Lemma 2.3 (Unicity of decomposition).

If tt is a tree not in {𝟎}Σ\{{\bf 0}\}\cup\Sigma then there exists a unique ordered pair t1,t2𝟎,𝟎\langle{t_{1},t_{2}}\rangle\neq\langle{{\bf 0},{\bf 0}}\rangle in 𝒯2\mathcal{T}^{2} such that t=t1t2t=t_{1}\star t_{2}.

This property allows us to associate with each t𝒯t\in\mathcal{T} its size |t||t| (number of nodes)

|𝟎|=0|{\bf 0}|=0, and for all aΣa\in\Sigma, |a|=1|a|=1,

– if t{𝟎}Σt\notin\{{\bf 0}\}\cup\Sigma then t=t1t2t=t_{1}\star t_{2}, and |t|=|t1|+|t2|+1|t|=|t_{1}|+|t_{2}|+1.

If |t|>1|t|>1 then there exist t1,t2t_{1},t_{2} with |ti|<|t||t_{i}|<|t| such that t=t1t2t=t_{1}\star t_{2}. Trees ttt\star\ t^{\prime}, 𝟎t{\bf 0}\star t^{\prime}, t𝟎t\star{\bf 0} are trees whose root has two sons, a single right son, a single left son, respectively. See Figure 1.

2.2 Homomorphisms, graftings

Lemma 2.4.

Let =B,\mathcal{B}=\langle B\,,\,*\rangle be an algebra with a binary operation *. Every mapping h:ΣBh\colon\Sigma\to B can be uniquely extended to a homomorphism h:𝒯Bh\colon\mathcal{T}\to B.

Remark 2.5.

1) Because of the universal property of Lemma 2.4, homomorphisms are (uniquely) defined by giving their values on Σ\Sigma.

2) For every endomorphism, h(𝟎)=𝟎h({\bf 0})={\bf 0}. Otherwise, as 𝟎=𝟎𝟎{\bf 0}={\bf 0}\star{\bf 0}, h(𝟎)=h(𝟎)h(𝟎)h({\bf 0})=h({\bf 0})\star h({\bf 0}); if h(𝟎)=th({\bf 0})=t with |t|1|t|\geq 1 then t=ttt=t\star t implies |t|=2|t|+1|t|=2|t|+1, a contradiction.

Definition 2.6.

For a given aΣa\in\Sigma, let νa\nu_{a} be the endomorphism sending Σ\Sigma onto aa. If for some aΣa\in\Sigma, νa(t)=νa(t)\nu_{a}(t)=\nu_{a}(t^{\prime}), trees tt and tt^{\prime} are said to be similar, which is denoted by tstt\sim_{s}t^{\prime}.

Note that the congruence s\sim_{s} does not depend on the choice of the letter aΣa\in\Sigma since νb(t)=νb(νa(t))\nu_{b}(t)=\nu_{b}(\nu_{a}(t)). From an intuitive viewpoint, tstt\sim_{s}t^{\prime} means that tt and tt^{\prime} have the same skeleton, i.e., they are identical except for the leaf labels. See Figure 1.

Other congruences fundamental for our proof are the kernels of the grafting endomorphisms, defined below.

Definition 2.7 (Grafting).

Let aΣa\in\Sigma and τ𝒯\tau\in\mathcal{T}. Then the grafting γaτ:𝒯𝒯{{\gamma}_{a\rightarrow\tau}}\colon\mathcal{T}\to\mathcal{T} is the endomorphism defined by its restriction on Σ\Sigma

γaτ(b)={τ if b=a,b if ba.{{\gamma}_{a\rightarrow\tau}}(b)=\begin{cases}\tau&\text{ if }b=a,\\ b&\text{ if }b\neq a.\end{cases}

In other words, for any aΣa\in\Sigma and any τ𝒯\tau\in\mathcal{T}, γaτ{\gamma}_{a\rightarrow\tau} is the endomorphism sending the letter aa on τ\tau and each other letter on itself.

An endomorphism hh of 𝒯(Σ),\langle\mathcal{T}(\Sigma),\star\rangle is idempotent if for every t𝒯t\in\mathcal{T}, h(h(t))=h(t)h(h(t))=h(t). By Lemma 2.4, hh is idempotent iff for every aΣa\in\Sigma, h(h(a))=h(a)h(h(a))=h(a). For instance if aa does not occur in τ\tau then γaτ{\gamma}_{a\rightarrow\tau} is idempotent.

Proposition 2.8.

Let τ𝒯\tau\in\mathcal{T}, let t,t𝒯t,\ t^{\prime}\in\mathcal{T}, and let a1a2a_{1}\neq a_{2} be two letters in Σ\Sigma. If γaiτ(t)=γaiτ(t){{\gamma}_{a_{i}\rightarrow\tau}}(t)={{\gamma}_{a_{i}\rightarrow\tau}}(t^{\prime}) for i=1,2i=1,2, then t=tt=t^{\prime}.

Proof.

By induction on min(|t|,|t|)\min(|t|,|t^{\prime}|).

Basis Case 0: If min(|t|,|t|)=0\min(|t|,|t^{\prime}|)=0 then one of t,tt,t^{\prime} is 𝟎{\bf 0}, say t=𝟎t={\bf 0}. If t𝟎t^{\prime}\neq{\bf 0} then tt^{\prime} contains at least one occurrence of some letter bb. As γaiτ(t)=γaiτ(t)=γaiτ(𝟎)=𝟎{\gamma}_{a_{i}\rightarrow\tau}(t^{\prime})={\gamma}_{a_{i}\rightarrow\tau}(t)={\gamma}_{a_{i}\rightarrow\tau}({\bf 0})={\bf 0}, we have γaiτ(t)=𝟎{\gamma}_{a_{i}\rightarrow\tau}(t^{\prime})={\bf 0}, which implies (because t𝟎t^{\prime}\neq{\bf 0} was supposed) that τ=𝟎\tau={\bf 0}. Then γaiτ(t)=𝟎{\gamma}_{a_{i}\rightarrow\tau}(t^{\prime})={\bf 0} implies that all leaves of tt^{\prime} are equal to both a1a_{1} and a2a_{2}, a contradiction. Hence t=𝟎t^{\prime}={\bf 0} and t=tt=t^{\prime}.

Basis Case 1: If min(|t|,|t|)=1\min(|t|,|t^{\prime}|)=1 then tt or tt^{\prime} is a letter, say t=bt=b, and there is one ii, say i=1i=1, such that a1ba_{1}\neq b, thus b=γa1τ(t)=γa1τ(t)b={{\gamma}_{a_{1}\rightarrow\tau}}(t)={{\gamma}_{a_{1}\rightarrow\tau}}(t^{\prime}).

  • If tt^{\prime} is a letter cbc\neq b, then γa1τ(c)=b{{\gamma}_{a_{1}\rightarrow\tau}}(c)=b. If c=a1c=a_{1} then b=γa1τ(c)=τb={{\gamma}_{a_{1}\rightarrow\tau}}(c)=\tau. Since γa2τ(c)=c=γa2τ(b){τ,b}={b}{\gamma}_{a_{2}\rightarrow\tau}(c)=c={\gamma}_{a_{2}\rightarrow\tau}(b)\in\{\tau,b\}=\{b\}, we have that c=bc=b, a contradiction. If ca1c\neq a_{1} and γa1τ(c)=cb=γa1τ(c){{\gamma}_{a_{1}\rightarrow\tau}}(c)=c\neq b={{\gamma}_{a_{1}\rightarrow\tau}}(c), a contradiction. Hence t=t=bt^{\prime}=t=b.

  • If |t|>1|t^{\prime}|>1 then t=t1t2t^{\prime}=t^{\prime}_{1}\star t^{\prime}_{2}, and γa1τ(t)=γa1τ(t1)γa1τ(t2){{\gamma}_{a_{1}\rightarrow\tau}(t^{\prime})}={{\gamma}_{a_{1}\rightarrow\tau}(t^{\prime}_{1})}\star{{\gamma}_{a_{1}\rightarrow\tau}(t^{\prime}_{2})} which can be only of size 0 or 2\geq 2, contradicting γa1τ(t)=b{{\gamma}_{a_{1}\rightarrow\tau}}(t^{\prime})=b. this case is excluded.

Induction: If min(|t|,|t|)>1\min(|t|,|t^{\prime}|)>1 then t=t1t2t=t_{1}\star t_{2} and t=t1t2t^{\prime}=t^{\prime}_{1}\star t^{\prime}_{2} with min(|ti|,|ti|)<min(|t|,|t|)\min(|t_{i}|,|t^{\prime}_{i}|)<\min(|t|,|t^{\prime}|), for i=1,2i=1,2. By Lemma 2.3, γajτ(t1)γajτ(t2)=γajτ(t1)γajτ(t2){{\gamma}_{a_{j}\rightarrow\tau}}(t_{1})\star{{\gamma}_{a_{j}\rightarrow\tau}}(t_{2})={{\gamma}_{a_{j}\rightarrow\tau}}(t^{\prime}_{1})\star{{\gamma}_{a_{j}\rightarrow\tau}}(t^{\prime}_{2}) implies γajτ(ti)=γajτ(ti){{\gamma}_{a_{j}\rightarrow\tau}}(t_{i})={{\gamma}_{a_{j}\rightarrow\tau}}(t^{\prime}_{i}), for j=1,2j=1,2. By the induction hypothesis ti=tit_{i}=t^{\prime}_{i}, hence t=tt=t^{\prime}. ∎

Proposition 2.9.

Let us fix aΣa\in\Sigma, with |Σ|3|\Sigma|\geq 3, t,t𝒯t,\ t^{\prime}\in\mathcal{T} such that tstt\sim_{s}t^{\prime}.

(1) If, for some τ𝒯\tau\in\mathcal{T} of size |τ|1|\tau|\neq 1, γaτ(t)=γaτ(t){{\gamma}_{a\rightarrow\tau}}(t)={{\gamma}_{a\rightarrow\tau}}(t^{\prime}), then t=tt=t^{\prime}.

(2) If, for all bab\neq a, bΣb\in\Sigma, γab(t)=γab(t){{\gamma}_{a\rightarrow b}}(t)={{\gamma}_{a\rightarrow b}}(t^{\prime}), then t=tt=t^{\prime}.

Proof.

Both (1) and (2) are proved by induction on |t|=|t||t|=|t^{\prime}|, and in both cases, the result obviously holds if t=t=𝟎t=t^{\prime}={\bf 0}.

Basis: If |t|=|t|=1|t|=|t^{\prime}|=1.

(1) We assume that t=bc=tt=b\neq c=t^{\prime}.

(i) If a{b,c}a\not\in\{b,c\} then γaτ(t)=bc=γaτ(t){{\gamma}_{a\rightarrow\tau}}(t)=b\neq c={{\gamma}_{a\rightarrow\tau}}(t^{\prime}), a contradiction.

(ii) Otherwise, a{b,c}a\in\{b,c\}, e.g., a=b=ta=b=t, then γaτ(t)=γaτ(a)=τ{{\gamma}_{a\rightarrow\tau}}(t)={{\gamma}_{a\rightarrow\tau}}(a)=\tau and γaτ(t)=γaτ(c)=c{{\gamma}_{a\rightarrow\tau}}(t^{\prime})={{\gamma}_{a\rightarrow\tau}}(c)=c, hence τ=c\tau=c, which contradicts |τ|1|\tau|\neq 1.

(2) We assume that t=bc=tt=b\neq c=t^{\prime}.

(i) The case a{b,c}a\not\in\{b,c\} yields a contradiction as in case (1).

(ii) Otherwise, e.g., a=ba=b, there exists d{a,c}d\not\in\{a,c\}, and we get γad(t)=γad(a)=d{{\gamma}_{a\rightarrow d}}(t)={{\gamma}_{a\rightarrow d}}(a)=d and γad(t)=γad(c)=c{{\gamma}_{a\rightarrow d}}(t^{\prime})={{\gamma}_{a\rightarrow d}}(c)=c, contradicting γad(t)=γad(t){{\gamma}_{a\rightarrow d}}(t)={{\gamma}_{a\rightarrow d}}(t^{\prime}).

Induction: As in Proposition 2.8 in both cases: since tt and tt^{\prime} are similar, t=t1t2t=t_{1}\star t_{2} and t=t1t2t^{\prime}=t^{\prime}_{1}\star t^{\prime}_{2} with tit_{i} similar to tit^{\prime}_{i} and |ti|<|ti||t_{i}|<|t^{\prime}_{i}|. ∎

2.3 Congruence preserving functions on trees

Definition 2.10.

A function f:𝒯n𝒯f\colon\mathcal{T}^{n}\to\mathcal{T} is congruence preserving (abbreviated into CP) if for all congruences \sim on 𝒯\mathcal{T}, for all t1,,tn,t1,,tnt_{1},\ldots,t_{n},\ t^{\prime}_{1},\ldots,t^{\prime}_{n} in 𝒯\mathcal{T}, titit_{i}\sim t^{\prime}_{i} for all i=1,,ni=1,\ldots,n, implies f(t1,,tn)f(t1,,tn)f(t_{1},\ldots,t_{n})\sim f(t^{\prime}_{1},\ldots,t^{\prime}_{n}).

Remark 2.11.

(1) It follows from Lemma 2.1 that CP functions are characterized by the fact that for all homomorphisms hh from 𝒯,\langle{{\mathcal{T}},\star}\rangle to any algebra A,A\langle{A,\star_{A}}\rangle, h(ti)=h(ti)h(t_{i})=h(t^{\prime}_{i}) for all i=1,,ni=1,\ldots,n, implies h(f(t1,,tn))=h(f(t1,,tn))h(f(t_{1},\ldots,t_{n}))=h(f(t^{\prime}_{1},\ldots,t^{\prime}_{n})).

(2) If ff is CP and endomorphism hh is idempotent then h(f(t1,,tn))=h(f(h(t1),,h(tn)))h(f(t_{1},\ldots,t_{n}))=h(f(h(t_{1}),\ldots,h(t_{n}))). Indeed, let h\sim_{h} be the congruence associated with hh, for i=1,,ni=1,\ldots,n, we have h(ti)=h(h(ti))h(t_{i})=h(h(t_{i})), hence tihh(ti)t_{i}\sim_{h}h(t_{i}), whence the result.

We will show that congruence preserving functions on the algebra 𝒯(Σ),\langle\mathcal{T}(\Sigma),\star\rangle are polynomial functions. Let us first formally define polynomials on trees.

Definition 2.12.

Let x1,,xnΣx_{1},\ldots,x_{n}\not\in\Sigma be called variables. A polynomial P(x1,,xn)P(x_{1},\ldots,x_{n}) is a tree on the alphabet Σ{x1,,xn}\Sigma\cup\{x_{1},\ldots,x_{n}\}.

With every polynomial P(x1,,xn)P(x_{1},\ldots,x_{n}) we will associate a polynomial function P~:𝒯n𝒯\tilde{P}\colon\mathcal{T}^{n}\to\mathcal{T} defined by: for any u=t1,,ti,,tn𝒯n\vec{u}=\langle t_{1},\ldots,t_{i},\ldots,t_{n}\rangle\in\mathcal{T}^{n},

P~(u)={Pif P=𝟎 or PΣtiif P=xiP1~(u)P2~(u)if P=P1P2\tilde{P}(\vec{u})=\left\{\begin{array}[]{ll}P&\mbox{if $P={\bf 0}$ or $P\in\Sigma$}\\ t_{i}&\mbox{if $P=x_{i}$}\\ \widetilde{P_{1}}(\vec{u})\star\widetilde{P_{2}}(\vec{u})&\mbox{if $P=P_{1}\star P_{2}$}\end{array}\right.

Obviously, every polynomial function is CP. Our goal is to prove the converse, namely

Theorem 2.13.

Let |Σ|3|\Sigma|\geq 3. If g:𝒯n𝒯g\colon\mathcal{T}^{n}\to\mathcal{T} is CP then there exists a polynomial PgP_{g} such that g=Pg~g=\widetilde{P_{g}}.

3 Equality of CP functions

Notation 3.1.

For any f:𝒯n𝒯f\colon{\mathcal{T}}^{n}\to{\mathcal{T}}, we denote by f|Σnf\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}} its restriction to Σn\Sigma^{n}.

In this section we prove that if ff and gg are two CP functions, then f|Σn=g|Σnf\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}}=g\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}} implies f=gf=g, provided that Σ\Sigma contains at least three letters.

Lemma 3.2.

Suppose Σ\Sigma has at least three letters. If ff and gg are unary CP functions on 𝒯\mathcal{T} such that for all aΣa\in\Sigma, f(a)=g(a)f(a)=g(a) then for all t𝒯t\in\mathcal{T}, f(t)f(t) and g(t)g(t) are similar.

Proof.

We have to show that νa(f(t))=νa(g(t))\nu_{a}(f(t))=\nu_{a}(g(t)) for some aΣa\in\Sigma and for all tt. As νa\nu_{a} is idempotent and ff is CP, by Remark 2.11 (2), νa(f(t))=νa(f(νa(t)))\nu_{a}(f(t))=\nu_{a}(f(\nu_{a}(t))), and similarly for gg. Hence it suffices to prove f(νa(t))=g(νa(t))f(\nu_{a}(t))=g(\nu_{a}(t)). Let b1,b2Σb_{1},\ b_{2}\in\Sigma such that a,b1,b2a,\ b_{1},\ b_{2} are pairwise distinct. As γbiνa(t){\gamma}_{b_{i}\rightarrow\nu_{a}(t)} is idempotent, by Remark 2.11 (2), we have γbiνa(t)(f(bi))=γbiνa(t)(f(νa(t))){\gamma}_{b_{i}\rightarrow\nu_{a}(t)}(f(b_{i}))={\gamma}_{b_{i}\rightarrow\nu_{a}(t)}(f(\nu_{a}(t))). The same holds for gg, i.e., γbiνa(t)(g(bi))=γbiνa(t)(g(νa(t))){\gamma}_{b_{i}\rightarrow\nu_{a}(t)}(g(b_{i}))={\gamma}_{b_{i}\rightarrow\nu_{a}(t)}(g(\nu_{a}(t))). From f(bi)=g(bi)f(b_{i})=g(b_{i}), we deduce that γbiνa(t)(f(νa(t)))=γbiνa(t)(g(νa(t))){\gamma}_{b_{i}\rightarrow\nu_{a}(t)}(f(\nu_{a}(t)))={\gamma}_{b_{i}\rightarrow\nu_{a}(t)}(g(\nu_{a}(t))). This equality holds for i=1,2i=1,2, thus Proposition 2.8 implies that f(νa(t))=g(νa(t))f(\nu_{a}(t))=g(\nu_{a}(t)). ∎

The following proposition shows that a unary CP function ff is completely determined by its values on Σ\Sigma.

Proposition 3.3.

Suppose Σ\Sigma has at least three letters. If ff and gg are unary CP functions on 𝒯\mathcal{T} such that for all aΣa\in\Sigma, f(a)=g(a)f(a)=g(a) then for all t𝒯t\in\mathcal{T}, f(t)=g(t)f(t)=g(t).

Proof.

Let aa be a letter that occurs in tt. For any other letter bb, the endomorphisms γab{\gamma}_{a\rightarrow b} and γatb{\gamma}_{a\rightarrow t_{b}} are idempotent, where tb=γab(t)t_{b}={\gamma}_{a\rightarrow b}(t). Thus by Remark 2.11 (2), γatb(f(a))=γatb(f(tb)){\gamma}_{a\rightarrow t_{b}}(f(a))={\gamma}_{a\rightarrow t_{b}}(f(t_{b})), and γatb(g(a))=γatb(g(tb)){\gamma}_{a\rightarrow t_{b}}(g(a))={\gamma}_{a\rightarrow t_{b}}(g(t_{b})). As f(a)=g(a)f(a)=g(a) we have γatb(f(tb))=γatb(g(tb)){\gamma}_{a\rightarrow t_{b}}(f(t_{b}))={\gamma}_{a\rightarrow t_{b}}(g(t_{b})). By Lemma 3.2, f(tb)f(t_{b}) and g(tb)g(t_{b}) are similar, and by Proposition 2.9 (1) f(tb)=g(tb)f(t_{b})=g(t_{b}).

On the other hand, as ff and gg are CP and tγabtbt\sim_{{\gamma}_{a\rightarrow b}}t_{b}, we get γab(f(t))=γab(f(tb)){\gamma}_{a\rightarrow b}(f(t))={\gamma}_{a\rightarrow b}(f(t_{b})) and γab(g(t))=γab(g(tb)){\gamma}_{a\rightarrow b}(g(t))={\gamma}_{a\rightarrow b}(g(t_{b})), hence γab(f(t))=γab(g(t)){\gamma}_{a\rightarrow b}(f(t))={\gamma}_{a\rightarrow b}(g(t)). As this is true for all bab\neq a, we have by Proposition 2.9 (2), f(t)=g(t)f(t)=g(t). ∎

Proposition 3.3 now can be generalized.

Notation 3.4.

For any function f:𝒯n+1𝒯f\colon\mathcal{T}^{n+1}\to\mathcal{T}, any t𝒯t\in\mathcal{T}, and u=t1,,tn\vec{u}=\langle t_{1},\ldots,t_{n}\rangle, we define

(1) a nn-ary function f,tf_{\cdots,t} obtained by “freezing” the (n+1)th argument to the value tt, and defined by: for all u𝒯n\vec{u}\in\mathcal{T}^{n}, f,t(u)=f(u,t)f_{\cdots,t}(\vec{u})=f(\vec{u},t),

(2) a unary function fu,f_{\vec{u},\cdot} obtained by “freezing” the nn first arguments to the value u=t1,,tn\vec{u}=\langle t_{1},\ldots,t_{n}\rangle, and defined by: for all t𝒯t\in\mathcal{T}, fu,(t)=f(u,t)f_{\vec{u},\cdot}(t)=f(\vec{u},t).

Proposition 3.5.

Let ff and gg be n-ary CP functions on 𝒯\mathcal{T} such that for all a1,,anΣa_{1},\ldots,a_{n}\in\Sigma, f(a1,,an)=g(a1,,an)f(a_{1},\ldots,a_{n})=g(a_{1},\ldots,a_{n}) then for all t1,,tn𝒯t_{1},\ldots,t_{n}\in\mathcal{T}, f(t1,,tn)=g(t1,,tn)f(t_{1},\ldots,t_{n})=g(t_{1},\ldots,t_{n}).

Proof.

By induction on nn. For n=1n=1 the result was proved in Proposition 3.3. Assume the result holds for nn. By the hypothesis, for all a1,,an,aΣa_{1},\ldots,a_{n},a\in\Sigma, we have f(a1,,an,a)=g(a1,,an,a)f(a_{1},\ldots,a_{n},a)=g(a_{1},\ldots,a_{n},a), i.e., f,a(a1,,an)=g,a(a1,,an)f_{\cdots,a}(a_{1},\ldots,a_{n})=g_{\cdots,a}(a_{1},\ldots,a_{n}). By the induction applied to f,af_{\cdots,a}, for all u𝒯n\vec{u}\in\mathcal{T}^{n}, f,a(u)=g,a(u)f_{\cdots,a}(\vec{u})=g_{\cdots,a}(\vec{u}), or equivalently fu,(a)=gu,(a)f_{\vec{u},\cdot}(a)=g_{\vec{u},\cdot}(a). As fu,(a)=gu,(a)f_{\vec{u},\cdot}(a)=g_{\vec{u},\cdot}(a), applying now Proposition 3.3 to fu,f_{\vec{u},\cdot} and gu,g_{\vec{u},\cdot} yields fu,(t)=gu,(t)f_{\vec{u},\cdot}(t)=g_{\vec{u},\cdot}(t) for all tt, hence f(u,t)=g(u,t)f(\vec{u},t)=g(\vec{u},t). ∎

4 The algebra of binary trees is affine complete

To prove that any CP function is a polynomial function, as a consequence of Proposition 3.5 and of the fact that a polynomial function is CP, it is enough to show that the restriction f|Σnf\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}} of f:𝒯n𝒯f\colon{\mathcal{T}}^{n}\to{\mathcal{T}} to Σn\Sigma^{n} is equal to the restriction P~|Σn\tilde{P}\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}} of a nn-ary polynomial function. For such restricted functions we introduce a weakened version WCP of the CP condition, namely,

Definition 4.1.

Function g:𝒯n𝒯g\colon\mathcal{T}^{n}\to\mathcal{T} is said to be WCP iff for any idempotent mapping h:ΣΣh\colon\Sigma\to\Sigma, u,vΣn\forall\vec{u},\vec{v}\in\Sigma^{n}, h(u)=h(v)h(g(u))=h(g(v))h(\vec{u})=h(\vec{v})\implies h(g(\vec{u}))=h(g(\vec{v})), where for u=u1,,un\vec{u}=\langle u_{1},\ldots,u_{n}\rangle, h(u)h(\vec{u}) denotes h(u1),,h(un)\langle h(u_{1}),\ldots,h(u_{n})\rangle.

Every CP function is clearly WCP.

Lemma 4.2.

If gg is WCP then for all u,vΣn\vec{u},\vec{v}\in\Sigma^{n}, g(u)g(\vec{u}) and g(v)g(\vec{v}) are similar.

Proof.

As νa(u)=νa(v)=a,,a\nu_{a}(\vec{u})=\nu_{a}(\vec{v})=\langle a,\ldots,a\rangle for all u,vΣn\vec{u},\vec{v}\in\Sigma^{n} and gg is WCP, νa(g(u))=νa(g(v))\nu_{a}(g(\vec{u}))=\nu_{a}(g(\vec{v})). ∎

We often use a different form of the condition WCP, which deals only with alphabetic graftings.

Proposition 4.3.

A function gg is WCP if and only if

(GCP) (G for graftings) for all a1,a2,,anΣa_{1},a_{2},\ldots,a_{n}\in\Sigma, i{1,,n}i\in\{1,\ldots,n\} and biΣb_{i}\in\Sigma, γaibi(g(a1,,an))=γaibi(g(a1,,ai1,bi,ai+1,,an)){\gamma}_{a_{i}\rightarrow b_{i}}(g(a_{1},\ldots,a_{n}))={\gamma}_{a_{i}\rightarrow b_{i}}(g(a_{1},\ldots,a_{i-1},b_{i},a_{i+1},\ldots,a_{n})).

Proof.

Since γaibi(a1,,an)=γaibi(a1,,ai1,bi,ai+1,,an){\gamma}_{a_{i}\rightarrow b_{i}}(a_{1},\ldots,a_{n})={\gamma}_{a_{i}\rightarrow b_{i}}(a_{1},\ldots,a_{i-1},b_{i},a_{i+1},\ldots,a_{n}), clearly WCP implies GCP. The proof of the converse is by induction on nn. It is obviously true for n=0n=0.

Otherwise, let hh be a mapping h:ΣΣh\colon\Sigma\to\Sigma and let u,vΣn\vec{u},\vec{v}\in\Sigma^{n} such that h(u)=h(v)h(\vec{u})=h(\vec{v}), and let a,bΣa,b\in\Sigma such that h(a)=h(b)h(a)=h(b). By (GCP), we have γab(g(u,a))=γab(g(u,b)){\gamma}_{a\rightarrow b}(g(\vec{u},a))={\gamma}_{a\rightarrow b}(g(\vec{u},b)), hence h(γab(g(u,a)))=h(γab(g(u,b)))h({\gamma}_{a\rightarrow b}(g(\vec{u},a)))=h({\gamma}_{a\rightarrow b}(g(\vec{u},b))).

But h(γab(c))={h(c)if cah(b)=h(a)if c=ah({\gamma}_{a\rightarrow b}(c))=\left\{\begin{array}[]{ll}h(c)&\mbox{if $c\neq a$}\\ h(b)=h(a)&\mbox{if $c=a$}\end{array}\right. hence hγab=hh\circ{\gamma}_{a\rightarrow b}=h. Therefore h(g(u,a))=h(g(u,b))h(g(\vec{u},a))=h(g(\vec{u},b)), and by the induction applied to g,bg_{\ldots,b}, h(g(u,a))=h(g(u,b))=h(g(v,b))h(g(\vec{u},a))=h(g(\vec{u},b))=h(g(\vec{v},b)). ∎

Let us first study unary WCP functions whose restriction to Σ\Sigma takes its values in Σ\Sigma.

Proposition 4.4.

Assume |Σ|3|\Sigma|\geq 3. Let f:𝒯𝒯f\colon\mathcal{T}\to\mathcal{T} be WCP and such that f(Σ)Σf(\Sigma)\subseteq\Sigma. Then f|Σf\raise-2.15277pt\hbox{$|$}_{\Sigma} is (1) either a constant function (2) or the identity.

Proof.

If ff is not the identity there exist a,ba,\ b, with aba\neq b and f(a)=bf(a)=b. As γab(f(b))=γab(f(a))=γab(b)=b{\gamma}_{a\rightarrow b}(f(b))={\gamma}_{a\rightarrow b}(f(a))={\gamma}_{a\rightarrow b}(b)=b, we get f(b){a,b}f(b)\in\{a,b\}.

For c{a,b}c\not\in\{a,b\}, γac(f(c))=γac(f(a))=b{\gamma}_{a\rightarrow c}(f(c))={\gamma}_{a\rightarrow c}(f(a))=b implies f(c)=bf(c)=b. It remains to prove that f(b)=bf(b)=b. From γbc(f(b))=γbc(f(c))=c{\gamma}_{b\rightarrow c}(f(b))={\gamma}_{b\rightarrow c}(f(c))=c, we deduce that f(b){c,b}f(b)\in\{c,b\}, hence f(b){a,b}{c,b}={b}f(b)\in\{a,b\}\cap\{c,b\}=\{b\}, which concludes the proof. ∎

We now will generalize Proposition 4.4 by Proposition 4.5 (replacing a unary ff by a nn-ary gg).

Proposition 4.5.

Assume |Σ|3|\Sigma|\geq 3. If g:𝒯n𝒯g\colon\mathcal{T}^{n}\to\mathcal{T} is WCP and such that g(Σn)Σg(\Sigma^{n})\subseteq\Sigma, then g|Σng\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}} is (1) either a constant function (2) or a projection πin\pi^{n}_{i}.

Proof.

The proof is by induction on nn. By Proposition 4.4 it is true for n=1n=1. If gg is of arity n+1n+1 then, by induction hypothesis, for any aΣa\in\Sigma, the function g,ag_{\cdots,a} of arity nn is either a constant or a projection πin\pi_{i}^{n}. We first show that these functions are all equal to a given πin\pi_{i}^{n}, or all equal to a same constant, or every g,ag_{\cdots,a} is the constant function aa.

Let us assume that g,a=πing_{\cdots,a}=\pi_{i}^{n}. Let u=a,,a,c,a,,a\vec{u}=\langle{a,\ldots,a,c,a,\ldots,a}\rangle and v=a,,a,d,a,,a\vec{v}=\langle{a,\ldots,a,d,a,\ldots,a}\rangle with a,c,da,c,d pairwise disjoint, so that for any bb, γab(g(u,a))=c{\gamma}_{a\rightarrow b}(g(\vec{u},a))=c and γab(g(v,a))=d{\gamma}_{a\rightarrow b}(g(\vec{v},a))=d. It follows from the GCP condition that γab(g(u,a))=γab(g(u,b))=c{\gamma}_{a\rightarrow b}(g(\vec{u},a))={\gamma}_{a\rightarrow b}(g(\vec{u},b))=c and γab(g(v,a))=γab(g(v,b))=d{\gamma}_{a\rightarrow b}(g(\vec{v},a))={\gamma}_{a\rightarrow b}(g(\vec{v},b))=d, which is impossible if g,bg_{\cdots,b} is either a constant or a projection πjn\pi_{j}^{n} with jij\neq i. Hence all g,ag_{\cdots,a} are equal to πin\pi_{i}^{n}, implying g=πin+1g=\pi_{i}^{n+1}.

Assume now all the g,ag_{\cdots,a} are constant. For every u,v,a\vec{u},\vec{v},a, we have g(u,a)=g(v,a)g(\vec{u},a)=g(\vec{v},a). We choose an arbitrary uΣn\vec{u}\in\Sigma^{n} which will be fixed. By the induction hypothesis gu,g_{\vec{u},\cdot} is either (1) the identity, or (2) a constant cc. In case (1), for all v,a\vec{v},a, g(u,a)=g(v,a)=ag(\vec{u},a)=g(\vec{v},a)=a and g=πn+1n+1g=\pi_{n+1}^{n+1}. In case (2), for all v,a,b\vec{v},a,b, g(u,a)=g(v,b)=cg(\vec{u},a)=g(\vec{v},b)=c and gg is a constant. ∎

As CP functions are WCP, for gg a CP function such that for some a1,,anΣa_{1},\ldots,a_{n}\in\Sigma, g(a1,,an)Σg(a_{1},\ldots,a_{n})\in\Sigma, we have shown that there exists a polynomial PgP_{g}, which is either a constant aΣa\in\Sigma or an xix_{i}, such that g=Pg~g=\widetilde{P_{g}}. We will now extend to the case when g(a1,,an)Σg(a_{1},\ldots,a_{n})\not\in\Sigma.

Proposition 4.6.

Assume that |Σ|3|\Sigma|\geq 3. Let g:𝒯n𝒯g\colon\mathcal{T}^{n}\to\mathcal{T} be WCP. Then there exists a polynomial PgP_{g} such that g|Σn=Pg~|Σng\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}}=\widetilde{P_{g}}\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}}.

Proof.

Let σ(g)\sigma(g) be the common size of all the g(u),uΣng(\vec{u}),\ \vec{u}\in\Sigma^{n}. The proof is by induction on σ(g)\sigma(g).

Basis: If σ(g)=0\sigma(g)=0 then g|Σn=P~|Σn=𝟎g\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}}=\tilde{P}\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}}={\bf 0}. If σ(g)=1\sigma(g)=1 then g(a1,,an)Σg(a_{1},\ldots,a_{n})\in\Sigma and the result is proved in Proposition 4.5.

Induction: If σ(g)>1\sigma(g)>1 there exists two functions gi:𝒯n𝒯g_{i}\colon{\mathcal{T}}^{n}\to{\mathcal{T}} for i=1,2i=1,2 such that for all uΣn\vec{u}\in\Sigma^{n}, g(u)=g1(u)g2(u)g(\vec{u})=g_{1}(\vec{u})\star g_{2}(\vec{u}), with |σ(gi)|<|σ(g)||\sigma(g_{i})|<|\sigma(g)|. It remains to show that both g1g_{1} and g2g_{2} are WCP. Let u,vΣn\vec{u},\vec{v}\in\Sigma^{n} be such that h(u)=h(v)h(\vec{u})=h(\vec{v}) for some mapping h:ΣΣh\colon\Sigma\to\Sigma. Extend hh as an endomorphism 𝒯𝒯\mathcal{T}\to\mathcal{T} by Lemma 2.4, then h(g(u))=h(g1(u)g2(u))=h(g1(u))h(g2(u))h(g(\vec{u}))=h(g_{1}(\vec{u})\star g_{2}(\vec{u}))=h(g_{1}(\vec{u}))\star h(g_{2}(\vec{u})). Similarly, h(g(v))=h(g1(v))h(g2(v))h(g(\vec{v}))=h(g_{1}(\vec{v}))\star h(g_{2}(\vec{v})). As gg is WCP and h(u)=h(v)h(\vec{u})=h(\vec{v}), we have h(g(u))=h(g(v))h(g(\vec{u}))=h(g(\vec{v})). Then by Lemma 2.3 (unique decomposition) we get h(gi(u))=h(gi(v))h(g_{i}(\vec{u}))=h(g_{i}(\vec{v})) for i=1,2i=1,2. This is true for any hh, thus g1g_{1} and g2g_{2} are WCP. By the induction hypothesis there exists PiP_{i} such Pi~|Σn=gi|Σn\widetilde{P_{i}}\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}}={g_{i}}\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}}, hence g|Σn=P1~|ΣnP2~|Σn=P1P2~|Σn{g}\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}}=\widetilde{P_{1}}\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}}\star\widetilde{P_{2}}\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}}=\widetilde{P_{1}\star P_{2}}\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}}. ∎

Theorem 4.7.

If f:𝒯n𝒯f\colon{\mathcal{T}}^{n}\to{\mathcal{T}} is CP then there exists a polynomial PP such that f=P~f=\tilde{P}.

Proof.

Since ff is CP, ff also is WCP. By the previous proposition, there exists PP such that f|Σn=P~|Σnf\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}}=\tilde{P}\raise-2.15277pt\hbox{$|$}_{\Sigma^{n}}, and by Proposition 3.5, f=P~f=\tilde{P}. ∎

5 Conclusion

We proved that, when Σ\Sigma has at least three letters, the algebra of arbitrary binary trees with leaves labeled by letters of Σ\Sigma is an affine complete algebra (non commutative and non associative).

Acknowledgements.
We thanks the referees for comments which helped to improve the paper.

References

  • Arnold et al. (2020) Arnold A., Cégielski P., Grigorieff S., Guessarian I.: Affine completeness of the algebra of full binary trees. Algebra Universalis, Springer Verlag, 81, Article 55, https://doi.org/10.1007/s00012-020-00690-681:55 (2020)
  • Cégielski et al. (2015) Cégielski, P., Grigorieff S., Guessarian I.: Newton representation of functions over natural integers having integral difference ratios. Int. J. Number Theory, 11, 2109 – 2139 (2015)
  • Grätzer (1962) Grätzer G.: On Boolean functions (notes on lattice theory. II). Rev. Math. Pures Appl. (Académie de la République Populaire Roumaine) 7, 693 – 697 (1962)
  • Grätzer (1964) Grätzer G.: Boolean functions on distributive lattices. Acta Math. Hungar. 15,193 – 201 (1964)
  • Iskander (1972) Iskander A.: Algebraic functions on pp-rings. Colloq. Math. 25, 37 – 41 (1972)
  • Kaarli and Pixley (2001) Kaarli K., Pixley A.F.: Polynomial Completeness in Algebraic Systems. Chapman & Hall/CRC (2001)
  • Ploščica and Haviar (2008) Ploščica M., Haviar M.: Congruence-preserving functions on distributive lattices. Algebra Universalis, 59, 179 – 196 (2008)
  • Werner (1971) Werner H.: Produkte von KongruenzenKlassengeometrien universeller Algebren. Math. Z. 121, 111 – 140 (1971)