I'm studying Peano arithmetic and I created this problem as a challenge to myself, but I've failed. I want to prove that the following relation P, which is defined recursively, is transitive. I know that it must be proven by induction, but I can't seem to figure out the lemmas I would need. Is this an easy thing to prove? Why can't I see it?
I'm aware of the usual way of proving that less than is transitive, but I'm trying to avoid the definition of addition for the sake of challenge.
Definition of P, for all natural numbers x and y: $$ P(0, 0) \\ \neg P(0, y + 1) \\ \neg P(x + 1, 0) \\ P(x + 1, y + 1) \Leftrightarrow P(x, y) $$
What I'm trying to prove: $$P(x, y) \wedge P(y, z) \Rightarrow P(x, z)$$
Edit: The definition I want to know if I can avoid, or the intuition behind why it's necessary:
$$ \text{add}(x, 0) = x \\ \text{add}(x, y + 1) = \text{add}(x, y) + 1 $$
Expanding on my comment, we prove $\forall x \forall y. P(x,y) \Longleftrightarrow x = y$; then clearly $P$ is transitive since $=$ is. We can prove it by induction on $x$, that is, show:
The base case is obvious. So to prove the induction step, assume for given $x$ that for all $y$, $P(x,y) \Longleftrightarrow x = y$. If $y = 0$ then clearly $P(x+1,y) \Longleftrightarrow x+1=y$ since both sides are false. Otherwise, $y = z+1$ for some $z$; then $$P(x+1,z+1) \Longleftrightarrow P(x,z) \Longleftrightarrow x=z \Longleftrightarrow x+1 = z+1,$$ where the middle equivalence is from the induction hypothesis.