1st thing, you really should seek legal council from a family law attorney, not some housing forum here where people here have absolutely no idea how the law works in divorce cases.
That said, since you asked and since I’m a member of the divorced club, the situation really depends.
What I sense from how you worded your question and your “scenarios” (Honestly, there really is no SET scenario IMO), but they all sound like you (hypothetical you or friend) wants some money back since you put a good chunk of your savings into the house.
Honestly, I think you’re fighting a losing battle here and the money is gone. Also, if the house went UP in value, will you claim it was all your investment so you should get near all the gain?
All that said, from what I’ve read/did in my own situation, there is no “set in stone” ways to divvy assets, retirement, etc…
Someone can walk away with nothing, half, all, you name it. You just negotiate. I got a divorce without lawyers and didn’t split a thing since ex worked and had her own thing…but I feel if you argue this point with your (or your hypothetical friend), this is going to blow up in your (his) face and this is where legal fees will far strip any money at all.
Lastly, if there are kids, you should probably get a lawyer since there are a ton more complexities when kids are involved.
If it was me, I’d just look at it as a 100k “loss” / bad investment / marriage, whatever. Be happy it only “costs” you 100k and be wiser or just don’t marry again.
At the end of the day:
TL:DR: It depends, people can negotiate whatever they want, but be careful what can of worms you open.