## Monday, August 16, 2004

### algebras, theories, and calculuses

In the post on non-numeric algebras, it may have occurred to you that I was leaving out some kinds of rules. For example, how do I know that I can add a number to both sides of an equation and the equation remains true? Is this part of the algebra of arithmetic? The rule might look something like this:

substitution in +: if a=b then a+c=b+c

This rule says that if you know that a is the same as b, then you can infer that a+c is the same as b+c. This rule is not part of the algebra of arithmetic. Part of the reason is that the rule would be too limited in scope if it were part of arithmetic. The rule isn't just true for addition, but also for all other functions. A more complete rule would be

substitution: if a=b then f(a)=f(b)

where f is any function or operation at all. We can say even more than that. Let P be any property at all. We write P(x) to say that x has property P. Then

indistinguishability: if a=b then P(a) if and only if P(b)

This says that there is no property at all that lets you distinguish between two equal values. All of this is part of the theory of equality, not the algebra of arithmetic. Algebras just assume this theory of equality. A theory is like an algebra except that where algebras deal with operations, theories deal with relations (like equality). (Beware: "theory" is one of the most confusingly overloaded words in mathematics. In different contexts it means different things). Here are the other rules associated with the theory of equality:

reflexivity: a=a
symmetry: if a=b then b=a
transitivity: if a=b and b=c then a=c

Well, that's one answer to the question, "how do I know that I can add a number to both sides of an equation and the equation remains true?". The other answer is that we are dealing with an algebra rather than with a calculus. A calculus is a set of rules for transforming expressions or equations. It is different from an algebra or a theory in that it views the equations as objects in their own right rather than as merely symbols for communication. This is not an obvious point, so let me try to illustrate with an example. Consider a sentence:

s1: Joe was wearing a brown sock and a black sock.

q1a: How many socks is Joe wearing?
q1b: What is wrong with the way Joe is dressed?
q1c: What can you guess about Joe's sock drawer or laundry basket?

These questions are all about Joe and his socks. They rely on your understanding of the meaning of the sentence. The other sort of questions are like this:

q2a: How many times does the word "sock" appear in the sentence?
q2b: How many words occur twice in the sentence?
q2c: What is the subject of the sentence?

These questions are about the sentence itself. They don't require any understanding of the sentence meaning. Even q2c only requires an understanding of the sentences structure, not its meaning. For example you can pick out the subject of

s2: The plu are delarkable this morning.

and you can do it without having any idea what the sentence means.

This is the difference between equations in an algebra and equations in a calculus. An algebra only uses equations as a way to express meaning. They deal with the meaning. You can use any knowledge you have, including a theory of equality because you are dealing with real mathematical objects. A calculus deals only with the equations themselves, ignoring the meaning. (What you learn in "calculus" textbooks is not really a calculus in this sense).

In a calculus, you need rules like substitution in +. You can't rely on outside knowledge because there isn't any outside knowledge other than the structure of the equation. If we were interested in a calculus of arithmetic, we would write transformation rules for formulas rather than rules expressing properties of numbers and operators. A transformation rule says, "if you have an equation that looks like this, you can change it to an equation that looks like that." Here is how transformation rules are typically written:

 + introduction: a=b a+c=b+c

Given any equation that looks like the one on the top, you can transform it to the one on the bottom.

If you are dealing with a calculus, you aren't allowed to do anything that isn't strictly permitted by the transformation rules. By contrast, if you are dealing with an algebra or theory, you can use your outside knowledge to reason about the equation.