this... is technically not infidelity? Chat, is it the intent of the perpetrator or the state of reality the most important in determining a crime?
If you intend to commit a crime and proceed under the assumption that you did, in fact, commit the crime then you can certainly be tried for
attempting the crime at the very least. Like imagine if someone caught you stabbing someone's bed only it turns out there was a bundle of sticks in it, that's still attempted murder. At least under most jurisdictions.