Yes, I know a good woman and use cheating to turn this woman into a neighbor. Dating becomes a lover. After becoming a lover, she asked for cohabitation. When she got home from marriage, she introduced her husband.
"Dating becomes a lover". This threw me off somewhat because the game uses inconsistent terminology between what is displayed to the player, and what is internally used in the script. "Dating" is a scripting term, which displayed to the player as girl/boyfriend. "Lover" is a game term which displayed to the player, which internally called "Affair". So excuse my confusion, are you saying you turn someone you date to someone you have an affair with?
I would assume that you mean, you turned some girl/woman into a neighbor, then date that neighbor. After that you marry her, and some point later, she introduced you to her "other" husband.
After thinking hard on how this is possible, I deduce this is related to a problem I'm starting to discuss with
You must be registered to see the links
, a major hole in relationship processing. The reason you are experiencing this is you turned her into a neighbor in the 1st place. There is a scene which involve a neighbor introducing his/her spouse. The game do not list all of the relationship an NPC has to the player, only the latest/somekind of override hierarchy. I suspect that even after you marry her, she still is your neighbor, but the game only list her as "Wife". This is why he 'neighbor introducing spouse' scene still fires. Furthermore, I do suspect the API used in that scene to check whether an NPC is already dating/married is only targeting other NPC, but not the Player (at least, I haven't see that function used in context of checking relationship to the player in the scripts). The game has 3 separate functions for this which I can't understand why not only 1 universal function. I have to do some testing on that.
Another possibility is the API correctly checks the relationship to the player, but the relationship isn't updated yet. You said "immediately after the wedding scene". The game won't update it's internal data in the course of a script run. Only after the script is finished running does the internal data updated. When the wedding scene is running, the script sets your GF as your wife, but the game won't recognize her as such until the wedding scene script is finished. Imagine that in the course of the wedding scene run, the game schedule other scene to run, which so happen it's the "neighbor introduce spouse" scene. The check against cases such as she's your wife fails because the wedding scene isn't finished yet, hence the game still not recognize her as your wife. After the wedding scene ends, the neighbor scene immediately fires, introducing you to her other husband. This depends on how scene triggers actually work.
In the meantime, try removing the "other" husband by deleting him, and turn your newly wedded wife to be not your neighbor.