Problem Set: assignment1

The Missing Reflection

A logic puzzle by Brandon Bennett

Your problem is to use first-order logic to represent the following example of reasoning, and use the Prover9 theorem prover to prove that the reasoning is valid.

Use the following template file to create your Prover9 encoding of the problem: vampire.p9

Marks: There are two marks for each sentence, making a total of 42 marks.

Outline: One dark and stormy night the residents of Abbey House, Whitby were sitting down for an elaborate but unappetising dinner in the large dining hall. Sir Hugh Cholmeley, Lady Anne, Master Bram and Dr Burely all looked pale and unwell. None had slept well for weeks. On the wall next to the table was a large mirror, which reflected the scene of the meal and the diners. Can you use knowledge representation in first-order logic and automated reasoning to find who or what is causing sleepless nights at Abbey House?

Problem Statement

A1 The only people who live in Abbey House are: Sir Hugh, Lady Anne, Dr Burley and Master Bram.
A2 Sir Hugh and Lady Anne are aristocrats.
A3 Aristocrats only wear blue or purple and never study logic.
A4 Sir Hugh loves nobody except himself.
A5 Lady Anne loves everyone who is cleverer than Sir Hugh
A6 At least one of the inhabitants of Abbey House is a logician.
A7 Logicians are always cleverer than those who do not study logic.
A8 Nobody in Abbey House is cleverer than Dr Burley.
A9 Logicians who are loved by aristocrats are always shy.
A10 Nobody loves a shy vampire.
A11 Master Bram never wears any colour other than black.
A12 Black is not the same as blue or puple.
A13 Dr Burley never wears the same colour as Master Bram.
A14 Lady Anne never wears the same color as anyone else in Abbey House.
A15 Aristocrats are always vain unless they are in love with someone who is not an Aristocrat.
A16 Those who are vain always look at themselves in mirrors.
A17 Vampires cannot be seen in mirrors. And if something has no reflection it must be a vampire.
A18 Dr Burley saw someone dressed in black in the mirror. It must have been someone who lives in Abbey House
A19 When she looked in the mirror, Lady Anne saw people wearing only two different colours of clothing. *
A20 Nobody in Abbey House was naked. **
Goal In Abbey House lives one and only one vampire, whose name is X ! ***

Non-Logical Vocabulary

Constants: sir_Hugh, lady_Anne, dr_Burley, master_Bram, blue, purple, black

Predicates: LivesInAbbeyHouse, Aristocrat, Logician, Shy, Vain, Vampire

Relations: Loves, IsClevererThan, WasWearingColour, SawInMirror

Notes: