Consider the following premises. If Elisabeth drinks water, then Joseph is a janitor. Barbara is listening to a song or Joseph is not a janitor. If Barbara listens to a song, then Elisabeth is drinking water. Can we infer the following from them? If we can, name the inference rule being used: Barbara is listening to a song if and only if Joseph is a janitor.
 From the fact that if Barbara listens to a song, then Elisabeth is drinking water, and that if Elisabeth drinks water, then Joseph is a janitor we can infer that if Barbara listens to a song, then Joseph is a janitor via transitivity. From the fact that Barbara is listening to a song or Joseph is not a janitor we can infer that if Joseph were a janitor, then Barbara is listening to a song via rewriting. Finally, from the fact that if Barbara listens to a song, then Joseph is a janitor, and that if Joseph were a janitor, then Barbara is listening to a song we can infer that Barbara is listening to a song if and only if Joseph is a janitor via biconditional introduction. Therefore, the answer is yes.