There's only so many ways to write a function to calculate the nth Fibonacci number. What you have in the music industry would be akin to the first person to copyright such a function would be able to prevent everyone else from publishing a function using the same algorithm.
Programming is not art. A function is not an artistic expression. Give a number of programmers same problem, and you will often find that two or more programmers independently arrive at very similar solutions.
In software we often emphasize clean room implementations: If you can show that you made an effort to *not* copy a body of source and develop it independently, we allow more similarities, simply because we recognize that such similarities may arise from similar trains of thought. If you do not look at the body of source, didn't look before you started, and can reasonably explain why you designed your source the way you did, it becomes a burden to prove copyright infringement.
But what if you are using a tool to coach or even coerce your train og thoughts, and that tool indeed *did* look at the body of source?
It seems to me that we need to establish when it becomes too "inspired" and when you could reasonably have arrived at the same formulation yourself.