After posting in arxiv the author finds that proof technique in the paper has some similarity with some discussions in a math forum
It's just an independent discovery.  That it was on the web versus a journal is just a detail (could have even be neither, like from a verbal talk).  Although the informal nature of the other work does make it a little more understandable that you missed it when you did a background search (even so, obscure archived articles can be missed also).

I wouldn't feel some need to update the arxive paper.  These things happen all the time.

If you do an update of the arxive (which I see more as a preprint server, but this is a different debate), into an archived real journal, I would cite the other work at that time.  I personally think it is possible to gently note that the other work was noticed after your discovery.  (Buffy disagrees--too personal.  But I think you can adroitly manage it.)