1

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 $$

  • 1
    If $P(a,b)$ is to be $a<b$ [as you suggest in saying "aware of usual way of proving less than is transitive"], then $P(0,0)$ would be false. If it means $a \le b$ then $P(0,y+1)$ would be true. Seems a bit confusing... PS it wasn't my downvote. – coffeemath May 23 '18 at 01:36
  • 1
    Sorry for the confusion. P is just an equal to relation, but in this system I'm assuming that = exists as well. And = has the usual reflexive, symmetric and transitive properties by assumption. From PA I'm trying to prove that P does everything = does. Is there a better way to phrase this in the question? –  May 23 '18 at 01:41
  • 1
    Yes, now it makes more sense. Do naturals start at $0$ [as typical in logic]? And the free vars $x,y$ are really viewed as universally quantified? – coffeemath May 23 '18 at 01:45
  • 1
    The first property and the fourth property particularized to $x=y$, gives you that $P(x,x)$ for all $x\in\mathbb{N}$. The second property applied to $y=k-1$, for a fixed $k>0$, and the counterpositive of the fourth property applied to $y=x+k-1$, give you by induction that $\neg P(x,x+k)$ for all $x$. Similarly (using the third property) you get that $\neg P(x+k,x)$ for any fixed $k>0$ and all $x$. Therefore, if you assume $P(x,y)\wedge P(y,z)$, then $x=y=z$. Therefore, $P(x,z)$. –  May 23 '18 at 01:46
  • Can't you just prove by induction on $x$ that $P(x,y) \Leftrightarrow x = y$? – arkeet May 23 '18 at 01:47
  • @arugula IMO your commment above should be made into an answer, since it seems to settle OP's question. – coffeemath May 23 '18 at 01:49
  • @coffeemath Then, go ahead. –  May 23 '18 at 01:49
  • @arugula I meant your name on it (I didn't think of it so shouldn't get credit.) – coffeemath May 23 '18 at 01:51
  • @coffeemath Yeah, they are universally quantified natural numbers, starting at 0, with the successor function S(x) = x + 1. –  May 23 '18 at 01:51
  • @arugula Thanks. That's kind of how the proof goes for less than in the usual way, correct? Is there a way to avoid using addition? I've been thinking about this for a week and I can't come up with a way, but I would love to know if it's possible. –  May 23 '18 at 01:52
  • 1
    @Mike Is it because you only want to see successor functions, $+1$'s? That is what $+k$ is, the successor applied $k$ times. –  May 23 '18 at 01:56
  • @arkeet Sorry, I'm a bit confused. What would a formal proof of that look like? Wouldn't I just be in the same situation, proving the reflexive, symmetric and transitive laws? –  May 23 '18 at 01:57
  • @arugula Exactly. I'm wondering if it can be done without the recursive definition of addition, which is $\text{add}(x, 0) = x$ and $\text{add}(x, y + 1) = \text{add}(x, y) + 1$. That's $+k$ right? Because you're allowing (k) to vary. I'm new to this way of thinking so please correct me if I'm wrong. –  May 23 '18 at 02:00
  • 1
    One possibility that comes to mind: you can certainly prove $\forall x.P(x,x)$ and I think you can prove (by double induction) $\forall x.\forall y . x≠y\implies \lnot P(x,y)$. From this you can conclude $P(x,y)\iff x=y$ and then transitivity follows. But maybe you don't want to go that direction? – MJD May 23 '18 at 02:34
  • @MJD Thanks for your comment. Looks similar to the idea given by arkeet, in that you suggest comparing against the equality that already exists. I'm happy with any direction that works. I'm just trying to learn by proving sorta thing. –  May 23 '18 at 02:46

2 Answers2

0

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:

  • $\forall y. P(0,y) \Longleftrightarrow 0 = y$
  • $(\forall y. P(x,y) \Longleftrightarrow x = y) \Longrightarrow (\forall y. P(x+1,y) \Longleftrightarrow x+1 = y)$

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.

arkeet
  • 6,695
  • I really like the way you explicitly stated the lemmas in FOL. Thanks for that. I'm pretty slow, so give me some time to think this through. –  May 23 '18 at 02:41
  • Your method certainly works. If MJD doesn't have an answer by the end of tomorrow, I'll accept your answer. His proposed method of not using equality would be interesting, if it works. Thanks for your help. –  May 23 '18 at 03:30
0

I was somewhat interested your comment that “(1) proves (2) simply because (1) assumes what is to be proved in (2)”. This sounds like a very common misunderstanding of how inductions works. For example, this question asks something very similar-sounding:

