Let’s say you and I both want to kill Bob. I sneak into his bedroom at night and smother him to death with a pillow. Bob is now dead and I sneak away—I have committed murder. Shortly afterwards, you sneak into his bedroom and shoot him multiple times with a gun. In this scenario, you are guilty of attempted murder even though the intended victim was already dead, unbeknownst to you.
Many stings rely on similar principles. People who steal bait cars don’t actually succeed in stealing the car, nor do johns who solicit streetwalking undercover cops succeed in buying sexual favors from them.
On an unrelated note, I'm surprised internet pedophiles don't ever say something like "I know you're not really a child but I'm going to pretend you are because that's hot" to create plausible deniability in the event they're not actually talking to a child.
By matter of pure legality, I suppose it would. In practicality, I doubt you could prove beyond reasonable doubt that such a person genuinely believed that witchcraft was an effective means of committing homicide.
This point is rather academic because any reasonable person believes that propositioning people on the internet who claim to be underage girls is, in fact, an effective method of propositioning underage girls.
I'd argue that it's worth discussing whether it even matters. The goal of the legal system _should_ be to make society safer. Taking a sexual predator off the streets does make society safer, even if they didn't actually commit the crime. They did _try_ to commit the crime; they believed they were committing it.
Admittedly, this falls at least partially into the realm of pre-crime. Is it fair to lock someone up because they are _going_ to commit a crime? It's in the middle ground, because they did believe they were committing the crime. But it's still also very much in the gray area as far as morality is concerned too.
You bring up an interesting question, but your examples confuse the issue.
In your examples there are always real, intended victims: the person who was being shot at with the fake gun, the person who was being given peanuts, and the copyright holder are all the intended victim (despite the attempts failing due to misconceptions on the part of the perpetator).
In such cases, a better analogy might be to someone trying to rob a bank with a fake (or a broken) gun. It's pretty clear that in such a case they would go to jail for attempted robbery.
However, in the case where an adult pretends to be a child, there's no victim. There's real intent, but the victim is imaginary.
This is similar to laws making it a crime to possess cartoon child porn. Once again, there's no victim.
... Yes? Intent matters; why let someone go just because they only tried to commit murder?