It's a lot easier to just look at the 'race' points:
So Federer has a 1740 lead. As both Paris and the world tour finals are compulsory, both will count completely in their totals. The world tour finals are worth a maximum of 1500, so Federer just has to outdo Djokovic in Paris to have the year-end number two wrapped up. Worst case scenario (for Federer) is losing first round in Paris while Djokovic takes the title. But this will still leave him with a 750 point lead meaning that Djokovic will have to at least make the finals of the world tour finals.
Basically, Federer has it all but wrapped up now after his Basel win.
Seriously, you are one of the only clear thinking people on MTF.