A man is leaning on an object beside a building.
A man is leaning on a pole by the building.
A pole is an object but an object does not have to be a pole.
exists e1 x1 x2 x3.(beside(e1,x3) & n_building(x3) & on(e1,x2) & n_object(x2) & Actor(e1,x1) & v_lean(e1) & n_man(x1))
exists e1 x1 x2 x3.(n_building(x3) & by(e1,x3) & on(e1,x2) & n_pole(x2) & Actor(e1,x1) & v_lean(e1) & n_man(x1))