Logic reasoning in AS 3.0?

Hello dear friends,

my problem is related to logical reasoning.
Q:

Color of all horses are red.
Amiga is a horse
What is the color of Amiga?

>> the answer must be red.

But how to convert it into actionscript code?
Please give me some ideas.
Thank You.