... is the identity element eH of H. Since f is a homomorphism, this is true iff f(b-1a) is eH. So to know whether a ~ b, it's enough to keep track of the preimage of th ...