/* These are the actual conditions given in the original problem: */ /* 1. The Englishman lives in the red house. */ samePerson(livesIn(redHouse), englishman) /* 2. The Spaniard has a dog. */ samePerson(hasPet(dog), spaniard) /* 3. Coffee is drunk in the green house. */ samePerson(livesIn(greenHouse), drinks(coffee)) /* 4. The Ukranian drinks tea. */ samePerson(drinks(tea), ukranian) /* 5. The green house is immediately to the right of the ivory house. */ immRight(houseNumber(greenHouse), houseNumber(ivoryHouse)) /* 6. The snail-owner smokes Old Gold. */ samePerson(hasPet(snails), smokes(oldGold)) /* 7. The inhabitant of the yellow house smokes Kools */ samePerson(smokes(kools), livesIn(yellowHouse)) /* 8. The Norwegian lives in the leftmost house. */ leftMost(locationOf(norwegian)) /* 9. The Chesterfield smoker lives next door to the fox owner. */ nextTo(locationOf(smokes(chesterfield)), locationOf(hasPet(fox))) /* 10. The Kools smoker lives next door to where the horse is kept. */ nextTo(locationOf(smokes(kools)), locationOf(hasPet(horse))) /* 11. The Lucky Strikes smoker drinks orange juice. */ samePerson(smokes(lucky), drinks(orangeJuice)) /* 12. The Japanese smokes Parliaments. */ samePerson(smokes(parliament),japanese) /* 13. The Norwegian lives next to the blue house. */ nextTo(houseNumber(blueHouse), houseNumber(inhabitedBy(norwegian))) /* 14. Milk is drunk in the middle house. */ A xj (samePerson(drinks(milk),locatedAt(xj)) <-> inMiddle(xj))