The logic of indirect speech