(Adapted from Barwise+Etchemendy:1993.) Given the following, can you prove that the unicorn is mythical? How about magical? Horned?
> If the unicorn is mythical, then it is immortal, but if it is not > mythical, then it is a mortal mammal. If the unicorn is either > immortal or a mammal, then it is horned. The unicorn is magical if it > is horned.

(Adapted from Barwise+Etchemendy:1993.) Given the following, can you prove that the unicorn is mythical? How about magical? Horned?
> If the unicorn is mythical, then it is immortal, but if it is not > mythical, then it is a mortal mammal. If the unicorn is either > immortal or a mammal, then it is horned. The unicorn is magical if it > is horned.

4th edition: chapter 7, Logical Agents

Tested in Python, Java, JavaScript, C#, Scala, Julia, Lisp





Submit an Answer

The button opens a form on GitHub, with this exercise filled in; you need a GitHub account. Your answer becomes a pull request, and once a maintainer merges it, it shows under Student Answers.