


what color is(x)
  if is color(x, y) return y
what color is(x)
  if is made of(x, y) and is color(y, z)
    return z
what color is(x)
  return "don't know"
is color("snow", "white")
is made of("grass", "vegetation")
is color("vegetation", "green")
what color is("snow") → "white"
what color is("grass") → "green"
what color is ("mud") → "don't know"
atom [ \(\leftarrow\) atom ( \(\wedge\) atom)* ]
snowIsWhite
snow-is-white
snow_is_white
snowiswhite
a b c
snowiswhite
grassisvegetation
dogissmelly \(\leftarrow\) dogiswet
a \(\leftarrow\) b \(\wedge\) c \(\wedge\) d
a \(\leftarrow\) b \(\wedge\) c: “a when b and c”
dogissmelly \(\leftarrow\) dogiswet: “dog is smelly when dog is wet”

snowiswhite
skyisblue
grassisvegetation
vegetationisgreen
grassisgreen \(\leftarrow\)
grassisvegetation \(\wedge\) vegetationisgreen
a \(\leftarrow\) b t t t t t f f f t f t f 
a ∧ b t t t t f f f f t f f f 
| 
 | If the dog’s not wet, it may or may not smell. | 
\(I\): { snowiswhite : true skyisblue : false grassisvegetation : true vegetationisgreen : true } 
\(I\): { snowiswhite : true grassisvegetation : true vegetationisgreen : true } 
\(I\): { snowiswhite, grassisvegetation, vegetationisgreen } 
snowiswhite
grassisvegetation
grassisgreen \(\leftarrow\)
grassisvegetation \(\wedge\) vegetationisgreen
xincell00 xincell01 \(\vdots\) xincell21 xincell22 
oincell00 oincell01 \(\vdots\) oincell21 oincell22 
xwins \(\leftarrow\) 
xincell00 \(\wedge\) xincell01 \(\wedge\) xincell02xwins \(\leftarrow\) 
xincell00 \(\wedge\) xincell10 \(\wedge\) xincell20\(\vdots\) 

| This page last modified on 2011 September 15. |