Worth noting that in both the case of Tywin and Robb, they aren’t “disinheriting” someone. Jaime is the eldest male Lannister, and it’s only his Kingsguard oath which makes him ineligible to inherit. Once he’s out of the Kingsguard, he’s the next claimant to Casterly Rock; Tyrion isn’t “disinherited” as much as he’s just pushed down the ladder.
Ditto Jon. Once Robb legitimates him, he becomes the oldest extant male heir (though it would be interesting to see what would happen if definitely trueborn Rickon or Bran showed up). Sansa isn’t being disinherited, but rather is just one further step removed from inheriting.
Agreed in Robb’s case, although I think the text could support either reading, since Robb was very insistent that the Lannisters not get a claim to Winterfell.
But disagree on Tywin. Jaime’s oath is very much binding, and Tywin hadn’t even made the offer to bootstrap Ser Barristan being dismissed to get his preferred heir back when he told Tyrion that he would never inherit King’s Landing.