Plank of Carneades
In ethics, the plank of Carneades is a thought experiment first proposed by Carneades of Cyrene; it explores the concept of self-defense in relation to murder.
In the thought experiment, there are two shipwrecked sailors, A and B. They both see a plank that can only support one of them and both of them swim towards it. Sailor A gets to the plank first. Sailor B, who is going to drown, pushes A off and away from the plank and, thus, proximately, causes A to drown. Sailor B gets on the plank and is later saved by a rescue team. The thought experiment poses the question of whether Sailor B can be tried for murder because if B had to kill A in order to live, then it would arguably be in self-defense.
The Case of the Speluncean Explorers by legal philosopher Lon Fuller is a similar exploration of morality and legality in extremis.