First, your child is not at odds with you or anyone else -- not in his view. I hated when people would try to teach me things. At a very young age I even declared openly to my mother that I would not learn from her mistakes; that sometimes learning from my own mistakes was the best way to learn.
You said, "especially if he is not able to do it himself instantly." So what? It's perfectly acceptable to fail on your first try. Thomas Edison didn't have anyone around demanding to show him how to invent something when he failed the first time. Who wants to feel creative and have some other person come in and crash on their creativity?
Your bullet point number 2 is typical of highly creative people (and those with ADHD [yes, I am both.]) When I would get nagged about something where I was perceived as not complying with someone else's timeframe or wishes, I would just give up -- "I don't want to go!", ... and I would stick to my guns. It was my terms or not at all.
Now, for #3... If I came to your house to teach you about programming in Java for Android devices, how would you react? And, if you're a programmer, then if I came to your house to discuss the nature of Ayn Rand's philosophical writings, Graham Hancock's Fingerprints of the Gods, etc... and presented my way as the way, how would you react?
Can you see how other people are wearing on him? It is easy to see our children from our own eyes, but let's walk in their shoes.
Now that we've taken a look through what are similar eyes to his...
When others try to teach or instruct, I'd tell them to let him keep working it out and tell him that if he would like a hint or some help, to let you know.
When he's distracted, ask him if there is something you can do to help him prepare. Coming across as helping him achieve his goal will allow him to "make it his own" and by offering a hand, will likely focus his energies since assistance is something he doesn't want.
"He starts an endless discussion" is not possible. It takes two to have a discussion. And only questions, explicit or implied, keep it going in such a type of discussion. First, if it's something you as the parent are requiring him to do, then state it that way and clearly state that you are not willing to discuss it further (he won't like it, but he will have no other choice since none have been presented as acceptable). Second, if it's about showing/teaching, then why can't he engage is such a conversation? Is the point not for him to learn?
He wants to learn. He wants to learn on his own. Grant him that. What will it really hurt?
For those who are set out to show/teach him things, have them back off. He knows how to go to the bathroom, take a shower, brush teeth, etc., so leave the rest of the Universe open to exploration... I am sure he will amaze you!