1. Nadal loses to Tsonga 2:0
The set win/loss for the three are:
Tsonga 5: 2
Tsonga is through. Nadal tops Federer for H2H.
Tsonga would be top on sets won %, and Fed 2nd. H2h only works in 3ways to split a tie when two are level (ie the same sets won%).
2. Nadal loses to Tsonga 2:1
Nadal would be out as having the lowest sets won%. Fed and Tsonga have the same sets won% so it goes to h2h, and Fed then tops the group.