-1

Suppose there is a proposition $P(n,m)$ is true for all $n<m$. I would like to prove using mathematical induction, but how should I apply induction? Should I assume $P(n,m)$ is true and prove $P(n+1,m+1)$ is true or should I prove $P(n+1,m)$ is true for $n<m-1$ ??

Mat
  • 151
  • Make sure you don't skip values...jumping from $(n,m)$ to $(n+1, m+1)$ skips $(n, m+1)$ and $(n+1,m)$. A common device is to do induction on the sum $n+m$ but, absent context, it's hard to know if that is applicable to your situation. – lulu Feb 24 '25 at 12:43
  • 3
    What is the property $P$ you're thinking of? There are many (apparently) different ways to approach the question. Choosing the most suitable one also depends on the property $P$ you want to prove, and what you already know and can take for granted. – Taroccoesbrocco Feb 24 '25 at 12:43

2 Answers2

3

The general idea is to reason by structural induction on the proof/witness of $n < m$. There are several ways to define $n < m$ inductively, and accordingly there are several valid induction structures.

One way is to say that $- < -$ is inductively generated by the clauses

$$ \begin{align*} 0 &< n + 1 \\ n < m \to n+1 &< m+1 \end{align*} $$

With this definition, your base case would be to prove that $P(0, n + 1)$ is true for all $n$, and your inductive step would assume $P(n, m)$ and prove $P(n +1, m + 1)$.

Alternatively, one can define $- < -$ as being inductively generated by the clauses

$$ \begin{align*} n &< n + 1 \\ n < m \to n &< m+1 \end{align*} $$

In this case your base case would be $P(n, n+1)$ and your inductive step would assume $P(n, m)$ and prove $P(n, m+1)$.

See the Agda standard library for a formalisation of both definitions (as _<_ and _<′_ respectively).

1

Hint: You will need to apply proof by induction twice. You need to prove:

$~~~~~\forall a:[a\in N\implies \forall b:[b\in N\implies[a\lt b\implies P(a,b)]]]$

The first step is to prove by induction that:

$~~~~~~\forall b:[b\in N\implies[0\lt b\implies P(0,b)]]]$

  • What if I prove by assuming $P(k,m)$ is true for all $k<m$ and then prove it is true for $P(k,m+1)$ where $k<m+1$, does it sound reasonable? And I believe it only prove with one induction right? – Mat Feb 24 '25 at 23:54
  • @Mat I don't know if your suggestion will work. I have used my method successfully many times. My "first step" here is used in the 2nd proof by induction for the base case. – Dan Christensen Feb 25 '25 at 15:05