I tough that induction n, m would create induction hypothesis for n and m but after some tries this seems not be the case. BTW I'm assuming forall (n m : nat).
So what is the difference of induction n, m induction n. induction m and induction n; induction m?
Here is my currently understanding:
I know that ; is a combinator so that a; b replays b on every subgoal generated by a, so induction n; induction m will generate an induction hypotesis for m for each subgoal of induction n is this right?
And in the same sense induction n. induction m would generate induction hypotesis only for the current goal so that this seems not particularly useful
I expected induction n, m to be like induct on this two variables this generate four goals for natural numbers as I expected, but I expected IHm to be on context on the 4th goal but it isn't! What I'm missing?
--
Still researching on this, it seems that the IHm is merged in IHn at the 4th goal, is this correct?
-- edit 2
Here is some example based on addition commutativity
So first the induction n, m version:
Example add_comm' : forall (n m : nat), n + m = m + n.
intros. induction n, m; try auto using plus_n_O.
This solves the trivial 3 first goals and leave me with the 4th goal with
n, m : nat
IHn : n + S m = S m + n
========================= (1 / 1)
S n + S m = S m + S n
Now the induction n; induction m version:
n, m : nat
IHn : n + S m = S m + n
IHm : n + m = m + n -> S n + m = m + S n
========================= (1 / 1)
S (n + S m) = S (m + S n)
So for this particular case induction n, m is better but I can't explain (and understand) what it is doing.
In the manual the only case for , in induction is
Variant
induction term+, using qualidThis syntax is used for the case qualid denotes an induction principle with complex predicates as the induction principles generated by Function or Functional Scheme may be.
But I'm not using using qualid so I'm not sure if this is the case
-- edit 3 --
As Andrey said in its comment, the using qualid variant is the one being triggered but I have no idea what is the explanation for what it does.