Damages get awarded for invalid patents.
This statement pretty much sums up how you and probably the author of the comment to which I responded are talking about something different than I am - and different from what many other readers would understand.
You're apparently talking about some kind of spiritual quality of a patent you call "invalid." I'm talking about what people care about more in discussing patent law: under what conditions can you expect to be forced to pay someone something? That's why most people say that whatever the courts decide is by definition the law, but apparently in your terminology, a court can get the law wrong.
You are correct to say that if a device using Code A infringes a patent, then another device using Code C to do the same thing will also infringe. But that is a clear statement that the patent protects an idea, ...
I wouldn't say it's clear. Patent claims come in all levels of abstractness, and the border between claims that describe a reduction to practice and those that merely state an idea is wide and fuzzy. That's why there are trials. Long ones.
Based on a scant exposure to patent law, it seems to me patents are being enforced on ideas, algorithms, and obvious inventions all the time, but if you ask me what patents are valid, I'm going to talk about the ones that can be enforced, not my impressions.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds