Logic is a system of reasoning that draws necessary conclusions from premises.
In the novel Don Quixote, Sancho Panza is presented with the following dilemma. "Senor, a large river separated two districts of one and the same lordship- will your worship please to pay attention, for the case is an important and a rather knotty one?
Well then, on this river there was a bridge, and at one end of it a gallows, and a sort of tribunal, where four judges commonly sat to administer the law which the lord of river, bridge and the lordship had enacted, and which was to this effect, 'If anyone crosses by this bridge from one side to the other he shall declare on oath where he is going to and with what object; and if he swears truly, he shall be allowed to pass, but if falsely, he shall be put to death for it by hanging on the gallows erected there, without any remission.' Though the law and its severe penalty were known, many persons crossed, but in their declarations it's easy to see at once they were telling the truth, and the judges let them pass free.
It happened, however, that one man, when they came to take his declaration, swore and said that by the oath he took he was going to die upon that gallows that stood there, and nothing else. The judges held a consultation over the oath, and they said, 'If we let this man pass free he has sworn falsely, and by the law he ought to die. But if we hang him, as he swore he was going to die on that gallows, and therefore swore the truth, by the same law he ought to go free.'
It is asked of your worship, senor governor, what are the judges to do with this man?..."