Equational Theories

10 Some abstract nonsense

This is an alternate presentation of the material of the previous section, where we use the “abstract nonsense” of free magmas in the presence of a theory as the conceptual foundation.

Definition 10.1 Free magma relative to a theory
#

Let Γ be a theory with an alphabet X. A free magma with alphabet X subject to the theory Γ is a magma MX,Γ together with a function ιX,Γ:XMX,Γ, with the following properties:

(i)

MX,Γ obeys the theory Γ: MX,ΓΓ.

(ii)

For any magma M obeying the theory Γ and any function f:XM, there exists a unique magma homomorphism f~:MX,ΓM such that f~ιX,Γ=f.

Such magmas exist and are unique up to a suitable isomorphism:

Theorem 10.2 Existence and uniqueness of free magmas

Let Γ be a theory with alphabet X.

(i)

There exists a free magma MX,Γ with alphabet X subject to the theory Γ.

(ii)

If MX,Γ and MX,Γ are two free magmas with alphabet X subject to the theory Γ, then there exists a unique magma isomorphism ϕ:MX,ΓMX,Γ such that ϕιX,Γ=ιX,Γ.

We remark that the ordinary free magma MX corresponds to the case when Γ is the empty theory.

Proof
Example 5 Free associative magma
#

Let Γ consist solely of the associative law, Definition 2.46 (so X contains 0,1,2). Then one can take MX,Γ to be the set of nonempty strings with alphabet X, with magma operation given by concatenation, and ιX,Γ(x) being the length one string x. It is a routine matter to verify that this obeys the axioms of a free magma subject to Γ.

Example 6 Free associative commutative magma
#

Let Γ consist of the associative law (Definition 2.46) and the commutative law (Definition 2.18). Then one can take MX,Γ to be the free abelian monoid N0X0 of tuples (nx)xX with the nx natural numbers, not all zero, with all but finitely many of the nx vanishing, with the magma operation given by vector addition, and with ιX,Γ(x) being the standard generator of NX associated to xX; one can think of this space as the space of formal non-empty commuting associating sums of X. It is a routine matter to verify that this obeys the axioms of a free magma subject to Γ.

Example 7 Free left absorptive magma
#

Let Γ consist of the left absorptive law (Definition 2.4). Then one can take MX,Γ to be X with the law xy=x, and ιX,Γ to be the identity map. It is easy to see that this is indeed a free magma subject to Γ.

Example 8 Free constant magma
#

Let Γ consist of the constant law (Definition 2.20). Then one can take MX,Γ to be the disjoint union X{0} of X and another object 0, with ιX,Γ being the identity embedding, and with the zero magma law xy=0 for all x,yX{0}.

Free magmas can be used to characterize entailment by Γ in terms of a canonical invariant.

Theorem 10.3 Canonical invariant

Let Γ be a theory with some alphabet X, and let MX,Γ be a free magma with alphabet X subject to Γ, with associated map ιX,Γ:XMX,Γ. Then for any w,wMX, we have

Γww if and only if φιX,Γ(w)=φιX,Γ(w).
Proof

Every theory Γ then gives a metatheorem about anti-implication:

Corollary 10.4 Criterion for anti-implication

Let Γ be a theory with some alphabet X, and let MX,Γ be a free magma with alphabet X subject to Γ, with associated map ιX,Γ:XMX,Γ. Let ww and ww be laws with alphabet X. If one has

φιX,Γ(w)=φιX,Γ(w)

but

φιX,Γ(w)φιX,Γ(w),

then the law ww cannot imply the law ww.

Proof
Example 9
#

Let Γ be the associative and commutative law, so that we can take MX,Γ=N0X0 as in Example 6. One can then check that for any word wMX, that φιX,Γ(w) is the tuple that assigns to each letter x of the alphabet, the number of times x appears in w. We conclude that if w,w have the same number of occurrences of each letter of the alphabet, but w,w do not, then ww cannot imply ww. This recovers Theorem 4.8.

Example 10
#

Let Γ consist of the left absorption law, so we can take MX,Γ=X as in Example 7. Then φιX,Γ(w) is the first letter of w. We conclude that if w,w have the same first letter, but w,w do not, then ww cannot imply ww.

Example 11
#

Let Γ consist of the constant law, so we can take MX,Γ=X{0} as in Example 8. Then φιX,Γ(w) is x if w is just a letter x of the alphabet, and 0 otherwise. We conclude that if w,w,w have order at least one, but w has order zero, then ww cannot imply ww; this is basically Theorem 4.7.

Example 12
#

Let Γ be the theory consisting of the commutative and associative laws, and an additional law xnyn for a fixed n, where xn denotes the magma operation applied to n copies of x (the order is irrelevant thanks to associativity), then one can check (for finite X) that the free magma MX,Γ can be taken to be (Z/nZ)X with the addition operation, and ιX,Γ(x) being the standard generator associated to x. Then for any word w, φιX,Γ(w) corresponds to a tuple that assigns to each letter x of the alphabet, the number of times x occurs in w modulo n. We conclude that if w,w have the same number of occurrences modulo n of each letter of the alphabet, but w,w do not, then ww cannot imply ww. This is a stronger version of Theorem 4.8.

10.1 Confluent theories

One promising source of theories Γ for which the free magma MX,Γ can be understood are the confluent theories.

Definition 10.5 Confluent theory

Let Γ be a theory. A word w can be reduced to another w if one can get from w to w by a series of substitutions of laws in Γ, where no substitution increases the length of the word this is a working definition, might not be the best one to keep.. A theory Γ is confluent if whenever a word w can be reduced to both w and w, then both w and w can be reduced further to a common reduction w~. As such, each word wMX should have a unique simplification to a reduced word wΓ in some normal form, for instance the shortest reduction that is minimal with respect to some suitable ordering such as lexicographical ordering.

Example 13
#

The associative law, Definition 2.46, appears to be confluent check this.

Example 14
#

The theory consisting of both the associative and commutative laws, Definition 2.46, Definition 2.18, appears to be confluent check this.

Example 15
#

The idempotent law, Definition 2.3, appears to be confluent check this.

The significance of confluent theories lies in

Theorem 10.6 Free magma of a confluent theory

Let Γ be a confluent theory. Then the free magma MX,Γ subject to this theory can be described as the space of reduced words in MX in normal form, where the operation wΓw on this magma is defined as the normal form reduction of ww, and ιX,Γ is the identity embedding (note that every single-letter word is already in normal form).

Proof
Corollary 10.7 Criterion for anti-implication

Let Γ be a confluent theory. Then a law ww is a consequence of Γ if and only if w,w have the same normal form reduction. In particular, a law with this property cannot imply a law without this property.

Proof

It is thus of interest to locate some confluent laws. Here is a non-trivial example:

Theorem 10.8 477 confluent

Definition 2.27 is confluent.

Proof
Lemma 10.9 477 lemma

If Z and W are simple, then Z(W(WW)) is simple.

Proof