It may be a good idea to skip this lecture first and to go directly to the chapter on term rewriting systems and to come back here for definitions as needed.
For this course, the current chapter is more background and only essential for those who want to go deeper into universal algebra or term rewriting. Having said this, it leaves a gap when ignored.
As we have seen, both solving equations in algebra and program execution in an ARS are special cases of equational reasoning. This leads to the following
Question: What precisely do we mean when we say that an equation
We have also seen that equations can or cannot hold in an algebra. For example, in the term-algebra
Question: What precisely do we mean when we say that an equation
Can we always derive all equations that are true in all algebras (possibly satisfying some axioms)? In other words:
Question: Are the rules of equational logic complete?
In this lecture we will answer some of these questions and more.
We can profit from our understanding of free algebras/term algebras in order to understand equations precisely.
Definition: Let
Instead of
Reminder: When we write
Remark: Let
Conceptually, we have already seen the importance of equivalence relations in many examples. We have also seen the importance of structure preserving maps. In this section we study congruence relations, which are structure preserving equivalence relations.
What is the idea of a structure preserving equivalence relation?
The reason why equivalence relations are so important is that they allow us to take quotients of sets. More precisely, whenever we have an equivalence relation
mapping an element of
But what if
What to we need to add to the notion of equivalence relation in order to make sure that
If the structure in question is algebraic, as given by a signature, then the answer is that we need the equivalence relation to be a congruence relation.
The clock is a homomorphism
As every function,
The same equivalence relation can defined purely in terms of
Moreover, the second definition allows us to get back
since
One question remains. We know that
Which property of
The property that
The Clock is neither fast nor slow but measures time the same everyday.
More precisely, if on two different days the clock shows the same time, and on both days I wait
Even more precisely, in symbolic notation:
We arrived at the definition of a congruence relation in case we have one unary operation "
More technically, the most important insight about equational logic is that the rules of equational logic capture what it means to be a surjective homomorphism (=structure preserving map).
Definition: A congruence relation on an algebra
for
Let
Let
Moreover, homomorphism and congruences determine each other in the following sense. If
Remark: Notice that this is universal algebra terminology for what we discussed in the lecture on meaning in syntax. If
The proposition on congruence relations is essentially a completeness theorem for equational reasoning without variables. For a full explanation of this, we need more mathematical machinery to be developed below. But the basic idea can be exlained now:
Let
Let
In the lecture on induction, we have seen that, given a set of equations
So to say that the equation
There is another take on consequence. We write
to mean that whenever an algebra
This leaves us with the task to explain what it means for an equation to hold for an algebra
Definition: Let
We say that
if for all homomorphisms
we have
to say
An important theorem, called the soundness and completeness theorem of equational logic states that these two notions of consequence are equivalent.
Theorem:
Proof: (Sketch) Soundness is the direction from left to right. By induction on the definition of
Remark: This sketch does has some gaps. Most importantly, that the term algebra quotiented by
In the section on congruence relations, and in the remark on completeness in particular, we argued that the proposition on congruence relations is a completeness theorem of equational logic without variables.
More precisely, a completeness theorem of equational logic in which variables are treated like constants in the sense that the rule of substitution is not admitted. For example, it would not be possible to deduce from
It is our aim to extend congruence relations to the case with variables. For this we need to consider special congruences. The basic idea is clear, once we remember the rules of equational logic:
Equivalence relations are reflexive, transitive and symmetric.
Congruence relations add the congruence rule.
Fully invariant congruence relations add the substitution rule.
This is done in the following way. Recall that substitutions on the term algebra are exactly the homomorphisms. The next definition is based on this idea and just that it replaces the term algebra by an arbitrary algebra
Definition: A fully invariant congruence relation on an algebra
Proposition on fully invariant congruence relations:
…