In the next step, one assumes the $n$th case is true, but how is this not assuming what we are trying to prove? Aren't we trying to prove any $n$th case is true? So how can we assume this without employing circular reasoning?

$\def\ri{{\color{darkred}{\implies}}} \def\gi{{\color{darkgreen}{\implies}} }$

This isn't the place to explain induction de novo, which would make this already too-long answer even longer, so I'll try to summarize, without trying to justify the logic. Suppose $\Phi(n)$ is some claim about the number $n$. Induction says that from $$\bbox[5px,border:2px solid red]{\Phi(0)}\tag{$\cdot$}$$ and $$\bbox[5px,border:2px solid red]{\forall k. \Phi(k)\gi\Phi(k+1)}\tag{$\cdot\cdot$}$$ we can conclude $$\bbox[5px,border:2px solid red]{\forall n.\Phi(n).}\tag{$\cdots$}$$

There are two important subtleties in the notation here:

  1. $(\cdot\cdot)$ can be confusing; the scope of the $\forall$ extends all the way to the right, so that $(\cdot\cdot)$ is an abbreviation for $$\forall n.( \Phi(n)\gi\Phi(n+1))\tag{$\stackrel{\cdot\cdot}\smile$}$$ and is not the same as $$ (\forall n. \Phi(n))\gi\Phi(n+1)\tag{$\stackrel{\cdot\cdot}\frown$}$$

  2. Although the variables in $(\cdot\cdot)$ and $(\cdots)$ are often written with the same letter, typically $n$, they are logically unrelated. I used different letters to make this clear.

In my original post, I suggested a sequence of lemmas, which I will now try to explain in more detail. Let us consider the following claim, which I will call $\Phi_0(n)$:

$$\forall z. P(0,n)\land P(n,z)\ri P(0,z).$$

This has a free variable, $n$, so it is neither true or false. it is a claim about an unspecified number $n$, and might be true for some values of $n$ and false for others. For example, this is claim $\Phi_0(17)$:

$$\forall z. P(0,17)\land P(17,z)\ri P(0,z).$$

Notice that it has no free variables, and so must be either true or false. (In fact it is true.)

I have used a red implication sign in $\Phi_0$ so that we can tell it apart from the green implication sign that appears in the induction part of an induction proof.

Following the pattern in the red boxes above, induction says that if we can prove $$\begin{align} \Phi_0(0)& \tag0\\ \forall k.(\Phi_0(k)& \gi \Phi_0(k+1))\tag1 \end{align}$$ then by induction we can conclude

$$\forall n.\Phi_0(n).\tag2$$

Replacing $\Phi_0$ with its definition, this says that if we can prove

$$\forall z. P(0,0)\land P(0,z) \ri P(0,z)\tag0$$ and $$\begin{align} \forall k.&((\forall z. P(0,k) &&\land P(k,z)&&\ri P(0,z))\\ &&&\gi\tag1\\ &(\forall z. P(0,k+1)&&\land P(k+1,z)&&\ri P(0,z))) \end{align}$$

then by induction we can conclude $(2)$, which is

$$\forall n.\forall z. P(0,n)\land P(n,z)\ri P(0,z).\tag2$$

Notice that $(1)$ contains three implications: the green one was there before, because the induction step requires it, and also each instance of $\Phi_0$ contains a red one. In $(1)$, we're not proving that $a\implies b$; we're proving that if $a\implies b$ then $c\implies d$.

You agreed that $(0)$ was trivial, and I still think that $(1)$ should be provable. From these, induction says we can conclude $(2)$.

Okay, this would be a good place to pause and take a rest.


Now we consider $(2)$ as the base case of its own induction. Define $\Phi_2(n)$ to mean $$\forall y.\forall z. P(n,y)\land P(y,z) \ri P(n,z).$$ As in all induction proofs, the claim has exactly one free variable, $n$ in this case. We would like to prove $\forall x.\Phi_2(x)$, because this is exactly the theorem you said you were trying to prove. How can we do this?

Again, following the same pattern from the red boxes, induction says that if we can prove

