# Proving that operations give equal results given equal inputs

I was reading about the 9 or 12 basic properties of 'fields' (if that's what they're called) in a book called Spivak's Calculus, 3rd Edition, and got quite befuddled by dealing with as basic stuff as assuming $1 \neq 0$ (although I get that now).

But I got stuck when I wanted to conclude stuff $a \cdot c = b \cdot c$ from $a = b$ where $\cdot$ means addition, multiplication or w/e. There was no property dealing with these cases!

Someone on IRC told me that a property stating that operations give equal results given equal inputs (note: the order of the inputs is preserved; we aren't dealing with commutativity here) was implicitly assumed in the book.

Also, last year in school, we learnt about Euclid's axioms which explicitly stated stuff like this (and in a rather wordy and arbitrary way too, it seemed; unlike the rest of this group and field stuff).

My questions are:

1. What is this property actually called?
2. Does it apply to every single operation definable (except stuff like RNGs)?
3. Why wasn't this mentioned along-side other 'basic' facts in the book?
• I don't quite understand what the problem is. If $a=b$ then you may interchange $a$ and $b$ since they are the same. They are just different letters representing the same thing. Thus, $a\cdot c=b\cdot c$. QED. May 5, 2014 at 9:25
• @IttayWeiss On reflection, what you say makes sense. If $a+b=c$, then indeed $c$ is just another name for the abstract number also called $a+b$ (like C compiler text macros). I think one reason I got confused was due to Euclid's axioms (see my edit). May 5, 2014 at 14:15
• Also, just as when the properties mention $+$, they really mean any binary operation that satisfies those properties (like OR wth only 0 and 1); couldn't there be like different meanings of $=$, like in modulo arithmetic or w/e? I don't know if you'd view 1 and 5 as the same thing in mod 4 arithmetic; more like equivalent integers or something? May 5, 2014 at 14:17
• On a semi-related note: this BetterExplained article on equality helped... May 5, 2014 at 14:20

I've seen that property referred to as compatibility or congruence. It's such a low-level fact that I'm not surprised even a detailed book on calculus doesn't make it explicit. If you want to understand it better you should study logic. That rule applies to absolutely anything. It's one of the axioms of predicate calculus with equality in the Hilbert system.

$$x = y → φ [z := x] → φ [z := y]$$