Translate the following inference to logic notation: If Robert plays tennis, then Thomas is excited. If Robert plays tennis, then Thomas is excited. If Thomas were excited, then Robert is playing tennis. Therefore Robert is playing tennis if and only if Thomas is excited.
p -> q. p -> q. q -> p. Therefore p <-> q.