$$\begin{align} \Phi_2(0)& \tag{$2'$}\\ \forall k.(\Phi_2(k)& \gi \Phi_2(k+1))\tag3 \end{align}$$

then we can conclude

$$\forall n.\Phi_2(n).\tag4$$

which is exactly what you are looking for, but with $n$ instead of $x$, which does not matter. Expanding $\Phi_2$ in these premises, we find that if we can prove

$$\forall y .\forall z. P(0,y)\land P(y,z) \ri P(0,z)\tag{$2'$}$$ and $$\begin{align} \forall k.&(\forall y.\forall z. P(k,y) &&\land P(y,z)&&\ri P(k,z))\\ &&&\gi \tag3\\ &(\forall y.\forall z. P(k+1,y)&&\land P(y,z)&&\ri P(k+1,z))) \end{align}$$

then we can conclude $(4)$ which is what you want. Item $(2')$ is already done; it is identical with $(2)$ except that the letter $n$ has become a letter $y$. I am pretty sure that $(3)$ is also doable, although I think you might need a third lemma along the way.

In any case, this is the general pattern, which does not depend on any trick such as a special property of $\Phi$.

The only other thing I would like to add is that this combined pattern, where you have a formula with two variables and you use induction on one variable and then the other, is not some crazy thing I made up, but is common enough to have a name; it is called a “double induction” and in more advanced mathematics one often sees things like “and then we can prove $\Phi(x,y)$ for all $x$ and $y$ via a straightforward double induction.” The general pattern is that from these:

$$\begin{align}\Phi(0,0)& \\ \forall j.\Phi(0,j)& \implies \Phi(0,j+1) \\ \forall k.(\forall n.\Phi(k,n))& \implies (\forall n.\Phi(k+1,n)) \end{align} $$we can conclude $$\forall m.\forall n.\Phi(m,n).$$

One can of course extend this pattern to triple induction and so forth. I rather wish now that I had started my answer with this point, but I can't justify another rewrite. Sorry!

The rest of this post is my original answer, which you have already read. I left it here fore reference.


I haven't thought this through (I'm in bed, and I'll try to come back in the morning and fill in details) but I think you ought to be able to proceed via the following sequence of lemmas:

$$\begin{align} \forall z.P(0,0)\land P(0,z)&\implies P(0,z)\qquad\tag{0}\text{(trivial)}\\ \forall z.(P(0,y)\land P(y,z) \implies P(0,z))&\implies(P(0,y+1)\land P(y+1,z) \implies P(0,z))\tag{1}\\ \forall y.\forall z.(P(0,y)\land P(y,z) &\implies P(0,z))\tag{2}\\ \forall y.\forall z.(P(x,y)\land P(y,z) \implies P(x,z))&\implies(P(x+1,y)\land P(y,z) \implies P(x+1,z))\tag{3}\\ \forall x.\forall y.\forall z.P(x,y)\land P(y,z) &\implies P(x,z)\tag4 \end{align} $$

You get $(2)$ from $(0)$ and $(1)$ by induction on $y$, and then you get $(4)$ from $(2)$ and $(3)$ by induction on $x$. And $(4)$ is the theorem you wanted to prove. The key point is that each induction step adds only one quantifier, and you need three quantifiers. The first one is so easy you can get it for free, so you need two inductions.

Although it's possible that to get $(3)$ you'll need to do another induction on $y$; like I said, I haven't worked it all out.

The observation that $P$ is equality is a trick, which happens to work for this particular example. But in general you would need to use the pattern above, and I think that's what you were looking for.

MJD
  • 65,394
  • 39
  • 298
  • 580
  • If this works, then I'm happy to accept it as the answer. But It seems that (1) proves (2) simply because (1) assumes what is to be proved in (2). As you've stated, it's easy to prove $P(0,0) \wedge P(0, z) \Rightarrow P(0, z)$, and it's certainly possible to prove $P(0, y) \wedge P(y, z) \Rightarrow P(0, z)$, but I'm not sure that gets us any closer to $P(x, y) \wedge P(y, z) \Rightarrow P(x,z)$. –  May 23 '18 at 03:19
  • 1
    @mike I have expanded the explanation in much greater detail. I hope this makes my plan clearer. There is a lot to read, but I think if you take it slowly, one step at a time, you will be able to follow it. – MJD May 29 '18 at 15:45
  • Thanks for taking the time to write this up. I'm familiar with induction but still getting to grips with double induction. Your response is very helpful. Unfortunately, I can't accept this as an answer yet, because of this statement: "I am pretty sure that (3) is also doable, although I think you might need a third lemma along the way." What would this third lemma be? I don't need a proof of the lemma. It's just that I don't know which lemma is worth proving. I wrote your arguments in Isabelle and indeed it all works up to (3), just as you illustrated. –  May 30 '18 at 23:08