They do not have to prove anything.

They can just generate the same code with an AI assistant, and then it is you who cannot claim that their code infringes the copyright that you claim for the code that you have written with assistance.

So neither of the 2 parties that have used an AI assistant is able to prevent the other party to use the generated code.

I consider this as a rather good outcome and not as a disadvantage of using AI assistants. However, this may be construed as a problem by the stupid corporate lawyers who insist that any product of the company must use only software IP than is the property of the company.

These kind of lawyers are encountered in many companies and they are the main reason for the low software productivity that was typical in many places before the use of AI assistants.

I wonder how many of those lawyers have already understood that this new fashion of using AI is incompatible with their mandated policies, which have always been the main blocker against efficient software reuse.

I was talking more generally about the "You can't patent or copyright code that was generated with an LLM".

Who can prove that I didn't write the code myself? And if I did, how am I to prove it?

That goes in both directions.

It's not like there is a watermark in the code telling the whole wide world that this was AI generated or human made.

So I write code (with or without an AI assistant) and claim copyright... they generate the same code. I sue them.

How does any of us prove that we wrote the code by hand?