My definition of add is as follows:
Fixpoint add n m :=
match n with
| 0 => m
| S p => add p (S m)
end.
Later in the file I am trying to prove the following goal:
add (S n) 0 = S n
I call simpl
command expecting it to reduce
add (S n) 0
to add n (S 0)
.
Instead it reduces
add (S n) 0
to add n 1
I suspect simpl
command executes multiple steps as long as it can execute.
My question: is there a command that would make a one step reduction, reducing
add (S n) 0 = S n
to
add n (S 0) = S n
?