The dog has a ball in its mouth.
A dog is holding a ball with it's mouth.
The dog has a ball in its mouth, and the only way a dog can hold an object is with its mouth. This means that the dog is holding the ball with its mouth.
exists e1 x1 x2 x3.(n_mouth(x3) & of(x3,x1) & n_thing(x1) & n_dog(x1) & Theme(e1,x2) & Actor(e1,x1) & v_have(e1) & in(x2,x3) & n_ball(x2))
exists e1 p1 x1 x2 x3.(Theme(e1,x2) & Actor(e1,x1) & v_hold(e1) & exists x4.((x3 = x4) & n_mouth(x4)) & (x2 = x3) & with(x2,x1) & n_thing(x1) & n_ball(x2) & n_dog(x1))