I am trying to prove that a predefined addition function is associative, but I am stuck at the step where the goal reads
plus (S x') (plus y z) = plus (plus (S x') y) z
but the only hypothesis I have is :
IHx' : forall y z : nat,
plus x' (plus y z) = plus (plus x' y) z
You should use the definition of your function plus at this point, for instance using a function to evaluate your goal such as
cbn(simplorlazymay also work). Then you obtain a goal where your induction hypothesis apply so you can finish withcongruence.By the way, the base case when
x = 0can be solved simply by computation soreflexivitysuffices.