In the Wikipedia article on "Peano axioms" I read this (source):
For all $a$ and $b$, if $a$ is a natural number and $a = b$, then $b$ is also a natural number. That is, the natural numbers are closed under equality.
Seems legit (to a computer scientist such as me, anyway, maybe not to a mathematician). But then in the Wikipedia article on "Closure" I read this (source):
A set has closure under an operation if performance of that operation on members of the set always produces a member of the same set.
I think the two above statements contradict each other. The first statement basically says: if an element of a set is operated on by a certain operator, the operator will not allow for elements of a different set to be the other operand, this set is considered closed under that operation. But the second statement says that the result of that operation is supposed to be of the same type (for lack of a better term). So one natural number added to another produces another natural number, so the natural numbers are closed under addition. But the equality operator produces a Boolean/truth value, not a natural number.
Question: What's the deal with equality and closure? I take it that the natural numbers are closed under equality, but how exactly? Which of the above statements is flawed?