The small boy in the red hat has a cracker.
The small boy is not wearing anything on his head.
A boy has a red hat in one scenario, and not wearing a hat (or anything) on his head in the other.
exists e1 s1 s2 x1 x2 x3.(n_hat(x2) & a_red(s2) & Theme(s2,x2) & n_boy(x1) & a_small(s1) & Theme(s1,x1) & Theme(e1,x3) & Actor(e1,x1) & v_have(e1) & n_cracker(x3) & in(x1,x2))
exists s1 x1 x3.(n_head(x3) & of(x3,x1) & n_male(x1) & n_boy(x1) & a_small(s1) & Theme(s1,x1) & -all x2.(n_thing(x2) -> exists e1.(on(e1,x3) & Theme(e1,x2) & Actor(e1,x1) & v_wear(e1))))