[Mathematical Logic (Miscellaneous) $]$

## Author: Raskina I.V.

In Forestoria, only elves and dwarves live. Dwarves lie when talking about their gold, but tell the truth in all other cases. Elves lie when talking about dwarves, but tell the truth in all other cases. One day, two Forestorians said:

A: All my gold I stole from the Dragon.

B: You are lying.

Determine whether each of them is an elf or a dwarf.

#
Suppose A is an elf. Then he told the truth, and B lied. But neither dwarves nor elves lie when speaking about elves. Therefore, A is a dwarf. Speaking about the gold, he lied. So B spoke the truth about A. This could only be done by a dwarf.

## Answer

Both are dwarves.