assign(max_seconds, 30). formulas(sos). all x (Wolf(x) -> animal(x)). all x (Fox(x) -> animal(x)). all x (Bird(x) -> animal(x)). all x (Caterpillar(x) -> animal(x)). all x (Snail(x) -> animal(x)). all x (Grain(x) -> plant(x)). exists x Wolf(x). exists x Fox(x). exists x Bird(x). exists x Caterpillar(x). exists x Snail(x). exists x Grain(x). % All animals either eat all plants or eat all smaller animals that eat some plants. all x (animal(x) -> (all y (plant(y)->eats(x,y))) | (all z ( animal(z) & Smaller(z,x) & (exists u (plant(u) & eats(z,u))) -> eats(x,z)))). all x all y (Caterpillar(x) & Bird(y) -> Smaller(x,y)). all x all y (Snail(x) & Bird(y) -> Smaller(x,y)). all x all y (Bird(x) & Fox(y) -> Smaller(x,y)). all x all y (Fox(x) & Wolf(y) -> Smaller(x,y)). all x all y (Bird(x) & Caterpillar(y) -> eats(x,y)). all x (Caterpillar(x) -> (exists y (plant(y) & eats(x,y)))). all x (Snail(x) -> (exists y (plant(y) & eats(x,y)))). all x all y (Wolf(x) & Fox(y) -> -eats(x,y)). all x all y (Wolf(x) & Grain(y) -> -eats(x,y)). all x all y (Bird(x) & Snail(y) -> -eats(x,y)). end_of_list. formulas(goals). % There is an animal that eats {an animal that eats all grains}. exists x exists y ( animal(x) & animal(y) & eats(x,y) & (all z (Grain(z) -> eats(y,z)))). end_of_list.