Consider the following premises. It is late if and only if Charles is happy. If David were a janitor, then it is late. If it is late, then David is a janitor. Can we infer the following from them? If David were a janitor, then Charles is happy.
 From the fact that if David were a janitor, then it is late, and that if it is late, then David is a janitor we can infer that David is a janitor if and only if it is late. From the fact that it is late if and only if Charles is happy we can infer that if it is late, then Charles is happy. From the fact that David is a janitor if and only if it is late we can infer that if David were a janitor, then it is late. Finally, from the fact that if David were a janitor, then it is late, and that if it is late, then Charles is happy we can infer that if David were a janitor, then Charles is happy. Therefore, the answer is yes.